Advertisement
Guest User

protostar

a guest
Apr 1st, 2021
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.36 KB | None | 0 0
  1. user@protostar:~$ ./stack5 < s5
  2. Illegal instruction
  3.  
  4. user@protostar:~$ clear
  5.  
  6. user@protostar:~$ gdb -q stack5
  7. Reading symbols from /home/user/stack5...done.
  8.  
  9. (gdb) disassemble main
  10. Dump of assembler code for function main:
  11. 0x080483c4 <main+0>:    push   ebp
  12. 0x080483c5 <main+1>:    mov    ebp,esp
  13. 0x080483c7 <main+3>:    and    esp,0xfffffff0
  14. 0x080483ca <main+6>:    sub    esp,0x50
  15. 0x080483cd <main+9>:    lea    eax,[esp+0x10]
  16. 0x080483d1 <main+13>:   mov    DWORD PTR [esp],eax
  17. 0x080483d4 <main+16>:   call   0x80482e8 <gets@plt>
  18. 0x080483d9 <main+21>:   leave
  19. 0x080483da <main+22>:   ret
  20. End of assembler dump.
  21.  
  22. (gdb) break *0x080483da
  23. Breakpoint 1 at 0x80483da: file stack5/stack5.c, line 11.
  24.  
  25. (gdb) define hook-stop
  26. Type commands for definition of "hook-stop".
  27. End with a line saying just "end".
  28. >x/1i $eip
  29. >x/8wx $esp
  30. >end
  31.  
  32. (gdb) r < s5
  33. Starting program: /home/user/stack5 < s5
  34. 0x80483da <main+22>:    ret
  35. 0xbffff7ec:     0xbffff80c      0x90909090      0x90909090      0x90909090
  36. 0xbffff7fc:     0x90909090      0x90909090      0x90909090      0x90909090
  37.  
  38. Breakpoint 1, 0x080483da in main (argc=Cannot access memory at address 0x5353535b
  39. ) at stack5/stack5.c:11
  40. 11      stack5/stack5.c: No such file or directory.
  41.         in stack5/stack5.c
  42. (gdb) si
  43. Cannot access memory at address 0x53535357
  44.  
  45. (gdb)
  46. 0xbffff80d:     nop
  47. 0xbffff7f0:     0x90909090      0x90909090      0x90909090      0x90909090
  48. 0xbffff800:     0x90909090      0x90909090      0x90909090      0x90909090
  49. 0xbffff80d in ?? ()
  50.  
  51. (gdb)
  52. 0xbffff80e:     nop
  53. 0xbffff7f0:     0x90909090      0x90909090      0x90909090      0x90909090
  54. 0xbffff800:     0x90909090      0x90909090      0x90909090      0x90909090
  55. 0xbffff80e in ?? ()
  56.  
  57. (gdb)
  58. 0xbffff80f:     nop
  59. 0xbffff7f0:     0x90909090      0x90909090      0x90909090      0x90909090
  60. 0xbffff800:     0x90909090      0x90909090      0x90909090      0x90909090
  61. 0xbffff80f in ?? ()
  62. (gdb) c
  63. Continuing.
  64.  
  65. Program received signal SIGTRAP, Trace/breakpoint trap.
  66. 0xbffff871:     int3
  67. 0xbffff7f0:     0x90909090      0x90909090      0x90909090      0x90909090
  68. 0xbffff800:     0x90909090      0x90909090      0x90909090      0x90909090
  69. 0xbffff871 in ?? ()
  70. (gdb) q
  71. A debugging session is active.
  72.  
  73.         Inferior 1 [process 2077] will be killed.
  74.  
  75. Quit anyway? (y or n) y
  76. user@protostar:~$ ./stack5 < s5
  77. Illegal instruction
  78. user@protostar:~$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement