T1559.003 Sumo Logic CSE · Sumo

Detect XPC Services in Sumo Logic CSE

Adversaries may abuse macOS XPC (Cross-Process Communication) services to execute malicious code with elevated privileges. XPC services provide privilege separation between application components, with helper daemons running as root under launchd. Applications communicate with these daemons using the low-level XPC C API or the NSXPCConnection API. When XPC services fail to properly validate client identity (via audit token checks) or sanitize input parameters, adversaries can send crafted messages to execute arbitrary code in the context of the privileged daemon. This technique has been exploited in the wild via CVE-2021-30724 targeting Apple's CVMServer (com.apple.cvmsServ), and is frequently combined with T1068 (Exploitation for Privilege Escalation) to achieve root-level code execution from an unprivileged user context.

MITRE ATT&CK

Tactic
Execution
Technique
T1559 Inter-Process Communication
Sub-technique
T1559.003 XPC Services
Canonical reference
https://attack.mitre.org/techniques/T1559/003/

Sumo Detection Query

Sumo Logic CSE (Sumo)
sql
(_sourceCategory=*endpoint* OR _sourceCategory=*macos* OR _sourceCategory=*osquery*)
| where (
    (parentBaseImage = "launchd"
     AND baseImage in ("bash", "sh", "zsh", "python3", "python", "ruby",
                       "perl", "osascript", "curl", "wget", "nc", "ncat", "php"))
  OR
    ((targetFilePath matches "*/Library/PrivilegedHelperTools/*"
      OR targetFilePath matches "*/Library/LaunchDaemons/*"
      OR targetFilePath matches "*XPCServices*")
     AND (targetFilePath matches "*.plist"
          OR targetFilePath matches "*.dylib"
          OR targetFilePath matches "*.xpc")
     AND !(baseImage in ("Installer", "pkgd", "softwareupdate", "mdmclient",
                         "osinstallersetupd", "jamf", "santa", "falcond")))
  )
| eval DetectionBranch = if(parentBaseImage = "launchd", "launchd_spawned_interpreter",
                        if(targetFilePath matches "*PrivilegedHelperTools*", "privileged_helper_modification",
                        if(targetFilePath matches "*LaunchDaemons*", "launch_daemon_modification",
                        "xpc_service_bundle_modification")))
| eval RiskScore = if(DetectionBranch = "privileged_helper_modification", 85,
                  if(DetectionBranch = "launchd_spawned_interpreter", 75,
                  if(DetectionBranch = "launch_daemon_modification", 70, 55)))
| fields _messageTime, device_hostname, user_username, baseImage, commandLine,
         parentBaseImage, targetFilePath, DetectionBranch, RiskScore
| sort by RiskScore desc, _messageTime desc
high severity medium confidence

Sumo Logic Cloud SIEM Enterprise query detecting T1559.003 XPC Services abuse on macOS. Operates against normalized endpoint telemetry ingested via osquery, CrowdStrike, Carbon Black, or similar macOS agents using the CSE normalized schema. Detects launchd spawning unexpected interpreter processes and unauthorized writes to XPC service and privileged helper directories, with risk-weighted branch scoring. Requires parentBaseImage, baseImage, commandLine, and targetFilePath fields to be populated by the log source normalization rules.

Data Sources

Sumo Logic Cloud SIEM EnterprisemacOS osquery via Sumo Logic Installed CollectorCrowdStrike or Carbon Black macOS agent via Sumo Logic SIEM integration

Required Tables

CSE normalized records with _sourceCategory matching *endpoint*, *macos*, or *osquery*

False Positives & Tuning

  • Legitimate XPC privileged helper installation by signed applications using SMJobBless (e.g., VirtualBox, VMware Fusion, Docker Desktop) where the helper tool installer process name is not captured in the baseImage exclusion list
  • Development environment bootstrappers (nix-daemon, asdf, pyenv, rbenv) that operate as launchd services and spawn shell interpreters or write wrapper scripts into monitored paths as part of version management setup
  • macOS SIP-disabled test environments or authorized red team macOS endpoints where launchd-spawning of interpreters is expected during OPSEC validation or privilege escalation testing under an authorized assessment
Download portable Sigma rule (.yml)

Other platforms for T1559.003


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1XPC Service and Privileged Helper Enumeration

    Expected signal: MDE DeviceProcessEvents: launchctl spawned multiple times with 'list' argument, parent = shell (bash/zsh). osquery process_events: launchctl and ls executions with enumeration arguments. File creation event for /tmp/df00tech_xpc_services.txt in MDE DeviceFileEvents and osquery file_events.

  2. Test 2Malicious LaunchDaemon XPC Service Registration

    Expected signal: MDE DeviceFileEvents: FileCreated for /Library/LaunchDaemons/com.df00tech.test.xpcservice.plist by the test process (InitiatingProcessFileName=cp or sudo). osquery file_events: target_path=/Library/LaunchDaemons/com.df00tech.test.xpcservice.plist, action=CREATED. MDE DeviceProcessEvents: launchd spawning /bin/sh with the touch/echo command. macOS Unified Log: launchd registering service label 'com.df00tech.test.xpcservice' and subsequent execution.

  3. Test 3Privileged Helper Tool Tampering Simulation

    Expected signal: MDE DeviceFileEvents: FileCreated action for /Library/PrivilegedHelperTools/com.df00tech.test.backdoor.helper, InitiatingProcessFileName=sudo or touch. osquery file_events: target_path=/Library/PrivilegedHelperTools/com.df00tech.test.backdoor.helper, action=CREATED, process_name=touch. macOS Unified Log: filesystem write event at the PrivilegedHelperTools path. codesign invocation captured in process events.

  4. Test 4XPC Client Connection Simulation via Python

    Expected signal: MDE DeviceProcessEvents: python3 spawned with inline script via shell. osquery process_events: python3 execution with cmdline containing 'subprocess', parent=bash/zsh. launchctl subprocess spawns visible as child process events. If this test is run from a launchd context (e.g., via a cron job registered with launchd), the 'launchd_spawned_interpreter' detection branch fires with python3 as the spawned interpreter.

Unlock Pro Content

Get the full detection package for T1559.003 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections