ROP Finding the vulnerable function
At this point you have been able to generate a crash on a linux binary. We now need to find the vulnerable function before progressing
use
ltrace
to see if there is a function that is causing the crash
we can see that
strcpy
is the issue here causing the crashuse
objdump
to see where in the code segmentstrcpy()
is called.Look at the GOT of the program and grep for
strcpy()
Then use the
objdump
tool to specifically query the.plt
segment to see where the address in the GOT is referenced.After attaining the address use
objdump
tool once more and change the segment to.text
and grep on the address shown in the PLT
to validate your finding see if your buffer analysis was correct (72)
Find static addresses
We need to find static memory locations as ASLR will be enabled on modern systems.
There may be static regions that do not utilize ASLR
There could be static mappings due to any third party programs that get mapped into our program
use
ltrace
to find the static mappings
look for any shared object that is mmap into the binary
should see an open() call followed by a mmap() with a memory address passed into mmap()
Last updated