-
Notifications
You must be signed in to change notification settings - Fork 17
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
CYT 341 Add basic Mach-O file info extractor #184
Conversation
Sample output so far:
Haven't tested on those that have multiple binaries, but it's set up to output a list of binaries in the |
…nto CYT-341-mach-o-support
for more information, see https://pre-commit.ci
I've been using https://github.com/JonathanSalwan/binary-samples to test. Let me know if there are any more good mach-o files to run this on. |
…nto CYT-341-mach-o-support
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Can you also generate an SBOM from running it in the files from this HELICS archive? https://github.com/GMLC-TDC/HELICS/releases/download/v3.5.2/Helics-3.5.2-macOS-universal2.zip |
output.zip I haven't tested much with large files and entire projects. Is this roughly how long it should take? From the output, the bindings and exports are by far the largest sections. Should including that be a user configurable setting as well or keep it in? |
Looking at the output, I think the bindings and exports are definitely things that should be a user configurable setting that is off by default -- my take from looking at them is that the addresses alone aren't very useful without knowing what symbol they resolve to. For the Linux and Windows HELICS releases, Surfactant takes less than a second to run -- macOS universal binaries are basically two binaries in one so I'd expect it to take longer, but probably still less than 2 seconds. I did notice issues in the lief repository about performance regressions. As a test, I ran I think the quick option is to pin lief to version 0.13.2, and replace use of
|
for more information, see https://pre-commit.ci
Co-authored-by: Shayna Kapadia <shaynahkapadia@gmail.com>
for more information, see https://pre-commit.ci
…nto CYT-341-mach-o-support
for more information, see https://pre-commit.ci
…ch-O support, and add links to the settings documentation page.
…odify config options.
for more information, see https://pre-commit.ci
Summary
If merged this pull request will add an info extractor for Mach-O files
Proposed changes
For now, all "MACHO" file types are covered, but I haven't looked into splitting these into cases (line 17).
Out of the ones I've looked at, the LIEF library looks more promising than macholib, macholibre, machofile, and kaitaistruct because of the ability to easily iterate through the various binaries in the FAT file.