Detection rules › Kusto
VMware ESXi - Multiple VMs stopped
'Detects when multiple VMs ware stopped by user.'
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Impact | T1529 System Shutdown/Reboot |
Rule body kusto
id: 5fe1af14-cd40-48ff-b581-3a12a1f90785
name: VMware ESXi - Multiple VMs stopped
description: |
'Detects when multiple VMs ware stopped by user.'
severity: Medium
status: Available
requiredDataConnectors:
- connectorId: SyslogAma
datatypes:
- Syslog
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
- Impact
relevantTechniques:
- T1529
query: |
let threshold = 5;
VMwareESXi
| where SyslogMessage has ('VmPoweredOffEvent')
| extend SrcUsername = extract(@'\[info\]\s+\[(.*?)\]', 1, SyslogMessage)
| extend DstHostname = extract(@'\[\d+\]\s+\[(.*?)\s+on', 1, SyslogMessage)
| summarize st_vm = make_set(DstHostname,200) by SrcUsername, bin(TimeGenerated, 5m)
| where array_length(st_vm) > threshold
| extend hostname = iff(array_length(st_vm) > 0, st_vm[0], "")
| extend NTDomain = tostring(split(hostname, '\\', 0)[0]), Name = tostring(split(SrcUsername, '\\', 1)[0]), HostName = tostring(split(hostname, '.', 0)[0]), DnsDomain = tostring(split(SrcUsername, '\\', 1)[0])
entityMappings:
- entityType: Account
fieldMappings:
- identifier: Name
columnName: Name
- identifier: DnsDomain
columnName: DnsDomain
- entityType: Host
fieldMappings:
- identifier: HostName
columnName: HostName
- identifier: NTDomain
columnName: NTDomain
version: 1.0.3
kind: Scheduled
Stages and Predicates
Parameters
let threshold = 5;
Stage 1: source
VMwareESXi
Stage 2: where
| where SyslogMessage has ('VmPoweredOffEvent')
Stage 3: extend
| extend SrcUsername = extract(@'\[info\]\s+\[(.*?)\]', 1, SyslogMessage)
Stage 4: extend
| extend DstHostname = extract(@'\[\d+\]\s+\[(.*?)\s+on', 1, SyslogMessage)
Stage 5: summarize
| summarize st_vm = make_set(DstHostname,200) by SrcUsername, bin(TimeGenerated, 5m)
Stage 6: where
| where array_length(st_vm) > threshold
Stage 7: extend
| extend hostname = iff(array_length(st_vm) > 0, st_vm[0], "")
hostname =st_vm > 0st_vm[0]""Stage 8: extend
| extend NTDomain = tostring(split(hostname, '\\', 0)[0]), Name = tostring(split(SrcUsername, '\\', 1)[0]), HostName = tostring(split(hostname, '.', 0)[0]), DnsDomain = tostring(split(SrcUsername, '\\', 1)[0])
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
SyslogMessage | match |
|
st_vm | gt |
|
Output fields
Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.
| Field | Source |
|---|---|
SrcUsername | summarize |
st_vm | summarize |
hostname | extend |
DnsDomain | extend |
HostName | extend |
NTDomain | extend |
Name | extend |