Skip to content

Instantly share code, notes, and snippets.

@fgsahoward
Created June 11, 2018 15:38
Show Gist options
  • Save fgsahoward/f5dd28415c2415f41a10e2db9ffc2269 to your computer and use it in GitHub Desktop.
Save fgsahoward/f5dd28415c2415f41a10e2db9ffc2269 to your computer and use it in GitHub Desktop.
[howard@sterling shellcodes]$ gdb -q ../easy32
Reading symbols from ../easy32...done.
(gdb) disas main
Dump of assembler code for function main:
0x08048483 <+0>: lea 0x4(%esp),%ecx
0x08048487 <+4>: and $0xfffffff0,%esp
0x0804848a <+7>: pushl -0x4(%ecx)
0x0804848d <+10>: push %ebp
0x0804848e <+11>: mov %esp,%ebp
0x08048490 <+13>: push %ecx
0x08048491 <+14>: sub $0x4,%esp
0x08048494 <+17>: mov %ecx,%eax
0x08048496 <+19>: cmpl $0x2,(%eax)
0x08048499 <+22>: je 0x80484a5 <main+34>
0x0804849b <+24>: sub $0xc,%esp
0x0804849e <+27>: push $0x1
0x080484a0 <+29>: call 0x8048320 <exit@plt>
0x080484a5 <+34>: mov 0x4(%eax),%eax
0x080484a8 <+37>: add $0x4,%eax
0x080484ab <+40>: mov (%eax),%eax
0x080484ad <+42>: sub $0xc,%esp
0x080484b0 <+45>: push %eax
0x080484b1 <+46>: call 0x804844b <vulnerable>
0x080484b6 <+51>: add $0x10,%esp
0x080484b9 <+54>: mov $0x0,%eax
0x080484be <+59>: mov -0x4(%ebp),%ecx
0x080484c1 <+62>: leave
0x080484c2 <+63>: lea -0x4(%ecx),%esp
0x080484c5 <+66>: ret
End of assembler dump.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment