Skip to content

Instantly share code, notes, and snippets.

@barkink
Created March 7, 2017 09:54
Show Gist options
  • Save barkink/da085ade8ac70a1737036d90b4377878 to your computer and use it in GitHub Desktop.
Save barkink/da085ade8ac70a1737036d90b4377878 to your computer and use it in GitHub Desktop.
from ctypes import *
c = CDLL("libc.so.6")
fd = c.syscall(319,"tempmem",0)
c.sendfile(fd,0,0,0x7ffff000)
c.fexecve(fd,byref(c_char_p()),byref(c_char_p()))
print "fexecve failed"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment