diff --git a/rules/macos/persistence_loginwindow_plist_modification.toml b/rules/macos/persistence_loginwindow_plist_modification.toml new file mode 100644 index 000000000..477c43a57 --- /dev/null +++ b/rules/macos/persistence_loginwindow_plist_modification.toml @@ -0,0 +1,47 @@ +[metadata] +creation_date = "2021/01/21" +maturity = "production" +updated_date = "2021/01/21" + +[rule] +author = ["Elastic"] +description = """ +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. +""" +from = "now-9m" +index = ["auditbeat-*", "logs-endpoint.events.*"] +language = "kuery" +license = "Elastic License" +name = "Potential Persistence via Login Hook" +note = "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." +references = ["https://github.com/D00MFist/PersistentJXA/blob/master/LoginScript.js"] +risk_score = 47 +rule_id = "ac412404-57a5-476f-858f-4e8fbb4f48d8" +severity = "medium" +tags = ["Elastic", "Host", "macOS", "Threat Detection", "Persistence"] +type = "query" + +query = ''' +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)) +''' + + +[[rule.threat]] +framework = "MITRE ATT&CK" +[[rule.threat.technique]] +id = "T1547" +name = "Boot or Logon Autostart Execution" +reference = "https://attack.mitre.org/techniques/T1547/" +[[rule.threat.technique.subtechnique]] +id = "T1547.011" +name = "Plist Modification" +reference = "https://attack.mitre.org/techniques/T1547/011/" + + + +[rule.threat.tactic] +id = "TA0003" +name = "Persistence" +reference = "https://attack.mitre.org/tactics/TA0003/"