Potential Persistence via Login Hookedit
Identifies the creation or modification of the login window property list (plist). Adversaries may modify plist files to run a program during system boot or user login for persistence.
Rule type: query
Rule indices:
- auditbeat-*
- logs-endpoint.events.*
Severity: medium
Risk score: 47
Runs every: 5 minutes
Searches indices from: now-9m (Date Math format, see also Additional look-back time
)
Maximum alerts per execution: 100
References:
Tags:
- Elastic
- Host
- macOS
- Threat Detection
- Persistence
Version: 101 (version history)
Added (Elastic Stack release): 7.12.0
Last modified (Elastic Stack release): 8.6.0
Rule authors: Elastic
Rule license: Elastic License v2
Investigation guideedit
## Triage and analysis Starting in Mac OS X 10.7 (Lion), users can specify certain applications to be re-opened when a user reboots their machine. This can be abused to establish or maintain persistence on a compromised system.
Rule queryedit
event.category:"file" and not event.type:"deletion" and file.name:"com.apple.loginwindow.plist" and process.name:(* and not (systemmigrationd or DesktopServicesHelper or diskmanagementd or rsync or launchd or cfprefsd or xpcproxy or ManagedClient or MCXCompositor or backupd or "iMazing Profile Editor" ))
Threat mappingedit
Framework: MITRE ATT&CKTM
-
Tactic:
- Name: Persistence
- ID: TA0003
- Reference URL: https://attack.mitre.org/tactics/TA0003/
-
Technique:
- Name: Boot or Logon Autostart Execution
- ID: T1547
- Reference URL: https://attack.mitre.org/techniques/T1547/
-
Tactic:
- Name: Defense Evasion
- ID: TA0005
- Reference URL: https://attack.mitre.org/tactics/TA0005/
-
Technique:
- Name: Plist File Modification
- ID: T1647
- Reference URL: https://attack.mitre.org/techniques/T1647/
Rule version historyedit
- Version 101 (8.6.0 release)
-
- Formatting only
- Version 100 (8.5.0 release)
-
- Formatting only
- Version 4 (8.4.0 release)
-
-
Updated query, changed from:
event.category:"file" and not event.type:"deletion" and file.name:"com.apple.loginwindow.plist" and process.name:(* and not (systemmigrationd or DesktopServicesHelper or diskmanagementd or rsync or launchd or cfprefsd or xpcproxy or ManagedClient or MCXCompositor))
-
- Version 2 (7.13.0 release)
-
- Formatting only