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 connectorsSyslogAma
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.3
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
relevantTechniques:
- T1078
name: VMware ESXi - Root login
queryPeriod: 14d
triggerThreshold: 0
id: deb448a8-6a9d-4f8c-8a95-679a0a2cd62c
severity: High
requiredDataConnectors:
- datatypes:
  - Syslog
  connectorId: SyslogAma
description: |
    'Detects when root user login from uncommon IP address.'
version: 1.0.3
status: Available
entityMappings:
- entityType: IP
  fieldMappings:
  - columnName: IPCustomEntity
    identifier: Address
tactics:
- InitialAccess
- PrivilegeEscalation
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  
kind: Scheduled
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/VMWareESXi/Analytic Rules/ESXiRootLogin.yaml
queryFrequency: 1h
{
  "$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/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",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess",
          "PrivilegeEscalation"
        ],
        "techniques": [
          "T1078"
        ],
        "templateVersion": "1.0.3",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}