XPC Services T1559.003
- Tactic
- Execution
- Platform
- macOS
- Version
- 1.1
- Created
- 12 October 2021
- Last modified
- 15 April 2025
- Contributor
- Csaba Fitzl @theevilbit of Kandji
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.[1][2]
Offense vs defense T1559.003
Is defensive coverage keeping up with adversary use? Eight counts, each ranked against all 697 ATT&CK techniques. Attack sits left, defense right, so a shape leaning left means adversaries are better documented here than defenders are equipped. Hover any spoke for its percentile and the share of techniques that have more. The timeline below shows when each side arrived.
XPC Services detection strategy DET0335
MITRE names one behaviour worth catching for this technique and breaks it into 1 analytic, one per platform. Each carries the log sources it needs and the fields you tune per environment.
Detect Abuse of XPC Services (T1559.003)
AN0948 · macOS
Detects anomalous use of macOS XPC services for code execution. Monitors for processes invoking privileged XPC daemons with abnormal parameters, unexpected binaries communicating over NSXPCConnection, or helper tools executing code outside of their expected parent process lineage. Correlates process access attempts to system-level daemons, privilege escalations via XPC misconfigurations, and injection of malicious payloads through inter-process communication.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| Process CreationDC0032 | macos:unifiedlog | execve: Helper tools invoked through XPC executing unexpected binaries |
| Process AccessDC0035 | macos:unifiedlog | Unexpected NSXPCConnection calls by non-Apple-signed or abnormal binaries |
| Named Pipe MetadataDC0048 | macos:unifiedlog | XPC messages requesting privileged actions from untrusted or unsigned clients |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| AllowedXPCClients | Maintain allowlist of binaries permitted to invoke specific XPC services to minimize false positives. |
| TimeWindow | Threshold for correlating abnormal XPC requests with subsequent privilege escalation or process creation. |
| UnsignedBinaryAlertLevel | Adjust sensitivity of alerts for unsigned or non-Apple-signed clients initiating XPC communication. |
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.