ESXi Audit Tampering

 Original Source: [splunk source]
Name:ESXi Audit Tampering
id:c48a155b-2861-417a-813c-220f5272cf01
version:6
date:None
author:Raven Tait, Splunk
status:production
type:TTP
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.
Data_source:
  • -VMWare ESXi Syslog
search:`esxi_syslog`
Message="*esxcli system auditrecords*"
Message IN ("*remote*","*local*")
NOT Message = "*[shell*"

| rex field=_raw "Z (?<dest>[\w\.]+)\s"
| rex field=_raw "[\w+]\]: (?<full_command>.*)"
| rex field=full_command "\[(?<user>.*)]:\s(?<command>.*)"

| stats count min(_time) as firstTime
max(_time) as lastTime
by dest user command

| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `esxi_audit_tampering_filter`


how_to_implement: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.
References:
  -https://detect.fyi/detecting-and-responding-to-esxi-compromise-with-splunk-f33998ce7823
drilldown_searches:
 name:'View the detection results for - "$dest$"'
 search:'%original_detection_search% | search dest = "$dest$"'
 earliest_offset:'$info_min_time$'
 latest_offset:'$info_max_time$'
 name:'View risk events for the last 7 days for - "$dest$"'
 search:'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$") | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
 earliest_offset:'7d'
 latest_offset:'0'
analytic_story:['ESXi Post Compromise', 'Black Basta Ransomware']

asset_type:Infrastructure

mitre_attack_id:['T1690', 'T1070']

product:['Splunk Enterprise', 'Splunk Enterprise Security', 'Splunk Cloud']

category:application

security_domain:endpoint

tags:

tests:
 name:'True Positive Test'
 attack_data:
  data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.003/esxi_audit_tampering/esxi_audit_tampering.log
  source: vmware:esxlog
  sourcetype: vmw-syslog
 test_type:'unit'
manual_test:None