Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global _main
- section .text
- _main:
- xor rsi, rsi
- push rsi
- mov rdi, 0x68732f6e69622f2f ; //bin/sh backward
- push rdi ; we put the string on the stack
- mov rdi, rsp ; and the address in rdi
- xor rax, rax
- mov al, 0x2 ; this puts the 2 in 0x2000003b
- sal rax, 24 ; this moves the 2 into position
- mov al, 0x3b ; and thisn puts the syscall number
- syscall
- xor rax, rax
- mov al, 0x2
- sal rax, 24
- mov al, 0x01
- xor rdi, rdi
- syscall
- section .data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement