7.7 Ensure that VHD's are encrypted


VHD (Virtual Hard Disks) are stored in BLOB storage and are the old style disks that were attached to Virtual Machines, and the BLOB VHD was then leased to the VM. By Default storage accounts are not encrypted, and Azure Defender(Security Centre) would then recommend that the OS disks should be encrypted. Storage accounts can be encrypted as a whole using PMK or CMK and this should be turned on for storage accounts containing VHD's.


With the changes that have been made that recommend using managed disks that are encrypted by default, we need to also have a recommendation that 'legacy' disk that may for a number of reasons need to be left as VHD's should also be encrypted to protect the data content.


Depending on how the encryption is implemented will change the size of the impact, if provider managed keys(PMK) are utilised the impact is relatively low, but processes need to be put in place to regularly rotate the keys. If Customer managed keys(CMK) are utilised a key management process needs to be implemented to store and manage key rotation and thus the impact is medium to high depending on user maturity with key management.


From Azure Portal

Navigate to the storage account that you wish to encrypt

Select the encryption option

Select the key type that you wish to use

If you wish to use an azure managed key (the default), you can save at this point and encryption will be applied to the account.
If you select customer managed key it will ask for the location of the key (The default is an Azure Keyvault) and the key name.
Once these are captured, save the configuration and the account will be encrypted using the provided key.
Using Azure Command Line Interface:
Create the Keyvault

az keyvault create --name 'myKV' --resource-group 'myResourceGroup' --location eastus --enabled-for-disk-encryption

Encrypt the disk and store the key in keyvault

az vm encryption enable -g MyResourceGroup --name MyVM --disk-encryption-keyvault myKV

Using Azure Powershell
This process uses a keyvault to store the keys
Create the Keyvault

New-AzKeyvault -name MyKV -ResourceGroupName myResourceGroup -Location EastUS -EnabledForDiskEncryption

Encrypt the disk and store the key in keyvault

$KeyVault = Get-AzKeyVault -VaultName MyKV -ResourceGroupName MyResourceGroup

Set-AzVMDiskEncryptionExtension -ResourceGroupName MyResourceGroup -VMName MyVM -DiskEncryptionKeyVaultUrl $KeyVault.VaultUri -DiskEncryptionKeyVaultId $KeyVault.ResourceId

Default Value:

The default value for encryption is 'NO Encryption'

See Also


Item Details


References: 800-53|IA-5(1), CSCv7|13

Plugin: microsoft_azure

Control ID: 0877f6c9ea0df228f1ec6a929fe635b0049a9daf34cf44e4fa0291d09d9c2bb2