[PLUG] stack smash issue

abhi abhi.elementx at gmail.com
Fri Jul 31 17:07:17 IST 2009


Oh and heres the asm code:
gdb code:
(gdb) disas main
Dump of assembler code for function main:
0x0804844e <main+0>:    lea    0x4(%esp),%ecx
0x08048452 <main+4>:    and    $0xfffffff0,%esp
0x08048455 <main+7>:    pushl  -0x4(%ecx)
0x08048458 <main+10>:    push   %ebp
0x08048459 <main+11>:    mov    %esp,%ebp
0x0804845b <main+13>:    push   %ecx
0x0804845c <main+14>:    sub    $0x24,%esp
0x0804845f <main+17>:    movl   $0x0,-0x8(%ebp)
0x08048466 <main+24>:    movl   $0x3,0x8(%esp)
0x0804846e <main+32>:    movl   $0x2,0x4(%esp)
0x08048476 <main+40>:    movl   $0x1,(%esp)
0x0804847d <main+47>:    call   0x8048414 <function>
0x08048482 <main+52>:    movl   $0x1,-0x8(%ebp)
0x08048489 <main+59>:    mov    -0x8(%ebp),%eax
0x0804848c <main+62>:    mov    %eax,0x4(%esp)
0x08048490 <main+66>:    movl   $0x8048570,(%esp)
0x08048497 <main+73>:    call   0x8048340 <printf at plt>
0x0804849c <main+78>:    mov    $0x0,%eax
0x080484a1 <main+83>:    add    $0x24,%esp
0x080484a4 <main+86>:    pop    %ecx
0x080484a5 <main+87>:    pop    %ebp
0x080484a6 <main+88>:    lea    -0x4(%ecx),%esp
0x080484a9 <main+91>:    ret
End of assembler dump.

-- 
“In fact, by only taking a few observations, and selecting our numbers, we
can by the effect of accidental causes defend all possible theories. By the
aid of such numbers, whose truth in other respects cannot be contested, we
set our consciences perfectly at rest, and demonstrate nearly anything we
may wish. This it is which always inspires so great a distrust in respect to
special statistics, and which has done the greatest injury to science with
persons who only judge of things superficially.”
- M. A. Quetelet



More information about the Plug-mail mailing list