Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. global _main
  2.  
  3. section .text
  4.  
  5. _main:
  6. xor rsi, rsi
  7. push rsi
  8. mov rdi, 0x68732f6e69622f2f ; //bin/sh backward
  9. push rdi ; we put the string on the stack
  10. mov rdi, rsp ; and the address in rdi
  11. xor rax, rax
  12. mov al, 0x2 ; this puts the 2 in 0x2000003b
  13. sal rax, 24 ; this moves the 2 into position
  14. mov al, 0x3b ; and thisn puts the syscall number
  15. syscall
  16.  
  17. xor rax, rax
  18. mov al, 0x2
  19. sal rax, 24
  20. mov al, 0x01
  21. xor rdi, rdi
  22. syscall
  23.  
  24. section .data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement