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

Improved DynELF address resolutions and symbol lookups #2335

Merged
merged 8 commits into from Feb 8, 2024

Conversation

Bl4ck-C4t
Copy link
Contributor

@Bl4ck-C4t Bl4ck-C4t commented Jan 10, 2024

Most changes are centered around not using the leaker function when we can directly read from the ELF object instead (where possible). This especially improves resolving section addresses, even when having an inconsistent leaker function.

Added the Elf64_Rel and Elf32_Rel datatypes (the entries of DT_JMPREL)

Added another way to lookup symbols by using DT_JMPREL when the default way through GNU_HASH fails (as it often does with FULL RELRO binaries).

Also the older _find_linkmap_assisted(self, path) was removed as it is no longer needed. _find_dt(self, tag) will use the elf object to resolve tags, if it can, automatically.

This should overall make DynELF more stable, faster and more informative.

Bl4ckC4t added 4 commits January 9, 2024 01:00
Improved _rel_lookup and added Elf64_Rel datatype

Added support for _rel_lookup in x86 binaries
@peace-maker
Copy link
Member

Nice, I'm not too familiar with this code, so proper review will take some time. It's a shame we don't have tests for this yet at all :/

@Bl4ck-C4t
Copy link
Contributor Author

Yea I could try adding some, but I only tested it on different 64 bit Elfs for now

@Bl4ck-C4t
Copy link
Contributor Author

Is there anything else needed for this before it is merged?

@peace-maker peace-maker merged commit a2b6771 into Gallopsled:dev Feb 8, 2024
11 of 12 checks passed
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

Successfully merging this pull request may close these issues.

None yet

3 participants