Advertisement
Madmouse

printable shellcode example

Aug 8th, 2015
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     push 0x7171444e     ; store our code in little endian
  2.     push rsp            ; return pointer
  3.     pop rax
  4.     push rax
  5.     sub al, 48          ; needed to make xor printable code
  6.     push rax            ; copy rax into rcx
  7.     pop rcx
  8.     push 0x41414141     ; syscall code block key
  9.     pop rax
  10.     xor [rcx+48], eax   ; decode the sycall code block using an offset for more ass pulling
  11.     push 0x4e           ; encoded syscall number for exit
  12.     pop rax
  13.     xor al, 0x72        ; xor it with the key
  14. ret ; this is removed when turned into shellcode
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement