| name | cis-azure-compute-20.6 |
| description | Ensure that Only Approved Extensions Are Installed |
| category | cis-azure-compute |
| version | 2.0.0 |
| author | cyberstrike-official |
| tags | ["cis","azure","virtual-machines","vm","disks","encryption"] |
| cis_id | 20.6 |
| cis_benchmark | CIS Microsoft Azure Compute Services Benchmark v2.0.0 |
| tech_stack | ["azure"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
Ensure that Only Approved Extensions Are Installed
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 Procedure
Using Azure Portal
- Go to
Virtual machines.
- For each virtual machine, click on the server name to select it.
- In the new column menu, under
Settings Click on Extensions + applications.
- Ensure that all the listed extensions are approved by your organization for use.
Using 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
Using Azure 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.
Expected Result
Only organization-approved extensions should be installed on virtual machines. No unauthorized or unapproved extensions should be present.
Remediation
Using Azure Portal
- Go to
Virtual machines.
- For each virtual machine, go to
Settings.
- Click on
Extensions + applications.
- If there are unapproved extensions, uninstall them.
Using Azure CLI
From the audit command identify the unapproved extensions, and use the below CLI command to remove an unapproved extension attached to VM.
az vm extension delete --resource-group <resourceGroupName> --vm-name <vmName> --name <extensionName>