Back to results

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.

Detections can measure how the public catalogue is used — which detections people look for, and which pages bring them here. It sets a cookie that recognises this browser for 180 days. It is never linked to an account and never follows you to other sites. Privacy notice