π [LEGACY] Azure Virtual Machine VHDs are not encrypted π’
- Contextual name: π [LEGACY] VHDs are not encrypted π’
- ID:
/ce/ca/azure/virtual-machine/LEGACY-vhd-encryption
- Located in: π Azure Virtual Machines
Flagsβ
- π’ Impossible policy
- π’ Policy with categories
- π’ Policy with type
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- Cloud Conformity
Descriptionβ
Descriptionβ
NOTE: This is a legacy recommendation. Managed Disks are encrypted by default and recommended for all new VM implementations.
VHD (Virtual Hard Disks) are stored in blob storage and are the old-style disks that were attached to Virtual Machines. The blob VHD was then leased to the VM. By default, storage accounts are not encrypted, and Microsoft Defender will then recommend that the OS disks should be encrypted. Storage accounts can be encrypted as a whole using PMK or CMK. This should be turned on for storage accounts containing VHDs.
Rationaleβ
While it is recommended to use Managed Disks which are encrypted by default, "legacy" VHDs may exist for a variety of reasons and may need to remain in VHD format. VHDs are not encrypted by default, so this recommendation intends to address the security of these disks. In these niche cases, VHDs should be encrypted using the procedures in this recommendation to encrypt and protect the data content.
If a virtual machine is using a VHD and can be converted to a managed disk, instructions for this procedure can be found in the resources section of this recommendation under the title "Convert VHD to Managed Disk."
... see more
Remediationβ
Remediationβ
From Azure Portalβ
- Navigate to the
Storage account
that you wish to encrypt.- Select
Encryption
.- Select the
Encryption type
that you wish to use.If you wish to use a Microsoft-managed key (the default), you can save at this point and encryption will be applied to the account.
If you select
Customer-managed keys
, it will ask for the location of the key (The default is an Azure Key Vault) and the key name.Once these are captured, save the configuration and the account will be encrypted using the provided key.
From Azure CLIβ
Create the Key Vault:
az keyvault create --name <name> --resource-group <resourceGroup> --location <location> --enabled-for-disk-encryption
Encrypt the disk and store the key in Key Vault:
az vm encryption enable -g <resourceGroup> --name <name> --disk-encryption-keyvault myKV
From PowerShellβ
This process uses a Key Vault to store the keys.
Create the Key Vault:
New-AzKeyvault -name <name> -ResourceGroupName <resourceGroup> -Location <location> -EnabledForDiskEncryption
... [see more](remediation.md)
policy.yamlβ
Linked Framework Sectionsβ
Section | Sub Sections | Internal Rules | Policies | Flags |
---|---|---|---|---|
πΌ CIS Azure v2.1.0 β πΌ 7.7 [Legacy] Ensure that VHDs are Encrypted - Level 2 (Manual) | 1 | |||
πΌ CIS Azure v3.0.0 β πΌ 8.9 [Legacy] Ensure that VHDs are Encrypted (Manual) | 1 | |||
πΌ Cloudaware Framework β πΌ Data Encryption | 31 |