Skip to content

Instantly share code, notes, and snippets.

@spaghetti-
Created September 16, 2016 07:21
Show Gist options
  • Save spaghetti-/ed27a13d1dddde91b8a4dabadfd98416 to your computer and use it in GitHub Desktop.
Save spaghetti-/ed27a13d1dddde91b8a4dabadfd98416 to your computer and use it in GitHub Desktop.
0x08048610 <+291>: mov 0x804a044,%eax
0x08048615 <+296>: mov 0x804a050,%ecx
0x0804861b <+302>: mov 0x804a054,%edx
0x08048621 <+308>: add %ecx,%edx
0x08048623 <+310>: cmp %edx,%eax
0x08048625 <+312>: jb 0x804858d <bof+160>
=> 0x0804862b <+318>: mov -0xc(%ebp),%eax
0x0804862e <+321>: mov %eax,0x8(%esp)
0x08048632 <+325>: mov -0x10(%ebp),%eax
0x08048635 <+328>: mov %eax,0x4(%esp)
0x08048639 <+332>: movl $0x80487e2,(%esp)
0x08048640 <+339>: call 0x8048380 <printf@plt>
0x08048645 <+344>: leave
0x08048646 <+345>: ret
End of assembler dump.
(gdb) ir
Undefined command: "ir". Try "help".
(gdb) i r
eax 0x80 128
ecx 0x40 64
edx 0x80 128
ebx 0xb7fc0000 -1208221696
esp 0xbffff600 0xbffff600
ebp 0xbffff668 0xbffff668
esi 0x0 0
edi 0x0 0
eip 0x804862b 0x804862b <bof+318>
eflags 0x246 [ PF ZF IF ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
(gdb) info frame
Stack level 0, frame at 0xbffff670:
eip = 0x804862b in bof (buffer-overflow.c:43); saved eip = 0x42004200
called by frame at 0xbffff674
source language c.
Arglist at 0xbffff668, args: fd1=0x42004200, fd2=0x42004200
Locals at 0xbffff668, Previous frame's sp is 0xbffff670
Saved registers:
ebp at 0xbffff668, eip at 0xbffff66c
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment