Description
For added security, only install organization-approved extensions on VMs.
Rationaleβ
Azure virtual machine extensions are small applications that provide post-deployment configuration and automation tasks on Azure virtual machines. These extensions run with administrative privileges and could potentially access anything on a virtual machine. The Azure Portal and community provide several such extensions. Each organization should carefully evaluate these extensions and ensure that only those that are approved for use are actually implemented.
Impactβ
Functionality by unsupported extensions will be disabled.
Auditβ
From Azure Portalβ
- Go to
Virtual machines
. - For each virtual machine, click on the server name to select it go to.
- In the new column menu, under
Settings
Click onExtensions + applications
. - Ensure that all the listed extensions are approved by your organization for use.
From Azure CLIβ
Use the below command to list the extensions attached to a VM, and ensure the listed extensions are approved for use:
az vm extension list --vm-name <vmName> --resource-group <sourceGroupName> --query [*].name
From PowerShellβ
Get a list of VMs:
Get-AzVM
For each VM run the following command:
Get-AzVMExtension -ResourceGroupName <VM Resource Group> -VMName <VM Name>
Review each Name
, ExtensionType
, and ProvisioningState
to make sure no unauthorized extensions are installed on any virtual machines.
From Azure Policyβ
If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure.
- Policy ID: c0e996f8-39cf-4af9-9f45-83fbde810432 - Name:
Only approved VM extensions should be installed
Default Valueβ
By default, no extensions are added to the virtual machines.
Referencesβ
- https://docs.microsoft.com/en-us/azure/virtual-machines/windows/extensions-features
- https://docs.microsoft.com/en-us/powershell/module/az.compute/?view=azps-7.5.0#vm-extensions
- https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-asset-management#am-2-use-only-approved-services
- https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-asset-management#am-5-use-only-approved-applications-in-virtual-machine