We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When tried to get the plt information from init elf with pwntools, it outputed the wrong address for some functions.
init
pwntools
In [1]: from pwn import ELF In [2]: init_elf = ELF("./init") In [3]: hex(init_elf.plt["unlink"]) Out[3]: '0x42138'
Take the unlink function as an example, the outputed plt address is 0x42138. However, it's 0x41B60 shown in IDA Pro.
unlink
0x42138
0x41B60
I tested it on the following environment:
The binary information are as follows, and added as an attachment below.
$ file ./init ./init: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, BuildID[sha1]=b3444afb3a4dc34e2798e7d89505c1061b57683a, for GNU/Linux 3.2.0, stripped
init.zip
The text was updated successfully, but these errors were encountered:
pwntools on my ubuntu machine cannot load plt in your file. Radare validates that unlink.plt is at 0x00041b60
unlink.plt is at 0x00041b60
> uv pip list| grep pwn pwntools 4.13.0 > python >>> from pwn import * >>> exe = ELF('./init', checksec=False) [!] Could not populate PLT: No module named 'pkg_resources' >>> hex(exe.sym.unlink) '0x41b60'
Sorry, something went wrong.
Thanks, exe.sym.unlink or exe.symbols["unlink"] works well, I may use this instead.
exe.sym.unlink
exe.symbols["unlink"]
No branches or pull requests
Description
When tried to get the plt information from
init
elf withpwntools
, it outputed the wrong address for some functions.Take the
unlink
function as an example, the outputed plt address is0x42138
. However, it's0x41B60
shown in IDA Pro.I tested it on the following environment:
The binary information are as follows, and added as an attachment below.
$ file ./init ./init: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, BuildID[sha1]=b3444afb3a4dc34e2798e7d89505c1061b57683a, for GNU/Linux 3.2.0, stripped
init.zip
The text was updated successfully, but these errors were encountered: