preamble
As cybersecurity threats continue to grow, it is critical to understand and prevent possible attacks. Blast-RADIUS 是一種嚴重影響 RADIUS 協議的安全性漏洞,能夠讓攻擊者繞過身份驗證獲取未經授權的存取權限。 本篇文章將深入探討該漏洞的工作原理、檢測方法及應對措施,幫助您有效防範潛在的安全風險。
Figure 1: Blast-RADIUS Vulnerability Security Risks
Blast-RADIUS Basics
Blast-RADIUS 是一種影響 RADIUS 協議(依據 RFC 2865)的安全性漏洞。它允許位於 RADIUS 用戶端和伺服器之間的中間人攻擊者, 偽造一個有效的存取接受(access-accept)消息,回應已經失敗的認證請求,使攻擊者能夠在無需猜測或強制破解密碼和共用金鑰的情況下,就取得對網路設備與服務的存取權限。 攻擊者在請求中插入了一個惡意屬性,導致合法伺服器響應中的認證資訊與攻擊者偽造的消息發生碰撞,最終將拒絕轉為接受,並可添加任意協定屬性。不過,攻擊者不會取得用戶憑據。 該漏洞已在 CVE-2024-3596 中描述。
Specifically, the attack uses a computational collision to attack the MD5 signature of the responding authenticator. Since this is a protocol level issue, any RADIUS implementation that does not use EAP and works over UDP unencrypted traffic (especially PAP, CHAP) will be affected.
Figure 2: Schematic diagram of the Blast-RADIUS vulnerability (enlarged)
如果無法直接使用 TLS 或 DTLS 進行傳輸加密,可以使用 RFC 2869 中描述的可選 RADIUS 屬性 “Message-Authenticator” 作為替代方法。 該方法為整個 RADIUS 數據包計算一個 HMAC-MD5 校驗和,任何未透過此完整性檢查的數據包必須被靜默丟棄。 由於沒有共用金鑰,攻擊者將無法偽造此 HMAC-MD5 簽名。如果在所有數據包中都要求使用有效的消息認證屬性,那麼這種攻擊將變得不可能。 可惜的是,這個屬性只有在 EAP 認證方法中才是強制性的,而在 PAP 和 CHAP 中並非強制;即便在 RFC 5080 中也只是「SHOULD」建議。
How to check for vulnerabilities
要檢查您的實現是否存在此漏洞,可以捕獲 RADIUS 伺服器和 RADIUS 用戶端之間的通訊數據包,依據受影響的協定特徵進行篩選。 我們可以使用 ProfiShark 或 IOTA 進行攔截,並將擷取到的封包透過 Wireshark 做進一步分析。 建議以內聯模式(見圖三)捕獲實際雙向通訊。
Figure 3: Interconnecting IOTA or ProfiShark between RADIUS client and server
Capture with Profishark
在 ProfiShark Manager 中,請前往 “Network Ports” 選項卡,將 ProfiShark 設置為內聯模式(取消勾選 “Span Mode”,如圖四), 然後將其內聯整合至您的網路拓撲(如圖三)。
Figure 4: Disable SPAN Mode in ProfiShark Manager
接下來,切換到 “Capture” 選項卡,根據需求設定捕獲目錄,然後點選 “Start Capture” 按鈕開始捕獲數據,直到取得足夠封包後再停止(圖五), 最後匯出為 PCAPNG 檔並使用 Wireshark 開啟。
Figure 5: Starting to capture packets in ProfiShark Manager
Capture using IOTA
在 IOTA 介面上,首先進入 “Capture > Interface Configuration”,將介面設置為內聯模式(如圖六),然後將 IOTA 內聯部署於網路環境中, 透過設備按鈕或 “Capture > Capture Control” 頁面點選 “Start Capture” 開始捕獲(圖七)。
Figure 6: Configuration of IOTA All-in-One Traffic Monitoring Tool Interface
Figure 7: Starting to catch through the interface or device buttons
現在,我們可以應用協定或應用程式篩檢器鎖定 RADIUS 封包,最簡單的方式是將 “APPLICATION” 設為 “RADIUS”。 也可改透過 “PROTOCOL_STACK=Ethernet | IPv4 | UDP | RADIUS” 來過濾。當篩選到特定的 RADIUS 流後, 可於底部的流列表處選擇下載該流的 PCAPNG 檔(圖八)。
Figure 8: Filtering RADIUS packets on IOTA
Figure 9: Stream list can be downloaded from PCAPNG upon request.
Analyzing vulnerable execution
After opening the exported PCAPNG file, in Wireshark, we can use the following display filters to target potentially vulnerable RADIUS packets:
(radius.code in {1,2,3,11}) and not (radius.Message_Authenticator or eap)
(如圖十)。這樣就能同時取得 Access-Requests(代碼1)、Access-Accepts(代碼2)、Access-Rejects(代碼3)及 Access-Challenges(代碼11),
但排除已使用 EAP 或帶有 Message-Authenticator 的安全封包。
Figure 10: Only RADIUS packets that do not contain Message-Authenticator or EAP are shown in Wireshark.
一旦封包中看見 “Message-Authenticator” 屬性(如圖十一),代表封包經 HMAC-MD5 校驗,便不易受 Blast-RADIUS 攻擊影響。 若所有 RADIUS 封包都帶有該屬性,攻擊將被阻擋。
Figure 11: Message-Authenticator Preventing Attacks with RADIUS Access-Request
Product Recommendation
Profitap Packet Grabber Profishark-1G
- Highly Accurate and Plug-and-Play Ethernet Line Interception and Analysis
- USB 3.0 interface, no need for external power supply
- Switchable SPAN or inline mode for high deployment flexibility
- Ideal for troubleshooting, safety testing, and performance monitoring
IOTA Integrated Traffic Monitoring Tool 1G
- Integration of packet capture, visualization and PCAP downloads.
- Supports 1G Ethernet speed for inbound interception
- Browser interface for remote control, fast filtering and downloads
- Suitable for security analysis, traffic monitoring, troubleshooting, etc.