-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 libc databases with offsets using https://libc.rip/api/ #1867
Comments
I thought #1704 does that already, see https://docs.pwntools.com/en/latest/libcdb.html |
nope, I am talking of a different use case. Let's say I can leak actual addresses of some libc functions and now want to search by offsets and download the correct libs to build my rop chain. I will propose a PR. |
Any updates on this? |
Here's what I used to solve the same scenario if it's any use to anyone finding this issue.
If you were using e.g. a ROP that
|
Partially addressed by #1828 |
When you're able to leak addresses of the libc library, use `libcdb.search_by_symbol_offsets()` to find and download the matching libc library from https://libc.rip. If there are multiple matches, the user is prompted to select one interactively. The selection can be saved in the code for future executions of the script. Fixes Gallopsled#1867
* libcdb: Add option to search by function offsets When you're able to leak addresses of the libc library, use `libcdb.search_by_symbol_offsets()` to find and download the matching libc library from https://libc.rip. If there are multiple matches, the user is prompted to select one interactively. The selection can be saved in the code for future executions of the script. Fixes #1867 * libcdb: Handle multiple results when looking up by hash Sometimes the same library appears to be indexed multiple times (see 0b52d2e713d243f0f65d808fcd3fbe372bb3cd32). Handle that situation by selecting the first in the list, since they should all be identical given the same hash value. * Update CHANGELOG * Fix off-by-one when pre-selecting a libc * Do .json() only once --------- Co-authored-by: Arusekk <[email protected]>
) * libcdb: Add option to search by function offsets When you're able to leak addresses of the libc library, use `libcdb.search_by_symbol_offsets()` to find and download the matching libc library from https://libc.rip. If there are multiple matches, the user is prompted to select one interactively. The selection can be saved in the code for future executions of the script. Fixes Gallopsled#1867 * libcdb: Handle multiple results when looking up by hash Sometimes the same library appears to be indexed multiple times (see 0b52d2e713d243f0f65d808fcd3fbe372bb3cd32). Handle that situation by selecting the first in the list, since they should all be identical given the same hash value. * Update CHANGELOG * Fix off-by-one when pre-selecting a libc * Do .json() only once --------- Co-authored-by: Arusekk <[email protected]>
Thanks for contributing to Pwntools! Ideas from the community help make Pwntools an amazing tool for everybody.
If you've got an idea for a new feature, please provide information about:
What the feature does
takes a leaked offset and find the correct libc binary and downloads it, then returns and ELF object with that file.
Why the feature should exist
To (1) create an abstraction allowing using the same exploit locally with one version of libc and remote with another version of LIBC
What tests should be included
If you think you can write the feature yourself, please submit a Pull Request and we can review your changes!
IF nobody is working on that i will be glad to try go build it.
The text was updated successfully, but these errors were encountered: