[rule]
description = """
This rule detects the execution of processes from the /boot directory. This may indicate an attempt to execute a process
from a location that is not typical for executable files. This behavior is often associated with malicious activity.
"""
id = "87bd993d-d2fa-4047-bc7b-d6a4527d6ab8"
license = "Elastic License v2"
name = "Process Execution from Boot Directory"
os_list = ["linux"]
version = "1.0.11"
query = '''
process where event.type == "start" and event.action == "exec" and process.executable like "/boot/*" and
not (
process.executable in ("/boot/loader/entries", "/boot/dietpi/dietpi-login") or
process.parent.executable in (
"/boot/dietpi/dietpi-update", "/etc/cron.daily/dietpi", "/etc/cron.hourly/dietpi", "/boot/dietpi/dietpi-login"
)
)
'''
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/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1036"
name = "Masquerading"
reference = "https://attack.mitre.org/techniques/T1036/"
[[threat.technique]]
id = "T1620"
name = "Reflective Code Loading"
reference = "https://attack.mitre.org/techniques/T1620/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "7.15.0"