大人學報名網站 任意檔案上傳 + 可上傳 PHP 達成 RCE - HITCON ZeroDay

Vulnerability Detail Report

Vulnerability Overview

  • ZDID: ZD-2025-00578
  •  發信 Vendor: 識博管理顧問有限公司
  • Title: 大人學報名網站 任意檔案上傳 + 可上傳 PHP 達成 RCE
  • Introduction: 任意檔案上傳 + 可上傳 PHP 達成 RCE

處理狀態

目前狀態

公開
Last Update : 2025/06/28
  • 新提交
  • 已審核
  • 已通報
  • 已修補
  • 已複測
  • 公開

處理歷程

  • 2025/06/14 16:11:29 : 新提交 (由 yusheng 更新此狀態)
  • 2025/06/14 17:09:43 : 新提交 (由 yusheng 更新此狀態)
  • 2025/06/16 16:45:11 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2025/06/20 16:55:23 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2025/06/20 16:55:23 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2025/06/24 14:11:06 : 已修補 (由 組織帳號 更新此狀態)
  • 2025/06/24 16:03:42 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2025/06/24 16:03:42 : 已修補 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2025/06/24 16:03:42 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2025/06/24 16:07:07 : 複測申請中 (由 組織帳號 更新此狀態)
  • 2025/06/24 18:00:02 : 確認已修補 (由 yusheng 更新此狀態)
  • 2025/06/28 03:00:26 : 公開 (由 HITCON ZeroDay 平台自動更新)

詳細資料

  • ZDID:ZD-2025-00578
  • 通報者:cat1528985 (yusheng)
  • 風險:嚴重
  • 類型:遠端命令執行 (Remote Code Execution)

參考資料

攻擊者可經由該漏洞取得主機完整權限、任意寫入檔案及取得大量內網資訊。

漏洞說明: OWASP - Code Injection
https://www.owasp.org/index.php/Code_Injection

漏洞說明: OWASP - Command Injection
https://www.owasp.org/index.php/Command_Injection

漏洞說明: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
http://cwe.mitre.org/data/definitions/77.html

漏洞說明: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
http://cwe.mitre.org/data/definitions/78.html
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)

相關網址

首頁:https://shop.darencademy.com/
上傳的 php 檔案,且可執行:https://shop.darencademy.com/images/users/7a8/95c/ab5/7a895cab5684d2abe7ffc9.php?cmd=ls

敘述

重現漏洞方式:

  1. 免費註冊大人學報名網站 https://shop.darencademy.com/
  2. 到修改個人資訊的頁面 https://shop.darencademy.com/users/update
  3. "更換大頭照" 可上傳 php 檔案,內容是 <?php system($_GET['cmd']); ?>
  4. 確定修改以後,重整頁面,F12 > Elements > 把大頭貼的網址複製下來,格式會如下 https://shop.darencademy.com/images/users/7a8/95c/ab5/7a895cab5684d2abe7ffc9.php
  5. 承上,可在網址的參數加上任意指令,例如 ?cmd=ls,打開網址就會執行php並且回傳結果

PoC 影片:https://drive.google.com/file/d/18DfqPrKP9DwkeVlKzS4eehbG0Cm7psb2/view?usp=sharing

漏洞的種類:
CWE-434: Unrestricted Upload of File with Dangerous Type
CWE-94: Improper Control of Generation of Code ('Code Injection')
CWE-20: Improper Input Validation

螢幕截圖說明:
經過實測,上傳的 php 檔案確實可以執行
圖片

影響:

  1. 上傳的 PHP 跟主網站是在同一個 domain,風險指數更高,嚴重可脅持整個 domain
  2. 可在 Server 執行任意程式碼,植入後門、讀取 Server 上的檔案(如:etc/passwd, .env),竊取 DB 資料等等...

修補建議

上傳圖片的API實踐嚴格的檔案類型檢查

擷圖

留言討論

聯絡組織

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