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 = makeset(DstHostname) by SrcUsername, bin(TimeGenerated, 5m)
| where array_length(st_vm) > threshold
| extend HostCustomEntity = st_vm, AccountCustomEntity = SrcUsername
version: 1.0.0
status: Available
queryFrequency: 1h
requiredDataConnectors:
- connectorId: VMwareESXi
dataTypes:
- VMwareESXi
entityMappings:
- fieldMappings:
- columnName: HostCustomEntity
identifier: FullName
entityType: Host
- fieldMappings:
- columnName: AccountCustomEntity
identifier: Name
entityType: Account
kind: Scheduled
queryPeriod: 1h
severity: Medium
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 = makeset(DstHostname) by SrcUsername, bin(TimeGenerated, 5m)
| where array_length(st_vm) > threshold
| extend HostCustomEntity = st_vm, AccountCustomEntity = SrcUsername
triggerOperator: gt
id: 5fe1af14-cd40-48ff-b581-3a12a1f90785
description: |
'Detects when multiple VMs ware stopped by user.'
triggerThreshold: 0
name: VMware ESXi - Multiple VMs stopped
relevantTechniques:
- T1529
tactics:
- Impact
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/VMWareESXi/Analytic Rules/ESXiMultipleVMStopped.yaml
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workspace": {
"type": "String"
}
},
"resources": [
{
"id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/5fe1af14-cd40-48ff-b581-3a12a1f90785')]",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/5fe1af14-cd40-48ff-b581-3a12a1f90785')]",
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules",
"kind": "Scheduled",
"apiVersion": "2022-11-01",
"properties": {
"displayName": "VMware ESXi - Multiple VMs stopped",
"description": "'Detects when multiple VMs ware stopped by user.'\n",
"severity": "Medium",
"enabled": true,
"query": "let threshold = 5;\nVMwareESXi\n| where SyslogMessage has ('VmPoweredOffEvent')\n| extend SrcUsername = extract(@'\\[info\\]\\s+\\[(.*?)\\]', 1, SyslogMessage)\n| extend DstHostname = extract(@'\\[\\d+\\]\\s+\\[(.*?)\\s+on', 1, SyslogMessage)\n| summarize st_vm = makeset(DstHostname) by SrcUsername, bin(TimeGenerated, 5m)\n| where array_length(st_vm) > threshold\n| extend HostCustomEntity = st_vm, AccountCustomEntity = SrcUsername\n",
"queryFrequency": "PT1H",
"queryPeriod": "PT1H",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0,
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"Impact"
],
"techniques": [
"T1529"
],
"alertRuleTemplateName": "5fe1af14-cd40-48ff-b581-3a12a1f90785",
"customDetails": null,
"entityMappings": [
{
"entityType": "Host",
"fieldMappings": [
{
"identifier": "FullName",
"columnName": "HostCustomEntity"
}
]
},
{
"entityType": "Account",
"fieldMappings": [
{
"identifier": "Name",
"columnName": "AccountCustomEntity"
}
]
}
],
"status": "Available",
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/VMWareESXi/Analytic Rules/ESXiMultipleVMStopped.yaml",
"templateVersion": "1.0.0"
}
}
]
}