inaz2 / roputils

A Return-oriented Programming toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

what's wrong?

pandazheng opened this issue · comments

root@ubuntu:/roputils/examples# make
gcc -fno-stack-protector bof.c -o bof
root@ubuntu:
/roputils/examples# make getoffset
python getoffset.py ./bof
120
root@ubuntu:/roputils/examples# python use-offset-x86-64.py ./bof 120
Traceback (most recent call last):
File "use-offset-x86-64.py", line 9, in
got_start = rop.got('__libc_start_main')
File "/root/roputils/examples/roputils.py", line 231, in got
return self.offset(self._got[name])
KeyError: '__libc_start_main'
root@ubuntu:
/roputils/examples# uname -a
Linux ubuntu 4.4.0-42-generic #62-Ubuntu SMP Fri Oct 7 23:11:45 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
root@ubuntu:~/roputils/examples#

KeyError: '__libc_start_main'

commented

That's weird. Tell me the output of gcc --version and /lib/x86_64-linux-gnu/libc.so.6.

gcc --version:
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609

file /lib/x86_64-linux-gnu/libc.so.6
libc.so.6:symbolic link to libc-2.23.so

commented

Fixed. Thanks 👍

Thanks too