Advertisement
Guest User

Untitled

a guest
May 15th, 2019
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [0x0804a040]> s main
  2. [0x0804846b]> pdf
  3. / (fcn) main 78
  4. |   int main (int argc, char **argv, char **envp);
  5. |           ; var int32_t var_4h @ ebp-0x4
  6. |           ; arg int32_t arg_4h @ esp+0x4
  7. |           ; DATA XREF from entry0 (0x8048387)
  8. |           0x0804846b      8d4c2404       lea ecx, [arg_4h]           ; 4
  9. |           0x0804846f      83e4f0         and esp, 0xfffffff0
  10. |           0x08048472      ff71fc         push dword [ecx - 4]
  11. |           0x08048475      55             push ebp
  12. |           0x08048476      89e5           mov ebp, esp
  13. |           0x08048478      51             push ecx
  14. |           0x08048479      83ec04         sub esp, 4
  15. |           0x0804847c      83ec0c         sub esp, 0xc
  16. |           0x0804847f      6840a00408     push obj.shellcode          ; 0x804a040 ; const char *s
  17. |           0x08048484      e8a7feffff     call sym.imp.strlen         ; size_t strlen(const char *s)
  18. |           0x08048489      83c410         add esp, 0x10
  19. |           0x0804848c      89c2           mov edx, eax
  20. |           0x0804848e      a180a00408     mov eax, dword [obj.stdout] ; obj.__TMC_END ; [0x804a080:4]=0
  21. |           0x08048493      83ec04         sub esp, 4
  22. |           0x08048496      52             push edx
  23. |           0x08048497      6840850408     push str.Length:__d         ; 0x8048540 ; "Length: %d\n" ; const char *format
  24. |           0x0804849c      50             push eax                    ; FILE *stream
  25. |           0x0804849d      e8aefeffff     call sym.imp.fprintf        ; int fprintf(FILE *stream, const char *format,   ...)
  26. |           0x080484a2      83c410         add esp, 0x10
  27. |           0x080484a5      b840a00408     mov eax, obj.shellcode      ; 0x804a040
  28. |           0x080484aa      ffd0           call eax
  29. |           0x080484ac      b800000000     mov eax, 0
  30. |           0x080484b1      8b4dfc         mov ecx, dword [var_4h]
  31. |           0x080484b4      c9             leave
  32. |           0x080484b5      8d61fc         lea esp, [ecx - 4]
  33. \           0x080484b8      c3             ret
  34. [0x0804846b]> s obj.shellcode
  35. [0x0804a040]> pd 16
  36.             ;-- shellcode:
  37.             ; DATA XREFS from main (0x804847f, 0x80484a5)
  38.         ,=< 0x0804a040      eb11           jmp 0x804a053
  39.         |   ;-- "^1ɱ'":
  40.         |   0x0804a042     .string "^1\xc9\xb1'" ; len=6
  41.         |   0x0804a048      6c             insb byte es:[edi], dx
  42.         |   0x0804a049      0e             push cs
  43.         |   0x0804a04a      ff3580e90175   push dword [0x7501e980]
  44.         |   0x0804a050      f6eb           imul bl
  45.         |   0x0804a052      05e8eaffff     add eax, 0xffffeae8
  46.             0x0804a057      ff20           jmp dword [eax]
  47.             0x0804a059      4a             dec edx
  48.             0x0804a05a      66f5           cmc
  49.             0x0804a05c      e544           in eax, 0x44                ; 'D'
  50.             0x0804a05e      90             nop
  51.             0x0804a05f      66             invalid
  52.             0x0804a060      fe             invalid
  53.             0x0804a061      9b             wait
  54.             0x0804a062      ee             out dx, al
  55. [0x0804a040]> s 0x804a053
  56. [0x0804a053]> pd 1
  57.             0x0804a053      e8eaffffff     call str.1
  58. [0x0804a053]> s str.1
  59. [0x0804a042]> pd 1
  60.             ;-- "^1ɱ'":
  61.             0x0804a042     .string "^1\xc9\xb1'" ; len=6
  62. [0x0804a042]>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement