ESXI Timestomping using Touch Command

Identifies instances where the 'touch' command is executed on a Linux system with the "-r" flag, which is used to modify the timestamp of a file based on another file's timestamp. The rule targets specific VM-related paths, such as "/etc/vmware/", "/usr/lib/vmware/", or "/vmfs/*". These paths are associated with VMware virtualization software, and their presence in the touch command arguments may indicate that a threat actor is attempting to tamper with timestamps of VM-related files and configurations on the system.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2023/04/11"
 3integration = ["endpoint", "auditd_manager"]
 4maturity = "production"
 5updated_date = "2024/05/21"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10Identifies instances where the 'touch' command is executed on a Linux system with the "-r" flag, which is used to modify
11the timestamp of a file based on another file's timestamp. The rule targets specific VM-related paths, such as
12"/etc/vmware/", "/usr/lib/vmware/", or "/vmfs/*". These paths are associated with VMware virtualization software, and
13their presence in the touch command arguments may indicate that a threat actor is attempting to tamper with timestamps
14of VM-related files and configurations on the system.
15"""
16from = "now-9m"
17index = ["logs-endpoint.events.*", "endgame-*", "auditbeat-*", "logs-auditd_manager.auditd-*"]
18language = "eql"
19license = "Elastic License v2"
20name = "ESXI Timestomping using Touch Command"
21references = [
22    "https://www.bleepingcomputer.com/news/security/massive-esxiargs-ransomware-attack-targets-vmware-esxi-servers-worldwide/",
23]
24risk_score = 47
25rule_id = "30bfddd7-2954-4c9d-bbc6-19a99ca47e23"
26setup = """## Setup
27
28This rule requires data coming in from Elastic Defend.
29
30### Elastic Defend Integration Setup
31Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
32
33#### Prerequisite Requirements:
34- Fleet is required for Elastic Defend.
35- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
36
37#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
38- Go to the Kibana home page and click "Add integrations".
39- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
40- Click "Add Elastic Defend".
41- Configure the integration name and optionally add a description.
42- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
43- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
44- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
45- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
46For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
47- Click "Save and Continue".
48- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
49For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
50"""
51severity = "medium"
52tags = [
53    "Domain: Endpoint",
54    "OS: Linux",
55    "Use Case: Threat Detection",
56    "Tactic: Defense Evasion",
57    "Data Source: Elastic Endgame",
58    "Data Source: Elastic Defend",
59    "Data Source: Auditd Manager",
60]
61timestamp_override = "event.ingested"
62type = "eql"
63
64query = '''
65process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "executed", "process_started")
66 and process.name == "touch" and process.args == "-r" and
67process.args : ("/etc/vmware/*", "/usr/lib/vmware/*", "/vmfs/*")
68'''
69
70
71[[rule.threat]]
72framework = "MITRE ATT&CK"
73[[rule.threat.technique]]
74id = "T1070"
75name = "Indicator Removal"
76reference = "https://attack.mitre.org/techniques/T1070/"
77[[rule.threat.technique.subtechnique]]
78id = "T1070.006"
79name = "Timestomp"
80reference = "https://attack.mitre.org/techniques/T1070/006/"
81
82
83
84[rule.threat.tactic]
85id = "TA0005"
86name = "Defense Evasion"
87reference = "https://attack.mitre.org/tactics/TA0005/"

References

Related rules

to-top