Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ gdb -q vulnerable
- Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
- (gdb) break foo
- Breakpoint 1 at 0x804837a: file vulnerable.c, line 6.
- (gdb) run `perl -e 'print "A"x72'`
- Starting program: /home/sam/vulnerable `perl -e 'print "A"x72'`
- Breakpoint 1, foo (arg=0xbffff912 'A' <repeats 72 times>) at vulnerable.c:6
- 6 strcpy(buffer, arg);
- (gdb) info frame
- Stack level 0, frame at 0xbffff710:
- eip = 0x804837a in foo (vulnerable.c:6); saved eip 0x80483af
- called by frame at 0xbffff720
- source language c.
- Arglist at 0xbffff708, args: arg=0xbffff912 'A' <repeats 72 times>
- Locals at 0xbffff708, Previous frame's sp is 0xbffff710
- Saved registers:
- ebp at 0xbffff708, eip at 0xbffff70c
- (gdb) s
- 7 }
- (gdb) info frame
- Stack level 0, frame at 0xbffff710:
- eip = 0x804838c in foo (vulnerable.c:7); saved eip 0x41414141
- called by frame at 0xbffff714
- source language c.
- Arglist at 0xbffff708, args: arg=0xbffff900 "home/sam/vulnerable"
- Locals at 0xbffff708, Previous frame's sp is 0xbffff710
- Saved registers:
- ebp at 0xbffff708, eip at 0xbffff70c
- (gdb) c
- Continuing.
- Program received signal SIGSEGV, Segmentation fault.
- 0x41414141 in ?? ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement