Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- section .data
- shell db '/bin/sh' ; Basicamente declaramos uma variável de string chamando uma shell /bin/sh
- section .text
- global _start ; É uma sintaxe global tipo o int main() da linguagem C
- _start:
- mov eax, 11 ; Armazenamos o numero syscall no eax
- mov ebx, shell ; O endereço da variavel /bin/sh é armazenado em ebx
- mov ecx, 0 ; O ECX pode ser Null mesmo
- int 0x80 ; Essa é uma instrução de interrupção, aonde emitimos o syscall, é uma maneira herdada de chamar uma chamada do sistema e deve ser evitada.
- mov eax, 1 ; O próximo Syscall é o número 1 que é o número de saida exit()
- mov ebx, 0 ; Código de saida vai retornar 0
- int 0x80 ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement