User Discovery Command Execution from Volume Mount


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.

Query · eql

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
Raw source User Discovery Command Execution from Volume Mount · Elastic TOML
Esc
Published by elastic/protections-artifacts ↗, licensed under Elastic License 2.0 ↗. Reproduced here unmodified.
[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"

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.