-
Notifications
You must be signed in to change notification settings - Fork 133
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
Support for extracting certificates from digitally signed binaries #42
Conversation
pesec: Handle unsupported/unknown values, and adjust printed data.
small fix to is_pe so it will work after seeking elsewhere in the file
Declare variables right after usage when possible.
…arting from one (1)".
Add peres for work with resources
Fix some formatting.
Conflicts: lib/libpe/pe.h
Now this PR should merge cleanly against your current master branch.
It also seems to enter an infinite loop when trying to extract resources from a specific PE. |
Support for extracting certificates from digitally signed binaries
Nice work jweyrich! Thank you for testing and understand code of peres. |
@marcelomf, I uploaded 2 PE samples to Dropbox and shared the folder with you. You probably got an email about it. If you prefer, I can upload it elsewhere. Just let me know.
|
A compact overview of the most important commits on this branch, in reverse order:
8a2a85f pesec: Show all signers and whether certificate signature is valid.
6005050 pesec: Support new CLI parameters --certoutform and --certout.
1d00753 Fix sign conversion warning.
8fa06d3 Parse certificates from digitally signed PE's.
e9accc4 README now contains instructions on how to build in Mac OS X.
8f185fe libpe: Fix missing cert types.
pesec: Handle unsupported/unknown values, and adjust printed data.
f8ace9e libpe: Fix indentation and line-breaks.
fcfe946 libpe: Add very basic support for the security directory.
bbe12bd libpe: Introduce new function pe_get_data_directory().
46a8153 Fix possible memory leaks in pe_get_directories().
Please, review those commits prefixed with "libpe" as they replace some #defines with enums, introduce new APIs, etc.
I felt it would be good to split the headers in order to avoid code duplication (mainly lib/libpe/types.h). Also though it would be positive to have separate headers for specific directory types (example, lib/libpe/dir_entry_security.h), so we don't clutter libpe.h with specifics.
I've tested only on Mac OS X, so I'd love some feedback from various users and systems.
Hope everyone enjoys it.