(gdb) r $(perl -e 'print "A"x[b]42[/b] , "B"x4')
The program being debugged has been started already.
Start it from the beginning? (y o n) y
Starting program: /home/cebanc/vuln $(perl -e 'print "A"x42 , "B"x4')
Program received signal SIGSEGV, Segmentation fault.
0x08004242 in ?? ()
(gdb) i r
eax 0xbffff280 -1073745280
ecx 0x0 0
edx 0xbffff54f -1073744561
ebx 0x28bff4 2670580
esp 0xbffff2b0 0xbffff2b0
[b]ebp 0x42424141 0x42424141[/b]
esi 0x0 0
edi 0x0 0
[b]eip 0x8004242 0x8004242[/b]
-------------------------------------------------------------------------
(gdb) r $(perl -e 'print "A"x[b]44 [/b], "B"x4')
The program being debugged has been started already.
Start it from the beginning? (y o n) y
Starting program: /home/cebanc/vuln $(perl -e 'print "A"x44 , "B"x4')
Program received signal SIGSEGV, Segmentation fault.
0x080483dd in overflow ()
(gdb) i r
eax 0xbffff280 -1073745280
ecx 0x0 0
edx 0xbffff54f -1073744561
ebx 0x28bff4 2670580
esp 0xbffff2ac 0xbffff2ac
[b]ebp 0x41414141 0x41414141[/b]
esi 0x0 0
edi 0x0 0
[b]eip 0x80483dd 0x80483dd <overflow+25>[/b]
(gdb)
--------------------------------------------------------------------
(gdb) r $(perl -e 'print "A"x[b]43[/b] , "B"x4')
The program being debugged has been started already.
Start it from the beginning? (y o n) y
Starting program: /home/cebanc/vuln $(perl -e 'print "A"x43 , "B"x4')
Program received signal SIGSEGV, Segmentation fault.
0x00424242 in ?? ()
(gdb) i r
eax 0xbffff280 -1073745280
ecx 0x0 0
edx 0xbffff54f -1073744561
ebx 0x28bff4 2670580
esp 0xbffff2b0 0xbffff2b0
[b]ebp 0x42414141 0x42414141[/b]
esi 0x0 0
edi 0x0 0
[b]eip 0x424242 0x424242[/b]
(gdb)
mi pregunta es, que es lo q esta pasando? por que eip derrepente tiene una direccion menor de lo normal y por que me sobrescribe alos 46 en vez d en los 40 que os sobrescribe a vosotros, alguien me puede hacer un dibujo de como estaria el stack al principio de ejecucion y despues de ser sobrescrito todo x favor, en la teoria lo entiendo o me da la sensacion de que lo e entendido pero llego a la practica y zass nose..