Persistence via Login or Logout Hook
Identifies use of the Defaults command to install a login or logoff hook in MacOS. An adversary may abuse this capability to establish persistence in an environment by inserting code to be executed at login or logout.
Detection logic
Its licence does not clear it for publishing here
Sunturai publishes a detection's own text where the licence it arrived under has been reviewed and permits it, and Elastic License 2.0 has not. The query as its source wrote it, its canonical form and the hash that pins this revision are in the workspace record.
Detection requirements
- Platform
- ESXiLinuxmacOSNetwork DevicesWindows
The rule states no platform. This is derived from the ATT&CK technique it maps to.
- Log source category
- event_index
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 |
|---|---|
| www.manpagez.com/man/1/defaults/ | Only this detection cites it |
| www.virusbulletin.com/uploads/pdf/conference_slides/2014/Wardle-VB2014.pdf | Only this detection cites it |
From the source
- At source
- Open at source
- Upstream identifier
- 5d0265bf-dea9-41a9-92ad-48a8dcd05080
- Tagged by the source as
- Data Source: Elastic DefendDomain: EndpointNoise: LowOS: macOSPerformance: FastPlatform: macOSResources: Investigation GuideRule Type: Event Correlation (EQL)Tactic: PersistenceUse Case: Threat Detection
Licence
- Published under
- Elastic License 2.0Read the licence
- Attribution
- Required
Authorship
- Written by
- Published
- Sep 20, 2026
- Version
- 3