Launchd suspicious program
A LaunchAgent/LaunchDaemon whose program runs from a world-writable or temp location (/tmp, /var/tmp, /private/tmp, /Users/Shared) or launches…
What it detects
A LaunchAgent/LaunchDaemon whose program runs from a world-writable or temp location (/tmp, /var/tmp, /private/tmp, /Users/Shared) or launches osascript/curl — a strong macOS persistence-plus-execution signal.
MITRE ATT&CK mapping
- T1543.004Create or Modify System Process: Launch Daemon· Persistence
False positives and triage
Some legitimate tools stage helpers in /Users/Shared. Confirm the program path, signature, and whether the label is known-good for this host.
The rule
Declarative YAML read by the detection engine — data, never executed. Confidence 75%. Source: rules/macos/launchd_suspicious_program.yaml, licensed under the Apache License 2.0.
id: macos.persistence.launchd_suspicious_program
version: 1.0.0
status: stable
severity: high
confidence: 0.75
platforms: [macos]
mitre_techniques: [T1543.004]
description: |
A LaunchAgent/LaunchDaemon whose program runs from a world-writable or temp
location (/tmp, /var/tmp, /private/tmp, /Users/Shared) or launches osascript/curl —
a strong macOS persistence-plus-execution signal.
match:
event_action: 'launch_item_registered'
command_line_regex: '(?i)(^|\s|/)(/private)?/(tmp|var/tmp)/|/Users/Shared/|\bosascript\b|\b(curl|wget)\b'
false_positive_guidance: |
Some legitimate tools stage helpers in /Users/Shared. Confirm the program path,
signature, and whether the label is known-good for this host.
Related detections
Run this rule on your own logs — offline
KIROSEC runs this rule and the rest of the library over Windows, Linux, macOS and cloud audit logs on the analyst's own machine. Every alert links to the events that raised it, and nothing leaves the device.
