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

References

Related rules

to-top