Detection rules › Elastic
Suspicious Dock Plist Configuration Modification
Detects when the Dock plist config is modified by a suspicious process. An adversary can maintain persistence on a macOS endpoint by modifying the Dock plist configuration to execute code each time the Dock is launched.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Defense Impairment |
Telemetry coverage
| Platform | Record / event type |
|---|---|
| macOS | ESF event write (NOTIFY): Fires after a process writes data to a file. |
Rule body
[rule]
description = """
Detects when the Dock plist config is modified by a suspicious process. An adversary can maintain persistence on a macOS
endpoint by modifying the Dock plist configuration to execute code each time the Dock is launched.
"""
id = "6de66c98-9aaa-44a7-af4d-b2c0670fcc49"
license = "Elastic License v2"
name = "Suspicious Dock Plist Configuration Modification"
os_list = ["macos"]
reference = ["https://x.com/MsftSecIntel/status/1891410993265123662"]
version = "1.0.3"
query = '''
file where event.action == "modification" and file.name == "com.apple.dock.plist" and
(process.name like~ ("osascript", "python*", "ruby", "gems*", "node", "npm") or (process.code_signature.exists == false or process.code_signature.trusted == false))
'''
min_endpoint_version = "8.10.2"
optional_actions = []
[[actions]]
action = "kill_process"
field = "Effective_process.entity_id"
state = 0
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1546"
name = "Event Triggered Execution"
reference = "https://attack.mitre.org/techniques/T1546/"
[threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1647"
name = "Plist File Modification"
reference = "https://attack.mitre.org/techniques/T1647/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "8.10.2"
Stages and Predicates
Stage 1: file
file where event.action == "modification" and file.name == "com.apple.dock.plist" and
(process.name like~ ("osascript", "python*", "ruby", "gems*", "node", "npm") or (process.code_signature.exists == false or process.code_signature.trusted == false))
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"modification" |
file.name | eq |
| field:"file.name" kind:eq value:"com.apple.dock.plist" |
process.code_signature.exists | eq |
| field:"process.code_signature.exists" kind:eq value:"false" |
process.code_signature.trusted | eq |
| field:"process.code_signature.trusted" kind:eq value:"false" |
process.name | wildcard |
| field:"process_name" kind:wildcard |