Detection rules › Elastic

At Utility Launched through Udevadm

Source
github.com/elastic/protections-artifacts

This rule detects the at utility being launched through udevadm. The at utility is used to schedule tasks to be run at a later time. This could be used by an attacker to establish persistence on a system. The udevadm utility is used to manage device events and could be used to trigger the at utility to run at a specific time, providing a threat actor with persistence.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
This rule detects the `at` utility being launched through `udevadm`. The `at` utility is used to schedule tasks to be
run at a later time. This could be used by an attacker to establish persistence on a system. The `udevadm` utility is
used to manage device events and could be used to trigger the `at` utility to run at a specific time, providing a threat
actor with persistence.
"""
id = "47e5595e-1920-4fdd-9a1c-cf712e1112d1"
license = "Elastic License v2"
name = "At Utility Launched through Udevadm"
os_list = ["linux"]
reference = [
    "https://ch4ik0.github.io/en/posts/leveraging-Linux-udev-for-persistence/",
    "https://www.elastic.co/security-labs/sequel-on-persistence-mechanisms",
]
version = "1.0.4"

query = '''
process where event.type == "start" and event.action == "exec" and process.parent.name == "udevadm" and
process.name == "at"
'''

min_endpoint_version = "7.15.0"
optional_actions = []
[[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 = "T1037"
name = "Boot or Logon Initialization Scripts"
reference = "https://attack.mitre.org/techniques/T1037/"


[threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1071"
name = "Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1071/"


[threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"

[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.name == "udevadm" and
process.name == "at"

Indicators

These rows show field, operator, and value matches.