Description
Virtual Machine Disks and snapshots can be configured to allow access from different network resources.
Rationaleβ
The setting Enable public access from all networks
is, in many cases, an overly permissive setting on Virtual Machine Disks that presents atypical attack, data infiltration, and data exfiltration vectors. If a disk to network connection is required, the preferred setting is to Disable public access and enable private access
.
Impactβ
The setting Disable public access and enable private access
will require configuring a private link (URL in references below).
The setting Disable public and private access
is most secure and preferred where disk network access is not needed.
Auditβ
From Azure Portalβ
Part A. Select the Virtual Machine to Evaluateβ
- Using the search bar, search for and open the
Virtual Machines
service. - Click on the name of the Virtual Machine to be audited.
Part B. Evaluate each Virtual Machine Disk individuallyβ
- From the selected Virtual Machine resource window, expand the
Settings
menu item and clickDisks
. - For each disk, click the name of the disk to open the disk resource window.
- From the selected Disk resource window, expand the
Settings
menu item, and clickNetworking
.
Ensure that Network access is NOT set to Enable public access from all networks
.
Repeat Part B for each Disk attached to a VM.
Repeat Parts A and B to evaluate all Disks in all VMs.
From Azure CLIβ
For each managed disk, run the following command:
az disk show --disk-name <disk name> --resource-group <resource group name>
Ensure the publicNetworkAccess
setting is set to Disabled
and the networkAccessPolicy
setting is set to AllowPrivate
or DenyAll
.
From PowerShellβ
For each managed disk, run the following PowerShell command:
Get-AzDisk -ResourceGroupName <resource group name> -DiskName <disk name>
Ensure the PublicNetworkAccess
setting is Disabled
and the NetworkAccessPolicy
is set to AllowPrivate
or DenyAll
.
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: 8405fdab-1faf-48aa-b702-999c9c172094 - Name:
Managed disks should disable public network access
Default Valueβ
By default, Disk Network access is set to Enable public access from all networks
.
Referencesβ
- https://learn.microsoft.com/en-us/azure/virtual-machines/disks-enable-private-links-for-import-export-portal
- https://learn.microsoft.com/en-us/azure/virtual-machines/linux/disks-export-import-private-links-cli
- https://learn.microsoft.com/en-us/azure/virtual-machines/disks-restrict-import-export-overview