Back to controls

[Legacy] Ensure that VHDs are Encrypted

**NOTE: This is a legacy recommendation. Managed Disks are encrypted by default and recommended for all new VM implementations.**

Category

Controls

High

Applies to

Microsoft Azure

Coverage

1 queries

Asset types

1 covered

Overview

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. They 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 be encrypted. Storage accounts can be encrypted as a whole using PMK or CMK, and this should be turned on for storage accounts containing VHDs.

Rationale

With the changes that have been made that recommend using managed disks that are encrypted by default, we also need to have a recommendation that "legacy" disks that may, for several reasons, need to be left as VHDs should also be encrypted to protect the data content.

Impact

The size of the impact will depend on how the encryption is implemented; if provider-managed keys(PMK) are utilized, the impact is relatively low, but processes need to be put in place to rotate the keys regularly. If customer-managed keys(CMK) are utilized, 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.

Remediation guidance

From Azure Portal

  1. Navigate to the storage account that you wish to encrypt
  2. Select the encryption option
  3. 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 arecaptured, 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"

References

  1. CLI: https://learn.microsoft.com/en-us/azure/virtual-machines/windows/disk-encryption-cli-quickstart
  2. Powershell: https://learn.microsoft.com/en-us/azure/virtual-machines/windows/disk-encryption-powershell-quickstart
  3. https://learn.microsoft.com/en-us/azure/security/benchmarks/security-controls-v2-data-protection#dp-5-encrypt-sensitive-data-at-rest

Service-wide remediation

Recommended when many resources are affected: fix the platform baseline first so new resources inherit the secure setting, then remediate the existing flagged resources in batches.

Azure

Use management group or subscription Azure Policy assignments, remediation tasks where supported, landing-zone standards, and IaC modules so drift is prevented at scale.

Operational rollout

  1. Fix the baseline first at the account, subscription, project, cluster, or tenant scope that owns this control.
  2. Remediate the currently affected resources in batches, starting with internet-exposed and production assets.
  3. Re-scan and track approved exceptions with an owner and expiry date.

Query logic

These are the stored checks tied to this control.

Azure unmanaged disks

Connectors

Microsoft Azure

Covered asset types

Disk

Expected check: eq []

{
  disks(where: { diskAttachments: { NOT: { vhdURI: "" } } }) {
    ...AssetFragment
  }
}
Cyscale Logo
Cyscale is an agentless cloud-native application protection platform (CNAPP) that automates the contextual analysis of cloud misconfigurations, vulnerabilities, access, and data, to provide an accurate and actionable assessment of risk.

Stay connected

Receive new blog posts and product updates from Cyscale

By clicking Subscribe, I agree to Cyscale’s Privacy Policy


© 2026 Cyscale Limited

LinkedIn icon
Twitter icon
Facebook icon
crunch base icon
angel icon