| ID | Technique | Tactic |
|---|---|---|
| T1070 | Indicator Removal | Stealth |
| T1690 | Prevent Command History Logging | Defense Impairment |
Detection: ESXi Audit Tampering
Description
The following analytic identifies the use of the esxcli system auditrecords commands, which can be used to tamper with logging on an ESXi host. This action may indicate an attempt to evade detection or hinder forensic analysis by preventing the recording of system-level audit events.
Search
1`esxi_syslog`
2Message="*esxcli system auditrecords*"
3Message IN ("*remote*","*local*")
4NOT Message = "*[shell*"
5
6
7| rex field=_raw "Z (?<dest>[\w\.]+)\s"
8
9| rex field=_raw "[\w+]\]: (?<full_command>.*)"
10
11| rex field=full_command "\[(?<user>.*)]:\s(?<command>.*)"
12
13
14| stats count min(_time) as firstTime
15 max(_time) as lastTime
16 by dest user command
17
18
19| `security_content_ctime(firstTime)`
20
21| `security_content_ctime(lastTime)`
22
23| `esxi_audit_tampering_filter`
Data Source
| Name | Platform | Sourcetype | Source |
|---|---|---|---|
| VMWare ESXi Syslog | Other | 'vmw-syslog' |
'vmware:esxlog' |
Macros Used
| Name | Value |
|---|---|
| security_content_ctime | convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
| esxi_audit_tampering_filter | search * |
esxi_audit_tampering_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
| Setting | Value |
|---|---|
| Disabled | true |
| Cron Schedule | 0 * * * * |
| Earliest Time | -70m@m |
| Latest Time | -10m@m |
| Schedule Window | auto |
| Creates Finding (Notable) | Yes |
| Rule Title | %name% |
| Rule Description | %description% |
| Notable Event Fields | user, dest |
| Creates Intermediate Finding (Risk Event) | No |
Implementation
This is based on syslog data generated by VMware ESXi hosts. To implement this search, you must configure your ESXi systems to forward syslog output to your Splunk deployment. These logs must be ingested with the appropriate Splunk Technology Add-on for VMware ESXi Logs, which provides field extractions and CIM compatibility.
Known False Positives
No false positives have been identified at this time.
Associated Analytic Story
Finding
| Title | Entity Field | Entity Type | Risk Score |
|---|---|---|---|
| Audit tampering activity via [$command$] on ESXi host [$dest$]. | dest | system | 50 |
Threat Objects
| Field | Type |
|---|---|
| command | command |
References
Detection Testing
| Test Type | Status | Dataset | Source | Sourcetype |
|---|---|---|---|---|
| Validation | ✅ Passing | N/A | N/A | N/A |
| Unit | ✅ Passing | Dataset | vmware:esxlog |
vmw-syslog |
| Integration | ✅ Passing | Dataset | vmware:esxlog |
vmw-syslog |
Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub |
Version: 6