Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal for empowering PEView - add detection of BSD UNIX kernel modules (.ko) #363

Closed
VictorVG opened this issue Jan 16, 2019 · 5 comments

Comments

@VictorVG
Copy link

Latest Git revision PEView can success detect some ELF binary like FreeBSD .so modules (dynamic library), but can't detect dynamic loadable kernel modules (.ko).

I think that if there is time, it makes sense to add their detection. Such module for FreeBSD 11.0 AMD64 is available in the tarball of virtualbox-ose-additions-5.1.8.txz - /boot/modules/vboxguest.ko. The difference between this type of module and ordinary .so is that it runs in the address space of the kernel and can contain both dynamic libraries and hardware drivers or installable file systems. In its structure, these are ELF executable modules and, instead of the current message about an unrecognized module type, you can display a message like "Dynamically loadable UNIX kernel module," and analyze them like the same .so modules.

Examples for testing: virtualbox-ose-additions-5.1.8.txz.zip (the .txz extension is equivalent to .tar.xz and is now used for all XZ (LZMA) compressed tarballs on FreeBSD UNIX ports).

@dmex
Copy link
Collaborator

dmex commented Jan 16, 2019

can't detect dynamic loadable kernel modules

The ELF support in peviewer is for WSL on Windows 10 and WSL doesn't support kernel modules which is why those modules are unsupported:
https://docs.microsoft.com/en-us/windows/wsl/faq

I fixed the issue but don't expect peviewer to support ELF binaries for platforms other than Windows.

@dmex dmex closed this as completed Jan 16, 2019
@VictorVG
Copy link
Author

Got it. I just out of habit, I tested for something that is at hand. :)

@Biswa96
Copy link
Contributor

Biswa96 commented Jan 16, 2019

Where did you get those ELF header structures?

@dmex
Copy link
Collaborator

dmex commented Jan 16, 2019

@Biswa96

The definitions are split across multiple repositories for Linux and Binutils:
https://github.com/torvalds/linux
https://www.gnu.org/software/binutils

@dmex
Copy link
Collaborator

dmex commented Jan 16, 2019

@Biswa96

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants