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

VMware ESXi - Root login

Back
Iddeb448a8-6a9d-4f8c-8a95-679a0a2cd62c
RulenameVMware ESXi - Root login
DescriptionDetects when root user login from uncommon IP address.
SeverityHigh
TacticsInitialAccess
PrivilegeEscalation
TechniquesT1078
Required data connectorsVMwareESXi
KindScheduled
Query frequency1h
Query period14d
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/VMWareESXi/Analytic Rules/ESXiRootLogin.yaml
Version1.0.1
Arm templatedeb448a8-6a9d-4f8c-8a95-679a0a2cd62c.json
Deploy To Azure
let p_lookback = 14d;
let t_lookback = 1h;
let root_ips = VMwareESXi
| where TimeGenerated between (ago(p_lookback) .. ago(t_lookback))
| where SyslogMessage has_all ('UserLoginSessionEvent', 'root', 'logged in')
| extend SrcIpAddr = extract(@'root@(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})', 1, SyslogMessage)
| summarize makeset(SrcIpAddr);
VMwareESXi
| where TimeGenerated > ago(t_lookback)
| where SyslogMessage has_all ('UserLoginSessionEvent', 'root', 'logged in')
| extend SrcIpAddr = extract(@'root@(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})', 1, SyslogMessage)
| where SrcIpAddr !in (root_ips)
| extend IPCustomEntity = SrcIpAddr
queryPeriod: 14d
version: 1.0.1
kind: Scheduled
triggerThreshold: 0
relevantTechniques:
- T1078
triggerOperator: gt
entityMappings:
- fieldMappings:
  - identifier: Address
    columnName: IPCustomEntity
  entityType: IP
query: |
  let p_lookback = 14d;
  let t_lookback = 1h;
  let root_ips = VMwareESXi
  | where TimeGenerated between (ago(p_lookback) .. ago(t_lookback))
  | where SyslogMessage has_all ('UserLoginSessionEvent', 'root', 'logged in')
  | extend SrcIpAddr = extract(@'root@(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})', 1, SyslogMessage)
  | summarize makeset(SrcIpAddr);
  VMwareESXi
  | where TimeGenerated > ago(t_lookback)
  | where SyslogMessage has_all ('UserLoginSessionEvent', 'root', 'logged in')
  | extend SrcIpAddr = extract(@'root@(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})', 1, SyslogMessage)
  | where SrcIpAddr !in (root_ips)
  | extend IPCustomEntity = SrcIpAddr  
name: VMware ESXi - Root login
queryFrequency: 1h
requiredDataConnectors:
- connectorId: VMwareESXi
  dataTypes:
  - VMwareESXi
description: |
    'Detects when root user login from uncommon IP address.'
status: Available
id: deb448a8-6a9d-4f8c-8a95-679a0a2cd62c
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/VMWareESXi/Analytic Rules/ESXiRootLogin.yaml
tactics:
- InitialAccess
- PrivilegeEscalation
severity: High
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2023-02-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/deb448a8-6a9d-4f8c-8a95-679a0a2cd62c')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/deb448a8-6a9d-4f8c-8a95-679a0a2cd62c')]",
      "properties": {
        "alertRuleTemplateName": "deb448a8-6a9d-4f8c-8a95-679a0a2cd62c",
        "customDetails": null,
        "description": "'Detects when root user login from uncommon IP address.'\n",
        "displayName": "VMware ESXi - Root login",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "IPCustomEntity",
                "identifier": "Address"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/VMWareESXi/Analytic Rules/ESXiRootLogin.yaml",
        "query": "let p_lookback = 14d;\nlet t_lookback = 1h;\nlet root_ips = VMwareESXi\n| where TimeGenerated between (ago(p_lookback) .. ago(t_lookback))\n| where SyslogMessage has_all ('UserLoginSessionEvent', 'root', 'logged in')\n| extend SrcIpAddr = extract(@'root@(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})', 1, SyslogMessage)\n| summarize makeset(SrcIpAddr);\nVMwareESXi\n| where TimeGenerated > ago(t_lookback)\n| where SyslogMessage has_all ('UserLoginSessionEvent', 'root', 'logged in')\n| extend SrcIpAddr = extract(@'root@(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})', 1, SyslogMessage)\n| where SrcIpAddr !in (root_ips)\n| extend IPCustomEntity = SrcIpAddr\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "P14D",
        "severity": "High",
        "status": "Available",
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess",
          "PrivilegeEscalation"
        ],
        "techniques": [
          "T1078"
        ],
        "templateVersion": "1.0.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}