Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

VMware ESXi - Multiple VMs stopped

Back
Id5fe1af14-cd40-48ff-b581-3a12a1f90785
RulenameVMware ESXi - Multiple VMs stopped
DescriptionDetects when multiple VMs ware stopped by user.
SeverityMedium
TacticsImpact
TechniquesT1529
Required data connectorsSyslogAma
VMwareESXi
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/VMWareESXi/Analytic Rules/ESXiMultipleVMStopped.yaml
Version1.0.2
Arm template5fe1af14-cd40-48ff-b581-3a12a1f90785.json
Deploy To Azure
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])
relevantTechniques:
- T1529
name: VMware ESXi - Multiple VMs stopped
requiredDataConnectors:
- dataTypes:
  - VMwareESXi
  connectorId: VMwareESXi
- datatypes:
  - Syslog
  connectorId: SyslogAma
entityMappings:
- fieldMappings:
  - identifier: Name
    columnName: Name
  - identifier: DnsDomain
    columnName: DnsDomain
  entityType: Account
- fieldMappings:
  - identifier: HostName
    columnName: HostName
  - identifier: NTDomain
    columnName: NTDomain
  entityType: Host
triggerThreshold: 0
id: 5fe1af14-cd40-48ff-b581-3a12a1f90785
tactics:
- Impact
version: 1.0.2
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/VMWareESXi/Analytic Rules/ESXiMultipleVMStopped.yaml
queryPeriod: 1h
kind: Scheduled
queryFrequency: 1h
severity: Medium
status: Available
description: |
    'Detects when multiple VMs ware stopped by user.'
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])  
triggerOperator: gt
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2024-01-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/5fe1af14-cd40-48ff-b581-3a12a1f90785')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/5fe1af14-cd40-48ff-b581-3a12a1f90785')]",
      "properties": {
        "alertRuleTemplateName": "5fe1af14-cd40-48ff-b581-3a12a1f90785",
        "customDetails": null,
        "description": "'Detects when multiple VMs ware stopped by user.'\n",
        "displayName": "VMware ESXi - Multiple VMs stopped",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "Name",
                "identifier": "Name"
              },
              {
                "columnName": "DnsDomain",
                "identifier": "DnsDomain"
              }
            ]
          },
          {
            "entityType": "Host",
            "fieldMappings": [
              {
                "columnName": "HostName",
                "identifier": "HostName"
              },
              {
                "columnName": "NTDomain",
                "identifier": "NTDomain"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/VMWareESXi/Analytic Rules/ESXiMultipleVMStopped.yaml",
        "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 = make_set(DstHostname,200) by SrcUsername, bin(TimeGenerated, 5m)\n| where array_length(st_vm) > threshold\n| extend hostname = iff(array_length(st_vm) > 0, st_vm[0], \"\")\n| 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])\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "Medium",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Impact"
        ],
        "techniques": [
          "T1529"
        ],
        "templateVersion": "1.0.2",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}