T1559.003 XPC Services
Adversaries can provide malicious content to an XPC service daemon for local code execution. macOS uses XPC services for basic inter-process communication between various processes, such as between the XPC Service daemon and third-party application privileged helper tools. Applications can send messages to the XPC Service daemon, which runs as root, using the low-level XPC Service C API
or the high level NSXPCConnection API
in order to handle tasks that require elevated privileges (such as network connections). Applications are responsible for providing the protocol definition which serves as a blueprint of the XPC services. Developers typically use XPC Services to provide applications stability and privilege separation between the application client and the daemon.12
Adversaries can abuse XPC services to execute malicious content. Requests for malicious execution can be passed through the application’s XPC Services handler.34 This may also include identifying and abusing improper XPC client validation and/or poor sanitization of input parameters to conduct Exploitation for Privilege Escalation.
Item | Value |
---|---|
ID | T1559.003 |
Sub-techniques | T1559.001, T1559.002, T1559.003 |
Tactics | TA0002 |
Platforms | macOS |
Version | 1.0 |
Created | 12 October 2021 |
Last Modified | 20 April 2022 |
Mitigations
ID | Mitigation | Description |
---|---|---|
M1013 | Application Developer Guidance | Enable the Hardened Runtime capability when developing applications. Do not include the com.apple.security.get-task-allow entitlement with the value set to any variation of true. |
Detection
ID | Data Source | Data Component |
---|---|---|
DS0009 | Process | Process Access |
References
-
Apple. (2016, September 9). Creating XPC Services. Retrieved April 19, 2022. ↩
-
Mickey Jin. (2021, June 3). CVE-2021-30724: CVMServer Vulnerability in macOS and iOS. Retrieved October 12, 2021. ↩
-
Wojciech Reguła. (2020, June 29). Learn XPC exploitation. Retrieved October 12, 2021. ↩
-
VerSprite. (2018, January 24). Exploiting VyprVPN for MacOS. Retrieved April 20, 2022. ↩