T1053.004 CrowdStrike LogScale · LogScale

Detect Launchd in CrowdStrike LogScale

Adversaries may abuse the launchd daemon to perform task scheduling for initial or recurring execution of malicious code on macOS. The launchd daemon is responsible for loading and maintaining services within the operating system. It processes property list (plist) files found in /System/Library/LaunchDaemons, /Library/LaunchDaemons (system-wide daemons run as root), /Library/LaunchAgents (user agents run for all users), and ~/Library/LaunchAgents (user agents run for the specific user). Adversaries may install malicious plist files in these directories to achieve persistence, privilege escalation (via LaunchDaemons running as root), or execution at system startup or login. This technique is noted as deprecated by MITRE due to inaccurate original characterization, but the underlying abuse of launchd-controlled directories remains a valid and observed persistence mechanism on macOS.

MITRE ATT&CK

Tactic
Execution Persistence Privilege Escalation
Canonical reference
https://attack.mitre.org/techniques/T1053/004/

LogScale Detection Query

CrowdStrike LogScale (LogScale)
cql
#event_simpleName = /^(ProcessRollup2|SyntheticProcessRollup2|FileCreate|FileWrite)$/
| case {
    #event_simpleName = /^(FileCreate|FileWrite)$/ and
    TargetFileName = /\.plist$/ and
    TargetFilePath = /\/(Library\/LaunchDaemons|Library\/LaunchAgents|System\/Library\/LaunchDaemons|System\/Library\/LaunchAgents)\// and
    ImageFileName = /(bash|sh|zsh|python3?|ruby|perl|curl|wget|osascript|node)$/ |
      AlertType := "PlistCreatedInLaunchDirectory" ;

    #event_simpleName = /^(ProcessRollup2|SyntheticProcessRollup2)$/ and
    ImageFileName = /\/launchctl$/ and
    CommandLine = /\b(load|bootstrap|submit|start)\b/ and
    ParentBaseFileName = /(bash|sh|zsh|python3?|ruby|perl|curl|wget|osascript|node)$/ |
      AlertType := "SuspiciousLaunchctlByShell" ;

    #event_simpleName = /^(ProcessRollup2|SyntheticProcessRollup2)$/ and
    ImageFileName = /\/launchctl$/ and
    CommandLine = /\b(load|bootstrap|submit|start)\b/ and
    CommandLine = /(\/tmp\/|\/var\/tmp\/|\.hidden|\/Users\/Shared\/)/ |
      AlertType := "LaunchctlFromSuspiciousPath" ;
  }
| AlertType = *
| IsDaemonPath := if(TargetFilePath = /Library\/LaunchDaemons/ or CommandLine = /Library\/LaunchDaemons/, "true", "false")
| IsSystemPath := if(TargetFilePath = /System\/Library/ or CommandLine = /System\/Library/, "true", "false")
| groupBy(
    [ComputerName, UserName, AlertType, IsDaemonPath, IsSystemPath],
    function=[
      count(as=EventCount),
      collect([TargetFilePath, TargetFileName, ImageFileName, ParentBaseFileName, CommandLine], limit=10)
    ]
  )
| sort(field=EventCount, order=desc)
high severity medium confidence

Detects T1053.004 launchd abuse using CrowdStrike Falcon macOS sensor telemetry. Matches FileCreate and FileWrite events targeting plist files in LaunchDaemon or LaunchAgent directories where the creating process is a shell or interpreter, and ProcessRollup2 events showing launchctl load/bootstrap/submit/start from suspicious parent processes or targeting staging paths. Results are grouped by host and alert type with event counts for analyst triage.

Data Sources

CrowdStrike Falcon macOS sensorFalcon Data Replicator (FDR) LogScale repository

Required Tables

ProcessRollup2SyntheticProcessRollup2FileCreateFileWrite

False Positives & Tuning

  • CrowdStrike Falcon sensor itself or other macOS EDR agents registering their own launch daemons via launchctl during initial installation or sensor update cycles.
  • macOS enterprise management platforms (Jamf, Kandji, Mosyle) deploying configuration profiles that write launch agent plists via shell script post-install phases.
  • Developer workflows using make, cmake, or custom build scripts that install launch agents as part of local development environment setup for services such as local database or web server instances.
Download portable Sigma rule (.yml)

Other platforms for T1053.004


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 1Create Malicious LaunchAgent Plist for User Persistence

    Expected signal: File creation event for ~/Library/LaunchAgents/com.argus.test.persistence.plist and /tmp/argus_test_payload.sh. Process creation event for launchctl with arguments 'load ~/Library/LaunchAgents/com.argus.test.persistence.plist'. macOS Unified Log entry for launchd registering the new service with label 'com.argus.test.persistence'. Subsequent execution of /bin/bash with /tmp/argus_test_payload.sh as argument, initiated by launchd.

  2. Test 2Create Root LaunchDaemon Plist for System-Level Persistence

    Expected signal: File creation event for /Library/LaunchDaemons/com.argus.test.daemon.plist with initiating process sudo/bash running as root. Process creation events for sudo and launchctl with 'load /Library/LaunchDaemons/com.argus.test.daemon.plist'. macOS Unified Log entry from launchd registering system daemon. The IsDaemon flag in the KQL query should be set to true.

  3. Test 3Launchctl Load from Suspicious Temp Directory Path

    Expected signal: File creation event for /tmp/com.argus.tmppersist.plist. Process creation event for launchctl with command line containing 'load /tmp/com.argus.tmppersist.plist' — the /tmp path is a key indicator. macOS Unified Log entries for launchd service registration from a temp path.

  4. Test 4Simulate Adversary Plist Drop via curl and Shell

    Expected signal: Process creation for bash with the dropper script as command. File creation event for ~/Library/LaunchAgents/com.argus.dropper.test.plist with InitiatingProcessFileName=bash — the suspicious parent detection fires. Process creation for launchctl initiated by bash. macOS Unified Log shows the full execution chain: bash → file write → launchctl → launchd registration.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections