Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2018-00433
- Vendor: 詮通電腦有限公司
- Title: 詮通網頁設計公司客戶網站存在資料庫注入攻擊
- Introduction: 資料庫注入攻擊
處理狀態
目前狀態
-
新提交
-
已審核
-
已通報
-
未回報修補狀況
-
未複測
-
公開
處理歷程
- 2018/04/08 06:10:40 : 新提交 (由 FB搜尋"波波的寂寞世界" 更新此狀態)
- 2018/04/08 20:22:30 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2018/04/08 20:22:42 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2018/04/14 14:50:55 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2018/04/14 14:51:19 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2018/06/08 03:00:20 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2018-00433
- 通報者:twfinderaz (FB搜尋"波波的寂寞世界")
- 風險:高
- 類型:資料庫注入攻擊 (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://www.thehoney.com.tw/profile.php?id=4
http://www.ir.com.tw/products_01.php?cate=155
http://www.acinverter.com.tw/product_detail.php?id=35&pid=47
http://www.muchang.com.tw/products_detail.php?category=1&subcategory=1
全部都有SQL Injection
敘述
該網頁設計公司http://www.s2-everywhere.com/service_03.htm
客戶網站皆存在SQL Injection攻擊,
簡易測試 於產品資訊或最新消息文章輸入 單引號 ' 測試
皆可發現錯誤訊息
例如
http://www.thehoney.com.tw/group.php?id=4
輸入單引號'
http://www.thehoney.com.tw/group.php?id=4'
錯誤訊息顯示
資料表錯誤,請連絡管理人員
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'tw'' at line 1
進行sleep測試
AND SLEEP(5)即可。
因關係到客戶網站權益,圖片就不說明了,已有在HITCON Zeroday回報其他幾個客戶網站資料庫攻擊漏洞
修補建議
解決方案採用參數化(Parameterized)查詢語法
嚴密的檢查所有輸入值,使用過濾字串函數過濾非法的字元
網站避免使用addslashes或是mysql_real_escape_string,會被繞過
建議Google查一下 SQL Injection攻擊手法,及防範措施Parameterized,
https://zh.wikipedia.org/wiki/SQL%E8%B3%87%E6%96%99%E9%9A%B1%E7%A2%BC%E6%94%BB%E6%93%8A
因關係到客戶網站權益,圖片就不說明了,已有在HITCON Zeroday回報其他幾個客戶網站資料庫攻擊漏洞