Detection rules › Elastic
User Discovery Command Execution from Volume Mount
Detects the execution of a user discovery command from a mounted volume. This is highly abnormal behavior and can be an indication of malicious activity.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Discovery |
Telemetry coverage
Rule body
[rule]
description = """
Detects the execution of a user discovery command from a mounted volume. This is highly abnormal behavior and can be an
indication of malicious activity.
"""
id = "a9b01a60-0d26-4b53-b043-1e995ba5c6d1"
license = "Elastic License v2"
name = "User Discovery Command Execution from Volume Mount"
os_list = ["macos"]
version = "1.0.7"
query = '''
sequence with maxspan=1m
[process where event.type == "start" and event.action == "exec" and
process.executable like "/Volumes/*" and
not process.executable like "/Volumes/Docker/Docker.app/Contents/MacOS/com.docker.backend" and
not process.Ext.effective_parent.executable like "/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfDaemon.app/Contents/MacOS/JamfDaemon"] by process.entity_id
[process where event.type == "start" and event.action == "exec" and
process.parent.executable like "/Volumes/*" and process.name in ("whoami", "dscl", "uname")] by process.parent.entity_id
'''
min_endpoint_version = "8.7.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 1
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[threat.technique.subtechnique]]
id = "T1059.004"
name = "Unix Shell"
reference = "https://attack.mitre.org/techniques/T1059/004/"
[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1033"
name = "System Owner/User Discovery"
reference = "https://attack.mitre.org/techniques/T1033/"
[threat.tactic]
id = "TA0007"
name = "Discovery"
reference = "https://attack.mitre.org/tactics/TA0007/"
[internal]
min_endpoint_version = "8.7.0"
Stages and Predicates
Ordered sequence: each step below must occur in order within 1m, correlated by process.entity_id, process.parent.entity_id.
Stage 1: process
[process where event.type == "start" and event.action == "exec" and
process.executable like "/Volumes/*" and
not process.executable like "/Volumes/Docker/Docker.app/Contents/MacOS/com.docker.backend" and
not process.Ext.effective_parent.executable like "/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfDaemon.app/Contents/MacOS/JamfDaemon"] by process.entity_id
Stage 2: process
[process where event.type == "start" and event.action == "exec" and
process.parent.executable like "/Volumes/*" and process.name in ("whoami", "dscl", "uname")] by process.parent.entity_id
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.Ext.effective_parent.executable | eq | /Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfDaemon.app/Contents/MacOS/JamfDaemon | excludes:process.Ext.effective_parent.executable field:"process.Ext.effective_parent.executable" value:"/Library/Application Support/JAMF/Jamf.app/Contents/MacOS/JamfDaemon.app/Contents/MacOS/JamfDaemon" |
process.executable | eq | /Volumes/Docker/Docker.app/Contents/MacOS/com.docker.backend | excludes:process.executable field:"process.executable" value:"/Volumes/Docker/Docker.app/Contents/MacOS/com.docker.backend" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"exec" |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.executable | wildcard |
| field:"Image" kind:wildcard value:"/Volumes/*" |
process.name | in |
| field:"process_name" kind:in |
process.parent.executable | wildcard |
| field:"ParentImage" kind:wildcard value:"/Volumes/*" |