Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2021-00483
- Vendor: 明祥貿易股份有限公司
- Title: 明祥貿易股份有限公司 網站存在 XSS 與 sql injection 與 原型污染
- Introduction: 網站存在 XSS 與 sql injection 與 原型污染
處理狀態
目前狀態
-
新提交
-
已審核
-
已通報
-
未回報修補狀況
-
未複測
-
公開
處理歷程
- 2021/07/30 10:34:52 : 新提交 (由 BTtea 更新此狀態)
- 2021/07/30 10:52:01 : 新提交 (由 BTtea 更新此狀態)
- 2021/07/30 10:53:40 : 新提交 (由 BTtea 更新此狀態)
- 2021/07/30 10:57:07 : 新提交 (由 BTtea 更新此狀態)
- 2021/07/30 11:04:00 : 新提交 (由 BTtea 更新此狀態)
- 2021/07/30 17:41:03 : 新提交 (由 BTtea 更新此狀態)
- 2021/08/02 00:21:03 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2021/08/02 13:24:57 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2021/08/02 13:24:57 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2021/08/02 13:24:57 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2021/09/29 03:00:06 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2021-00483
- 通報者:blacktea_player (BTtea)
- 風險:高
- 類型:資料庫注入攻擊 (SQL Injection)
參考資料
漏洞說明: OWASP - SQL Injection
https://www.owasp.org/index.php/SQL_Injection
漏洞說明: OWASP - Top 10 - 2017 A1 - Injection
https://www.owasp.org/index.php/Top_10-2017_A1-Injection
漏洞說明: CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
https://cwe.mitre.org/data/definitions/89.html
防護方式: OWASP - SQL Injection Prevention Cheat Sheet
https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet
相關網址
http://mhtc.com.tw/products_in.php?id=528&page=1
http://mhtc.com.tw/ckfinder/ckfinder.html
敘述
http://mhtc.com.tw/searchs.php?searchs=1
網站搜尋欄輸入單引號測試,出現sql語法錯誤,使用工具得其結果
在 http://mhtc.com.tw/products_in.php?id=528&page=1
在 id=528 後輸入一個單引號測試異常,在輸入兩個減號測試沒東西
懷疑有WAF,輸入一個空格跟一減號 bypass WAF
確認存在注入點,一樣工具測試結果如圖
這個網址參數也一樣方法bypass WAF,存在注入點 http://mhtc.com.tw/profile.php?id=8
http://mhtc.com.tw/searchs.php?searchs=1
在 http://mhtc.com.tw/products_in.php?id=528&page=1
在這兩個網址的三個參數中,將值皆替換成 XSS payload 可以觸發 xss
XSS payload:"><script>alert(document.cookie)</script>
完整網址:在 http://mhtc.com.tw/products_in.php?id="><script>alert(document.cookie)</script>
之後發現網站 jquery 版本過舊,將原形污染 PoC payload 加入 XSS 後三個參數都進行測試,皆可彈出結果
原形污染 PoC payload:"><script>$.extend(true,{},JSON.parse('{"__proto__":{"z":"xss"'));alert(z);</script>
完整網址:http://mhtc.com.tw/searchs.php?searchs="><script>$.extend(true,{},JSON.parse('{"__proto__":{"z":"xss"'));alert(z);</script>
此網址建議禁止外網連入上傳檔案
http://mhtc.com.tw/ckfinder/ckfinder.html
無用的測試網址或者其他檔案建議禁止外網連入瀏覽或隱藏
http://mhtc.com.tw/README
http://mhtc.com.tw/test.php
http://mhtc.com.tw/changelog.txt