Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user@protostar:~$ ./stack5 < s5
- Illegal instruction
- user@protostar:~$ clear
- user@protostar:~$ gdb -q stack5
- Reading symbols from /home/user/stack5...done.
- (gdb) disassemble main
- Dump of assembler code for function main:
- 0x080483c4 <main+0>: push ebp
- 0x080483c5 <main+1>: mov ebp,esp
- 0x080483c7 <main+3>: and esp,0xfffffff0
- 0x080483ca <main+6>: sub esp,0x50
- 0x080483cd <main+9>: lea eax,[esp+0x10]
- 0x080483d1 <main+13>: mov DWORD PTR [esp],eax
- 0x080483d4 <main+16>: call 0x80482e8 <gets@plt>
- 0x080483d9 <main+21>: leave
- 0x080483da <main+22>: ret
- End of assembler dump.
- (gdb) break *0x080483da
- Breakpoint 1 at 0x80483da: file stack5/stack5.c, line 11.
- (gdb) define hook-stop
- Type commands for definition of "hook-stop".
- End with a line saying just "end".
- >x/1i $eip
- >x/8wx $esp
- >end
- (gdb) r < s5
- Starting program: /home/user/stack5 < s5
- 0x80483da <main+22>: ret
- 0xbffff7ec: 0xbffff80c 0x90909090 0x90909090 0x90909090
- 0xbffff7fc: 0x90909090 0x90909090 0x90909090 0x90909090
- Breakpoint 1, 0x080483da in main (argc=Cannot access memory at address 0x5353535b
- ) at stack5/stack5.c:11
- 11 stack5/stack5.c: No such file or directory.
- in stack5/stack5.c
- (gdb) si
- Cannot access memory at address 0x53535357
- (gdb)
- 0xbffff80d: nop
- 0xbffff7f0: 0x90909090 0x90909090 0x90909090 0x90909090
- 0xbffff800: 0x90909090 0x90909090 0x90909090 0x90909090
- 0xbffff80d in ?? ()
- (gdb)
- 0xbffff80e: nop
- 0xbffff7f0: 0x90909090 0x90909090 0x90909090 0x90909090
- 0xbffff800: 0x90909090 0x90909090 0x90909090 0x90909090
- 0xbffff80e in ?? ()
- (gdb)
- 0xbffff80f: nop
- 0xbffff7f0: 0x90909090 0x90909090 0x90909090 0x90909090
- 0xbffff800: 0x90909090 0x90909090 0x90909090 0x90909090
- 0xbffff80f in ?? ()
- (gdb) c
- Continuing.
- Program received signal SIGTRAP, Trace/breakpoint trap.
- 0xbffff871: int3
- 0xbffff7f0: 0x90909090 0x90909090 0x90909090 0x90909090
- 0xbffff800: 0x90909090 0x90909090 0x90909090 0x90909090
- 0xbffff871 in ?? ()
- (gdb) q
- A debugging session is active.
- Inferior 1 [process 2077] will be killed.
- Quit anyway? (y or n) y
- user@protostar:~$ ./stack5 < s5
- Illegal instruction
- user@protostar:~$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement