diff --git a/rules/macos/persistence_suspicious_calendar_modification.toml b/rules/macos/persistence_suspicious_calendar_modification.toml new file mode 100644 index 000000000..768e20a77 --- /dev/null +++ b/rules/macos/persistence_suspicious_calendar_modification.toml @@ -0,0 +1,56 @@ +[metadata] +creation_date = "2021/01/19" +maturity = "production" +updated_date = "2021/01/19" + +[rule] +author = ["Elastic"] +description = """ +Identifies suspicious modifications of the calendar file by an unusual process. Adversaries may create a custom calendar +notification procedure to execute a malicious program at a recurring interval to establish persistence. +""" +false_positives = ["Trusted applications for managing calendars and reminders."] +from = "now-9m" +index = ["logs-endpoint.events.*", "auditbeat-*"] +language = "kuery" +license = "Elastic License" +name = "Suspicious Calendar File Modification" +references = [ + "https://labs.f-secure.com/blog/operationalising-calendar-alerts-persistence-on-macos", + "https://github.com/FSecureLABS/CalendarPersist", + "https://github.com/D00MFist/PersistentJXA/blob/master/CalendarPersist.js", +] +risk_score = 47 +rule_id = "cb71aa62-55c8-42f0-b0dd-afb0bb0b1f51" +severity = "medium" +tags = ["Elastic", "Host", "macOS", "Threat Detection", "Persistence"] +type = "query" + +query = ''' +event.category:file and event.action:modification and + file.path:/Users/*/Library/Calendars/*.calendar/Events/*.ics and + process.executable: + (* and not + ( + /System/Library/* or + /System/Applications/Calendar.app/Contents/MacOS/* or + /usr/libexec/xpcproxy or + /sbin/launchd or + /Applications/* + ) + ) +''' + + +[[rule.threat]] +framework = "MITRE ATT&CK" +[[rule.threat.technique]] +id = "T1546" +name = "Event Triggered Execution" +reference = "https://attack.mitre.org/techniques/T1546/" + + +[rule.threat.tactic] +id = "TA0003" +name = "Persistence" +reference = "https://attack.mitre.org/tactics/TA0003/"