longld / peda

PEDA - Python Exploit Development Assistance for GDB
Other
5.84k stars 801 forks source link

SIGSEG Not Triggering #102

Open RaJiska opened 7 years ago

RaJiska commented 7 years ago

For some reasons PEDA doesn't have the program to SIGSEGV on buffer of 260, while it does on buffer of 261.

With GDB:

(gdb) r $(python -c 'print "A" * 260')
Starting program: /tmp/vuln $(python -c 'print "A" * 260')
Input: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'

Program received signal SIGSEGV, Segmentation fault.
0x41414141 in ?? ()
(gdb) info registers
eax            0x0  0
ecx            0xffffd400   -11264
edx            0xf7f9b870   -134629264
ebx            0x0  0
esp            0xffffd400   0xffffd400
ebp            0x0  0x0
esi            0xf7f9a000   -134635520
edi            0xf7f9a000   -134635520
eip            0x41414141   0x41414141
eflags         0x10282  [ SF IF RF ]
cs             0x23 35
ss             0x2b 43
ds             0x2b 43
es             0x2b 43
fs             0x0  0
gs             0x63 99

With GDB-Peda:

gdb-peda$ r $(python -c 'print "A" * 260')
Starting program: /tmp/vuln $(python -c 'print "A" * 260')
Input: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
[Inferior 1 (process 14450) exited normally]
Warning: not running or target is remote
longld commented 7 years ago

It's strange, you should re-test using cyclic pattern (>260) as argument (check command pattern_*).

41northstudios commented 5 years ago

This is exactly what is happening for me too, gdb-peda keeps terminating and giving the warning: not running message - see my issue https://github.com/longld/peda/issues/143