Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2021-00435
- Vendor: 精聯電子股份有限公司
- Title: 精聯電子 網站存在 XSS 與任意檔案上傳導致 getwebshell
- Introduction: 搜尋欄存在 Reflected XSS 與 webshell 上傳
處理狀態
目前狀態
-
新提交
-
已審核
-
已通報
-
未回報修補狀況
-
未複測
-
公開
處理歷程
- 2021/07/24 05:46:44 : 新提交 (由 BTtea 更新此狀態)
- 2021/07/24 06:14:27 : 新提交 (由 BTtea 更新此狀態)
- 2021/07/24 06:15:55 : 新提交 (由 BTtea 更新此狀態)
- 2021/07/25 23:38:45 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2021/07/26 11:38:28 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2021/07/26 11:38:28 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2021/07/26 11:38:28 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2021/09/23 03:00:05 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2021-00435
- 通報者:blacktea_player (BTtea)
- 風險:高
- 類型:任意檔案上傳 (Arbitrary File Upload)
參考資料
漏洞說明: OWASP - Unrestricted File Upload
https://www.owasp.org/index.php/Unrestricted_File_Upload
漏洞說明: CWE-434: Unrestricted Upload of File with Dangerous Type
https://cwe.mitre.org/data/definitions/434.html
相關網址
https://www.ute.com/upload.html
https://www.ute.com/uploads
https://globalweb2.ute.com/uploads/images/test
敘述
- XSS
搜尋欄位輸入 <input type="" onmouseover="alert('xss test')"> 成功觸發腳本
- 不正確的權限設置導致敏感資訊洩漏與任意檔案上傳造成webshell
到 https://www.ute.com/upload.html 上傳 attack.php 文件,再到 https://www.ute.com/uploads 查看上傳文件路徑
確認路徑為 uploads/images/test 後 直接到該路徑的剛上傳的 php 腳本下 cmd get 參數命令 ls -la 得到以下結果,確認能執行
ps. 記得刪除該路徑底下之 attack 與 attack.php 檔案
該站點太多權限設置尚未妥當,且能由外網讀取到不少路徑,建議設置相關安全性
修補建議
攻擊者可經由該漏洞竊取使用者身份,或進行掛碼、轉址等攻擊行為。
漏洞說明: OWASP - Cross-site Scripting (XSS)
https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)
防護原則: OWASP - XSS (Cross Site Scripting) Prevention Cheat Sheet
https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet
防禦繞過方式: OWASP - XSS Filter Evasion Cheat Sheet
https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
攻擊者可上傳任意檔案至該主機,有機會經由上傳之文件取得該主機系統權限。
漏洞說明: OWASP - Unrestricted File Upload
https://www.owasp.org/index.php/Unrestricted_File_Upload
漏洞說明: CWE-434: Unrestricted Upload of File with Dangerous Type
https://cwe.mitre.org/data/definitions/434.html