-
-
Notifications
You must be signed in to change notification settings - Fork 746
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
Add config to override libc version. #1027
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is good, but I wonder if this could be done better with some command, rather than a config. To me a config is user configuration that basically configures his experience and shouldn't really be used for a specific target. I can see people getting weird behaviour if they accidentally set it, gef save
, and then can't work with heap stuff in normal binaries anymore.
yea, i thought about that case too, hence i added test to make sure that this config could be cleared by setting ''. is there any recommended way for doing this? so far it looks like config seems to be the way... or maybe we can make some config not persistent? |
The command could set a variable, maybe member of a class or instance, which is readable from exactly where you check the config. That way it would never pessist. |
would you like it to be part of the config or should we introduce a new command? |
third option would be that all heap commands could take a |
sounds perfect! let's see which way we like to go. |
Actually this (enforcing the libc version via config) could be useful especially for ctf exploits, it'd allow to programmatically switch the libc. |
Description
This change add a config for force the libc version to a specific version.
This is helpful when debugging certain core dumps that doesn't have good memory map information, and could not find libc properly.
This shows up in our recent debugging, where we know the program is using libc 2.31, but it could not be detected properly due to memory map information missing.
The screenshot below shows the libc version missing problem, which results failures when dumping the heap:
libc version missing:
having trouble dump heap arenas (see top == 0, while arena pointer is right):
This change allows us to force the libc version into a specific version, which solves this problem.
Here is the screenshots that demos the fix: