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

ELF.search gives false positives #1164

Closed
TethysSvensson opened this issue Jun 8, 2018 · 1 comment
Closed

ELF.search gives false positives #1164

TethysSvensson opened this issue Jun 8, 2018 · 1 comment

Comments

@TethysSvensson
Copy link
Contributor

ELF.search can sometimes give out false positives.

For instance:

$ ipython
In [1]: hex(max(elf.ELF('./foo').search('e')))


Out[1]: '0x60102f'
$ gdb ./foo
(gdb) x/1xb 0x60102f
0x60102f:	0x00
(gdb) start
Temporary breakpoint 1 at 0x4003b0
Starting program: /home/idolf/git/pcs-f2018/weeklies/week6-rop/rop-forensics/foo 

Temporary breakpoint 1, 0x00000000004003b0 in main ()
(gdb) x/1xb 0x60102f
0x60102f:	0x00

foo.zip

@TethysSvensson
Copy link
Contributor Author

The binary was generated with echo 'int main() {}' | gcc -x c - -no-pie -fno-PIE -o foo

TethysSvensson added a commit to TethysSvensson/pwntools that referenced this issue Jun 8, 2018
TethysSvensson pushed a commit that referenced this issue Jun 11, 2018
This reverts commit 8e704e7.
zachriggle pushed a commit that referenced this issue Jun 12, 2018
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

No branches or pull requests

1 participant