Detection rules › Elastic

Unusual Execution from /dev Parent

Source
github.com/elastic/protections-artifacts

This rule detects suspicious executions from /dev parent directories. Attackers may execute binaries from /dev parent directories to evade detection and execute malicious payloads.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
This rule detects suspicious executions from /dev parent directories. Attackers may execute binaries from /dev parent
directories to evade detection and execute malicious payloads.
"""
id = "eb575588-dce7-4934-966c-c0e9ebc456c5"
license = "Elastic License v2"
name = "Unusual Execution from /dev Parent"
os_list = ["linux"]
version = "1.0.6"

query = '''
process where event.type == "start" and event.action == "exec" and process.parent.executable like "/dev/*" and
process.executable like ("/tmp/*", "/var/tmp/*", "/var/www/*", "/bin/*", "/usr/bin/*", "/usr/local/bin/*") and
not (
  process.args like "/dev/shm/*" or
  process.parent.executable like ("/dev/fd/*", "/dev/null/*", "/dev/shm/*") or
  process.parent.command_line == "runc init" or
  process.name in ("buildkitd", "uname") or
  process.executable == "/usr/bin/fusermount"
)
'''

min_endpoint_version = "7.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0

[[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/"

[internal]
min_endpoint_version = "7.15.0"

Stages and Predicates

Stage 1: process

process where event.type == "start" and event.action == "exec" and process.parent.executable like "/dev/*" and
process.executable like ("/tmp/*", "/var/tmp/*", "/var/www/*", "/bin/*", "/usr/bin/*", "/usr/local/bin/*") and
not (
  process.args like "/dev/shm/*" or
  process.parent.executable like ("/dev/fd/*", "/dev/null/*", "/dev/shm/*") or
  process.parent.command_line == "runc init" or
  process.name in ("buildkitd", "uname") or
  process.executable == "/usr/bin/fusermount"
)

Exclusions

The rule actively suppresses these predicates.

Indicators

These rows show field, operator, and value matches.