Advertisement
Guest User

Devexploit1

a guest
Aug 6th, 2020
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. section .data
  2.  
  3. shell db '/bin/sh' ; Basicamente declaramos uma variável de string chamando uma shell /bin/sh
  4.  
  5. section .text
  6. global _start ; É uma sintaxe global tipo o int main() da linguagem C
  7.  
  8. _start:
  9. mov eax, 11 ; Armazenamos o numero syscall no eax
  10.  
  11. mov ebx, shell ; O endereço da variavel /bin/sh é armazenado em ebx
  12.  
  13. mov ecx, 0 ; O ECX pode ser Null mesmo
  14.  
  15. 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.
  16.  
  17. mov eax, 1 ; O próximo Syscall é o número 1 que é o número de saida exit()
  18.  
  19. mov ebx, 0 ; Código de saida vai retornar 0
  20.  
  21. int 0x80 ;
  22.  
  23.  
  24.  
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement