emin_int11

dm

Jan 15th, 2016
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. strncpy@plt = 0x8048390
  2. PLT strcpy prosedurunun relative offsetini vererek aktual kodun icrasi ucun GOT table offsetine *jmp* edir.
  3. Dump of assembler code for function strncpy@plt:
  4. 0x08048390 <+0>: jmp DWORD PTR ds:0x804a01c
  5. GOT offseti 0x804a01c bu adresdedir getdim. aktual kodu icra etmeye baslayiram.
  6.  
  7.  
  8. 0xf7e92ec3: mov edi,DWORD PTR [esp+0x10]
  9. 0xf7e92ec7: mov esi,DWORD PTR [esp+0x14]
  10. 0xf7e92ecb: mov ebx,DWORD PTR [esp+0x18]
  11.  
  12. 0xf7e92ed1: je 0xf7e93ee0
  13. 0xf7e92ed7: mov ecx,esi
  14. => 0xf7e92ed9: mov eax,edi
  15. gdb-peda$ x/s $ecx
  16. 0xffffcf01: "Qumar"
  17. 0xf7e92edb: and ecx,0xf
  18. 0xf7e92ede: je 0xf7e9312e
  19. 0xf7e92ee4: and esi,0xfffffff0
  20. gdb-peda$ x/x $esi
  21. 0xffffcf00: 0x00
  22.  
  23.  
  24. => 0xf7e93352: jne 0xf7e932d0
  25. | 0xf7e93358: sub ebx,ecx
  26. | 0xf7e9335a: add esi,ecx
  27. | 0xf7e9335c: call 0xf7f2d94f
  28. | 0xf7e93361: add ecx,0xcfe9f
  29. |-> 0xf7e932d0: sub ebx,ecx
  30. 0xf7e932d2: add esi,ecx
  31. 0xf7e932d4: bsf edx,edx
  32. 0xf7e932d7: cmp edx,ebx
  33.  
  34. EBX: 0x3
  35. ECX: 0x1
  36. EDX: 0xfe0
  37. EBX-ECX = 2
  38. ESI+ECX=
  39. ||
  40. ^^
  41. $esi contenti Qumar memory adresine mapped edildiyine gore and (bitwise) emeliyyati ile `SHARED OBJECT` artiq `merging` emeliyyatina baslayir.
  42. gdb-peda$ x/s $esi+1
  43. 0xffffcf01: "Qumar"
  44.  
  45. => 0xf7e932d2: add esi,ecx
  46. x/x $ecx == 1
  47.  
  48. bu halda $ecx == "Qumar"
  49.  
  50. 0xf7e938a9: lea esi,[esi+eiz*1+0x0]
  51. 0xf7e938b0: mov dx,WORD PTR [esi] most significant byte 0x5171 (QU) move edilir dx registerine (16 bit registere)
  52. 0xf7e938b3: mov WORD PTR [edi],dx == "Qu" verilen bayt
  53. ^^^^^^^^^^^ Register indirect addressing modunda WORD specific size verilerek (4 byte) memory uzerinde "tabxana" slice-nin pointerine move edilir bu pointer refer edir bu addresi '0xffffcef7' hemcinin EAX registeride bu adresi refer etdiyine gore.
  54. neticede
  55. EAX: 0xffffcef7 ("Qutabxana")
  56. EBX: 0x2
  57. ECX: 0xf7e938b0 (mov dx,WORD PTR [esi])
  58. EDX: 0x7551 ('Qu')
  59. ESI: 0xffffcf01 ("Qumar")
  60. EDI: 0xffffcef7 ("Qutabxana")
  61. ;)
  62.  
  63. point to ===> 0xffffcef7 $EDI: 0xffffcef7
  64.  
  65. EDX: 0x7551 ('Qu')
Add Comment
Please, Sign In to add comment