MacOS LoginHook Persistence
Identifies attempts to configure a macOS LoginHook via the defaults utility. LoginHooks enable automatic execution of a script or program upon user login and have historically been abused for persistence. Creation or…
Description
Identifies attempts to configure a macOS LoginHook via the defaults utility. LoginHooks enable automatic execution of a script or program upon user login and have historically been abused for persistence. Creation or modification of this setting may indicate an attempt to establish startup execution outside standard LaunchAgent mechanisms.
Detection logic
Detection requirements
- Platform
- macOS
The rule states no platform. This is derived from the ATT&CK technique it maps to.
- Log source category
- osquery_results
Known benign triggers
- This method is possibly still used by legacy enterprise management scripts. Update filter macro to remove false positives.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| osquery.readthedocs.io/en/stable/deployment/process-auditing/ | 12 |
| www.loobins.io/binaries/defaults/ | Only this detection cites it |
From the source
- At source
- Open at source
- Upstream identifier
- a04832e7-9d1d-49b1-a684-e31bcd775c77
- Tagged by the source as
- MacOS Post-ExploitationEndpointendpointSplunk CloudSplunk EnterpriseSplunk Enterprise Securityendpoint
Licence
- Published under
- Apache License 2.0Read the licence
- Attribution
- Required
- Obtained under
- Apache-2.0Read the origin licence
Authorship
- Written by
- Published
- Aug 26, 2026
- Version
- 1