Unusual Azure VM Extension Detected
Identifies the first time a given VM extension name is created or updated on an Azure virtual machine or VM scale set within the rule's lookback window. VM extensions run with high privilege on the guest (SYSTEM on…
Description
Identifies the first time a given VM extension name is created or updated on an Azure virtual machine or VM scale set within the rule's lookback window. VM extensions run with high privilege on the guest (SYSTEM on Windows, root on Linux) and are a common code-execution and persistence primitive. The extension instance name is attacker-controlled and the Azure activity log records only that name, not the publisher or type, so the control plane cannot reliably identify the extension family (for example CustomScript). This rule therefore takes a type-agnostic ES|QL new-terms approach: it derives the host and the extension instance name from `azure.resource.name` and alerts the first time a given (host, extension name) pair is observed in the window, surfacing novel extension deployments while suppressing names a host routinely uses.
Detection logic
Its licence does not clear it for publishing here
Sunturai publishes a detection's own text where the licence it arrived under has been reviewed and permits it, and Elastic License 2.0 has not. The query as its source wrote it, its canonical form and the hash that pins this revision are in the workspace record.
Detection requirements
Known benign triggers
- Legitimate provisioning, patching, and configuration-management automation may deploy an extension to a host for the first time. The first occurrence per host will alert. Baseline expected automation principals and hosts and exclude verified-benign ones.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| blog.pwnedlabs.io/diving-deep-into-azure-vm-attack-vectors | 6 |
| learn.microsoft.com/en-us/azure/virtual-machines/extensions/custom-script-windows | 3 |
| learn.microsoft.com/en-us/azure/virtual-machines/extensions/overview | Only this detection cites it |
| www.netspi.com/blog/technical-blog/adversary-simulation/7-ways-to-execute-command-on-azure-virtual-machine-virtual-machine-scale-sets/ | 6 |
| www.sysdig.com/blog/the-expendable-extension-name-azure-vmaccess-naming-chaos-password-resets-and-a-detection-gap | 4 |
From the source
- At source
- Open at source
- Upstream identifier
- d29b0a67-178d-4381-92c5-02e9fd9a6ef6
- Tagged by the source as
- Data Source: AzureData Source: Azure Activity LogsDomain: CloudNoise: MediumPerformance: FastPlatform: AzureProfile: RecommendedResources: Investigation GuideRule Type: ES|QLTactic: ExecutionTactic: PersistenceThreat: Cloud VM ExecutionUse Case: Threat Detection
Licence
- Published under
- Elastic License 2.0Read the licence
- Attribution
- Required
Authorship
- Written by
- Published
- Sep 29, 2026
- Version
- 4