CIS Microsoft Azure Foundations Benchmark v6.0.0
The CIS Azure Foundations Benchmark provides prescriptive guidance for configuring security options for a subset of Azure with an emphasis on foundational, testable, and architecture agnostic settings.
Run this compliance with Prowler
Run in Prowler Cloudprowler azure --compliance cis_6.0_azureRequirements (127)
2 Analytics Services124
2.1.1Ensure that Azure Databricks is deployed in a customer-managed virtual network (VNet)1
Attributes
- Profile
Level 1
- Section
2 Analytics Services
- Sub Section
2.1 Azure Databricks
- Description
Ensure that Azure Databricks is deployed in a customer-managed virtual network (VNet)
- Default Value
By default, Azure Databricks uses a Databricks-Managed VNet.
- Audit Procedure
Audit from Azure Portal 1. Go to Azure Portal Search for Databricks Workspaces. 1. Select the Databricks Workspace to audit. 1. Under Networking, check if the workspace is deployed in a Customer-Managed VNet. 1. If the Virtual Network field shows Databricks-Managed VNet, it is non-compliant. 1. Verify NSG rules and Private Endpoints for fine-grained access control. Audit from Azure CLI Run the following command to check if Databricks is using a customer-managed VNet:
az network vnet show --resource-group <resource-group-name> --name <vnet-name>Ensure that Databricks subnets are present in the VNet configuration. Validate NSG rules attached to the Databricks subnets. Audit from PowerShellGet-AzDatabricksWorkspace -ResourceGroupName <resource-group-name> -Name <databricks-workspace-name> | Select-Object VirtualNetworkIdIf VirtualNetworkId is null or shows a Databricks-Managed VNet, it is non-compliant. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 9c25c9e4-ee12-4882-afd2-11fb9d87893f - Name: 'Azure Databricks Workspaces should be in a virtual network'- Impact Statement
- Requires additional configuration during Databricks workspace deployment. - Might increase operational overhead for network maintenance. - May impact connectivity if misconfigured (e.g., restrictive NSG rules or missing routes).
- Assessment Status
Automated
- Rationale Statement
Using a customer-managed VNet ensures better control over network security and aligns with zero-trust architecture principles. It allows for: - Restricted outbound internet access to prevent unauthorized data exfiltration. - Integration with on-premises networks via VPN or ExpressRoute for hybrid connectivity. - Fine-grained NSG policies to restrict access at the subnet level. - Private Link for secure API access, avoiding public internet exposure.
- Remediation Procedure
Remediate from Azure Portal 1. Delete the existing Databricks workspace (migration required). 1. Create a new Databricks workspace with VNet Injection: 1. Go to Azure Portal Create Databricks Workspace. 1. Select Advanced Networking. 1. Choose Deploy into your own Virtual Network. 1. Specify a customer-managed VNet and associated subnets. 1. Enable Private Link for secure API access. Remediate from Azure CLI Deploy a new Databricks workspace in a custom VNet:
az databricks workspace create --name <databricks-workspace-name> \ --resource-group <resource-group-name> \ --location <region> \ --managed-resource-group <managed-rg-name> \ --enable-no-public-ip true \ --network-security-group-rule NoAzureServices \ --public-network-access Disabled \ --custom-virtual-network-id /subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Network/virtualNetworks/<vnet-name>Ensure NSG Rules are correctly configured:az network nsg rule create --resource-group <resource-group-name> \ --nsg-name <nsg-name> \ --name DenyAllOutbound \ --direction Outbound \ --access Deny \ --priority 4096Remediate from PowerShellNew-AzDatabricksWorkspace -ResourceGroupName <resource-group-name> -Name <databricks-workspace-name> -Location <region> -ManagedResourceGroupName <managed-rg-name> -CustomVirtualNetworkId /subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Network/virtualNetworks/<vnet-name>
2.1.2Ensure that Network Security Groups are Configured for Databricks Subnets0
Attributes
- Profile
Level 1
- Section
2 Analytics Services
- Sub Section
2.1 Azure Databricks
- Description
Ensure that Network Security Groups are Configured for Databricks Subnets
- Default Value
By default, Databricks subnets do not have NSGs assigned.
- Audit Procedure
Audit from Azure Portal 1. Navigate to Virtual Networks > Subnets, and review NSG assignments. Audit from Azure CLI
az network nsg list --query [].{Name:name, Rules:securityRules}Audit from PowerShellGet-AzNetworkSecurityGroup -ResourceGroupName <resource-group-name>- Impact Statement
- NSGs require periodic maintenance to ensure rule accuracy. * Misconfigured NSGs could inadvertently block required traffic.
- Assessment Status
Automated
- Rationale Statement
Using NSGs with both explicit allow and deny rules provides clear documentation and control over permitted and prohibited traffic. While Azure NSGs implicitly deny all traffic not explicitly allowed, defining explicit deny rules for known malicious or unnecessary sources enhances clarity, simplifies troubleshooting, and supports compliance audits.
- Remediation Procedure
Remediate from Azure Portal 1. Assign NSG to Databricks subnets under Networking > NSG Settings.
2.1.3Ensure that Traffic is Encrypted Between Cluster Worker Nodes0
Attributes
- Profile
Level 2
- Section
2 Analytics Services
- Sub Section
2.1 Azure Databricks
- Description
Ensure that Traffic is Encrypted Between Cluster Worker Nodes
- Default Value
By default, traffic is not encrypted between cluster worker nodes.
- Audit Procedure
Audit from Azure Portal Review cluster init scripts: 1. Navigate to your Azure Databricks workspace, go to the Clusters section, select a cluster, and check the Advanced Options for any init scripts that configure encryption settings. Verify spark configuration: 2. Ensure that the following Spark configurations are set:
spark.authenticate true spark.authenticate.enableSaslEncryption true spark.network.crypto.enabled true spark.network.crypto.keyLength 256 spark.network.crypto.keyFactoryAlgorithm PBKDF2WithHmacSHA1 spark.io.encryption.enabled trueThese settings can be found in the cluster's Spark configuration properties. Check keystone management: 3. Verify that the Java KeyStore (JKS) file is securely stored in DBFS and that its integrity is maintained. 4. Ensure that the keystore password is securely managed and not hardcoded in scripts.- Impact Statement
- Enabling encryption may introduce a performance penalty due to the computational overhead associated with encrypting and decrypting traffic. This can result in longer query execution times, especially for data-intensive operations. * Implementing encryption requires creating and managing init scripts, which adds complexity to cluster configuration and maintenance. * The shared encryption secret is derived from the hash of the keystore stored in DBFS. If the keystore is updated or rotated, all running clusters must be restarted to prevent authentication failures between Spark workers and drivers.
- Assessment Status
Manual
- Rationale Statement
- Protects sensitive data during transit between cluster nodes, mitigating risks of data interception or unauthorized access. * Aligns with organizational security policies and compliance requirements that mandate encryption of data in transit. * Enhances overall security posture by ensuring that all inter-node communications within the cluster are encrypted.
- Remediation Procedure
Create a JKS keystore: 1. Generate a Java KeyStore (JKS) file that will be used for SSL/TLS encryption. 2. Upload the keystore file to a secure directory in DBFS (e.g. /dbfs/<keystore-directory>/jetty_ssl_driver_keystore.jks). Develop an init script: 3. Create an init script that performs the following tasks: - Retrieves the JKS keystore file and password. - Derives a shared encryption secret from the keystore. - Configures Spark driver and executor settings to enable encryption. 4. Example init script:
#!/bin/bash set -euo pipefail keystore_dbfs_file=/dbfs/<keystore-directory>/jetty_ssl_driver_keystore.jks max_attempts=30 while [ ! -f ${keystore_dbfs_file} ]; do if [ $max_attempts == 0 ]; then echo ERROR: Unable to find the file : $keystore_dbfs_file. Failing the script. exit 1 fi sleep 2s ((max_attempts--)) done sasl_secret=$(sha256sum $keystore_dbfs_file | cut -d' ' -f1) if [ -z ${sasl_secret} ]; then echo ERROR: Unable to derive the secret. Failing the script. exit 1 fi local_keystore_file=$DB_HOME/keys/jetty_ssl_driver_keystore.jks local_keystore_password=gb1gQqZ9ZIHS if [[ $DB_IS_DRIVER = TRUE ]]; then driver_conf=${DB_HOME}/driver/conf/spark-branch.conf echo Configuring driver conf at $driver_conf if [ ! -e $driver_conf ]; then echo spark.authenticate true >> $driver_conf echo spark.authenticate.secret $sasl_secret >> $driver_conf echo spark.authenticate.enableSaslEncryption true >> $driver_conf echo spark.network.crypto.enabled true >> $driver_conf echo spark.network.crypto.keyLength 256 >> $driver_conf echo spark.network.crypto.keyFactoryAlgorithm PBKDF2WithHmacSHA1 >> $driver_conf echo spark.io.encryption.enabled true >> $driver_conf echo spark.ssl.enabled true >> $driver_conf echo spark.ssl.keyPassword $local_keystore_password >> $driver_conf echo spark.ssl.keyStore $local_keystore_file >> $driver_conf echo spark.ssl.keyStorePassword $local_keystore_password >> $driver_conf echo spark.ssl.protocol TLSv1.3 >> $driver_conf fi fi executor_conf=${DB_HOME}/conf/spark.executor.extraJavaOptions echo Configuring executor conf at $executor_conf if [ ! -e $executor_conf ]; then echo -Dspark.authenticate=true >> $executor_conf echo -Dspark.authenticate.secret=$sasl_secret >> $executor_conf echo -Dspark.authenticate.enableSaslEncryption=true >> $executor_conf echo -Dspark.network.crypto.enabled=true >> $executor_conf echo -Dspark.network.crypto.keyLength=256 >> $executor_conf echo -Dspark.network.crypto.keyFactoryAlgorithm=PBKDF2WithHmacSHA1 >> $executor_conf echo -Dspark.io.encryption.enabled=true >> $executor_conf echo -Dspark.ssl.enabled=true >> $executor_conf echo -Dspark.ssl.keyPassword=$local_keystore_password >> $executor_conf echo -Dspark.ssl.keyStore=$local_keystore_file >> $executor_conf echo -Dspark.ssl.keyStorePassword=$local_keystore_password >> $executor_conf echo -Dspark.ssl.protocol=TLSv1.3 >> $executor_conf fi5. Save.
2.1.4Ensure that Users and Groups are Synced from Microsoft Entra ID to Azure Databricks0
Attributes
- Profile
Level 1
- Section
2 Analytics Services
- References
- https://learn.microsoft.com/en-us/azure/databricks/administration-guide/users-groups/scim/aad
- Sub Section
2.1 Azure Databricks
- Description
Ensure that Users and Groups are Synced from Microsoft Entra ID to Azure Databricks
- Default Value
By default, Azure Databricks does not sync users and groups from Microsoft Entra ID.
- Audit Procedure
Audit from Azure Portal Verify SCIM provisioning is enabled: 1. Go to
Microsoft Entra ID. 1. UnderManage, clickEnterprise applications. 1. Click the name of the Azure Databricks SCIM application. 1. UnderProvisioning, confirm that SCIM provisioning is enabled and running. Check user sync status in Azure Portal: 5. UnderProvisioning Logs, verify the last successful sync and any failed entries. Check user sync status in Databricks: 6. Go toAdmin Console>Identity and Access Management. 7. Confirm that Users and Groups match those assigned in Microsoft Entra ID. Ensure role-based access control (RBAC) mapping is correct: 8. Verify that users are assigned appropriate Databricks roles (e.g. Admin, User, Contributor). 9. Confirm that groups are mapped to workspace access roles.- Impact Statement
SCIM provisioning requires role mapping to avoid misconfigured user privileges.
- Assessment Status
Manual
- Rationale Statement
Syncing users and groups from Microsoft Entra ID centralizes access control, enforces the least privilege principle by automatically revoking unnecessary access, reduces administrative overhead by eliminating manual user management, and ensures auditability and compliance with industry regulations.
- Remediation Procedure
Remediate from Azure Portal Enable provisioning in Azure Portal: 1. Go to
Microsoft Entra ID. 1. UnderManage, clickEnterprise applications. 1. Click the name of the Azure Databricks SCIM application. 1. UnderProvisioning, selectAutomaticand enter the SCIM endpoint and API token from Databricks. Enable provisioning in Databricks: 5. Navigate toAdmin Console>Identity and Access Management. 6. Enable SCIM provisioning and generate an API token. Configure role assignments: 7. Ensure groups from Entra ID are mapped to appropriate Databricks roles. 8. Restrict administrative privileges to designated security groups. Regularly monitor sync logs: 9. Periodically review sync logs in Microsoft Entra ID and Databricks Admin Console. 10. Configure Azure Monitor alerts for provisioning failures. Disable manual user creation in Databricks: 11. Ensure that all user management is controlled via SCIM sync from Entra ID. 12. Disable personal access token usage for authentication. Remediate from Azure CLI Enable SCIM User and Group Provisioning in Azure Databricks:az ad app update --id <databricks-app-id> --set provisioning.provisioningMode=Automatic
2.1.5Ensure that Unity Catalog is Configured for Azure Databricks0
Attributes
- Profile
Level 1
- Section
2 Analytics Services
- Sub Section
2.1 Azure Databricks
- Description
Ensure that Unity Catalog is Configured for Azure Databricks
- Default Value
New workspaces have Unity Catalog enabled by default. Existing workspaces may require manual enablement.
- Audit Procedure
Method 1: Verify unity catalog deployment: 1. As an Azure Databricks account admin, log into the account console. 1. Click Workspaces. 1. Find your workspace and check the Metastore column. If a metastore name is present, your workspace is attached to a Unity Catalog metastore and therefore enabled for Unity Catalog. Method 2: Run a SQL query to confirm Unity Catalog enablement Run the following SQL query in the SQL query editor or a notebook that is attached to a Unity Catalog-enabled compute resource. No admin role is required.
SELECT CURRENT_METASTORE();If the query returns a metastore ID like the following, then your workspace is attached to a Unity Catalog metastore and therefore enabled for Unity Catalog.- Impact Statement
- Improperly configured permissions may lead to data exfiltration or unauthorized access. * Unity Catalog requires structured governance policies to be effective and prevent overly permissive access.
- Assessment Status
Manual
- Rationale Statement
- Enforces centralized access control policies and reduces data security risks. * Enables identity-based authentication via Microsoft Entra ID. * Improves compliance with industry regulations (e.g. GDPR, HIPAA, SOC 2) by providing audit logs and access visibility. * Prevents unauthorized data access through table-, row-, and column-level security (RLS & CLS).
- Remediation Procedure
Use the remediation procedure written in this article: https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/get-started.
2.1.6Ensure that Usage is Restricted and Expiry is Enforced for Databricks Personal Access Tokens0
Attributes
- Profile
Level 1
- Section
2 Analytics Services
- Sub Section
2.1 Azure Databricks
- Description
Ensure that Usage is Restricted and Expiry is Enforced for Databricks Personal Access Tokens
- Default Value
By default, personal access tokens are enabled and users can create the Personal access token and their expiry time.
- Audit Procedure
Azure Databricks administrators can monitor and revoke personal access tokens within their workspace. Detailed instructions are available in the Monitor and Revoke Personal Access Tokens section of the Microsoft documentation: https://learn.microsoft.com/en-us/azure/databricks/admin/access-control/tokens. To evaluate the usage of personal access tokens in your Azure Databricks account, you can utilize the provided notebook that lists all PATs not rotated or updated in the last 90 days, allowing you to identify tokens that may require revocation. This process is detailed here: https://docs.azure.cn/en-us/databricks/security/auth/oauth-pat-usage. Implementing diagnostic logging provides a comprehensive reference of audit log services and events, enabling you to track activities related to personal access tokens. More information can be found in the diagnostic log reference section: https://docs.azure.cn/en-us/databricks/security/auth/oauth-pat-usage.
- Impact Statement
If revoked improperly, applications relying on these tokens may fail, requiring a remediation plan for token rotation. Increased administrative effort is required to track and manage API tokens effectively.
- Assessment Status
Manual
- Rationale Statement
Restricting usage and enforcing expiry for personal access tokens reduces exposure to long-lived tokens, minimizes the risk of API abuse if compromised, and aligns with security best practices through controlled issuance and enforced expiry.
- Remediation Procedure
Remediate from Azure Portal Disable personal access tokens: If your workspace does not require PATs, you can disable them entirely to prevent their use.
2.1.7Ensure that Diagnostic Log Delivery is Configured for Azure Databricks0
Attributes
- Profile
Level 1
- Section
2 Analytics Services
- Sub Section
2.1 Azure Databricks
- Description
Ensure that Diagnostic Log Delivery is Configured for Azure Databricks
- Audit Procedure
Audit from Azure Portal Check if diagnostic logging is enabled for the Databricks workspace: 1. Go to
Azure Databricks. 1. Select a workspace. 1. In the left-hand menu, selectMonitoring>Diagnostic settings. 1. Verify if a diagnostic setting is configured. If not, diagnostic logging is not enabled. Ensure that logging is enabled for the following categories:- Impact Statement
Logs consume storage and may require additional monitoring tools, leading to increased operational overhead and costs. Incomplete log configurations may result in missing critical events, reducing monitoring effectiveness.
- Assessment Status
Automated
- Rationale Statement
Diagnostic logging provides visibility into security and operational activities within Databricks workspaces while maintaining an audit trail for forensic investigations, and it supports compliance with regulatory standards that require logging and monitoring.
- Remediation Procedure
Remediate from Azure Portal Enable diagnostic logging for Azure Databricks: 1. Navigate to your Azure Databricks workspace. 1. In the left-hand menu, select
Monitoring>Diagnostic settings. 1. Click+ Add diagnostic setting. 1. UnderCategory details, select the log categories you wish to capture, such as AuditLogs, Clusters, Notebooks, and Jobs. 1. Choose a destination for the logs: -Log Analytics workspace: For advanced querying and monitoring. -Storage account: For long-term retention. -Event Hub: For integration with third-party systems. 1. Provide aNamefor the diagnostic setting. 1. ClickSave. Implement log retention policies: 1. Navigate to your Log Analytics workspace. 1. UnderGeneral, selectUsage and estimated costs. 1. ClickData Retention. 1. Adjust the retention period slider to the desired number of days (up to 730 days). 1. ClickOK. Monitor logs for anomalies: 1. Navigate toAzure Monitor. 1. SelectAlerts>+ New alert rule. 1. UnderScope, specify the Databricks resource. 1. DefineConditionbased on log queries that identify anomalies (e.g. unauthorized access attempts). 1. ConfigureActionsto notify stakeholders or trigger automated responses. 1. Provide an Alert rulenameanddescription. 1. ClickCreate alert rule. Remediate from Azure CLI Enable diagnostic logging for Azure Databricks:az monitor diagnostic-settings create --name DatabricksLogging --resource <databricks-resource-id> --logs '[{category: AuditLogs, enabled: true}, {category: Clusters, enabled: true}, {category: Notebooks, enabled: true}, {category: Jobs, enabled: true}]' --workspace <log-analytics-id>Implement log retention policies:az monitor log-analytics workspace update --resource-group <resource-group> --name <log-analytics-name> --retention-time 365Monitor logs for anomalies:az monitor activity-log alert create --name DatabricksAnomalyAlert --resource-group <resource-group> --scopes <databricks-resource-id> --condition contains 'UnauthorizedAccess'- Additional Information
- Ensure that the Azure Databricks workspace is on the Premium plan to utilize diagnostic logging features. * Regularly review and update alert rules to adapt to evolving security threats and operational requirements.
2.1.8Ensure Critical Data in Azure Databricks is Encrypted with Customer-managed Keys (CMK)1
Attributes
- Profile
Level 2
- Section
2 Analytics Services
- Sub Section
2.1 Azure Databricks
- Description
Ensure Critical Data in Azure Databricks is Encrypted with Customer-managed Keys (CMK)
- Default Value
By default, Encryption type is set to Microsoft Managed Keys.
- Audit Procedure
Audit: Audit from Azure Portal 1. Go to Azure Portal → Databricks Workspaces. 2. Select a Databricks Workspace and go to Encryption settings. 3. Check if customer-managed keys (CMK) are enabled under Managed Disk Encryption .4. If CMK is not enabled, the workspace is non-compliant. Audit from Azure CLI Run the following command to check encryption settings for Databricks workspace: az databricks workspace show --name <databricks-workspace-name> --resourcegroup <resource-group-name> --query encryption Ensure that keySource is set to Microsoft.KeyVault. Audit from PowerShell Get-AzDatabricksWorkspace -ResourceGroupName <resource-group-name> -Name <databricks-workspace-name> | Select-Object Encryption Verify that encryption is set to Customer-Managed Keys (CMK). Audit from Databricks CLI databricks workspace get-metadata --workspace-id <workspace-id> Ensure that encryption settings reflect a CMK setup.
- Impact Statement
If the key expires due to setting the 'activation date' and 'expiration date', the key must be rotated manually. Using Customer Managed Keys may also incur additional man-hour requirements to create, store, manage, and protect the keys as needed.
- Assessment Status
Manual
- Rationale Statement
By default in Azure, data at rest tends to be encrypted using Microsoft Managed Keys. If your organization wants to control and manage encryption keys for compliance and defense-in-depth, Customer Managed Keys can be established. While it is possible to automate the assessment of this recommendation, the assessment status for this recommendation remains 'Manual' due to ideally limited scope. The scope of application - which workloads CMK is applied to - should be carefully considered to account for organizational capacity and targeted to workloads with specific need for CMK.
- Remediation Procedure
NOTE: These remediations assume that an Azure KeyVault already exists in the subscription. Remediate from Azure CLI 1. Create a dedicated key: az keyvault key create --vault-name <keyvault-name> --name <key-name> -protection <software or hsm> 2. Assign permissions to Databricks: az keyvault set-policy --name <keyvault-name> --resource-group <resourcegroup-name> --spn <databricks-spn> --key-permissions get wrapKey unwrapKey 3. Enable encryption with CMK: az databricks workspace update --name <databricks-workspace-name> --resourcegroup <resource-group-name> --key-source Microsoft.KeyVault --key-name <key-name> --keyvault-uri <keyvault-uri> Remediate from PowerShell $Key = Add-AzKeyVaultKey -VaultName <keyvault-name> -Name <key-name> Destination <software or hsm> Set-AzDatabricksWorkspace -ResourceGroupName <resource-group-name> WorkspaceName <databricks-workspace-name> -EncryptionKeySource Microsoft.KeyVault -KeyVaultUri $Key.Id
- Additional Information
This recommendation is based on the Common Reference Recommendation Ensure critical data is encrypted with customer-managed keys (CMK).
2.1.9Ensure 'No Public IP' is Set to 'Enabled'1
Attributes
- Profile
Level 1
- Section
2 Analytics Services
- Sub Section
2.1 Azure Databricks
- Description
Ensure 'No Public IP' is Set to 'Enabled'
- Default Value
No Public IP is set to Enabled by default.
- Audit Procedure
Audit from Azure Portal 1. Go to
Azure Databricks. 2. Click the name of a workspace. 3. UnderSettings, clickNetworking. 4. UnderNetwork access, ensure thatDeploy Azure Databricks workspace with Secure Cluster Connectivity (No Public IP)is set toEnabled. 5. Repeat steps 1-4 for each workspace. Audit from Azure CLI Run the following command to list workspaces:az databricks workspace listFor each workspace, run the following command to get the enableNoPublicIp setting:az databricks workspace show --resource-group <resource-group> --name <workspace> --query parameters.enableNoPublicIp.valueEnsure thattrueis returned. Audit from PowerShell Run the following command to list workspaces:Get-AzDatabricksWorkspaceRun the following command to get the workspace in a resource group with a given name:$workspace = Get-AzDatabricksWorkspace -ResourceGroupName <resource-group> -Name <workspace>Run the following command to get the EnableNoPublicIp setting:$workspace.EnableNoPublicIPEnsure thatTrueis returned. Audit from Azure Policy - Policy ID: [51c1490f-3319-459c-bbbc-7f391bbed753] - Name: 'Azure Databricks Clusters should disable public IP'- Impact Statement
Enabling secure cluster connectivity requires careful network configuration. Before secure cluster connectivity can be enabled, Azure Databricks workspaces must be deployed in a customer-managed virtual network (VNet injection).
- Assessment Status
Automated
- Rationale Statement
Enabling secure cluster connectivity limits exposure to the public internet, improving security and reducing the risk of external attacks.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Azure Databricks. 2. Click the name of a workspace. 3. UnderSettings, clickNetworking. 4. UnderNetwork access, next toDeploy Azure Databricks workspace with Secure Cluster Connectivity (No Public IP), click the radio button next toEnabled. 5. ClickSave. 6. Repeat steps 1-5 for each workspace requiring remediation. Remediate from Azure CLI For each workspace requiring remediation, run the following command to set enableNoPublicIp to true:az databricks workspace update --resource-group <resource-group> --name <workspace> --enable-no-public-ip trueRemediate from PowerShell For each workspace requiring remediation, run the following command to set EnableNoPublicIP to True:Update-AzDatabricksWorkspace -ResourceGroupName <resource-group> -Name <workspace> -EnableNoPublicIP
2.1.10Ensure 'Allow Public Network Access' is set to 'Disabled'1
Attributes
- Profile
Level 1
- Section
2 Analytics Services
- Sub Section
2.1 Azure Databricks
- Description
Ensure 'Allow Public Network Access' is set to 'Disabled'
- Default Value
Allow Public Network Access is set to Enabled by default.
- Audit Procedure
Audit from Azure Portal 1. Go to
Azure Databricks. 2. Click the name of a workspace. 3. UnderSettingsclickNetworking. 4. UnderNetwork access, ensureAllow Public Network Accessis set toDisabled. 5. Repeat steps 1-4 for each workspace. Audit from Azure CLI Run the following command to list workspaces:az databricks workspace listFor each workspace, run the following command to get the publicNetworkAccess setting:az databricks workspace show --resource-group <resource-group> --name <workspace> --query publicNetworkAccessEnsure thatDisabledis returned. Audit from PowerShell Run the following command to list workspaces:Get-AzDatabricksWorkspaceRun the following command to get the PublicNetworkAccess setting:$workspace = Get-AzDatabricksWorkspace -ResourceGroupName <resource-group> -Name <workspace> $workspace.PublicNetworkAccessEnsure thatDisabledis returned. Audit from Azure Policy - Policy ID: [0e7849de-b939-4c50-ab48-fc6b0f5eeba2] - Name: 'Azure Databricks Workspaces should disable public network access'- Impact Statement
Prior to disabling public network access, it is strongly recommended that virtual network integration is completed or private endpoints/links are set up. Disabling public network access restricts access to the service and will require the configuration of a virtual network and/or private endpoints for any services or users needing access within trusted networks.
- Assessment Status
Automated
- Rationale Statement
Disabling public network access improves security by ensuring that Azure Databricks workspaces are not exposed on the public internet.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Azure Databricks. 2. Click the name of a workspace. 3. UnderSettingsclickNetworking. 4. UnderNetwork access, next toAllow Public Network Access, click the radio button next toDisabled. 5. ClickSave. 6. Repeat steps 1-5 for each workspace requiring remediation. Remediate from Azure CLI For each workspace requiring remediation, run the following command to set publicNetworkAccess to Disabled:az databricks workspace update --resource-group <resource-group> --name <workspace> --public-network-access DisabledRemediate from PowerShell For each workspace requiring remediation, run the following command to set PublicNetworkAccess to Disabled:Update-AzDatabricksWorkspace -ResourceGroupName <resource-group> -Name <workspace> -PublicNetworkAccess Disabled- Additional Information
This recommendation is based on the Common Reference Recommendation Ensure public network access is Disabled.
2.1.11Ensure Private Endpoints are used to access Azure Databricks workspaces0
Attributes
- Profile
Level 2
- Section
2 Analytics Services
- Sub Section
2.1 Azure Databricks
- Description
Ensure Private Endpoints are used to access Azure Databricks workspaces
- Default Value
Private endpoints are not configured for Azure Databricks workspaces by default.
- Audit Procedure
Audit from Azure Portal 1. Go to
Azure Databricks. 2. Click the name of a workspace. 3. UnderSettings, clickNetworking. 4. ClickPrivate endpoint connections. 5. Ensure a private endpoint connection exists with a connection state ofApproved. 6. Repeat steps 1-5 for each workspace. Audit from Azure CLI Run the following command to list workspaces:az databricks workspace listFor each workspace, run the following command to get the privateEndpointConnections configuration:az databricks workspace show --resource-group <resource-group> --name <workspace> --query privateEndpointConnectionsEnsure a private endpoint connection is returned with a privateLinkServiceConnectionState status ofApproved. Audit from PowerShell Run the following command to list workspaces:Get-AzDatabricksWorkspaceRun the following command to get the PrivateEndpointConnection configuration:$workspace = Get-AzDatabricksWorkspace -ResourceGroupName <resource-group> -Name <workspace> $workspace.PrivateEndpointConnection | Select-Object -Property Id,PrivateLinkServiceConnectionStateStatusEnsure a private endpoint connection is returned with a PrivateLinkServiceConnectionStateStatus ofApproved. Audit from Azure Policy - Policy ID: [258823f2-4595-4b52-b333-cc96192710d8] - Name: 'Azure Databricks Workspaces should use private link'- Impact Statement
If an Azure Virtual Network is not implemented correctly, this may result in the loss of critical network traffic. Private endpoints are charged per hour of use. Before a private endpoint can be configured, Azure Databricks workspaces must be deployed in a customer-managed virtual network, must have secure cluster connectivity enabled, and must be on the Premium pricing tier.
- Assessment Status
Automated
- Rationale Statement
Using private endpoints for Azure Databricks workspaces ensures that all communication between clients, services, and data sources occurs over a secure, private IP space within an Azure Virtual Network (VNet). This approach eliminates exposure to the public internet, significantly reducing the attack surface and aligning with Zero Trust principles.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Azure Databricks. 2. Click the name of a workspace. 3. UnderSettings, clickNetworking. 4. ClickPrivate endpoint connections. 5. Click+ Private endpoint. 6. UnderProject details, select a Subscription and a Resource group. 7. UnderInstance details, provide a Name, Network Interface Name, and select a Region. 8. ClickNext : Resource >. 9. Select a Target sub-resource. 10. ClickNext : Virtual Network >. 11. UnderNetworking, select a Virtual network and a Subnet. 12. Optionally, configure Private IP configuration and Application security group. 13. ClickNext : DNS >. 14. Optionally, configure Private DNS integration. 15. ClickNext : Tags >. 16. Optionally, configure tags. 17. ClickNext : Review + create >. 18. ClickCreate. 19. Repeat steps 1-18 for each workspace requiring remediation. Remediate from Azure CLI For each workspace requiring remediation, run the following command to create a private endpoint connection:az network private-endpoint create --resource-group <resource-group> --name <private-endpoint> --location <location> --vnet-name <virtual-network> --subnet <subnet> --private-connection-resource-id <workspace> --connection-name <private-endpoint-connection> --group-id <browser_authentication|databricks_ui_api>- Additional Information
This recommendation is based on the Common Reference Recommendation Ensure Private Endpoints are used to access {service}.
2.1.12Ensure Azure Databricks groups are reviewed periodically0
Attributes
- Profile
Level 1
- Section
2 Analytics Services
- Sub Section
2.1 Azure Databricks
- Description
Ensure Azure Databricks groups are reviewed periodically
- Default Value
By default Azure Databricks only has the Owner user and role assigned.
- Audit Procedure
Audit from Azure Portal 1. From Azure Home select
Azure Databricks. 1. Select the Databricks implementation you wish to audit. 1. SelectAccess control (IAM). 1. In the horizontal menu selectRole assignments. 1. Audit the list for each role and its assignment to each user.- Impact Statement
Administrative overhead of user management.
- Assessment Status
Manual
- Rationale Statement
To ensure accurate privileges for your Azure Databricks implementation, your organization should review all users and permission assignments on a regular interval.
- Remediation Procedure
Remediate from Azure Portal 1. From Azure Home select
Azure Databricks. 1. Select the Databricks implementation you wish to audit. 1. SelectAccess control (IAM). 1. Scroll down and selectAdd role assignment. 1. Search for the role you wish to add. Then selectNext. 1. Select the group members you wish to add. Then selectNext. 1. Review the info you have chosen, then selectReview + assign.
3 Compute Services11
3.1.1Ensure only MFA Enabled Identities can Access Privileged Virtual Machine1
Attributes
- Profile
Level 2
- Section
3 Compute Services
- Sub Section
3.1 Virtual Machines
- Description
Ensure only MFA Enabled Identities can Access Privileged Virtual Machine
- Audit Procedure
Audit from Azure Portal 1. Log in to the Azure portal. 1. Select the
Subscription, then click onAccess control (IAM). 1. ClickRole : Alland clickAllto display the drop-down menu. 1. TypeVirtual Machine Administrator Loginand selectVirtual Machine Administrator Login. 1. Review the list of identities that have been assigned theVirtual Machine Administrator Loginrole. 1. Go toMicrosoft Entra ID. 1. ForPer-user MFA: 1. UnderManage, clickUsers. 1. ClickPer-user MFA. 1. Ensure that none of the identities assigned theVirtual Machine Administrator Loginrole from step 4 haveStatusset todisabled. 1. ForConditional Access: 1. UnderManage, clickSecurity. 1. UnderProtect, clickConditional Access. 1. Ensure that none of the identities assigned theVirtual Machine Administrator Loginrole from step 4 are exempt from a Conditional Access policy requiring MFA for all users.- Impact Statement
This recommendation requires the Entra ID P2 license to implement. Ensure that identities provisioned to a virtual machine utilize an RBAC/ABAC group and are allocated a role using Azure PIM, and that the role settings require MFA or use another third-party PAM solution for accessing virtual machines.
- Assessment Status
Manual
- Rationale Statement
Integrating multi-factor authentication (MFA) as part of the organizational policy can greatly reduce the risk of an identity gaining control of valid credentials that may be used for additional tactics such as initial access, lateral movement, and collecting information. MFA can also be used to restrict access to cloud resources and APIs. An Adversary may log into accessible cloud services within a compromised environment using Valid Accounts that are synchronized to move laterally and perform actions with the virtual machine's managed identity. The adversary may then perform management actions or access cloud-hosted resources as the logged-on managed identity.
- Remediation Procedure
Remediate from Azure Portal 1. Log in to the Azure portal. 2. This can be remediated by enabling MFA for user, Removing user access or Reducing access of managed identities attached to virtual machines. - Case I : Enable MFA for users having access on virtual machines. 1. Go to
Microsoft Entra ID. 1. ForPer-user MFA: 1. UnderManage, clickUsers. 1. ClickPer-user MFA. 1. For each user requiring remediation, check the box next to their name. 1. ClickEnable MFA. 1. ClickEnable. 1. ForConditional Access: 1. UnderManage, clickSecurity. 1. UnderProtect, clickConditional Access. 1. Update the Conditional Access policy requiring MFA for all users, removing each user requiring remediation from theExcludelist. - Case II : Removing user access on a virtual machine. 1. Select theSubscription, then click onAccess control (IAM). 2. SelectRole assignmentsand search forVirtual Machine Administrator LoginorVirtual Machine User Loginor any role that provides access to log into virtual machines. 3. Click onRole Name, SelectAssignments, and remove identities with no MFA configured. - Case III : Reducing access of managed identities attached to virtual machines. 1. Select theSubscription, then click onAccess control (IAM). 2. SelectRole Assignmentsfrom the top menu and apply filters onAssignment typeasPrivileged administrator rolesandTypeasVirtual Machines. 3. Click onRole Name, SelectAssignments, and remove identities access make sure this follows the least privileges principal.
5 Identity Services157
5.1.1Ensure that 'security defaults' is Enabled in Microsoft Entra ID1
Attributes
- Profile
Level 1
- Section
5 Identity Services
- Sub Section
5.1 Security Defaults (Per-User MFA)
- Description
Ensure that 'security defaults' is Enabled in Microsoft Entra ID
- Default Value
If your tenant was created on or after October 22, 2019, security defaults may already be enabled in your tenant.
- Audit Procedure
Audit from Azure Portal To ensure security defaults is enabled in your directory: 1. From Azure Home select the Portal Menu. 2. Browse to
Microsoft Entra ID>Properties. 3. SelectManage security defaults. 4. UnderSecurity defaults, verify thatEnabled (recommended)is selected.- Impact Statement
This recommendation should be implemented initially and then may be overridden by other service/product specific CIS Benchmarks. Administrators should also be aware that certain configurations in Microsoft Entra ID may impact other Microsoft services such as Microsoft 365.
- Assessment Status
Automated
- Rationale Statement
Security defaults provide secure default settings that we manage on behalf of organizations to keep customers safe until they are ready to manage their own identity security settings. For example, doing the following: - Requiring all users and admins to register for MFA. - Challenging users with MFA - when necessary, based on factors such as location, device, role, and task. - Disabling authentication from legacy authentication clients, which cant do MFA.
- Remediation Procedure
Remediate from Azure Portal To enable security defaults in your directory: 1. From Azure Home select the Portal Menu. 1. Browse to
Microsoft Entra ID>Properties. 1. SelectManage security defaults. 1. UnderSecurity defaults, selectEnabled (recommended). 1. SelectSave.- Additional Information
This recommendation differs from the Microsoft 365 Benchmark. This is because the potential impact associated with disabling Security Defaults is dependent upon the security settings implemented in the environment. It is recommended that organizations disabling Security Defaults implement appropriate security settings to replace the settings configured by Security Defaults.
5.1.2Ensure that 'Require Multifactor Authentication to register or join devices with Microsoft Entra' is set to 'Yes'0
Attributes
- Profile
Level 1
- Section
5 Identity Services
- Sub Section
5.1 Security Defaults (Per-User MFA)
- Description
Ensure that 'Require Multifactor Authentication to register or join devices with Microsoft Entra' is set to 'Yes'
- Default Value
By default,
Require Multifactor Authentication to register or join devices with Microsoft Entrais set toNo.- Audit Procedure
Audit from Azure Portal 1. From Azure Home select the Portal Menu 1. Select
Microsoft Entra ID1. UnderManage, selectDevices1. UnderManage, selectDevice settings1. UnderMicrosoft Entra join and registration settings, ensure thatRequire Multifactor Authentication to register or join devices with Microsoft Entrais set toYes- Impact Statement
A slight impact of additional overhead, as Administrators will now have to approve every access to the domain.
- Assessment Status
Manual
- Rationale Statement
Multi-factor authentication is recommended when adding devices to Microsoft Entra ID. When set to
Yes, users who are adding devices from the internet must first use the second method of authentication before their device is successfully added to the directory. This ensures that rogue devices are not added to the domain using a compromised user account.- Remediation Procedure
Remediate from Azure Portal 1. From Azure Home select the Portal Menu 1. Select
Microsoft Entra ID1. UnderManage, selectDevices1. UnderManage, selectDevice settings1. UnderMicrosoft Entra join and registration settings, setRequire Multifactor Authentication to register or join devices with Microsoft EntratoYes1. ClickSave- Additional Information
If Conditional Access is available, this recommendation should be bypassed in favor of the Conditional Access implementation of requiring Multifactor Authentication to register or join devices with Microsoft Entra. https://learn.microsoft.com/en-us/entra/identity/conditional-access/how-to-policy-mfa-device-register-join
5.1.3Ensure that 'multifactor authentication' is 'enabled' For All Users2
Attributes
- Profile
Level 1
- Section
5 Identity Services
- Sub Section
5.1 Security Defaults (Per-User MFA)
- Description
Ensure that 'multifactor authentication' is 'enabled' For All Users
- Default Value
Multifactor authentication is not enabled for all users by default. Starting in 2024, multifactor authentication is enabled for administrative accounts by default.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Entra ID. 1. UnderManage, clickUsers. 1. ClickPer-user MFAfrom the top menu. 1. Ensure thatStatusisenabledfor all users. Audit from REST API Run the following Graph PowerShell command:get-mguser -All | where {$_.StrongAuthenticationMethods.Count -eq 0} | Select-Object -Property UserPrincipalNameIf the output contains anyUserPrincipalName, then this recommendation is non-compliant.- Impact Statement
Users would require two forms of authentication before any access is granted. Additional administrative time will be required for managing dual forms of authentication when enabling multifactor authentication.
- Assessment Status
Automated
- Rationale Statement
Multifactor authentication requires an individual to present a minimum of two separate forms of authentication before access is granted. Multifactor authentication provides additional assurance that the individual attempting to gain access is who they claim to be. With multifactor authentication, an attacker would need to compromise at least two different authentication mechanisms, increasing the difficulty of compromise and thus reducing the risk.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Entra ID. 1. UnderManage, clickUsers. 1. ClickPer-user MFAfrom the top menu. 1. Click the box next to a user withStatusdisabled. 1. ClickEnable MFA. 1. ClickEnable. 1. Repeat steps 1-6 for each user requiring remediation. Other options within Azure Portal - https://docs.microsoft.com/en-us/azure/active-directory/authentication/tutorial-enable-azure-mfa - https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-mfasettings - https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/howto-conditional-access-policy-admin-mfa - https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-getstarted#enable-multi-factor-authentication-with-conditional-access
5.1.4Ensure that 'Allow users to remember multifactor authentication on devices they trust' is Disabled0
Attributes
- Profile
Level 1
- Section
5 Identity Services
- Sub Section
5.1 Security Defaults (Per-User MFA)
- Description
Ensure that 'Allow users to remember multifactor authentication on devices they trust' is Disabled
- Default Value
By default,
Allow users to remember multi-factor authentication on devices they trustis disabled.- Audit Procedure
Audit from Azure Portal 1. From Azure Home select the Portal Menu 1. Select
Microsoft Entra ID1. UnderManage, clickUsers1. Click thePer-user MFAbutton on the top bar 1. Click onService settings1. Ensure thatAllow users to remember multi-factor authentication on devices they trustis not enabled- Impact Statement
For every login attempt, the user will be required to perform multi-factor authentication.
- Assessment Status
Manual
- Rationale Statement
Remembering Multi-Factor Authentication (MFA) for devices and browsers allows users to have the option to bypass MFA for a set number of days after performing a successful sign-in using MFA. This can enhance usability by minimizing the number of times a user may need to perform two-step verification on the same device. However, if an account or device is compromised, remembering MFA for trusted devices may affect security. Hence, it is recommended that users not be allowed to bypass MFA.
- Remediation Procedure
Remediate from Azure Portal 1. From Azure Home select the Portal Menu 1. Select
Microsoft Entra ID1. UnderManage, clickUsers1. Click thePer-user MFAbutton on the top bar 1. Click onService settings1. Uncheck the box next toAllow users to remember multi-factor authentication on devices they trust1. ClickSave
5.3.1Ensure that Azure Admin Accounts Are Not Used for Daily Operations0
Attributes
- Profile
Level 1
- Section
5 Identity Services
- References
- https://learn.microsoft.com/en-us/security/privileged-access-workstations/critical-impact-accounts
- Sub Section
5.3 Periodic Identity Reviews
- Description
Ensure that Azure Admin Accounts Are Not Used for Daily Operations
- Audit Procedure
Audit from Azure Portal Monitor: 1. Go to
Monitor. 1. ClickActivity log. 1. Review the activity log and ensure that admin accounts are not being used for daily operations. Microsoft Entra ID: 1. Go toMicrosoft Entra ID. 1. UnderMonitoring, clickSign-in logs. 1. Review the sign-in logs and ensure that admin accounts are not being accessed more frequently than necessary.- Impact Statement
Minor administrative overhead includes managing separate accounts, enforcing stricter access controls, and potential licensing costs for advanced security features.
- Assessment Status
Manual
- Rationale Statement
Using admin accounts for daily operations increases the risk of accidental misconfigurations and security breaches.
- Remediation Procedure
If admin accounts are being used for daily operations, consider the following: - Monitor and alert on unusual activity. - Enforce the principle of least privilege. - Revoke any unnecessary administrative access. - Use Conditional Access to limit access to resources. - Ensure that administrators have separate admin and user accounts. - Use Microsoft Entra ID Protection helps organizations detect, investigate, and remediate identity-based risks. - Use Privileged Identity Management (PIM) in Microsoft Entra ID to limit standing administrator access to privileged roles, discover who has access, and review privileged access.
5.3.2Ensure that Guest Users are Reviewed on a Regular Basis1
Attributes
- Profile
Level 1
- Section
5 Identity Services
- Sub Section
5.3 Periodic Identity Reviews
- Description
Ensure that Guest Users are Reviewed on a Regular Basis
- Default Value
By default no guest users are created.
- Audit Procedure
Audit from Azure Portal 1. From Azure Home select the Portal Menu 1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. Click onAdd filter1. SelectUser type1. SelectGuestfrom the Value dropdown 1. ClickApply1. Audit the listed guest users Audit from Azure CLIaz ad user list --query [?userType=='Guest']Ensure all users listed are still required and not inactive. Audit from Azure PowerShellGet-AzureADUser |Where-Object {$_.UserType -like Guest} |Select-Object DisplayName, UserPrincipalName, UserType -UniqueAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: e9ac8f8e-ce22-4355-8f04-99b911d6be52 - Name: 'Guest accounts with read permissions on Azure resources should be removed' - Policy ID: 94e1c2ac-cbbe-4cac-a2b5-389c812dee87 - Name: 'Guest accounts with write permissions on Azure resources should be removed' - Policy ID: 339353f6-2387-4a45-abe4-7f529d121046 - Name: 'Guest accounts with owner permissions on Azure resources should be removed'- Impact Statement
Before removing guest users, determine their use and scope. Like removing any user, there may be unforeseen consequences to systems if an account is removed without careful consideration.
- Assessment Status
Manual
- Rationale Statement
Guest users are typically added outside your employee on-boarding/off-boarding process and could potentially be overlooked indefinitely. To prevent this, guest users should be reviewed on a regular basis. During this audit, guest users should also be determined to not have administrative privileges.
- Remediation Procedure
Remediate from Azure Portal 1. From Azure Home select the Portal Menu 1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. Click onAdd filter1. SelectUser type1. SelectGuestfrom the Value dropdown 1. ClickApply1. Check the box next to allGuestusers that are no longer required or are inactive 1. ClickDelete1. ClickOKRemediate from Azure CLI Before deleting the user, set it to inactive using the ID from the Audit Procedure to determine if there are any dependent systems.az ad user update --id <exampleaccountid@domain.com> --account-enabled {false}After determining that there are no dependent systems, delete the user.Remove-AzureADUser -ObjectId <exampleaccountid@domain.com>Remediate from Azure PowerShell Before deleting the user, set it to inactive using the ID from the Audit Procedure to determine if there are any dependent systems.Set-AzureADUser -ObjectId <exampleaccountid@domain.com> -AccountEnabled falseAfter determining that there are no dependent systems, delete the user.PS C:\>Remove-AzureADUser -ObjectId <exampleaccountid@domain.com>- Additional Information
It is good practice to use a dynamic security group to manage guest users. To create the dynamic security group: 1. Navigate to the 'Microsoft Entra ID' blade in the Azure Portal 2. Select the 'Groups' item 3. Create new 4. Type of 'dynamic' 5. Use the following dynamic selection rule. (user.userType -eq Guest) 6. Once the group has been created, select access reviews option and create a new access review with a period of monthly and send to relevant administrators for review.
5.3.3Ensure That Use of the 'User Access Administrator' Role is Restricted1
Attributes
- Profile
Level 1
- Section
5 Identity Services
- Sub Section
5.3 Periodic Identity Reviews
- Description
Ensure That Use of the 'User Access Administrator' Role is Restricted
- Audit Procedure
Audit from Azure Portal 1. From Azure Home select the Portal Menu. 1. Select
Subscriptions. 1. Select a subscription. 1. SelectAccess control (IAM). 1. Look for the following banner at the top of the page:Action required: X users have elevated access in your tenant. You should take immediate action and remove all role assignments with elevated access.If the banner is displayed, theUser Access Administratoris assigned. Audit from Azure CLI Run the following command:az role assignment list --role User Access Administrator --scope /Ensure that the command does not return anyUser Access Administratorrole assignment information.- Impact Statement
Increased administrative effort to manage and remove role assignments appropriately.
- Assessment Status
Automated
- Rationale Statement
The User Access Administrator role provides extensive access control privileges. Unnecessary assignments heighten the risk of privilege escalation and unauthorized access. Removing the role immediately after use minimizes security exposure.
- Remediation Procedure
Remediate from Azure Portal 1. From Azure Home select the Portal Menu. 1. Select
Subscriptions. 1. Select a subscription. 1. SelectAccess control (IAM). 1. Look for the following banner at the top of the page:Action required: X users have elevated access in your tenant. You should take immediate action and remove all role assignments with elevated access.1. ClickView role assignments. 1. ClickRemove. Remediate from Azure CLI Run the following command:az role assignment delete --role User Access Administrator --scope /
5.3.4Ensure that All 'Privileged' Role Assignments are Periodically Reviewed0
Attributes
- Profile
Level 1
- Section
5 Identity Services
- Sub Section
5.3 Periodic Identity Reviews
- Description
Ensure that All 'Privileged' Role Assignments are Periodically Reviewed
- Audit Procedure
Audit from Azure Portal 1. From Azure Home select the Portal Menu. 2. Select
Subscriptions. 3. Select a subscription. 4. SelectAccess control (IAM). 5. Look for the number under the wordPrivilegedaccompanied by a link titledView Assignments. Click theView assignmentslink. 6. For each privileged role listed, evaluate whether the assignment is appropriate and current for each User, Group, or App assigned to each privileged role. NOTE: Determining 'appropriate' assignments requires a clear understanding of your organization's personnel, systems, policy, and security requirements.- Impact Statement
Increased administrative effort to manage and remove role assignments appropriately.
- Assessment Status
Manual
- Rationale Statement
Privileged roles are crown jewel assets that can be used by malicious insiders, threat actors, and even through mistake to significantly damage an organization. These roles should be periodically reviewed to identify lingering permissions assignment and detect lateral movement through privilege escalation.
- Remediation Procedure
Review privileged role assignments and remove any that are no longer necessary or appropriate. Use Azure PIM (Privileged Identity Management) to implement just-in-time access for privileged roles.
5.3.5Ensure Disabled User Accounts do not Have Read, Write, or Owner Permissions0
Attributes
- Profile
Level 1
- Section
5 Identity Services
- Sub Section
5.3 Periodic Identity Reviews
- Description
Ensure Disabled User Accounts do not Have Read, Write, or Owner Permissions
- Default Value
Disabled user accounts retain their prior role assignments.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Entra ID. 2. UnderManage, clickUsers. 3. ClickAdd filter. 4. ClickAccount enabled. 5. Click the toggle switch to set the value toNo. 6. ClickApply. 7. Click theDisplay nameof a disabled user account. 8. ClickAzure role assignments. 9. Ensure that no read, write, or owner roles are assigned to the user account. 10. Repeat steps 7-9 for each disabled user account. Audit from PowerShellConnect-AzureAD Get-AzureADUser $user = Get-AzureADUser -ObjectId <object-id> $user.AccountEnabledIf AccountEnabled is False, run:Get-AzRoleAssignment -ObjectId $user.ObjectIdAudit from Azure Policy - Policy ID: [0cfea604-3201-4e14-88fc-fae4c427a6c5] - Name: 'Blocked accounts with owner permissions on Azure resources should be removed' - Policy ID: [8d7e1fde-fe26-4b5f-8108-f8e432cbc2be] - Name: 'Blocked accounts with read and write permissions on Azure resources should be removed'- Impact Statement
Ensure disabled accounts are not relied on for break glass or automated processes before removing roles to avoid service disruption.
- Assessment Status
Manual
- Rationale Statement
Disabled accounts should not retain access to resources, as this poses a security risk. Removing role assignments mitigates potential unauthorized access and enforces the principle of least privilege.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Entra ID. 2. UnderManage, clickUsers. 3. ClickAdd filter. 4. ClickAccount enabled. 5. Click the toggle switch to set the value toNo. 6. ClickApply. 7. Click theDisplay nameof a disabled user account with read, write, or owner roles assigned. 8. ClickAzure role assignments. 9. Click the name of a read, write, or owner role. 10. ClickAssignments. 11. ClickRemovein the row for the disabled user account. 12. ClickYes. 13. Repeat steps 7-12 for disabled user accounts requiring remediation. Remediate from PowerShellRemove-AzRoleAssignment -ObjectId $user.ObjectId -RoleDefinitionName <role-definition-name>
5.3.6Ensure 'Tenant Creator' Role Assignments are Periodically Reviewed0
Attributes
- Profile
Level 1
- Section
5 Identity Services
- Sub Section
5.3 Periodic Identity Reviews
- Description
Ensure 'Tenant Creator' Role Assignments are Periodically Reviewed
- Default Value
The Tenant Creator role is not assigned by default.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Entra ID. 2. UnderManage, clickRoles and administrators. 3. In the search bar, typeTenant Creator. 4. Click the role. 5. Review the assignments and ensure that they are appropriate.- Impact Statement
Verify that the Tenant Creator role is no longer required by any assignments before removal to avoid disruption of critical functions.
- Assessment Status
Manual
- Rationale Statement
Unnecessary assignments increase the risk of privilege escalation and unauthorized access. This recommendation should be applied alongside the recommendation 'Ensure that Restrict non-admin users from creating tenants is set to Yes'.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Entra ID. 2. UnderManage, clickRoles and administrators. 3. In the search bar, typeTenant Creator. 4. Click the role. 5. Click the name of an assignment. 6. Check the box next to theTenant Creatorrole. 7. ClickX Remove assignments. 8. ClickYes. 9. Repeat steps 1-8 for each assignment requiring remediation.
5.3.7Ensure All Non-privileged Role Assignments are Periodically Reviewed0
Attributes
- Profile
Level 1
- Section
5 Identity Services
- Sub Section
5.3 Periodic Identity Reviews
- Description
Ensure All Non-privileged Role Assignments are Periodically Reviewed
- Default Value
Users do not have non-privileged roles assigned to them by default.
- Audit Procedure
Audit from Azure Portal 1. Go to
Subscriptions. 2. Click the name of a subscription. 3. ClickAccess control (IAM). 4. ClickRole assignments. 5. ClickJob function roles. 6. For each role, ensure the assignments are appropriate. 7. Repeat steps 1-6 for each subscription.- Impact Statement
Increased administrative effort to manage and remove role assignments appropriately.
- Assessment Status
Manual
- Rationale Statement
To ensure the principle of least privilege is followed, non-privileged role assignments should be reviewed periodically to confirm that users are granted only the minimum level of permissions they need to perform their tasks.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Subscriptions. 2. Click the name of a subscription. 3. ClickAccess control (IAM). 4. ClickRole assignments. 5. ClickJob function roles. 6. Check the box next to any inappropriate assignments. 7. ClickDelete. 8. ClickYes. 9. Repeat steps 1-8 for each subscription.
5.4Ensure that No Custom Subscription Administrator Roles Exist1
Attributes
- Profile
Level 1
- Section
5 Identity Services
- Description
Ensure that No Custom Subscription Administrator Roles Exist
- Default Value
By default, no custom owner roles are created.
- Audit Procedure
Audit from Azure Portal 1. From Azure Home select the Portal Menu. 1. Select
Subscriptions. 1. Select a subscription. 1. SelectAccess control (IAM). 1. SelectRoles. 1. ClickTypeand selectCustom rolefrom the drop-down menu. 1. SelectViewnext to a role. 1. SelectJSON. 1. Check forassignableScopesset to the subscription, andactionsset to*. 1. Repeat steps 7-9 for each custom role. Audit from Azure CLI List custom roles:az role definition list --custom-role-only TrueCheck for entries withassignableScopeof thesubscription, and an action of*Audit from PowerShellConnect-AzAccount Get-AzRoleDefinition |Where-Object {($_.IsCustom -eq $true) -and ($_.Actions.contains('*'))}Check the output forAssignableScopesvalue set to the subscription. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: a451c1ef-c6ca-483d-87ed-f49761e3ffb5 - Name: 'Audit usage of custom RBAC roles'- Impact Statement
Subscriptions will need to be handled by Administrators with permissions.
- Assessment Status
Automated
- Rationale Statement
Custom roles in Azure with administrative access can obfuscate the permissions granted and introduce complexity and blind spots to the management of privileged identities. For less mature security programs without regular identity audits, the creation of Custom roles should be avoided entirely. For more mature security programs with regular identity audits, Custom Roles should be audited for use and assignment, used minimally, and the principle of least privilege should be observed when granting permissions
- Remediation Procedure
Remediate from Azure Portal 1. From Azure Home select the Portal Menu. 1. Select
Subscriptions. 1. Select a subscription. 1. SelectAccess control (IAM). 1. SelectRoles. 1. ClickTypeand selectCustom rolefrom the drop-down menu. 1. Check the box next to each role which grants subscription administrator privileges. 1. SelectDelete. 1. SelectYes. Remediate from Azure CLI List custom roles:az role definition list --custom-role-only TrueCheck for entries withassignableScopeof thesubscription, and an action of*. To remove a violating role:az role definition delete --name <role name>Note that any role assignments must be removed before a custom role can be deleted. Ensure impact is assessed before deleting a custom role granting subscription administrator privileges.
5.5Ensure that a Custom Role is Assigned Permissions for Administering Resource Locks1
Attributes
- Profile
Level 2
- Section
5 Identity Services
- Description
Ensure that a Custom Role is Assigned Permissions for Administering Resource Locks
- Default Value
A role for administering resource locks does not exist by default.
- Audit Procedure
Audit from Azure Portal 1. In the Azure portal, navigate to a subscription or resource group. 1. Click
Access control (IAM). 1. ClickRoles. 1. ClickType : All. 1. Click to view the drop-down menu. 1. SelectCustom role. 1. ClickViewin theDetailscolumn of a custom role. 1. Review the role permissions. 1. ClickAssignmentsand review the assignments. 1. Click theXto exit the custom role details page. 1. Repeat steps 7-10. Ensure that at least one custom role exists that assigns theMicrosoft.Authorization/lockspermission to appropriate members. 1. Repeat steps 1-11 for each subscription or resource group.- Impact Statement
By adding this role, specific permissions may be granted for managing only resource locks rather than needing to provide the broad Owner or User Access Administrator role, reducing the risk of the user being able to cause unintentional damage.
- Assessment Status
Manual
- Rationale Statement
Given that the resource lock functionality is outside of standard Role-Based Access Control (RBAC), it would be prudent to create a resource lock administrator role to prevent inadvertent unlocking of resources.
- Remediation Procedure
Remediate from Azure Portal 1. In the Azure portal, navigate to a subscription or resource group. 1. Click
Access control (IAM). 1. Click+ Add. 1. ClickAdd custom role. 1. In theCustom role namefield enterResource Lock Administrator. 1. In theDescriptionfield enterCan Administer Resource Locks. 1. ForBaseline permissionsselectStart from scratch. 1. ClickNext. 1. ClickAdd permissions. 1. In theSearch for a permissionbox, typeMicrosoft.Authorization/locks. 1. Click the result. 1. Check the box next toPermission. 1. ClickAdd. 1. ClickReview + create. 1. ClickCreate. 1. ClickOK. 1. Click+ Add. 1. ClickAdd role assignment. 1. In theSearch by role name, description, permission, or IDbox, typeResource Lock Administrator. 1. Select the role. 1. ClickNext. 1. Click+ Select members. 1. Select appropriate members. 1. ClickSelect. 1. ClickReview + assign. 1. ClickReview + assignagain. 1. Repeat steps 1-26 for each subscription or resource group requiring remediation. Remediate from PowerShell: Below is a PowerShell definition for a resource lock administrator role created at an Azure Management group levelImport-Module Az.Accounts Connect-AzAccount $role = Get-AzRoleDefinition User Access Administrator $role.Id = $null $role.Name = Resource Lock Administrator $role.Description = Can Administer Resource Locks $role.Actions.Clear() $role.Actions.Add(Microsoft.Authorization/locks/*) $role.AssignableScopes.Clear() * Scope at the Management group level Management group $role.AssignableScopes.Add(/providers/Microsoft.Management/managementGroups/MG-Name) New-AzRoleDefinition -Role $role Get-AzureRmRoleDefinition Resource Lock Administrator
5.6Ensure that 'Subscription leaving Microsoft Entra tenant' and 'Subscription entering Microsoft Entra tenant' is set to 'Permit no one'0
Attributes
- Profile
Level 2
- Section
5 Identity Services
- Description
Ensure that 'Subscription leaving Microsoft Entra tenant' and 'Subscription entering Microsoft Entra tenant' is set to 'Permit no one'
- Default Value
By default
Subscription leaving Microsoft Entra tenantandSubscription entering Microsoft Entra tenantare set toAllow everyone (default)- Audit Procedure
Audit from Azure Portal 1. From the Azure Portal Home select the portal menu 1. Select
Subscriptions1. In theAdvanced optionsdrop-down menu, selectManage Policies1. EnsureSubscription leaving Microsoft Entra tenantandSubscription entering Microsoft Entra tenantare set toPermit no one- Impact Statement
Subscriptions will need to have these settings turned off to be moved.
- Assessment Status
Manual
- Rationale Statement
Permissions to move subscriptions in and out of a Microsoft Entra tenant must only be given to appropriate administrative personnel. A subscription that is moved into a Microsoft Entra tenant may be within a folder to which other users have elevated permissions. This prevents loss of data or unapproved changes of the objects within by potential bad actors.
- Remediation Procedure
Remediate from Azure Portal 1. From the Azure Portal Home select the portal menu 1. Select
Subscriptions1. In theAdvanced optionsdrop-down menu, selectManage Policies1. SetSubscription leaving Microsoft Entra tenantandSubscription entering Microsoft Entra tenanttoPermit no one1. ClickSave changes
5.7Ensure there are between 2 and 3 Subscription Owners0
Attributes
- Profile
Level 1
- Section
5 Identity Services
- Description
Ensure there are between 2 and 3 Subscription Owners
- Default Value
A subscription has 1 owner by default.
- Audit Procedure
Audit from Azure Portal 1. Go to
Subscriptions. 2. Click the name of a subscription. 3. ClickAccess Controls (IAM). 4. ClickRole assignments. 5. ClickRole : All. 6. Click the arrow next toAll. 7. ClickOwner. 8. Ensure a minimum of 2 and a maximum of 3 members are returned. 9. Repeat steps 1-8 for each subscription. Audit from Azure CLIaz role assignment list --role Owner --scope /subscriptions/<subscription-id> --query "[].{PrincipalName:principalName, Type:principalType}"Ensure a minimum of 2 and a maximum of 3 members are returned. Audit from PowerShellGet-AzRoleAssignment -RoleDefinitionName Owner -Scope /subscriptions/<subscription-id>Audit from Azure Policy - Policy ID: [09024ccc-0c5f-475e-9457-b7c0d9ed487b] - Name: 'There should be more than one owner assigned to your subscription' - Policy ID: [4f11b553-d42e-4e3a-89be-32ca364cad4c] - Name: 'A maximum of 3 owners should be designated for your subscription'- Impact Statement
Implementation may require changes in administrative workflows or the redistribution of roles and responsibilities.
- Assessment Status
Automated
- Rationale Statement
If groups are used, ensure their membership is tightly controlled and regularly reviewed to avoid privilege sprawl. This includes user accounts, Entra ID groups, service principals, and managed identities.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Subscriptions. 2. Click the name of a subscription. 3. ClickAccess Controls (IAM). 4. ClickRole assignments. 5. ClickRole : All. 6. ClickOwner. 7. Check the box next to members from whom the owner role should be removed. 8. ClickDelete. 9. ClickYes. 10. Repeat for each subscription requiring remediation. Remediate from Azure CLIaz role assignment delete --ids <role-assignment-ids>
6 Management and Governance Services2422
6.1.1.1Ensure that a 'Diagnostic Setting' Exists for Subscription Activity Logs1
Attributes
- Profile
Level 1
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that a 'Diagnostic Setting' Exists for Subscription Activity Logs
- Default Value
By default, diagnostic setting is not set.
- Audit Procedure
Audit from Azure Portal To identify Diagnostic Settings on a subscription: 1. Go to
Monitor2. ClickActivity Log3. ClickExport Activity Logs4. Select aSubscription5. Ensure aDiagnostic settingexists for the selected Subscription To identify Diagnostic Settings on specific resources: 1. Go toMonitoring2. ClickDiagnostic settings3. Ensure aDiagnostic settingexists for all appropriate resources. Audit from Azure CLI To identify Diagnostic Settings on a subscription:az monitor diagnostic-settings subscription list --subscription <subscription ID>To identify Diagnostic Settings on a resourceaz monitor diagnostic-settings list --resource <resource Id>Audit from PowerShell To identify Diagnostic Settings on a Subscription:Get-AzDiagnosticSetting -SubscriptionId <subscription ID>To identify Diagnostic Settings on a specific resource:Get-AzDiagnosticSetting -ResourceId <resource ID>- Impact Statement
Diagnostic settings incur costs based on the amount of data collected and the destination.
- Assessment Status
Automated
- Rationale Statement
A diagnostic setting controls how a diagnostic log is exported. By default, logs are retained only for 90 days. Diagnostic settings should be defined so that logs can be exported and stored for a longer duration to analyze security activities within an Azure subscription.
- Remediation Procedure
Remediate from Azure Portal To enable Diagnostic Settings on a Subscription: 1. Go to
Monitor2. Click onActivity log3. Click onExport Activity Logs4. Click+ Add diagnostic setting5. Enter aDiagnostic setting name6. SelectCategoriesfor the diagnostic setting 7. Select the appropriateDestination details(this may be Log Analytics, Storage Account, Event Hub, or Partner solution) 8. ClickSaveTo enable Diagnostic Settings on a specific resource: 1. Go toMonitoring1. ClickDiagnostic settings1. SelectAdd diagnostic setting1. Enter aDiagnostic setting name1. Select the appropriate log, metric, and destination (this may be Log Analytics, Storage Account, Event Hub, or Partner solution) 1. ClickSaveRepeat these step for all resources as needed. Remediate from Azure CLI To configure Diagnostic Settings on a Subscription:az monitor diagnostic-settings subscription create --subscription <subscription id> --name <diagnostic settings name> --location <location> <[--event-hub <event hub ID> --event-hub-auth-rule <event hub auth rule ID>] [--storage-account <storage account ID>] [--workspace <log analytics workspace ID>] --logs <JSON encoded categories> (e.g. [{category:Security,enabled:true},{category:Administrative,enabled:true},{category:Alert,enabled:true},{category:Policy,enabled:true}])To configure Diagnostic Settings on a specific resource:az monitor diagnostic-settings create --subscription <subscription ID> --resource <resource ID> --name <diagnostic settings name> <[--event-hub <event hub ID> --event-hub-rule <event hub auth rule ID>] [--storage-account <storage account ID>] [--workspace <log analytics workspace ID>] --logs <resource specific JSON encoded log settings> --metrics <metric settings (shorthand|json-file|yaml-file)>Remediate from PowerShell To configure Diagnostic Settings on a subscription:$logCategories = @(); $logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Administrative -Enabled $true $logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Security -Enabled $true $logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category ServiceHealth -Enabled $true $logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Alert -Enabled $true $logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Recommendation -Enabled $true $logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Policy -Enabled $true $logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Autoscale -Enabled $true $logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category ResourceHealth -Enabled $true New-AzSubscriptionDiagnosticSetting -SubscriptionId <subscription ID> -Name <Diagnostic settings name> <[-EventHubAuthorizationRule <event hub auth rule ID> -EventHubName <event hub name>] [-StorageAccountId <storage account ID>] [-WorkSpaceId <log analytics workspace ID>] [-MarketplacePartner ID <full ARM Marketplace resource ID>]> -Log $logCategoriesTo configure Diagnostic Settings on a specific resource: ``` $logCategories = @() $logCategories += New-AzDiagnosticSettingLogSettingsObject -Category <resource specific log category> -Enabled $true Repeat command and variable assignment for each Log category specific to the resource where this Diagnostic Setting will get configured. $metricCategories = @() $metricCategories += New-AzDiagnosticSettingMetricSettingsObject -Enabled $true [-Category <resource specific metric category | AllMetrics>] [-RetentionPolicyDay <Integer>] [-RetentionPolicyEnabled $true] Repeat command and variable assignment for each Metric category or use the 'AllMetrics' category. New-AzDiagnosticSetting -ResourceId <resource ID> -Name <Diagnostic settings name> -Log $logCategories -Metric $metricCategories [-EventHubAuthorizationRuleId <event hub auth rule ID> -EventHubName <event hub name>] [-StorageAccountId <storage account ID>] [-WorkspaceId <log analytics workspace ID>] [-MarketplacePartnerId <full ARM marketplace resource ID>]>
6.1.1.2Ensure Diagnostic Setting Captures Appropriate Categories1
Attributes
- Profile
Level 1
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure Diagnostic Setting Captures Appropriate Categories
- Default Value
When the diagnostic setting is created using Azure Portal, by default no categories are selected.
- Audit Procedure
Audit from Azure Portal 1. Go to
Monitor. 1. ClickActivity log. 1. Click onExport Activity Logs. 1. Select the appropriateSubscription. 1. ClickEdit settingnext to a diagnostic setting. 1. Ensure that the following categories are checked:Administrative, Alert, Policy, and Security. Audit from Azure CLI Ensure the categories'Administrative', 'Alert', 'Policy', and 'Security'set to: 'enabled: true'az monitor diagnostic-settings subscription list --subscription <subscription ID>Audit from PowerShell Ensure the categories Administrative, Alert, Policy, and Security are set to Enabled:TrueGet-AzSubscriptionDiagnosticSetting -Subscription <subscriptionID>Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 3b980d31-7904-4bb7-8575-5665739a8052 - Name: 'An activity log alert should exist for specific Security operations' - Policy ID: b954148f-4c11-4c38-8221-be76711e194a - Name: 'An activity log alert should exist for specific Administrative operations' - Policy ID: c5447c04-a4d7-4ba8-a263-c9ee321a6858 - Name: 'An activity log alert should exist for specific Policy operations'- Impact Statement
Enabling additional categories may increase storage costs.
- Assessment Status
Automated
- Rationale Statement
A diagnostic setting controls how the diagnostic log is exported. Capturing the diagnostic setting categories for appropriate control/management plane activities allows proper alerting.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Monitor. 1. ClickActivity log. 1. Click onExport Activity Logs. 1. Select theSubscriptionfrom the drop down menu. 1. ClickEdit settingnext to a diagnostic setting. 1. Check the following categories:Administrative, Alert, Policy, and Security. 1. Choose the destination details according to your organization's needs. 1. ClickSave. Remediate from Azure CLIaz monitor diagnostic-settings subscription create --subscription <subscription id> --name <diagnostic settings name> --location <location> <[--event-hub <event hub ID> --event-hub-auth-rule <event hub auth rule ID>] [--storage-account <storage account ID>] [--workspace <log analytics workspace ID>] --logs [{category:Security,enabled:true},{category:Administrative,enabled:true},{category:Alert,enabled:true},{category:Policy,enabled:true}]Remediate from PowerShell$logCategories = @(); $logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Administrative -Enabled $true $logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Security -Enabled $true $logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Alert -Enabled $true $logCategories += New-AzDiagnosticSettingSubscriptionLogSettingsObject -Category Policy -Enabled $true New-AzSubscriptionDiagnosticSetting -SubscriptionId <subscription ID> -Name <Diagnostic settings name> <[-EventHubAuthorizationRule <event hub auth rule ID> -EventHubName <event hub name>] [-StorageAccountId <storage account ID>] [-WorkSpaceId <log analytics workspace ID>] [-MarketplacePartner ID <full ARM Marketplace resource ID>]> -Log $logCategories
6.1.1.3Ensure the Storage Account Containing the Container with Activity Logs is Encrypted with Customer-managed Key (CMK)1
Attributes
- Profile
Level 2
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure the Storage Account Containing the Container with Activity Logs is Encrypted with Customer-managed Key (CMK)
- Default Value
By default, for a storage account
keySourceis set toMicrosoft.Storageallowing encryption with vendor Managed key and not a Customer Managed Key.- Audit Procedure
Audit from Azure Portal 1. Go to
Monitor. 1. SelectActivity log. 1. SelectExport Activity Logs. 1. Select aSubscription. 1. Note the name of theStorage Accountfor the diagnostic setting. 1. Navigate toStorage accounts. 1. Click on the storage account name noted in Step 5. 1. UnderSecurity + networking, clickEncryption. 1. EnsureCustomer-managed keysis selected and a key is set. Audit from Azure CLI 1. Get storage account id configured with log profile:az monitor diagnostic-settings subscription list --subscription <subscription id> --query 'value[*].storageAccountId'2. Ensure the storage account is encrypted with CMK:az storage account list --query [?name=='<Storage Account Name>']In command output ensurekeySourceis set toMicrosoft.KeyvaultandkeyVaultPropertiesis not set tonullAudit from PowerShellGet-AzStorageAccount -ResourceGroupName <resource group name> -Name <storage account name>|select-object -ExpandProperty encryption|format-listEnsure the value ofKeyVaultPropertiesis notnullor empty, and ensureKeySourceis not set toMicrosoft.Storage. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: fbb99e8e-e444-4da0-9ff1-75c92f5a85b2 - Name: 'Storage account containing the container with activity logs must be encrypted with BYOK'- Impact Statement
NOTE: You must have your key vault setup to utilize this. All Audit Logs will be encrypted with a key you provide. You will need to set up customer managed keys separately, and you will select which key to use via the instructions here. You will be responsible for the lifecycle of the keys, and will need to manually replace them at your own determined intervals to keep the data secure.
- Assessment Status
Manual
- Rationale Statement
Configuring the storage account with the activity log export container to use CMKs provides additional confidentiality controls on log data, as a given user must have read permission on the corresponding storage account and must be granted decrypt permission by the CMK.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Monitor. 1. SelectActivity log. 1. SelectExport Activity Logs. 1. Select aSubscription. 1. Note the name of theStorage Accountfor the diagnostic setting. 1. Navigate toStorage accounts. 1. Click on the storage account. 1. UnderSecurity + networking, clickEncryption. 1. Next toEncryption type, selectCustomer-managed keys. 1. Complete the steps to configure a customer-managed key for encryption of the storage account. Remediate from Azure CLIaz storage account update --name <name of the storage account> --resource-group <resource group for a storage account> --encryption-key-source=Microsoft.Keyvault --encryption-key-vault <Key Vault URI> --encryption-key-name <KeyName> --encryption-key-version <Key Version>Remediate from PowerShellSet-AzStorageAccount -ResourceGroupName <resource group name> -Name <storage account name> -KeyvaultEncryption -KeyVaultUri <key vault URI> -KeyName <key name>
6.1.1.4Ensure that Logging for Azure Key Vault is 'Enabled'1
Attributes
- Profile
Level 1
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that Logging for Azure Key Vault is 'Enabled'
- Default Value
By default, Diagnostic AuditEvent logging is not enabled for Key Vault instances.
- Audit Procedure
Audit from Azure Portal 1. Go to
Key vaults. 1. For each Key vault, underMonitoring, go toDiagnostic settings. 1. ClickEdit settingnext to a diagnostic setting. 1. Ensure that a destination is configured. 1. UnderCategory groups, ensure thatauditandallLogsare checked. Audit from Azure CLI List all key vaultsaz keyvault listFor each keyvaultidaz monitor diagnostic-settings list --resource <id>Ensure thatstorageAccountIdreflects your desired destination and thatcategoryGroupandenabledare set as follows in the sample outputs below.logs: [ { categoryGroup: audit, enabled: true, }, { categoryGroup: allLogs, enabled: true, }Audit from PowerShell List the key vault(s) in the subscriptionGet-AzKeyVaultFor each key vault, run the following:Get-AzDiagnosticSetting -ResourceId <key_vault_id>Ensure thatStorageAccountId,ServiceBusRuleId,MarketplacePartnerId, orWorkspaceIdis set as appropriate. Also, ensure thatenabledis set totrue, and thatcategoryGroupreflects bothauditandallLogscategory groups. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: cf820ca0-f99e-4f3e-84fb-66e913812d21 - Name: 'Resource logs in Key Vault should be enabled'- Impact Statement
Enabling logging incurs costs based on the volume of logs generated.
- Assessment Status
Automated
- Rationale Statement
Monitoring how and when key vaults are accessed, and by whom, enables an audit trail of interactions with confidential information, keys, and certificates managed by Azure Key Vault. Enabling logging for Key Vault saves information in a user provided destination of either an Azure storage account or Log Analytics workspace. The same destination can be used for collecting logs for multiple Key Vaults.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Key vaults. 2. Select a Key vault. 3. UnderMonitoring, selectDiagnostic settings. 4. ClickEdit settingto update an existing diagnostic setting, orAdd diagnostic settingto create a new one. 5. If creating a new diagnostic setting, provide a name. 6. Configure an appropriate destination. 7. UnderCategory groups, checkauditandallLogs. 8. ClickSave. Remediate from Azure CLI To update an existingDiagnostic Settingsaz monitor diagnostic-settings update --name <diagnostic_setting_name> --resource <key_vault_id>To create a newDiagnostic Settingsaz monitor diagnostic-settings create --name <diagnostic_setting_name> --resource <key_vault_id> --logs [{category:audit,enabled:true},{category:allLogs,enabled:true}] --metrics [{category:AllMetrics,enabled:true}] <[--event-hub <event_hub_ID> --event-hub-rule <event_hub_auth_rule_ID> | --storage-account <storage_account_ID> |--workspace <log_analytics_workspace_ID> | --marketplace-partner-id <solution_resource_ID>]>Remediate from PowerShell Create theLogsettings object$logSettings = @() $logSettings += New-AzDiagnosticSettingLogSettingsObject -Enabled $true -Category audit $logSettings += New-AzDiagnosticSettingLogSettingsObject -Enabled $true -Category allLogsCreate theMetricsettings object$metricSettings = @() $metricSettings += New-AzDiagnosticSettingMetricSettingsObject -Enabled $true -Category AllMetricsCreate theDiagnostic Settingsfor eachKey VaultNew-AzDiagnosticSetting -Name <diagnostic_setting_name> -ResourceId <key_vault_id> -Log $logSettings -Metric $metricSettings [-StorageAccountId <storage_account_ID> | -EventHubName <event_hub_name> -EventHubAuthorizationRuleId <event_hub_auth_rule_ID> | -WorkSpaceId <log analytics workspace ID> | -MarketPlacePartnerId <full resource ID for third-party solution>]- Additional Information
DEPRECATION WARNING Retention rules for Key Vault logging is being migrated to Azure Storage Lifecycle Management. Retention rules should be set based on the needs of your organization and security or compliance frameworks. Please visit https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/migrate-to-azure-storage-lifecycle-policy?tabs=portal for detail on migrating your retention rules. Microsoft has provided the following deprecation timeline: March 31, 2023 – The Diagnostic Settings Storage Retention feature will no longer be available to configure new retention rules for log data. This includes using the portal, CLI PowerShell, and ARM and Bicep templates. If you have configured retention settings, you'll still be able to see and change them in the portal. March 31, 2024 – You will no longer be able to use the API (CLI, Powershell, or templates), or Azure portal to configure retention setting unless you're changing them to 0. Existing retention rules will still be respected. September 30, 2025 – All retention functionality for the Diagnostic Settings Storage Retention feature will be disabled across all environments.
6.1.1.5Ensure that Network Security Group Flow Logs are Captured and Sent to Log Analytics1
Attributes
- Profile
Level 2
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that Network Security Group Flow Logs are Captured and Sent to Log Analytics
- Default Value
By default Network Security Group logs are not sent to Log Analytics.
- Audit Procedure
Audit from Azure Portal 1. Navigate to
Network Watcher. 1. UnderLogs, selectFlow logs. 1. ClickAdd filter. 1. From theFilterdrop-down, selectFlow log type. 1. Review existingNetwork security groupflow logs, if any remain, to ensure they are enabled and configured to send logs to aLog Analytics Workspace. 1. ReviewVirtual networkflow logs for new or migrated coverage. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 27960feb-a23c-4577-8d36-ef8b5f35e0be - Name: 'All flow log resources should be in enabled state' - Policy ID: c251913d-7d24-4958-af87-478ed3b9ba41 - Name: 'Flow logs should be configured for every network security group' - Policy ID: 4c3c6c5f-0d47-4402-99b8-aa543dd8bcee - Name: 'Flow logs should be configured for every virtual network'- Impact Statement
The impact of configuring NSG Flow logs is primarily one of cost and configuration. If deployed, it will create storage accounts that hold minimal amounts of data on a 5-day lifecycle before feeding to Log Analytics Workspace. This will increase the amount of data stored and used by Azure Monitor.
- Assessment Status
Manual
- Rationale Statement
Network Flow Logs provide valuable insight into the flow of traffic around your network and feed into both Azure Monitor and Azure Sentinel (if in use), permitting the generation of visual flow diagrams to aid with analyzing for lateral movement, etc.
- Remediation Procedure
Remediate from Azure Portal Existing NSG flow logs can still be reviewed under
Network Watcher>Flow logs. If you already have NSG flow logs configured, ensure they remain enabled and thatTraffic Analyticssends data to aLog Analytics Workspaceuntil migration is complete. Azure no longer allows creation of new NSG flow logs after June 30, 2025. For new or migrated deployments, createVirtual networkflow logs instead: 1. Navigate toNetwork Watcher. 1. UnderLogs, selectFlow logs. 1. Select+ Create. 1. Select the desired Subscription. 1. ForFlow log type, selectVirtual network. 1. Select+ Select target resource. 1. SelectVirtual network. 1. Select a virtual network. 1. ClickConfirm selection. 1. Select or create a new Storage Account. 1. If using a v2 storage account, input the retention in days to retain the log. 1. ClickNext. 1. UnderAnalytics, forFlow log version, selectVersion 2. 1. Check the box next toEnable traffic analytics. 1. Select a processing interval. 1. Select aLog Analytics Workspace. 1. SelectNext. 1. Optionally add Tags. 1. SelectReview + create. 1. SelectCreate.- Additional Information
On September 30, 2027, NSG flow logs will be retired, and creating new NSG flow logs has not been possible since June 30, 2025. Azure recommends migrating to virtual network flow logs, which address NSG flow log limitations. After retirement, traffic analytics using NSG flow logs will no longer be supported, and existing NSG flow log resources will be deleted. Previously collected NSG flow log records will remain available per their retention policies. For details, see the official announcement: https://azure.microsoft.com/en-gb/updates?id=Azure-NSG-flow-logs-Retirement.
6.1.1.6Ensure that Virtual Network Flow Logs are Captured and Sent to Log Analytics1
Attributes
- Profile
Level 2
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that Virtual Network Flow Logs are Captured and Sent to Log Analytics
- Audit Procedure
Audit from Azure Portal 1. Go to
Network Watcher. 1. UnderLogs, selectFlow logs. 1. ClickAdd filter. 1. From theFilterdrop-down menu, selectFlow log type. 1. From theValuedrop-down menu, checkVirtual networkonly. 1. ClickApply. 1. Ensure that at least one virtual network flow log is listed and is configured to send logs to aLog Analytics Workspace. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 2f080164-9f4d-497e-9db6-416dc9f7b48a - Name: 'Network Watcher flow logs should have traffic analytics enabled' - Policy ID: 4c3c6c5f-0d47-4402-99b8-aa543dd8bcee - Name: 'Audit flow logs configuration for every virtual network'- Impact Statement
- Virtual network flow logs are charged per gigabyte of network flow logs collected and come with a free tier of 5 GB/month per subscription. * If traffic analytics is enabled with virtual network flow logs, traffic analytics pricing applies at per gigabyte processing rates. * The storage of logs is charged separately.
- Assessment Status
Manual
- Rationale Statement
Virtual network flow logs provide critical visibility into traffic patterns. Sending logs to a Log Analytics workspace enables centralized analysis, correlation, and alerting for faster threat detection and response.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Network Watcher. 1. UnderLogs, clickFlow logs. 1. Click+ Create. 1. Select a subscription. 1. Next toFlow log type, selectVirtual network. 1. Click+ Select target resource. 1. SelectVirtual network. 1. Select a virtual network. 1. ClickConfirm selection. 1. Select a storage account, or create a new storage account. 1. Set the retention in days for the storage account. 1. ClickNext. 1. UnderAnalytics, forFlow logs version, selectVersion 2. 1. Check the box next toEnable traffic analytics. 1. Select a processing interval. 1. Select aLog Analytics Workspace. 1. ClickNext. 1. Optionally, addTags. 1. ClickReview + create. 1. ClickCreate. 1. Repeat steps 1-20 for each subscription or virtual network requiring remediation.- Additional Information
On September 30, 2027, NSG flow logs will be retired, and creating new NSG flow logs will no longer be possible after June 30, 2025. Azure recommends migrating to virtual network flow logs, which address NSG flow log limitations. After retirement, traffic analytics using NSG flow logs will no longer be supported, and existing NSG flow log resources will be deleted. Previously collected NSG flow log records will remain available per their retention policies. For details, see the official announcement: https://azure.microsoft.com/en-gb/updates?id=Azure-NSG-flow-logs-Retirement.
6.1.1.7Ensure that a Microsoft Entra Diagnostic Setting Exists to Send Microsoft Graph Activity Logs to an Appropriate Destination1
Attributes
- Profile
Level 2
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that a Microsoft Entra Diagnostic Setting Exists to Send Microsoft Graph Activity Logs to an Appropriate Destination
- Default Value
By default, Microsoft Entra diagnostic settings do not exist.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Entra ID. 1. UnderMonitoring, clickDiagnostic settings. 1. Next to each diagnostic setting, clickEdit setting, and review the selected log categories and destination details. 1. Ensure that at least one diagnostic setting is configured to sendMicrosoftGraphActivityLogsto an appropriate destination.- Impact Statement
A Microsoft Entra ID P1 or P2 tenant license is required to access the Microsoft Graph activity logs. The amount of data logged and, thus, the cost incurred can vary significantly depending on the tenant size and the applications in your tenant that interact with the Microsoft Graph APIs. See the following pricing calculations for respective services: - Log Analytics: https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#pricing-model. - Azure Storage: https://azure.microsoft.com/en-gb/pricing/details/storage/blobs/. - Event Hubs: https://azure.microsoft.com/en-gb/pricing/details/event-hubs/
- Assessment Status
Manual
- Rationale Statement
Microsoft Graph activity logs provide visibility into HTTP requests made to the Microsoft Graph service, helping detect unauthorized access, suspicious activity, and security threats. Configuring diagnostic settings in Microsoft Entra ensures these logs are collected and sent to an appropriate destination for monitoring, analysis, and retention.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Entra ID. 1. UnderMonitoring, clickDiagnostic settings. 1. Click+ Add diagnostic setting. 1. Provide aDiagnostic setting name. 1. UnderLogs > Categories, check the box next toMicrosoftGraphActivityLogs. 1. Configure an appropriate destination for the logs. 1. ClickSave.
6.1.1.8Ensure that a Microsoft Entra Diagnostic Setting Exists to Send Microsoft Entra Activity Logs to an Appropriate Destination1
Attributes
- Profile
Level 2
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that a Microsoft Entra Diagnostic Setting Exists to Send Microsoft Entra Activity Logs to an Appropriate Destination
- Default Value
By default, Microsoft Entra diagnostic settings do not exist.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Entra ID. 1. UnderMonitoring, clickDiagnostic settings. 1. Next to each diagnostic setting, clickEdit setting, and review the selected log categories and destination details. 1. Ensure that at least one diagnostic setting is configured to send the following logs to an appropriate destination: -AuditLogs-SignInLogs-NonInteractiveUserSignInLogs-ServicePrincipalSignInLogs-ManagedIdentitySignInLogs-ProvisioningLogs-ADFSSignInLogs-RiskyUsers-UserRiskEvents-NetworkAccessTrafficLogs-RiskyServicePrincipals-ServicePrincipalRiskEvents-EnrichedOffice365AuditLogs-MicrosoftGraphActivityLogs-RemoteNetworkHealthLogs-NetworkAccessAlerts- Impact Statement
To export sign-in data, your organization needs an Azure AD P1 or P2 license. The amount of data logged and, thus, the cost incurred can vary significantly depending on the tenant size. See the following pricing calculations for respective services: - Log Analytics: https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#pricing-model. - Azure Storage: https://azure.microsoft.com/en-gb/pricing/details/storage/blobs/. - Event Hubs: https://azure.microsoft.com/en-gb/pricing/details/event-hubs/
- Assessment Status
Manual
- Rationale Statement
Microsoft Entra activity logs enables you to assess many aspects of your Microsoft Entra tenant. Configuring diagnostic settings in Microsoft Entra ensures these logs are collected and sent to an appropriate destination for monitoring, analysis, and retention.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Entra ID. 1. UnderMonitoring, clickDiagnostic settings. 1. Click+ Add diagnostic setting. 1. Provide aDiagnostic setting name. 1. UnderLogs > Categories, check the box next to each of the following logs: -AuditLogs-SignInLogs-NonInteractiveUserSignInLogs-ServicePrincipalSignInLogs-ManagedIdentitySignInLogs-ProvisioningLogs-ADFSSignInLogs-RiskyUsers-UserRiskEvents-NetworkAccessTrafficLogs-RiskyServicePrincipals-ServicePrincipalRiskEvents-EnrichedOffice365AuditLogs-MicrosoftGraphActivityLogs-RemoteNetworkHealthLogs-NetworkAccessAlerts1. Configure an appropriate destination for the logs. 1. ClickSave.
6.1.1.9Ensure that Intune Logs are Captured and Sent to Log Analytics0
Attributes
- Profile
Level 2
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that Intune Logs are Captured and Sent to Log Analytics
- Default Value
By default, Intune diagnostic settings do not exist.
- Audit Procedure
Audit from Azure Portal 1. Go to
Intune. 1. ClickReports. 1. UnderAzure monitor, clickDiagnostic settings. 1. Next to each diagnostic setting, clickEdit setting, and review the selected log categories and destination details. 1. Ensure that at least one diagnostic setting is configured to send the following logs to a Log Analytics workspace: -AuditLogs-OperationalLogs-DeviceComplianceOrg-Devices-Windows365AuditLogs- Impact Statement
A Microsoft Intune plan is required to access Intune: https://www.microsoft.com/en-gb/security/business/microsoft-intune-pricing. The amount of data logged and, thus, the cost incurred can vary significantly depending on the tenant size. For information on Log Analytics workspace costs, visit: https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs.
- Assessment Status
Manual
- Rationale Statement
Intune includes built-in logs that provide information about your environments. Sending logs to a Log Analytics workspace enables centralized analysis, correlation, and alerting for faster threat detection and response.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Intune. 1. ClickReports. 1. UnderAzure monitor, clickDiagnostic settings. 1. Click+ Add diagnostic setting. 1. Provide aDiagnostic setting name. 1. UnderLogs > Categories, check the box next to each of the following logs: -AuditLogs-OperationalLogs-DeviceComplianceOrg-Devices-Windows365AuditLogs1. UnderDestination details, check the box next toSend to Log Analytics workspace. 1. Select aSubscription. 1. Select aLog Analytics workspace. 1. ClickSave.
6.1.2.1Ensure that Activity Log Alert Exists for Create Policy Assignment1
Attributes
- Profile
Level 1
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that Activity Log Alert Exists for Create Policy Assignment
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal 1. Navigate to the
Monitorblade. 1. Click onAlerts. 1. In the Alerts window, click onAlert rules. 1. Ensure an alert rule exists where the Condition column containsOperation name=Microsoft.Authorization/policyAssignments/write. 1. Click on the AlertNameassociated with the previous step. 1. Ensure theConditionpanel displays the textWhenever the Activity Log has an event with Category='Administrative', Operation name='Create policy assignment'and does not filter onLevel,StatusorCaller. 1. Ensure theActionspanel displays an Action group is assigned to notify the appropriate personnel in your organization. Audit from Azure CLIaz monitor activity-log alert list --subscription <subscription ID> --query [].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}Look forMicrosoft.Authorization/policyAssignments/writein the output. If it's missing, generate a finding. Audit from PowerShellGet-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match Microsoft.Authorization/policyAssignments/write}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfIf the output is empty, analert ruleforCreate Policy Assignmentsis not configured. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: c5447c04-a4d7-4ba8-a263-c9ee321a6858 - Name: 'An activity log alert should exist for specific Policy operations'- Impact Statement
Alert rules incur minimal costs.
- Assessment Status
Automated
- Rationale Statement
Monitoring for create policy assignment events gives insight into changes done in Azure policy - assignments and can reduce the time it takes to detect unsolicited changes.
- Remediation Procedure
Remediate from Azure Portal 1. Navigate to the
Monitorblade. 1. SelectAlerts. 1. SelectCreate. 1. SelectAlert rule. 1. Choose a subscription. 1. SelectApply. 1. Select theConditiontab. 1. ClickSee all signals. 1. SelectCreate policy assignment (Policy assignment). 1. ClickApply. 1. Select theActionstab. 1. ClickSelect action groupsto select an existing action group, orCreate action groupto create a new action group. 1. Follow the prompts to choose or create an action group. 1. Select theDetailstab. 1. Select aResource group, provide anAlert rule nameand an optionalAlert rule description. 1. ClickReview + create. 1. ClickCreate. Remediate from Azure CLIaz monitor activity-log alert create --resource-group <resource group name> --condition category=Administrative and operationName=Microsoft.Authorization/policyAssignments/write and level=<verbose | information | warning | error | critical> --scope /subscriptions/<subscription ID> --name <activity log rule name> --subscription <subscription ID> --action-group <action group ID>Remediate from PowerShell Create theconditionsobject.$conditions = @() $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Authorization/policyAssignments/write -Field operationName $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field levelGet theAction Groupinformation and store it in a variable, then create a newActionobject.$actionGroup = Get-AzActionGroup -ResourceGroupName <resource group name> -Name <action group name> $actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.IdCreate theScopevariable.$scope = /subscriptions/<subscription ID>Create theActivity Log Alert RuleforMicrosoft.Authorization/policyAssignments/writeNew-AzActivityLogAlert -Name <activity alert rule name> -ResourceGroupName <resource group name> -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription <subscription ID> -Enabled $true
6.1.2.2Ensure that Activity Log Alert exists for Delete Policy Assignment1
Attributes
- Profile
Level 1
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that Activity Log Alert exists for Delete Policy Assignment
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal 1. Navigate to the
Monitorblade. 1. Click onAlerts. 1. In the Alerts window, click onAlert rules. 1. Ensure an alert rule exists where the Condition column containsOperation name=Microsoft.Authorization/policyAssignments/delete. 1. Click on the AlertNameassociated with the previous step. 1. Ensure theConditionpanel displays the textWhenever the Activity Log has an event with Category='Administrative', Operation name='Delete policy assignment'and does not filter onLevel,StatusorCaller. 1. Ensure theActionspanel displays an Action group is assigned to notify the appropriate personnel in your organization. Audit from Azure CLIaz monitor activity-log alert list --subscription <subscription ID> --query [].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}Look forMicrosoft.Authorization/policyAssignments/deletein the output Audit from PowerShellGet-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match Microsoft.Authorization/policyAssignments/delete}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: c5447c04-a4d7-4ba8-a263-c9ee321a6858 - Name: 'An activity log alert should exist for specific Policy operations'- Impact Statement
Alert rules incur minimal costs.
- Assessment Status
Automated
- Rationale Statement
Monitoring for delete policy assignment events gives insight into changes done in azure policy - assignments and can reduce the time it takes to detect unsolicited changes.
- Remediation Procedure
Remediate from Azure Portal 1. Navigate to the
Monitorblade. 1. SelectAlerts. 1. SelectCreate. 1. SelectAlert rule. 1. Choose a subscription. 1. SelectApply. 1. Select theConditiontab. 1. ClickSee all signals. 1. SelectDelete policy assignment (Policy assignment). 1. ClickApply. 1. Select theActionstab. 1. ClickSelect action groupsto select an existing action group, orCreate action groupto create a new action group. 1. Follow the prompts to choose or create an action group. 1. Select theDetailstab. 1. Select aResource group, provide anAlert rule nameand an optionalAlert rule description. 1. ClickReview + create. 1. ClickCreate. Remediate from Azure CLIaz monitor activity-log alert create --resource-group <resource group name> --condition category=Administrative and operationName=Microsoft.Authorization/policyAssignments/delete and level=<verbose | information | warning | error | critical> --scope /subscriptions/<subscription ID> --name <activity log rule name> --subscription <subscription id> --action-group <action group ID>Remediate from PowerShell Create the conditions object$conditions = @() $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Authorization/policyAssignments/delete -Field operationName $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field levelRetrieve theAction Groupinformation and store in a variable, then create theActionobject.$actionGroup = Get-AzActionGroup -ResourceGroupName <resource group name> -Name <action group name> $actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.IdCreate theScopevariable.$scope = /subscriptions/<subscription id>Create theActivity Log Alert RuleforMicrosoft.Authorization/policyAssignments/delete.New-AzActivityLogAlert -Name <activity log alert rule name> -ResourceGroupName <resource group name> -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription <subscription ID> -Enabled $true- Additional Information
This log alert also applies for Azure Blueprints.
6.1.2.3Ensure that Activity Log Alert Exists for Create or Update Network Security Group1
Attributes
- Profile
Level 1
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that Activity Log Alert Exists for Create or Update Network Security Group
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal 1. Navigate to the
Monitorblade. 1. Click onAlerts. 1. In the Alerts window, click onAlert rules. 1. Ensure an alert rule exists where the Condition column containsOperation name=Microsoft.Network/networkSecurityGroups/write. 1. Click on the AlertNameassociated with the previous step. 1. Ensure theConditionpanel displays the textWhenever the Activity Log has an event with Category='Administrative', Operation name='Create or Update Network Security Group'and does not filter onLevel,StatusorCaller. 1. Ensure theActionspanel displays an Action group is assigned to notify the appropriate personnel in your organization. Audit from Azure CLIaz monitor activity-log alert list --subscription <subscription ID> --query [].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}Look forMicrosoft.Network/networkSecurityGroups/writein the output Audit from PowerShellGet-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match Microsoft.Network/networkSecurityGroups/write}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: b954148f-4c11-4c38-8221-be76711e194a - Name: 'An activity log alert should exist for specific Administrative operations'- Impact Statement
Alert rules incur minimal costs.
- Assessment Status
Automated
- Rationale Statement
Monitoring for Create or Update Network Security Group events gives insight into network access changes and may reduce the time it takes to detect suspicious activity.
- Remediation Procedure
Remediate from Azure Portal 1. Navigate to the
Monitorblade. 1. SelectAlerts. 1. SelectCreate. 1. SelectAlert rule. 1. Choose a subscription. 1. SelectApply. 1. Select theConditiontab. 1. ClickSee all signals. 1. SelectCreate or Update Network Security Group (Network Security Group). 1. ClickApply. 1. Select theActionstab. 1. ClickSelect action groupsto select an existing action group, orCreate action groupto create a new action group. 1. Follow the prompts to choose or create an action group. 1. Select theDetailstab. 1. Select aResource group, provide anAlert rule nameand an optionalAlert rule description. 1. ClickReview + create. 1. ClickCreate. Remediate from Azure CLIaz monitor activity-log alert create --resource-group <resource group name> --condition category=Administrative and operationName=Microsoft.Network/networkSecurityGroups/write and level=verbose --scope /subscriptions/<subscription ID> --name <activity log rule name> --subscription <subscription id> --action-group <action group ID>Remediate from PowerShell Create theConditionsobject.$conditions = @() $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Network/networkSecurityGroups/write -Field operationName $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field levelRetrieve theAction Groupinformation and store in a variable, then create theActionsobject.$actionGroup = Get-AzActionGroup -ResourceGroupName <resource group name> -Name <action group name> $actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.IdCreate theScopeobject$scope = /subscriptions/<subscription id>Create theActivity Log Alert RuleforMicrosoft.Network/networkSecurityGroups/writeNew-AzActivityLogAlert -Name <activity log alert rule name> -ResourceGroupName <resource group name> -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription <subscription ID> -Enabled $true
6.1.2.4Ensure that Activity Log Alert Exists for Delete Network Security Group1
Attributes
- Profile
Level 1
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that Activity Log Alert Exists for Delete Network Security Group
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal 1. Navigate to the
Monitorblade. 1. Click onAlerts. 1. In the Alerts window, click onAlert rules. 1. Ensure an alert rule exists where the Condition column containsOperation name=Microsoft.Network/networkSecurityGroups/delete. 1. Click on the AlertNameassociated with the previous step. 1. Ensure theConditionpanel displays the textWhenever the Activity Log has an event with Category='Administrative', Operation name='Delete Network Security Group'and does not filter onLevel,StatusorCaller. 1. Ensure theActionspanel displays an Action group is assigned to notify the appropriate personnel in your organization. Audit from Azure CLIaz monitor activity-log alert list --subscription <subscription ID> --query [].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}Look forMicrosoft.Network/networkSecurityGroups/deletein the output Audit from PowerShellGet-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match Microsoft.Network/networkSecurityGroups/delete}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: b954148f-4c11-4c38-8221-be76711e194a - Name: 'An activity log alert should exist for specific Administrative operations'- Impact Statement
Alert rules incur minimal costs.
- Assessment Status
Automated
- Rationale Statement
Monitoring for Delete Network Security Group events gives insight into network access changes and may reduce the time it takes to detect suspicious activity.
- Remediation Procedure
Remediate from Azure Portal 1. Navigate to the
Monitorblade. 1. SelectAlerts. 1. SelectCreate. 1. SelectAlert rule. 1. Choose a subscription. 1. SelectApply. 1. Select theConditiontab. 1. ClickSee all signals. 1. SelectDelete Network Security Group (Network Security Group). 1. ClickApply. 1. Select theActionstab. 1. ClickSelect action groupsto select an existing action group, orCreate action groupto create a new action group. 1. Follow the prompts to choose or create an action group. 1. Select theDetailstab. 1. Select aResource group, provide anAlert rule nameand an optionalAlert rule description. 1. ClickReview + create. 1. ClickCreate. Remediate from Azure CLIaz monitor activity-log alert create --resource-group <resource group name> --condition category=Administrative and operationName=Microsoft.Network/networkSecurityGroups/delete and level=<verbose | information | warning | error | critical> --scope /subscriptions/<subscription ID> --name <activity log rule name> --subscription <subscription id> --action-group <action group ID>Remediate from PowerShell Create theConditionsobject.$conditions = @() $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Network/networkSecurityGroups/delete -Field operationName $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field levelRetrieve theAction Groupinformation and store in a variable, then create theActionsobject.$actionGroup = Get-AzActionGroup -ResourceGroupName <resource group name> -Name <action group name> $actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.IdCreate theScopeobject$scope = /subscriptions/<subscription id>Create theActivity Log Alert RuleforMicrosoft.Network/networkSecurityGroups/deleteNew-AzActivityLogAlert -Name <activity log alert rule name> -ResourceGroupName <resource group name> -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription <subscription ID> -Enabled $true
6.1.2.5Ensure that Activity Log Alert Exists for Create or Update Security Solution1
Attributes
- Profile
Level 1
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that Activity Log Alert Exists for Create or Update Security Solution
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal 1. Navigate to the
Monitorblade. 1. Click onAlerts. 1. In the Alerts window, click onAlert rules. 1. Ensure an alert rule exists where the Condition column containsOperation name=Microsoft.Security/securitySolutions/write. 1. Click on the AlertNameassociated with the previous step. 1. Ensure theConditionpanel displays the textWhenever the Activity Log has an event with Category='Administrative', Operation name='Create or Update Security Solutions'and does not filter onLevel,StatusorCaller. 1. Ensure theActionspanel displays an Action group is assigned to notify the appropriate personnel in your organization. Audit from Azure CLIaz monitor activity-log alert list --subscription <subscription Id> --query [].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}Look forMicrosoft.Security/securitySolutions/writein the output Audit from PowerShellGet-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match Microsoft.Security/securitySolutions/write}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: b954148f-4c11-4c38-8221-be76711e194a - Name: 'An activity log alert should exist for specific Administrative operations'- Impact Statement
Alert rules incur minimal costs.
- Assessment Status
Automated
- Rationale Statement
Monitoring for Create or Update Security Solution events gives insight into changes to the active security solutions and may reduce the time it takes to detect suspicious activity.
- Remediation Procedure
Remediate from Azure Portal 1. Navigate to the
Monitorblade. 1. SelectAlerts. 1. SelectCreate. 1. SelectAlert rule. 1. Choose a subscription. 1. SelectApply. 1. Select theConditiontab. 1. ClickSee all signals. 1. SelectCreate or Update Security Solutions (Security Solutions). 1. ClickApply. 1. Select theActionstab. 1. ClickSelect action groupsto select an existing action group, orCreate action groupto create a new action group. 1. Follow the prompts to choose or create an action group. 1. Select theDetailstab. 1. Select aResource group, provide anAlert rule nameand an optionalAlert rule description. 1. ClickReview + create. 1. ClickCreate. Remediate from Azure CLIaz monitor activity-log alert create --resource-group <resource group name> --condition category=Administrative and operationName=Microsoft.Security/securitySolutions/write and level=<verbose | information | warning | error | critical> --scope /subscriptions/<subscription ID> --name <activity log rule name> --subscription <subscription id> --action-group <action group ID>Remediate from PowerShell Create theConditionsobject.$conditions = @() $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Security/securitySolutions/write -Field operationName $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field levelRetrieve theAction Groupinformation and store in a variable, then create theActionsobject.$actionGroup = Get-AzActionGroup -ResourceGroupName <resource group name> -Name <action group name> $actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.IdCreate theScopeobject$scope = /subscriptions/<subscription ID>Create theActivity Log Alert RuleforMicrosoft.Security/securitySolutions/writeNew-AzActivityLogAlert -Name <activity log alert rule name> -ResourceGroupName <resource group name> -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription <subscription ID> -Enabled $true
6.1.2.6Ensure that Activity Log Alert Exists for Delete Security Solution1
Attributes
- Profile
Level 1
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that Activity Log Alert Exists for Delete Security Solution
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal 1. Navigate to the
Monitorblade. 1. Click onAlerts. 1. In the Alerts window, click onAlert rules. 1. Ensure an alert rule exists where the Condition column containsOperation name=Microsoft.Security/securitySolutions/delete. 1. Click on the AlertNameassociated with the previous step. 1. Ensure theConditionpanel displays the textWhenever the Activity Log has an event with Category='Administrative', Operation name='Delete Security Solutions'and does not filter onLevel,StatusorCaller. 1. Ensure theActionspanel displays an Action group is assigned to notify the appropriate personnel in your organization. Audit from Azure CLIaz monitor activity-log alert list --subscription <subscription Id> --query [].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}Look forMicrosoft.Security/securitySolutions/deletein the output Audit from PowerShellGet-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match Microsoft.Security/securitySolutions/delete}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: b954148f-4c11-4c38-8221-be76711e194a - Name: 'An activity log alert should exist for specific Administrative operations'- Impact Statement
Alert rules incur minimal costs.
- Assessment Status
Automated
- Rationale Statement
Monitoring for Delete Security Solution events gives insight into changes to the active security solutions and may reduce the time it takes to detect suspicious activity.
- Remediation Procedure
Remediate from Azure Portal 1. Navigate to the
Monitorblade. 1. SelectAlerts. 1. SelectCreate. 1. SelectAlert rule. 1. Choose a subscription. 1. SelectApply. 1. Select theConditiontab. 1. ClickSee all signals. 1. SelectDelete Security Solutions (Security Solutions). 1. ClickApply. 1. Select theActionstab. 1. ClickSelect action groupsto select an existing action group, orCreate action groupto create a new action group. 1. Follow the prompts to choose or create an action group. 1. Select theDetailstab. 1. Select aResource group, provide anAlert rule nameand an optionalAlert rule description. 1. ClickReview + create. 1. ClickCreate. Remediate from Azure CLIaz monitor activity-log alert create --resource-group <resource group name> --condition category=Administrative and operationName=Microsoft.Security/securitySolutions/delete and level=<verbose | information | warning | error | critical> --scope /subscriptions/<subscription ID> --name <activity log rule name> --subscription <subscription id> --action-group <action group ID>Remediate from PowerShell Create theConditionsobject.$conditions = @() $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Security/securitySolutions/delete -Field operationName $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field levelRetrieve theAction Groupinformation and store in a variable, then create theActionsobject.$actionGroup = Get-AzActionGroup -ResourceGroupName <resource group name> -Name <action group name> $actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.IdCreate theScopeobject$scope = /subscriptions/<subscription ID>Create theActivity Log Alert RuleforMicrosoft.Security/securitySolutions/deleteNew-AzActivityLogAlert -Name <activity log alert rule name> -ResourceGroupName <resource group name> -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription <subscription ID> -Enabled $true
6.1.2.7Ensure that Activity Log Alert Exists for Create or Update SQL Server Firewall Rule1
Attributes
- Profile
Level 1
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that Activity Log Alert Exists for Create or Update SQL Server Firewall Rule
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal 1. Navigate to the
Monitorblade. 1. Click onAlerts. 1. In the Alerts window, click onAlert rules. 1. Ensure an alert rule exists where the Condition column containsOperation name=Microsoft.Sql/servers/firewallRules/write. 1. Click on the AlertNameassociated with the previous step. 1. Ensure theConditionpanel displays the textWhenever the Activity Log has an event with Category='Administrative', Operation name='Create/Update server firewall rule'and does not filter onLevel,StatusorCaller. 1. Ensure theActionspanel displays an Action group is assigned to notify the appropriate personnel in your organization. Audit from Azure CLIaz monitor activity-log alert list --subscription <subscription Id> --query [].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}Look forMicrosoft.Sql/servers/firewallRules/writein the output Audit from PowerShellGet-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match Microsoft.Sql/servers/firewallRules/write}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: b954148f-4c11-4c38-8221-be76711e194a - Name: 'An activity log alert should exist for specific Administrative operations'- Impact Statement
There will be a substantial increase in log size if there are a large number of administrative actions on a server.
- Assessment Status
Automated
- Rationale Statement
Monitoring for Create or Update SQL Server Firewall Rule events gives insight into network access changes and may reduce the time it takes to detect suspicious activity.
- Remediation Procedure
Remediate from Azure Portal 1. Navigate to the
Monitorblade. 1. SelectAlerts. 1. SelectCreate. 1. SelectAlert rule. 1. Choose a subscription. 1. SelectApply. 1. Select theConditiontab. 1. ClickSee all signals. 1. SelectCreate/Update server firewall rule (Server Firewall Rule). 1. ClickApply. 1. Select theActionstab. 1. ClickSelect action groupsto select an existing action group, orCreate action groupto create a new action group. 1. Follow the prompts to choose or create an action group. 1. Select theDetailstab. 1. Select aResource group, provide anAlert rule nameand an optionalAlert rule description. 1. ClickReview + create. 1. ClickCreate. Remediate from Azure CLIaz monitor activity-log alert create --resource-group <resource group name> --condition category=Administrative and operationName=Microsoft.Sql/servers/firewallRules/write and level=<verbose | information | warning | error | critical> --scope /subscriptions/<subscription ID> --name <activity log rule name> --subscription <subscription id> --action-group <action group ID>Remediate from PowerShell Create theConditionsobject.$conditions = @() $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Sql/servers/firewallRules/write -Field operationName $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field levelRetrieve theAction Groupinformation and store in a variable, then create theActionsobject.$actionGroup = Get-AzActionGroup -ResourceGroupName <resource group name> -Name <action group name> $actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.IdCreate theScopeobject$scope = /subscriptions/<subscription ID>Create theActivity Log Alert RuleforMicrosoft.Sql/servers/firewallRules/writeNew-AzActivityLogAlert -Name <activity log alert rule name> -ResourceGroupName <resource group name> -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription <subscription ID> -Enabled $true
6.1.2.8Ensure that Activity Log Alert Exists for Delete SQL Server Firewall Rule1
Attributes
- Profile
Level 1
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that Activity Log Alert Exists for Delete SQL Server Firewall Rule
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal 1. Navigate to the
Monitorblade. 1. Click onAlerts. 1. In the Alerts window, click onAlert rules. 1. Ensure an alert rule exists where the Condition column containsOperation name=Microsoft.Sql/servers/firewallRules/delete. 1. Click on the AlertNameassociated with the previous step. 1. Ensure theConditionpanel displays the textWhenever the Activity Log has an event with Category='Administrative', Operation name='Delete server firewall rule'and does not filter onLevel,StatusorCaller. 1. Ensure theActionspanel displays an Action group is assigned to notify the appropriate personnel in your organization. Audit from Azure CLIaz monitor activity-log alert list --subscription <subscription Id> --query [].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}Look forMicrosoft.Sql/servers/firewallRules/deletein the output Audit from PowerShellGet-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match Microsoft.Sql/servers/firewallRules/delete}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: b954148f-4c11-4c38-8221-be76711e194a - Name: 'An activity log alert should exist for specific Administrative operations'- Impact Statement
There will be a substantial increase in log size if there are a large number of administrative actions on a server.
- Assessment Status
Automated
- Rationale Statement
Monitoring for Delete SQL Server Firewall Rule events gives insight into SQL network access changes and may reduce the time it takes to detect suspicious activity.
- Remediation Procedure
Remediate from Azure Portal 1. Navigate to the
Monitorblade. 1. SelectAlerts. 1. SelectCreate. 1. SelectAlert rule. 1. Choose a subscription. 1. SelectApply. 1. Select theConditiontab. 1. ClickSee all signals. 1. SelectDelete server firewall rule (Server Firewall Rule). 1. ClickApply. 1. Select theActionstab. 1. ClickSelect action groupsto select an existing action group, orCreate action groupto create a new action group. 1. Follow the prompts to choose or create an action group. 1. Select theDetailstab. 1. Select aResource group, provide anAlert rule nameand an optionalAlert rule description. 1. ClickReview + create. 1. ClickCreate. Remediate from Azure CLIaz monitor activity-log alert create --resource-group <resource group name> --condition category=Administrative and operationName=Microsoft.Sql/servers/firewallRules/delete and level=<verbose | information | warning | error | critical> --scope /subscriptions/<subscription ID> --name <activity log rule name> --subscription <subscription id> --action-group <action group ID>Remediate from PowerShell Create theConditionsobject.$conditions = @() $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Sql/servers/firewallRules/delete -Field operationName $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field levelRetrieve theAction Groupinformation and store in a variable, then create theActionsobject.$actionGroup = Get-AzActionGroup -ResourceGroupName <resource group name> -Name <action group name> $actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.IdCreate theScopeobject$scope = /subscriptions/<subscription ID>Create theActivity Log Alert RuleforMicrosoft.Sql/servers/firewallRules/deleteNew-AzActivityLogAlert -Name <activity log alert rule name> -ResourceGroupName <resource group name> -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription <subscription ID> -Enabled $true
6.1.2.9Ensure that Activity Log Alert Exists for Create or Update Public IP Address rule1
Attributes
- Profile
Level 1
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that Activity Log Alert Exists for Create or Update Public IP Address rule
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal 1. Navigate to the
Monitorblade. 1. Click onAlerts. 1. In the Alerts window, click onAlert rules. 1. Ensure an alert rule exists where the Condition column containsOperation name=Microsoft.Network/publicIPAddresses/write. 1. Click on the AlertNameassociated with the previous step. 1. Ensure theConditionpanel displays the textWhenever the Activity Log has an event with Category='Administrative', Operation name='Create or Update Public Ip Address'and does not filter onLevel,StatusorCaller. 1. Ensure theActionspanel displays an Action group is assigned to notify the appropriate personnel in your organization. Audit from Azure CLIaz monitor activity-log alert list --subscription <subscription Id> --query [].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}Look forMicrosoft.Network/publicIPAddresses/writein the output Audit from PowerShellGet-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match Microsoft.Network/publicIPAddresses/write}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 1513498c-3091-461a-b321-e9b433218d28 - Name: 'Enable logging by category group for Public IP addresses (microsoft.network/publicipaddresses) to Log Analytics'- Impact Statement
There will be a substantial increase in log size if there are a large number of administrative actions on a server.
- Assessment Status
Automated
- Rationale Statement
Monitoring for Create or Update Public IP Address events gives insight into network access changes and may reduce the time it takes to detect suspicious activity.
- Remediation Procedure
Remediate from Azure Portal 1. Navigate to the
Monitorblade. 1. SelectAlerts. 1. SelectCreate. 1. SelectAlert rule. 1. Choose a subscription. 1. SelectApply. 1. Select theConditiontab. 1. ClickSee all signals. 1. SelectCreate or Update Public Ip Address (Public Ip Address). 1. ClickApply. 1. Select theActionstab. 1. ClickSelect action groupsto select an existing action group, orCreate action groupto create a new action group. 1. Follow the prompts to choose or create an action group. 1. Select theDetailstab. 1. Select aResource group, provide anAlert rule nameand an optionalAlert rule description. 1. ClickReview + create. 1. ClickCreate. Remediate from Azure CLIaz monitor activity-log alert create --resource-group <resource group name> --condition category=Administrative and operationName=Microsoft.Network/publicIPAddresses/write and level=<verbose | information | warning | error | critical> --scope /subscriptions/<subscription ID> --name <activity log rule name> --subscription <subscription id> --action-group <action group ID>Remediate from PowerShell Create theConditionsobject.$conditions = @() $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Network/publicIPAddresses/write -Field operationName $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field levelRetrieve theAction Groupinformation and store in a variable, then create theActionsobject.$actionGroup = Get-AzActionGroup -ResourceGroupName <resource group name> -Name <action group name> $actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.IdCreate theScopeobject$scope = /subscriptions/<subscription ID>Create theActivity Log Alert RuleforMicrosoft.Network/publicIPAddresses/writeNew-AzActivityLogAlert -Name <activity log alert rule name> -ResourceGroupName <resource group name> -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription <subscription ID> -Enabled $true
6.1.2.10Ensure that Activity Log Alert Exists for Delete Public IP Address rule1
Attributes
- Profile
Level 1
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that Activity Log Alert Exists for Delete Public IP Address rule
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal 1. Navigate to the
Monitorblade. 1. Click onAlerts. 1. In the Alerts window, click onAlert rules. 1. Ensure an alert rule exists where the Condition column containsOperation name=Microsoft.Network/publicIPAddresses/delete. 1. Click on the AlertNameassociated with the previous step. 1. Ensure theConditionpanel displays the textWhenever the Activity Log has an event with Category='Administrative', Operation name='Delete Public Ip Address'and does not filter onLevel,StatusorCaller. 1. Ensure theActionspanel displays an Action group is assigned to notify the appropriate personnel in your organization. Audit from Azure CLIaz monitor activity-log alert list --subscription <subscription Id> --query [].{Name:name,Enabled:enabled,Condition:condition.allOf,Actions:actions}Look forMicrosoft.Network/publicIPAddresses/deletein the output Audit from PowerShellGet-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match Microsoft.Network/publicIPAddresses/delete}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 1513498c-3091-461a-b321-e9b433218d28 - Name: 'Enable logging by category group for Public IP addresses (microsoft.network/publicipaddresses) to Log Analytics'- Impact Statement
There will be a substantial increase in log size if there are a large number of administrative actions on a server.
- Assessment Status
Automated
- Rationale Statement
Monitoring for Delete Public IP Address events gives insight into network access changes and may reduce the time it takes to detect suspicious activity.
- Remediation Procedure
Remediate from Azure Portal 1. Navigate to the
Monitorblade. 1. SelectAlerts. 1. SelectCreate. 1. SelectAlert rule. 1. Choose a subscription. 1. SelectApply. 1. Select theConditiontab. 1. ClickSee all signals. 1. SelectDelete Public Ip Address (Public Ip Address). 1. ClickApply. 1. Select theActionstab. 1. ClickSelect action groupsto select an existing action group, orCreate action groupto create a new action group. 1. Follow the prompts to choose or create an action group. 1. Select theDetailstab. 1. Select aResource group, provide anAlert rule nameand an optionalAlert rule description. 1. ClickReview + create. 1. ClickCreate. Remediate from Azure CLIaz monitor activity-log alert create --resource-group <resource group name> --condition category=Administrative and operationName=Microsoft.Network/publicIPAddresses/delete and level=<verbose | information | warning | error | critical> --scope /subscriptions/<subscription ID> --name <activity log rule name> --subscription <subscription id> --action-group <action group ID>Remediate from PowerShell Create theConditionsobject.$conditions = @() $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Administrative -Field category $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Microsoft.Network/publicIPAddresses/delete -Field operationName $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Equal Verbose -Field levelRetrieve theAction Groupinformation and store in a variable, then create theActionsobject.$actionGroup = Get-AzActionGroup -ResourceGroupName <resource group name> -Name <action group name> $actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.IdCreate theScopeobject$scope = /subscriptions/<subscription ID>Create theActivity Log Alert RuleforMicrosoft.Network/publicIPAddresses/deleteNew-AzActivityLogAlert -Name <activity log alert rule name> -ResourceGroupName <resource group name> -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription <subscription ID> -Enabled $true
6.1.2.11Ensure that an Activity Log Alert Exists for Service Health1
Attributes
- Profile
Level 1
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that an Activity Log Alert Exists for Service Health
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal 1. Go to
Monitor. 1. ClickAlerts. 1. ClickAlert rules. 1. Ensure an alert rule exists for a subscription withConditionset toService names=All, Event types=AllandTarget resource typeset toSubscription. 1. If an alert rule is found for step 4, click the name of the alert rule. 1. Ensure theActionspanel displays an action group configured to notify appropriate personnel. 1. Repeat steps 1-6 for each subscription. Audit from Azure CLI Run the following command to list activity log alerts:az monitor activity-log alert list --subscription <subscription-id>For each activity log alert, run the following command:az monitor activity-log alert show --subscription <subscription-id> --resource-group <resource-group> --activity-log-alert-name <activity-log-alert>Ensure an alert exists forServiceHealthwithscopesset to a subscription ID. Repeat for each subscription. Audit from PowerShell Run the following command to locateServiceHealthalert rules for a subscription:Get-AzActivityLogAlert -SubscriptionId <subscription-id> | where-object {$_.ConditionAllOf.Equal -match ServiceHealth} | select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfEnsure that at least oneServiceHealthalert rule is returned. Repeat for each subscription.- Impact Statement
There is no charge for creating activity log alert rules.
- Assessment Status
Automated
- Rationale Statement
Monitoring for Service Health events provides insight into service issues, planned maintenance, security advisories, and other changes that may affect the Azure services and regions in use.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Monitor. 1. ClickAlerts. 1. Click+ Create. 1. SelectAlert rulefrom the drop-down menu. 1. Choose a subscription. 1. ClickApply. 1. Select theConditiontab. 1. ClickSee all signals. 1. SelectService health. 1. ClickApply. 1. Open the drop-down menu next toEvent types. 1. Check the box next toSelect all. 1. Select theActionstab. 1. ClickSelect action groupsto select an existing action group, orCreate action groupto create a new action group. 1. Follow the prompts to choose or create an action group. 1. Select theDetailstab. 1. Select aResource group, provide anAlert rule nameand an optionalAlert rule description. 1. ClickReview + create. 1. ClickCreate. 1. Repeat steps 1-19 for each subscription requiring remediation. Remediate from Azure CLI For each subscription requiring remediation, run the following command to create aServiceHealthalert rule for a subscription:az monitor activity-log alert create --subscription <subscription-id> --resource-group <resource-group> --name <alert-rule> --condition category=ServiceHealth and properties.incidentType=Incident --scope /subscriptions/<subscription-id> --action-group <action-group>Remediate from PowerShell Create theConditionsobject:$conditions = @() $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Field category -Equal ServiceHealth $conditions += New-AzActivityLogAlertAlertRuleAnyOfOrLeafConditionObject -Field properties.incidentType -Equal IncidentRetrieve theAction Groupinformation and store in a variable:$actionGroup = Get-AzActionGroup -ResourceGroupName <resource-group> -Name <action-group>Create theActionsobject:$actionObject = New-AzActivityLogAlertActionGroupObject -Id $actionGroup.IdCreate theScopeobject:$scope = /subscriptions/<subscription-id>Create the activity log alert rule:New-AzActivityLogAlert -Name <alert-rule> -ResourceGroupName <resource-group> -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription <subscription-id> -Enabled $trueRepeat for each subscription requiring remediation.
6.1.3.1Ensure Application Insights are Configured1
Attributes
- Profile
Level 2
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure Application Insights are Configured
- Default Value
Application Insights are not enabled by default.
- Audit Procedure
Audit from Azure Portal 1. Navigate to
Application Insights. 2. Ensure anApplication Insightsservice is configured and exists. Audit from Azure CLIaz monitor app-insights component show --query [].{ID:appId, Name:name, Tenant:tenantId, Location:location, Provisioning_State:provisioningState}Ensure the above command produces output, otherwiseApplication Insightshas not been configured. Audit from PowerShellGet-AzApplicationInsights|select location,name,appid,provisioningState,tenantid- Impact Statement
Because Application Insights relies on a Log Analytics Workspace, an organization will incur additional expenses when using this service.
- Assessment Status
Automated
- Rationale Statement
Configuring Application Insights provides additional data not found elsewhere within Azure as part of a much larger logging and monitoring program within an organization's Information Security practice. The types and contents of these logs will act as both a potential cost saving measure (application performance) and a means to potentially confirm the source of a potential incident (trace logging). Metrics and Telemetry data provide organizations with a proactive approach to cost savings by monitoring an application's performance, while the trace logging data provides necessary details in a reactive incident response scenario by helping organizations identify the potential source of an incident within their application.
- Remediation Procedure
Remediate from Azure Portal 1. Navigate to
Application Insights. 2. Under theBasicstab within thePROJECT DETAILSsection, select theSubscription. 3. Select theResource group. 4. Within theINSTANCE DETAILS, enter aName. 5. Select aRegion. 6. Next toResource Mode, selectWorkspace-based. 7. Within theWORKSPACE DETAILS, select theSubscriptionfor the log analytics workspace. 8. Select the appropriateLog Analytics Workspace. 9. ClickNext:Tags >. 10. Enter the appropriateTagsasName,Valuepairs. 11. ClickNext:Review+Create. 12. ClickCreate. Remediate from Azure CLIaz monitor app-insights component create --app <app name> --resource-group <resource group name> --location <location> --kind web --retention-time <INT days to retain logs> --workspace <log analytics workspace ID> --subscription <subscription ID>Remediate from PowerShellNew-AzApplicationInsights -Kind web -ResourceGroupName <resource group name> -Name <app insights name> -location <location> -RetentionInDays <INT days to retain logs> -SubscriptionID <subscription ID> -WorkspaceResourceId <log analytics workspace ID>
6.1.4Ensure that Azure Monitor Resource Logging is Enabled for All Services that Support it1
Attributes
- Profile
Level 1
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure that Azure Monitor Resource Logging is Enabled for All Services that Support it
- Default Value
By default, Azure Monitor Resource Logs are 'Disabled' for all resources.
- Audit Procedure
Audit from Azure Portal The specific steps for configuring resources within the Azure console vary depending on resource, but typically the steps are: 1. Go to the resource 2. Click on Diagnostic settings 3. In the blade that appears, click Add diagnostic setting 4. Configure the diagnostic settings 5. Click on Save Audit from Azure CLI List all
resourcesfor asubscriptionaz resource list --subscription <subscription id>For eachresourcerun the followingaz monitor diagnostic-settings list --resource <resource ID>An empty result means adiagnostic settingsis not configured for that resource. An error message means adiagnostic settingsis not supported for that resource. Audit from PowerShell Get a list ofresourcesin asubscriptioncontext and store in a variable$resources = Get-AzResourceLoop through eachresourceto determine if a diagnostic setting is configured or not.foreach ($resource in $resources) {$diagnosticSetting = Get-AzDiagnosticSetting -ResourceId $resource.id -ErrorAction SilentlyContinue; if ([string]::IsNullOrEmpty($diagnosticSetting)) {$message = Diagnostic Settings not configured for resource: + $resource.Name;Write-Output $message}else{$diagnosticSetting}}A result ofDiagnostic Settings not configured for resource: <resource name>means adiagnostic settingsis not configured for that resource. Otherwise, the output of the above command will show configuredDiagnostic Settingsfor a resource. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: cf820ca0-f99e-4f3e-84fb-66e913812d21 - Name: 'Resource logs in Key Vault should be enabled' - Policy ID: 91a78b24-f231-4a8a-8da9-02c35b2b6510 - Name: 'App Service apps should have resource logs enabled' - Policy ID: 428256e6-1fac-4f48-a757-df34c2b3336d - Name: 'Resource logs in Batch accounts should be enabled' - Policy ID: 057ef27e-665e-4328-8ea3-04b3122bd9fb - Name: 'Resource logs in Azure Data Lake Store should be enabled' - Policy ID: c95c74d9-38fe-4f0d-af86-0c7d626a315c - Name: 'Resource logs in Data Lake Analytics should be enabled' - Policy ID: 83a214f7-d01a-484b-91a9-ed54470c9a6a - Name: 'Resource logs in Event Hub should be enabled' - Policy ID: 383856f8-de7f-44a2-81fc-e5135b5c2aa4 - Name: 'Resource logs in IoT Hub should be enabled' - Policy ID: 34f95f76-5386-4de7-b824-0d8478470c9d - Name: 'Resource logs in Logic Apps should be enabled' - Policy ID: b4330a05-a843-4bc8-bf9a-cacce50c67f4 - Name: 'Resource logs in Search services should be enabled' - Policy ID: f8d36e2f-389b-4ee4-898d-21aeb69a0f45 - Name: 'Resource logs in Service Bus should be enabled' - Policy ID: f9be5368-9bf5-4b84-9e0a-7850da98bb46 - Name: 'Resource logs in Azure Stream Analytics should be enabled'- Impact Statement
Costs for monitoring varies with Log Volume. Not every resource needs to have logging enabled. It is important to determine the security classification of the data being processed by the given resource and adjust the logging based on which events need to be tracked. This is typically determined by governance and compliance requirements.
- Assessment Status
Manual
- Rationale Statement
A lack of monitoring reduces the visibility into the data plane, and therefore an organization's ability to detect reconnaissance, authorization attempts or other malicious activity. Unlike Activity Logs, Resource Logs are not enabled by default. Specifically, without monitoring it would be impossible to tell which entities had accessed a data store that was breached. In addition, alerts for failed attempts to access APIs for Web Services or Databases are only possible when logging is enabled.
- Remediation Procedure
Azure Subscriptions should log every access and operation for all resources. Logs should be sent to Storage and a Log Analytics Workspace or equivalent third-party system. Logs should be kept in readily-accessible storage for a minimum of one year, and then moved to inexpensive cold storage for a duration of time as necessary. If retention policies are set but storing logs in a Storage Account is disabled (for example, if only Event Hubs or Log Analytics options are selected), the retention policies have no effect. Enable all monitoring at first, and then be more aggressive moving data to cold storage if the volume of data becomes a cost concern. Remediate from Azure Portal The specific steps for configuring resources within the Azure console vary depending on resource, but typically the steps are: 1. Go to the resource 2. Click on Diagnostic settings 3. In the blade that appears, click Add diagnostic setting 4. Configure the diagnostic settings 5. Click on Save Remediate from Azure CLI For each
resource, run the following making sure to use aresourceappropriate JSON encodedcategoryfor the--logsoption.az monitor diagnostic-settings create --name <diagnostic settings name> --resource <resource ID> --logs [{category:<resource specific category>,enabled:true,rentention-policy:{enabled:true,days:180}}] --metrics [{category:AllMetrics,enabled:true,retention-policy:{enabled:true,days:180}}] <[--event-hub <event hub ID> --event-hub-rule <event hub auth rule ID> | --storage-account <storage account ID> |--workspace <log analytics workspace ID> | --marketplace-partner-id <full resource ID of third-party solution>]>Remediate from PowerShell Create thelogsettings object$logSettings = @() $logSettings += New-AzDiagnosticSettingLogSettingsObject -Enabled $true -RetentionPolicyDay 180 -RetentionPolicyEnabled $true -Category <resource specific category> $logSettings += New-AzDiagnosticSettingLogSettingsObject -Enabled $true -RetentionPolicyDay 180 -RetentionPolicyEnabled $true -Category <resource specific category number 2>Create themetricsettings object$metricSettings = @() $metricSettings += New-AzDiagnosticSettingMetricSettingsObject -Enabled $true -RetentionPolicyDay 180 -RetentionPolicyEnabled $true -Category AllMetricsCreate the diagnostic setting for a specific resourceNew-AzDiagnosticSetting -Name <diagnostic settings name> -ResourceId <resource ID> -Log $logSettings -Metric $metricSettings- Additional Information
For an up-to-date list of Azure resources which support Azure Monitor, refer to the Supported Log Categories reference.
6.1.5Ensure Basic, Free, and Consumption SKUs are not used on Production artifacts requiring monitoring and SLA0
Attributes
- Profile
Level 2
- Section
6 Management and Governance Services
- Sub Section
6.1 Logging and Monitoring
- Description
Ensure Basic, Free, and Consumption SKUs are not used on Production artifacts requiring monitoring and SLA
- Default Value
Policy should enforce standard SKUs for the following artifacts: - Public IP Addresses - Network Load Balancers - REDIS Cache - SQL PaaS Databases - VPN Gateways
- Audit Procedure
This needs to be audited by Azure Policy (one for each resource type) and denied for each artifact that is production. Audit from Azure Portal 1. Open
Azure Resource Graph Explorer1. ClickNew query1. Paste the following into the query window:Resources | where sku contains 'Basic' or sku contains 'consumption' | order by type4. ClickRun querythen evaluate the results in the results window. 5. Ensure that no production artifacts are returned. Audit from Azure CLIaz graph query -q Resources | where sku contains 'Basic' or sku contains 'consumption' | order by typeAlternatively, to filter on a specific resource group:az graph query -q Resources | where resourceGroup == '<resourceGroupName>' | where sku contains 'Basic' or sku contains 'consumption' | order by typeEnsure that no production artifacts are returned. Audit from PowerShellGet-AzResource | ?{ $_.Sku -EQ Basic}Ensure that no production artifacts are returned.- Impact Statement
The impact of enforcing Standard SKU's is twofold 1) There will be a cost increase 2) The monitoring and service level agreements will be available and will support the production service. All resources should be either tagged or in separate Management Groups/Subscriptions
- Assessment Status
Manual
- Rationale Statement
Typically, production workloads need to be monitored and should have an SLA with Microsoft, using Basic SKUs for any deployed product will mean that that these capabilities do not exist. The following resource types should use standard SKUs as a minimum. - Public IP Addresses - Network Load Balancers - REDIS Cache - SQL PaaS Databases - VPN Gateways
- Remediation Procedure
Each resource has its own process for upgrading from basic to standard SKUs that should be followed if required. - Public IP Address: https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/public-ip-upgrade. - Basic Load Balancer: https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-basic-upgrade-guidance. - Azure Cache for Redis: https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-how-to-scale. - Azure SQL Database: https://learn.microsoft.com/en-us/azure/azure-sql/database/scale-resources. - VPN Gateway: https://learn.microsoft.com/en-us/azure/vpn-gateway/gateway-sku-resize.
6.2Ensure that Resource Locks are set for Mission-Critical Azure Resources1
Attributes
- Profile
Level 2
- Section
6 Management and Governance Services
- Description
Ensure that Resource Locks are set for Mission-Critical Azure Resources
- Default Value
By default, no locks are set.
- Audit Procedure
Audit from Azure Portal 1. Navigate to the specific Azure Resource or Resource Group. 2. Click on
Locks. 3. Ensure the lock is defined with name and description, with typeRead-onlyorDeleteas appropriate. Audit from Azure CLI Review the list of all locks set currently:az lock list --resource-group <resourcegroupname> --resource-name <resourcename> --namespace <Namespace> --resource-type <type> --parentAudit from PowerShell Run the following command to list all resources.Get-AzResourceFor each resource, run the following command to check for Resource Locks.Get-AzResourceLock -ResourceName <Resource Name> -ResourceType <Resource Type> -ResourceGroupName <Resource Group Name>Review the output of thePropertiessetting. Compliant settings will have theCanNotDeleteorReadOnlyvalue.- Impact Statement
There can be unintended outcomes of locking a resource. Applying a lock to a parent service will cause it to be inherited by all resources within. Conversely, applying a lock to a resource may not apply to connected storage, leaving it unlocked. Please see the documentation for further information.
- Assessment Status
Manual
- Rationale Statement
As an administrator, it may be necessary to lock a subscription, resource group, or resource to prevent other users in the organization from accidentally deleting or modifying critical resources. The lock level can be set to to
CanNotDeleteorReadOnlyto achieve this purpose. -CanNotDeletemeans authorized users can still read and modify a resource, but they cannot delete the resource. -ReadOnlymeans authorized users can read a resource, but they cannot delete or update the resource. Applying this lock is similar to restricting all authorized users to the permissions granted by the Reader role.- Remediation Procedure
Remediate from Azure Portal 1. Navigate to the specific Azure Resource or Resource Group. 2. For each mission critical resource, click on
Locks. 3. ClickAdd. 4. Give the lock a name and a description, then select the type,Read-onlyorDeleteas appropriate. 5. Click OK. Remediate from Azure CLI To lock a resource, provide the name of the resource, its resource type, and its resource group name.az lock create --name <LockName> --lock-type <CanNotDelete/Read-only> --resource-group <resourceGroupName> --resource-name <resourceName> --resource-type <resourceType>Remediate from PowerShellGet-AzResourceLock -ResourceName <Resource Name> -ResourceType <Resource Type> -ResourceGroupName <Resource Group Name> -Locktype <CanNotDelete/Read-only>
7 Networking Services169
7.1Ensure that RDP Access from the Internet is Evaluated and Restricted1
Attributes
- Profile
Level 1
- Section
7 Networking Services
- Description
Ensure that RDP Access from the Internet is Evaluated and Restricted
- Default Value
By default, RDP access from internet is not
enabled.- Audit Procedure
Audit from Azure Portal 1. Go to
Network security groups. 1. UnderSettings, clickInbound security rules. 1. Ensure that no inbound security rule exists that matches the following: - Port:3389or range including 3389 - Protocol:TCPorAny- Source:0.0.0.0/0,Internet, orAny- Action:Allow1. Repeat steps 1-3 for each network security group. To audit from Azure Resource Graph: 1. Go toResource Graph Explorer. 1. ClickNew query. 1. Paste the following into the query window:resources | where type =~ microsoft.network/networksecuritygroups | project id, name, securityRule = properties.securityRules | mv-expand securityRule | extend access = securityRule.properties.access, direction = securityRule.properties.direction, protocol = securityRule.properties.protocol, destinationPort = case(isempty(securityRule.properties.destinationPortRange), securityRule.properties.destinationPortRanges, securityRule.properties.destinationPortRange), sourceAddress = case(isempty(securityRule.properties.sourceAddressPrefix), securityRule.properties.sourceAddressPrefixes, securityRule.properties.sourceAddressPrefix) | where access =~ Allow and direction =~ Inbound and protocol in~ (tcp, ) | mv-expand destinationPort | mv-expand sourceAddress | extend destinationPortMin = toint(split(destinationPort, -)[0]), destinationPortMax = toint(split(destinationPort, -)[-1]) | where (destinationPortMin <= 3389 and destinationPortMax >= 3389) or destinationPort == | where sourceAddress in~ (*, 0.0.0.0, internet, any) or sourceAddress endswith /01. ClickRun query. 1. Ensure that no results are returned. Audit from Azure CLI List network security groups with non-default security rules:az network nsg list --query [*].[name,securityRules]Ensure that no network security group has an inbound security rule that matches the following:access : Allow destinationPortRange : 3389, *, or <range-including-3389> direction : Inbound protocol : TCP or * sourceAddressPrefix : 0.0.0.0/0, Internet, or *Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 22730e10-96f6-4aac-ad84-9383d35b5917 - Name: 'Management ports should be closed on your virtual machines'- Impact Statement
Restricting RDP access may require alternative methods for remote administration such as VPN or Azure Bastion.
- Assessment Status
Automated
- Rationale Statement
The potential security problem with using RDP over the Internet is that attackers can use various brute force techniques to gain access to Azure Virtual Machines. Once the attackers gain access, they can use a virtual machine as a launch point for compromising other machines on an Azure Virtual Network or even attack networked devices outside of Azure.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Network security groups. 1. UnderSettings, clickInbound security rules. 1. Check the box next to any inbound security rule matching: - Port:3389or range including 3389 - Protocol:TCPorAny- Source:0.0.0.0/0,Internet, orAny- Action:Allow1. ClickDelete. 1. ClickYes. Remediate from Azure CLI For each network security group rule requiring remediation, run the following command to delete a rule:az network nsg rule delete --resource-group <resource-group> --nsg-name <network-security-group> --name <rule>
7.2Ensure that SSH Access from the Internet is Evaluated and Restricted1
Attributes
- Profile
Level 1
- Section
7 Networking Services
- Description
Ensure that SSH Access from the Internet is Evaluated and Restricted
- Default Value
By default, SSH access from internet is not
enabled.- Audit Procedure
Audit from Azure Portal 1. Open the
Networkingblade for the specific Virtual machine in Azure portal 2. Verify that theINBOUND PORT RULESdoes not have a rule for SSH such as - port =22, - protocol =TCPORANY, - Source =AnyORInternetAudit from Azure CLI List Network security groups with corresponding non-default Security rules:az network nsg list --query [*].[name,securityRules]Ensure that none of the NSGs have security rule as belowaccess : Allow destinationPortRange : 22 or * or [port range containing 22] direction : Inbound protocol : TCP or * sourceAddressPrefix : * or 0.0.0.0 or <nw>/0 or /0 or internet or anyAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 22730e10-96f6-4aac-ad84-9383d35b5917 - Name: 'Management ports should be closed on your virtual machines'- Impact Statement
Restricting SSH access may require alternative methods for remote administration such as VPN or Azure Bastion.
- Assessment Status
Automated
- Rationale Statement
The potential security problem with using SSH over the Internet is that attackers can use various brute force techniques to gain access to Azure Virtual Machines. Once the attackers gain access, they can use a virtual machine as a launch point for compromising other machines on the Azure Virtual Network or even attack networked devices outside of Azure.
- Remediation Procedure
Where SSH is not explicitly required and narrowly configured for resources attached to the Network Security Group, Internet-level access to your Azure resources should be restricted or eliminated. For internal access to relevant resources, configure an encrypted network tunnel such as: ExpressRoute Site-to-site VPN Point-to-site VPN
7.3Ensure that UDP Port Access from the Internet is Evaluated and Restricted1
Attributes
- Profile
Level 1
- Section
7 Networking Services
- Description
Ensure that UDP Port Access from the Internet is Evaluated and Restricted
- Default Value
By default, UDP access from internet is not
enabled.- Audit Procedure
Audit from Azure Portal 1. Open the
Networkingblade for the specific Virtual machine in Azure portal 2. Verify that theINBOUND PORT RULESdoes not have a rule for UDP such as - protocol =UDP, - Source =AnyORInternetAudit from Azure CLI List Network security groups with corresponding non-default Security rules:az network nsg list --query [*].[name,securityRules]Ensure that none of the NSGs have security rule as belowaccess : Allow destinationPortRange : * or [port range containing 53, 123, 161, 389, 1900, or other vulnerable UDP-based services] direction : Inbound protocol : UDP sourceAddressPrefix : * or 0.0.0.0 or <nw>/0 or /0 or internet or any- Impact Statement
Restricting UDP access may impact services that legitimately require UDP traffic.
- Assessment Status
Automated
- Rationale Statement
The potential security problem with broadly exposing UDP services over the Internet is that attackers can use DDoS amplification techniques to reflect spoofed UDP traffic from Azure Virtual Machines. The most common types of these attacks use exposed DNS, NTP, SSDP, SNMP, CLDAP and other UDP-based services as amplification sources for disrupting services of other machines on the Azure Virtual Network or even attack networked devices outside of Azure.
- Remediation Procedure
Where UDP is not explicitly required and narrowly configured for resources attached to the Network Security Group, Internet-level access to your Azure resources should be restricted or eliminated. For internal access to relevant resources, configure an encrypted network tunnel such as: ExpressRoute Site-to-site VPN Point-to-site VPN
7.4Ensure that HTTP(S) Access from the Internet is Evaluated and Restricted1
Attributes
- Profile
Level 1
- Section
7 Networking Services
- References
Express Route: https://docs.microsoft.com/en-us/azure/expressroute/:Site-to-Site VPN: https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-manager-portal:Point-to-Site VPN: https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal:https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-network-security#ns-1-establish-network-segmentation-boundaries
- Description
Ensure that HTTP(S) Access from the Internet is Evaluated and Restricted
- Audit Procedure
Audit from Azure Portal 1. For each VM, open the Networking blade 2. Verify that the INBOUND PORT RULES does not have a rule for HTTP(S) such as - port =
80/443, - protocol =TCP, - Source =AnyORInternetAudit from Azure CLI List Network security groups with corresponding non-default Security rules:az network nsg list --query [*].[name,securityRules]Ensure that none of the NSGs have security rule as belowaccess : Allow destinationPortRange : 80/443 or * or [port range containing 80/443] direction : Inbound protocol : TCP sourceAddressPrefix : * or 0.0.0.0 or <nw>/0 or /0 or internet or any- Impact Statement
Restricting HTTP(S) access may require proper configuration of web application firewalls and load balancers.
- Assessment Status
Automated
- Rationale Statement
The potential security problem with using HTTP(S) over the Internet is that attackers can use various brute force techniques to gain access to Azure resources. Once the attackers gain access, they can use the resource as a launch point for compromising other resources within the Azure tenant.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Virtual machines. 2. For each VM, open theNetworkingblade. 3. Click onInbound port rules. 4. Delete the rule with: * Port = 80/443 OR [port range containing 80/443] * Protocol = TCP OR Any * Source = Any (*) OR IP Addresses(0.0.0.0/0) OR Service Tag(Internet) * Action = Allow Remediate from Azure CLI 1. Run below command to list network security groups:az network nsg list --subscription <subscription-id> --output table2. For each network security group, run below command to list the rules associated with the specified port:az network nsg rule list --resource-group <resource-group> --nsg-name <nsg-name> --query [?destinationPortRange=='80 or 443']3. Run the below command to delete the rule with: * Port = 80/443 OR [port range containing 80/443] * Protocol = TCP OR * * Source = Any (*) OR IP Addresses(0.0.0.0/0) OR Service Tag(Internet) * Action = Allowaz network nsg rule delete --resource-group <resource-group> --nsg-name <nsg-name> --name <rule-name>
7.5Ensure that Network Security Group Flow Log Retention Days is Set to Greater than or equal to 901
Attributes
- Profile
Level 2
- Section
7 Networking Services
- Description
Ensure that Network Security Group Flow Log Retention Days is Set to Greater than or equal to 90
- Default Value
When a virtual network flow log is created using the Azure CLI, retention days is set to 0 by default. When creating via the Azure Portal, retention days must be specified by the creator.
- Audit Procedure
Audit from Azure Portal 1. Go to
Network Watcher. 1. UnderLogs, selectFlow logs. 1. ClickAdd filter. 1. From theFilterdrop-down menu, selectFlow log type. 1. From theValuedrop-down menu, checkVirtual networkonly. 1. ClickApply. 1. Click the name of a virtual network flow log. 1. UnderStorage Account, ensure thatRetention daysis set to0,90, or a number greater than 90. IfRetention daysis set to0, the logs are retained indefinitely with no retention policy. 1. Repeat steps 7 and 8 for each virtual network flow log. Audit from Azure CLI Run the following command to list network watchers:az network watcher listRun the following command to list the name and retention policy of flow logs in a network watcher:az network watcher flow-log list --location <location> --query [*].[name,retentionPolicy]For each flow log, ensure thatdaysis set to0,90, or a number greater than 90. Ifdaysis set to0, the logs are retained indefinitely with no retention policy. Repeat for each network watcher.- Impact Statement
- Virtual network flow logs are charged per gigabyte of network flow logs collected and come with a free tier of 5 GB/month per subscription. * If traffic analytics is enabled with virtual network flow logs, traffic analytics pricing applies at per gigabyte processing rates. * The storage of logs is charged separately, and the cost will depend on the amount of logs and the retention period.
- Assessment Status
Automated
- Rationale Statement
Virtual network flow logs provide critical visibility into traffic patterns. Logs can be used to check for anomalies and give insight into suspected breaches.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Network Watcher. 1. UnderLogs, selectFlow logs. 1. ClickAdd filter. 1. From theFilterdrop-down menu, selectFlow log type. 1. From theValuedrop-down menu, checkVirtual networkonly. 1. ClickApply. 1. Click the name of a virtual network flow log. 1. UnderStorage Account, setRetention daysto0,90, or a number greater than 90. IfRetention daysis set to0, the logs are retained indefinitely with no retention policy. 1. Repeat steps 7 and 8 for each virtual network flow log requiring remediation. Remediate from Azure CLI Run the following command update the retention policy for a flow log in a network watcher, settingretentionto0,90, or a number greater than 90:az network watcher flow-log update --location <location> --name <flow-log> --retention <number-of-days>Repeat for each virtual network flow log requiring remediation.- Additional Information
As network security group flow logs are on the retirement path, Azure recommends migrating to virtual network flow logs.
7.6Ensure that Network Watcher is 'Enabled' for Azure Regions That are in Use1
Attributes
- Profile
Level 2
- Section
7 Networking Services
- Description
Ensure that Network Watcher is 'Enabled' for Azure Regions That are in Use
- Default Value
Network Watcher is automatically enabled. When you create or update a virtual network in your subscription, Network Watcher will be enabled automatically in your Virtual Network's region. There is no impact to your resources or associated charge for automatically enabling Network Watcher.
- Audit Procedure
Audit from Azure Portal 1. Use the Search bar to search for and click on the
Network Watcherservice. 1. From the Overview menu item, review each Network Watcher listed, and ensure that a network watcher is listed for each region in use by the subscription. Audit from Azure CLIaz network watcher list --query [].{Location:location,State:provisioningState} -o tableThis will list all network watchers and their provisioning state. EnsureprovisioningStateisSucceededfor each network watcher.az account list-locations --query [?metadata.regionType=='Physical'].{Name:name,DisplayName:regionalDisplayName} -o tableThis will list all physical regions that exist in the subscription. Compare this list to the previous one to ensure that for each region in use, a network watcher exists withprovisioningStateset toSucceeded. Audit from PowerShell Get a list of Network WatchersGet-AzNetworkWatcherMake sure each watcher is set with theProvisioningStatesetting set toSucceededand allLocationsthat are in use by the subscription are using a watcher. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: b6e2945c-0b7b-40f5-9233-7a5323b5cdc6 - Name: 'Network Watcher should be enabled'- Impact Statement
There are additional costs per transaction to run and store network data. For high-volume networks these charges will add up quickly.
- Assessment Status
Automated
- Rationale Statement
Network diagnostic and visualization tools available with Network Watcher help users understand, diagnose, and gain insights to the network in Azure.
- Remediation Procedure
Opting out of Network Watcher automatic enablement is a permanent change. Once you opt-out you cannot opt-in without contacting support. To manually enable Network Watcher in each region where you want to use Network Watcher capabilities, follow the steps below. Remediate from Azure Portal 1. Use the Search bar to search for and click on the
Network Watcherservice. 1. ClickCreate. 1. Select aRegionfrom the drop-down menu. 1. ClickAdd. Remediate from Azure CLIaz network watcher configure --locations <region> --enabled true --resource-group <resource_group>
7.7Ensure that Public IP Addresses are Evaluated on a Periodic Basis1
Attributes
- Profile
Level 1
- Section
7 Networking Services
- Description
Ensure that Public IP Addresses are Evaluated on a Periodic Basis
- Default Value
During Virtual Machine and Application creation, a setting may create and attach a public IP.
- Audit Procedure
Audit from Azure Portal 1. Open the
All Resourcesblade 2. Click onAdd Filter3. In the Add Filter window, select the following: Filter:TypeOperator:EqualsValue:Public IP address4. Click theApplybutton 5. For each Public IP address in the list, use Overview (or Properties) to review theAssociated to:field and determine if the associated resource is still relevant to your tenant environment. If the associated resource is relevant, ensure that additional controls exist to mitigate risk (e.g. Firewalls, VPNs, Traffic Filtering, Virtual Gateway Appliances, Web Application Firewalls, etc.) on all subsequently attached resources. Audit from Azure CLI List all Public IP addresses:az network public-ip listFor each Public IP address in the output, review thenameproperty and determine if the associated resource is still relevant to your tenant environment. If the associated resource is relevant, ensure that additional controls exist to mitigate risk (e.g. Firewalls, VPNs, Traffic Filtering, Virtual Gateway Appliances, Web Application Firewalls, etc.) on all subsequently attached resources.- Impact Statement
Regular reviews require administrative effort.
- Assessment Status
Manual
- Rationale Statement
Public IP Addresses allocated to the tenant should be periodically reviewed for necessity. Public IP Addresses that are not intentionally assigned and controlled present a publicly facing vector for threat actors and significant risk to the tenant.
- Remediation Procedure
Remediation will vary significantly depending on your organization's security requirements for the resources attached to each individual Public IP address.
7.8Ensure that Virtual Network Flow Log Retention Days is Set to Greater than or Equal to 901
Attributes
- Profile
Level 2
- Section
7 Networking Services
- Description
Ensure that Virtual Network Flow Log Retention Days is Set to Greater than or Equal to 90
- Default Value
When a virtual network flow log is created using the Azure CLI, retention days is set to 0 by default. When creating via the Azure Portal, retention days must be specified by the creator.
- Audit Procedure
Audit from Azure Portal 1. Go to
Network Watcher. 1. UnderLogs, selectFlow logs. 1. ClickAdd filter. 1. From theFilterdrop-down menu, selectFlow log type. 1. From theValuedrop-down menu, checkVirtual networkonly. 1. ClickApply. 1. Click the name of a virtual network flow log. 1. UnderStorage Account, ensure thatRetention daysis set to0,90, or a number greater than 90. IfRetention daysis set to0, the logs are retained indefinitely with no retention policy. 1. Repeat steps 7 and 8 for each virtual network flow log. Audit from Azure CLI Run the following command to list network watchers:az network watcher listRun the following command to list the name and retention policy of flow logs in a network watcher:az network watcher flow-log list --location <location> --query [*].[name,retentionPolicy]For each flow log, ensure thatdaysis set to0,90, or a number greater than 90. Ifdaysis set to0, the logs are retained indefinitely with no retention policy. Repeat for each network watcher.- Impact Statement
- Virtual network flow logs are charged per gigabyte of network flow logs collected and come with a free tier of 5 GB/month per subscription. * If traffic analytics is enabled with virtual network flow logs, traffic analytics pricing applies at per gigabyte processing rates. * The storage of logs is charged separately, and the cost will depend on the amount of logs and the retention period.
- Assessment Status
Automated
- Rationale Statement
Virtual network flow logs provide critical visibility into traffic patterns. Logs can be used to check for anomalies and give insight into suspected breaches.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Network Watcher. 1. UnderLogs, selectFlow logs. 1. ClickAdd filter. 1. From theFilterdrop-down menu, selectFlow log type. 1. From theValuedrop-down menu, checkVirtual networkonly. 1. ClickApply. 1. Click the name of a virtual network flow log. 1. UnderStorage Account, setRetention daysto0,90, or a number greater than 90. IfRetention daysis set to0, the logs are retained indefinitely with no retention policy. 1. Repeat steps 7 and 8 for each virtual network flow log requiring remediation. Remediate from Azure CLI Run the following command update the retention policy for a flow log in a network watcher, settingretentionto0,90, or a number greater than 90:az network watcher flow-log update --location <location> --name <flow-log> --retention <number-of-days>Repeat for each virtual network flow log requiring remediation.- Additional Information
As network security group flow logs are on the retirement path, Azure recommends migrating to virtual network flow logs.
7.9Ensure 'Authentication type' is Set to 'Azure Active Directory' only for Azure VPN Gateway Point-to-Site Configuration0
Attributes
- Profile
Level 2
- Section
7 Networking Services
- Description
Ensure 'Authentication type' is Set to 'Azure Active Directory' only for Azure VPN Gateway Point-to-Site Configuration
- Default Value
'Authentication type' is selected during creation of point-to-site configuration.
- Audit Procedure
Audit from Azure Portal 1. Go to
Virtual network gateways. 2. UnderVPN gateway, clickVPN gateways. 3. Click the name of a VPN gateway. 4. UnderSettings, clickPoint-to-site configuration. 5. EnsureAuthentication typeis set toAzure Active Directoryonly. 6. Repeat steps 1-5 for each VPN gateway. Audit from Azure Policy - Policy ID: 21a6bc25-125e-4d13-b82d-2e19b7208ab7 - Name: 'VPN gateways should use only Azure Active Directory (Azure AD) authentication for point-to-site users'- Impact Statement
Azure VPN Gateways incur hourly charges, with additional costs for point-to-site connections and data transfer. Pricing varies by SKU and usage. Refer to https://azure.microsoft.com/en-us/pricing/details/vpn-gateway/ for details.
- Assessment Status
Automated
- Rationale Statement
Microsoft Entra ID authentication provides strong security and centralized identity management, and reduces risks associated with static credentials and certificate management.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Virtual network gateways. 2. UnderVPN gateway, clickVPN gateways. 3. Click the name of a VPN gateway. 4. UnderSettings, clickPoint-to-site configuration. 5. EnsureAuthentication typeclick to expand the drop-down menu. 6. Check the box next toAzure Active Directory, and uncheck the boxes next toAzure certificateandRADIUS authentication. 7. Provide aTenant,Audience, andIssuerfor the Azure Active Directory configuration. 8. ClickSave. 9. Repeat steps 1-8 for each VPN gateway requiring remediation.
7.10Ensure Azure Web Application Firewall (WAF) is Enabled on Azure Application Gateway0
Attributes
- Profile
Level 2
- Section
7 Networking Services
- Description
Ensure Azure Web Application Firewall (WAF) is Enabled on Azure Application Gateway
- Default Value
Azure Web Application Firewall is enabled by default for the WAF V2 tier of Azure Application Gateway. It is not available in the Basic tier. Application gateways deployed using the Standard V2 tier can be upgraded to the WAF V2 tier to enable Azure Web Application Firewall.
- Audit Procedure
Audit from Azure Portal 1. Go to
Application gateways. 2. Click the name of an application gateway. 3. In theOverview, underEssentials, ensureTieris set toWAF V2. 4. Repeat steps 1-3 for each application gateway. Audit from Azure CLI Run the following command to list application gateways:az network application-gateway listFor each application gateway, run the following command to get the firewall policy id:az network application-gateway show --resource-group <resource-group> --name <application-gateway> --query firewallPolicy.idEnsure a firewall policy id is returned. Audit from Azure Policy - Policy ID: 564feb30-bf6a-4854-b4bb-0d2d2d1e6c66 - Name: 'Web Application Firewall (WAF) should be enabled for Application Gateway'- Impact Statement
The WAF V2 tier for Azure Application Gateways costs more than the Basic and Standard V2 tiers. Pricing includes a fixed hourly charge plus a charge per capacity-unit hour. Refer to https://azure.microsoft.com/en-gb/pricing/details/application-gateway/ for details.
- Assessment Status
Automated
- Rationale Statement
Using Azure Web Application Firewall with Azure Application Gateway reduces exposure to external threats by mitigating attacks on public facing applications.
- Remediation Procedure
Note: Basic tier application gateways cannot be upgraded to the WAF V2 tier. Create a new WAF V2 tier application gateway to replace a Basic tier application gateway. Remediate from Azure Portal To remediate a Standard V2 tier application gateway: 1. Go to
Application gateways. 2. ClickAdd filter. 3. From theFilterdrop-down menu, selectSKU size. 4. Check the box next toStandard_v2only. 5. ClickApply. 6. Click the name of an application gateway. 7. UnderSettings, clickWeb application firewall. 8. UnderConfigure, next toTier, clickWAF V2. 9. Select an existing or create a new WAF policy. 10. ClickSave. 11. Repeat steps 1-10 for each Standard V2 tier application gateway requiring remediation.
7.11Ensure Subnets Are Associated with Network Security Groups1
Attributes
- Profile
Level 1
- Section
7 Networking Services
- Description
Ensure Subnets Are Associated with Network Security Groups
- Default Value
By default, a subnet is not associated with a network security group.
- Audit Procedure
Audit from Azure Portal 1. Go to
Virtual networks. 2. Click the name of a virtual network. 3. UnderSettings, clickSubnets. 4. Click the name of a subnet. 5. UnderSecurity, ensureNetwork security groupis not set toNone. 6. Repeat steps 1-5 for each virtual network and subnet. Audit from Azure CLI Run the following command to list virtual networks:az network vnet listFor each virtual network, run the following command to list subnets:az network vnet show --resource-group <resource-group> --name <virtual-network> --query subnetsFor each subnet, run the following command to get the network security group id:az network vnet subnet show --resource-group <resource-group> --vnet-name <virtual-network> --name <subnet> --query networkSecurityGroup.idEnsure a network security group id is returned. Audit from Azure Policy - Policy ID: e71308d3-144b-4262-b144-efdc3cc90517 - Name: 'Subnets should be associated with a Network Security Group'- Impact Statement
Minor administrative effort is required to ensure subnets are associated with network security groups. There is no cost to create or use network security groups.
- Assessment Status
Automated
- Rationale Statement
Unprotected subnets can expose resources to unauthorized access.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Virtual networks. 2. Click the name of a virtual network. 3. UnderSettings, clickSubnets. 4. Click the name of a subnet. 5. UnderSecurity, next toNetwork security group, clickNoneto display the drop-down menu. 6. Select a network security group. 7. ClickSave. 8. Repeat steps 1-7 for each virtual network and subnet requiring remediation. Remediate from Azure CLI For each subnet requiring remediation, run the following command to associate it with a network security group:az network vnet subnet update --resource-group <resource-group> --vnet-name <virtual-network> --name <subnet> --network-security-group <network-security-group>
7.12Ensure the SSL Policy's 'Min protocol version' is Set to 'TLSv1_2' or Higher on Azure Application Gateway0
Attributes
- Profile
Level 1
- Section
7 Networking Services
- Description
Ensure the SSL Policy's 'Min protocol version' is Set to 'TLSv1_2' or Higher on Azure Application Gateway
- Default Value
Min protocol version is set to TLSv1_2 by default.
- Audit Procedure
Audit from Azure Portal 1. Go to
Application gateways. 2. Click the name of an application gateway. 3. UnderSettings, clickListeners. 4. UnderSSL Policy, ensureMin protocol versionis set toTLSv1_2or higher. 5. Repeat steps 1-4 for each application gateway. Audit from Azure CLI Run the following command to list application gateways:az network application-gateway listFor each application gateway, run the following command to get the SSL policy:az network application-gateway ssl-policy show --resource-group <resource-group> --gateway-name <application-gateway>For each SSL policy, run the following command to get the minProtocolVersion:az network application-gateway ssl-policy predefined show --name <ssl-policy> --query minProtocolVersionEnsureTLSv1_2or higher is returned.- Impact Statement
Using the latest TLS version may affect compatibility with clients and backend services.
- Assessment Status
Automated
- Rationale Statement
TLS 1.0 and 1.1 are outdated and vulnerable to security risks. Since TLS 1.2 and TLS 1.3 provide enhanced security and improved performance, it is highly recommended to use TLS 1.2 or higher whenever possible.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Application gateways. 2. Click the name of an application gateway. 3. UnderSettings, clickListeners. 4. UnderSSL Policy, next to the Selected SSL Policy name, clickchange. 5. Select an appropriate SSL policy with aMin protocol versionofTLSv1_2or higher. 6. ClickSave. 7. Repeat steps 1-6 for each application gateway requiring remediation. Remediate from Azure CLI Run the following command to list available SSL policy options:az network application-gateway ssl-policy list-optionsRun the following command to list available predefined SSL policies:az network application-gateway ssl-policy predefined listFor each application gateway requiring remediation, run the following command to set a predefined SSL policy:az network application-gateway ssl-policy set --resource-group <resource-group> --gateway-name <application-gateway> --name <ssl-policy> --policy-type PredefinedAlternatively, run the following command to set a custom SSL policy:az network application-gateway ssl-policy set --resource-group <resource-group> --gateway-name <application-gateway> --policy-type Custom --min-protocol-version <min-protocol-version> --cipher-suites <cipher-suites>
7.13Ensure 'HTTP2' is Set to 'Enabled' on Azure Application Gateway0
Attributes
- Profile
Level 1
- Section
7 Networking Services
- Description
Ensure 'HTTP2' is Set to 'Enabled' on Azure Application Gateway
- Default Value
HTTP2 is enabled by default.
- Audit Procedure
Audit from Azure Portal 1. Go to
Application gateways. 2. Click the name of an application gateway. 3. UnderSettings, clickConfiguration. 4. EnsureHTTP2is set toEnabled. 5. Repeat steps 1-4 for each application gateway. Audit from Azure CLI Run the following command to list application gateways:az network application-gateway listFor each application gateway, run the following command to get the HTTP2 setting:az network application-gateway show --resource-group <resource-group> --name <application-gateway> --query enableHttp2Ensuretrueis returned. Audit from PowerShell Run the following command to list application gateways:Get-AzApplicationGatewayRun the following command to get the application gateway in a resource group with a given name:$gateway = Get-AzApplicationGateway -ResourceGroupName <resource-group> -Name <application-gateway>Run the following command to get the HTTP2 setting:$gateway.EnableHttp2Ensure thatTrueis returned. Repeat for each application gateway.- Impact Statement
Clients and backend services that do not support HTTP/2 will fall back to HTTP/1.1.
- Assessment Status
Automated
- Rationale Statement
Enabling HTTP/2 supports use of modern encrypted connections.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Application gateways. 2. Click the name of an application gateway. 3. UnderSettings, clickConfiguration. 4. UnderHTTP2, clickEnabled. 5. ClickSave. 6. Repeat steps 1-5 for each application gateway requiring remediation. Remediate from Azure CLI For each application gateway requiring remediation, run the following command to enable HTTP2:az network application-gateway update --resource-group <resource-group> --name <application-gateway> --http2 EnabledRemediate from PowerShell Run the following command to get the application gateway in a resource group with a given name:$gateway = Get-AzApplicationGateway -ResourceGroupName <resource-group> -Name <application-gateway>Run the following command to enable HTTP2:$gateway.EnableHttp2 = $trueRun the following command to apply the update:Set-AzApplicationGateway -ApplicationGateway $gatewayRepeat for each application gateway requiring remediation.
7.14Ensure Request Body Inspection is Enabled in Azure Web Application Firewall policy on Azure Application Gateway0
Attributes
- Profile
Level 2
- Section
7 Networking Services
- Description
Ensure Request Body Inspection is Enabled in Azure Web Application Firewall policy on Azure Application Gateway
- Default Value
Request body inspection is enabled by default on Azure Application Gateways with Web Application Firewall.
- Audit Procedure
Audit from Azure Portal 1. Go to
Application gateways. 2. Click the name of an application gateway. 3. UnderSettings, clickWeb application firewall. 4. UnderAssociated web application firewall policy, click the policy name. 5. UnderSettings, clickPolicy settings. 6. Ensure the box next toEnforce request body inspectionis checked. 7. Repeat steps 1-6 for each application gateway. Audit from Azure CLI Run the following command to list application gateways:az network application-gateway listFor each application gateway, run the following command to get the firewall policy id:az network application-gateway show --resource-group <resource-group> --name <application-gateway> --query firewallPolicy.idFor each firewall policy, run the following command to get the request body inspection setting:az network application-gateway waf-policy show --ids <firewall-policy> --query policySettings.requestBodyCheckEnsuretrueis returned. Audit from Azure Policy - Policy ID: ca85ef9a-741d-461d-8b7a-18c2da82c666 - Name: 'Azure Web Application Firewall on Azure Application Gateway should have request body inspection enabled'- Impact Statement
Minor performance impact on the Web Application Firewall. Additional effort may be required to monitor findings.
- Assessment Status
Automated
- Rationale Statement
Enabling request body inspection strengthens security by allowing the Web Application Firewall to detect common attacks, such as SQL injection and cross-site scripting.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Application gateways. 2. Click the name of an application gateway. 3. UnderSettings, clickWeb application firewall. 4. UnderAssociated web application firewall policy, click the policy name. 5. UnderSettings, clickPolicy settings. 6. Check the box next toEnforce request body inspection. 7. ClickSave. 8. Repeat steps 1-7 for each application gateway and firewall policy requiring remediation. Remediate from Azure CLI For each firewall policy requiring remediation, run the following command to enable request body inspection:az network application-gateway waf-policy update --ids <firewall-policy> --policy-settings request-body-check=true
7.15Ensure Bot Protection is Enabled in Azure Web Application Firewall Policy on Azure Application Gateway0
Attributes
- Profile
Level 2
- Section
7 Networking Services
- Description
Ensure Bot Protection is Enabled in Azure Web Application Firewall Policy on Azure Application Gateway
- Default Value
Bot protection is disabled by default on Azure Application Gateways with Web Application Firewall.
- Audit Procedure
Audit from Azure Portal 1. Go to
Application gateways. 2. Click the name of an application gateway. 3. UnderSettings, clickWeb application firewall. 4. UnderAssociated web application firewall policy, click the policy name. 5. UnderSettings, clickManaged rules. 6. Ensure aRule IdcontainingMicrosoft_BotManagerRuleSetis listed. 7. Click the>to expand the row. 8. Ensure theStatusforMalicious Botsis set toEnabled. 9. Repeat steps 1-8 for each application gateway. Audit from Azure CLI Run the following command to list application gateways:az network application-gateway listFor each application gateway, run the following command to get the firewall policy id:az network application-gateway show --resource-group <resource-group> --name <application-gateway> --query firewallPolicy.idFor each firewall policy, run the following command to get the managed rule sets:az network application-gateway waf-policy show --ids <firewall-policy> --query managedRules.managedRuleSetsEnsure a managed rule set withruleSetTypeofMicrosoft_BotManagerRuleSetis returned, and that noruleGroupOverridesforruleGroupNameKnownBadBotswithstateDisabledare returned. Audit from Azure Policy - Policy ID: ebea0d86-7fbd-42e3-8a46-27e7568c2525 - Name: 'Bot Protection should be enabled for Azure Application Gateway WAF'- Impact Statement
May require monitoring to identify false positives.
- Assessment Status
Automated
- Rationale Statement
Internet traffic from bots can scrape, scan, and search for application vulnerabilities. Enabling bot protection stops requests from known malicious IP addresses and enhances the overall security of your application by reducing exposure to automated attacks.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Application gateways. 2. Click the name of an application gateway. 3. UnderSettings, clickWeb application firewall. 4. UnderAssociated web application firewall policy, click the policy name. 5. UnderSettings, clickManaged rules. 6. ClickAssign. 7. UnderBot Management ruleset, click to display the drop-down menu. 8. Select aMicrosoft_BotManagerRuleSet. 9. ClickSave. 10. ClickXto close the panel. 11. Repeat steps 1-10 for each application gateway and firewall policy requiring remediation. Remediate from Azure CLI For each firewall policy requiring remediation, run the following command to enable bot protection:az network application-gateway waf-policy managed-rule rule-set add --resource-group <resource-group> --policy-name <firewall-policy> --type Microsoft_BotManagerRuleSet --version <0.1|1.0|1.1>
7.16Ensure Azure Network Security Perimeter is Used to Secure Azure Platform-as-a-service Resources0
Attributes
- Profile
Level 2
- Section
7 Networking Services
- Description
Ensure Azure Network Security Perimeter is Used to Secure Azure Platform-as-a-service Resources
- Default Value
PaaS resources are not associated with a network security perimeter by default.
- Audit Procedure
Audit from Azure Portal 1. Go to
Resource groups. 2. Click the name of a resource group. 3. Take note of PaaS resources. 4. Go toNetwork Security Perimeters. 5. Click the name of a network security perimeter. 6. UnderSettings, clickAssociated resources. 7. Take note of the associated resources. 8. Repeat steps 1-7 and ensure each PaaS resource is associated with a network security perimeter. Audit from Azure CLI Run the following command to list resource groups:az group listFor each resource group, run the following command to list resources:az resource list --resource-group <resource-group>Take note of PaaS resources. For each resource group, run the following command to list network security perimeters:az network perimeter list --resource-group <resource-group>For each network security perimeter, run the following command to list resources:az network perimeter association list --resource-group <resource-group> --perimeter-name <network-security-perimeter>Ensure each PaaS resource is associated with a network security perimeter.- Impact Statement
Implementation requires administrative effort to configure and maintain network security perimeter profiles and resource assignments. Azure does not list any additional charges for using network security perimeters.
- Assessment Status
Manual
- Rationale Statement
Network security perimeter denies public access to PaaS resources, reducing exposure and mitigating data exfiltration risks.
- Remediation Procedure
Remediate from Azure Portal Create and associate PaaS resources with a new network security perimeter: 1. Go to
Network Security Perimeters. 2. Click+ Create. 3. Select aSubscriptionandResource group, provide aName, select aRegion, and provide aProfile name. 4. ClickNext. 5. Click+ Add. 6. Check the box next to a PaaS resource to associate it with the network security perimeter. 7. ClickSelect. 8. ClickNext. 9. Configure appropriateInbound access rulesfor your organization. 10. ClickNext. 11. Configure appropriateOutbound access rulesfor your organization. 12. ClickReview + create. 13. ClickCreate. Remediate from Azure CLI Useaz network perimeter profile listoraz network perimeter profile createto list existing or create a new network security perimeter profile. For each PaaS resource requiring association with a network security perimeter, run the following command:az network perimeter association create --resource-group <resource-group> --perimeter-name <network-security-perimeter> --association-name <association> --private-link-resource "{id:<paas-resource-id>}" --profile "{<profile-id>}"- Additional Information
The current list of resources that can be associated with a network security perimeter are as follows: Azure Monitor, Azure AI Search, Cosmos DB, Event Hubs, Key Vault, SQL DB, Storage, Azure OpenAI Service. While network security perimeter is generally available, Cosmos DB, SQL DB, and Azure OpenAI Service are in public preview.
8 Security Services3832
8.1.1.1Ensure Microsoft Defender CSPM is Set to 'On'1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure Microsoft Defender CSPM is Set to 'On'
- Default Value
Defender CSPM is disabled by default.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Defender for Cloud. 2. UnderManagement, clickEnvironment settings. 3. Click the name of a subscription. 4. Select theDefender plansblade. 5. UnderCloud Security Posture Management (CSPM), in the row forDefender CSPM, ensureStatusis set toOn. Audit from Azure CLI Run the following command to get the CloudPosture plan pricing tier:az security pricing show --name CloudPosture --query pricingTierEnsureStandardis returned. Audit from PowerShell Run the following command to get the CloudPosture plan pricing tier:Get-AzSecurityPricing -Name CloudPosture | Select-Object PricingTierEnsureStandardis returned. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 1f90fc71-a595-4066-8974-d4d0802e8ef0 - Name: 'Microsoft Defender CSPM should be enabled'- Impact Statement
Enabling Microsoft Defender CSPM incurs hourly charges for each billable compute, database, and storage resource. This can lead to significant costs in larger environments. Careful planning and cost analysis are recommended before enabling the service. Refer to https://azure.microsoft.com/en-us/pricing/details/defender-for-cloud/#pricing for pricing information.
- Assessment Status
Automated
- Rationale Statement
Microsoft Defender CSPM provides detailed visibility into the security state of assets and workloads and offers hardening guidance to help improve security posture.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Defender for Cloud. 2. UnderManagement, clickEnvironment settings. 3. Click the name of a subscription. 4. Select theDefender plansblade. 5. UnderCloud Security Posture Management (CSPM), in the row forDefender CSPM, set the toggle switch forStatustoOn. 6. ClickSave. Remediate from Azure CLI Run the following command to enable Defender CSPM:az security pricing create --name CloudPosture --tier Standard --extensions name=ApiPosture isEnabled=trueRemediate from PowerShell Run the following command to enable Defender CSPM:Set-AzSecurityPricing -Name CloudPosture -PricingTier Standard -Extension '[{"name":"ApiPosture","isEnabled":"True"}]'
8.1.2.1Ensure Microsoft Defender for APIs is Set to 'On'1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure Microsoft Defender for APIs is Set to 'On'
- Default Value
By default, Microsoft Defender plan is off.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Defender for Cloud2. UnderManagement, selectEnvironment Settings3. Click on the subscription name 4. SelectDefender plans5. Ensure Status isOnforApp ServiceAudit from Azure CLI Run the following command:az security pricing show -n AppServicesEnsure-PricingTieris set toStandardAudit from PowerShell Run the following command:Get-AzSecurityPricing -Name 'AppServices' |Select-Object Name,PricingTierEnsure the-PricingTieris set toStandardAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 2913021d-f2fd-4f3d-b958-22354e2bdbcb - Name: 'Azure Defender for App Service should be enabled'- Impact Statement
Turning on Microsoft Defender for App Service incurs an additional cost per resource.
- Assessment Status
Automated
- Rationale Statement
Enabling Microsoft Defender for App Service allows for greater defense-in-depth, with threat detection provided by the Microsoft Security Response Center (MSRC).
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Defender for Cloud2. UnderManagement, selectEnvironment Settings3. Click on the subscription name 4. SelectDefender plans5. SetApp ServiceStatus toOn6. SelectSaveRemediate from Azure CLI Run the following command:az security pricing create -n Appservices --tier 'standard'Remediate from PowerShell Run the following command:Set-AzSecurityPricing -Name AppServices -PricingTier Standard
8.1.3.1Ensure that Defender for Servers is Set to 'On'1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure that Defender for Servers is Set to 'On'
- Default Value
By default, the Defender for Servers plan is disabled.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Defender for Cloud. 1. UnderManagement, selectEnvironment settings. 1. Click on a subscription name. 1. SelectDefender plansin the left pane. 1. UnderCloud Workload Protection (CWP), locateServersin the Plan column, ensure Status is set toOn. 1. Repeat steps 1-5 for each subscription. Audit from Azure CLI Run the following command:az security pricing show -n VirtualMachines --query pricingTierIf the tenant is licensed and enabled, the output will indicateStandard. Audit from PowerShell Run the following command:Get-AzSecurityPricing -Name 'VirtualMachines' |Select-Object Name,PricingTierIf the tenant is licensed and enabled, the-PricingTierparameter will indicateStandard. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 4da35fc9-c9e7-4960-aec9-797fe7d9051d - Name: 'Azure Defender for servers should be enabled'- Impact Statement
Enabling Defender for Servers in Microsoft Defender for Cloud incurs an additional cost per resource. Refer to https://azure.microsoft.com/en-us/pricing/details/defender-for-cloud/ and https://azure.microsoft.com/en-us/pricing/calculator/ to estimate potential costs. - Plan 1: Subscription only - Plan 2: Subscription and workspace
- Assessment Status
Automated
- Rationale Statement
Enabling Defender for Servers allows for greater defense-in-depth, with threat detection provided by the Microsoft Security Response Center (MSRC).
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Defender for Cloud. 1. UnderManagement, selectEnvironment settings. 1. Click on a subscription name. 1. ClickDefender plansin the left pane. 1. UnderCloud Workload Protection (CWP), locateServersin the Plan column, set Status toOn. 1. SelectSave. 1. Repeat steps 1-6 for each subscription requiring remediation. Remediate from Azure CLI Run the following command:az security pricing create -n VirtualMachines --tier 'standard'Remediate from PowerShell Run the following command:Set-AzSecurityPricing -Name 'VirtualMachines' -PricingTier 'Standard'
8.1.3.2Ensure that 'Vulnerability assessment for machines' Component Status is set to 'On'1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure that 'Vulnerability assessment for machines' Component Status is set to 'On'
- Default Value
By default,
Automatic provisioning of monitoring agentis set toOff.- Audit Procedure
Audit from Azure Portal 1. From Azure Home select the Portal Menu 1. Select
Microsoft Defender for Cloud1. UnderManagement, selectEnvironment Settings1. Select a subscription 1. Click onSettings & monitoring1. Ensure thatVulnerability assessment for machinesis set toOnRepeat the above for any additional subscriptions.- Impact Statement
Microsoft Defender for Servers plan 2 licensing is required, and configuration of Azure Arc introduces complexity beyond this recommendation.
- Assessment Status
Manual
- Rationale Statement
Vulnerability assessment for machines scans for various security-related configurations and events such as system updates, OS vulnerabilities, and endpoint protection, then produces alerts on threat and vulnerability findings.
- Remediation Procedure
Remediate from Azure Portal 1. From Azure Home select the Portal Menu 1. Select
Microsoft Defender for Cloud1. UnderManagement, selectEnvironment Settings1. Select a subscription 1. Click onSettings & Monitoring1. Set theStatusofVulnerability assessment for machinestoOn1. ClickContinueRepeat the above for any additional subscriptions.- Additional Information
While this feature is generally available as of publication, it is not yet available for Azure Government tenants.
8.1.3.3Ensure that 'Endpoint protection' Component Status is set to 'On'1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure that 'Endpoint protection' Component Status is set to 'On'
- Default Value
By default, Endpoint protection is
off.- Audit Procedure
Audit from Azure Portal 1. From Azure Home select the Portal Menu. 1. Select
Microsoft Defender for Cloud. 1. UnderManagement, selectEnvironment Settings. 1. Click on the subscription name. 1. ClickSettings & monitoring. 1. Ensure theStatusforEndpoint protectionis set toOn. Audit from Azure CLI Ensure the output of the below command isTrueaz account get-access-token --query {subscription:subscription,accessToken:accessToken} --out tsv | xargs -L1 bash -c 'curl -X GET -H Authorization: Bearer $1 -H Content-Type: application/json https://management.azure.com/subscriptions/<subscriptionID>/providers/Microsoft.Security/settings?api-version=2021-06-01' | jq '.|.value[] | select(.name==WDATP)'|jq '.properties.enabled'Audit from PowerShell Run the following commands to login and audit this checkConnect-AzAccount Set-AzContext -Subscription <subscriptionID> Get-AzSecuritySetting | Select-Object name,enabled |where-object {$_.name -eq WDATP}PowerShell Output - Non-CompliantName Enabled ---- ------- WDATP FalsePowerShell Output - CompliantName Enabled ---- ------- WDATP True- Impact Statement
Endpoint protection requires licensing and is included in these plans: - Defender for Servers plan 1 - Defender for Servers plan 2
- Assessment Status
Automated
- Rationale Statement
Microsoft Defender for Endpoint integration brings comprehensive Endpoint Detection and Response (EDR) capabilities within Microsoft Defender for Cloud. This integration helps to spot abnormalities, as well as detect and respond to advanced attacks on endpoints monitored by Microsoft Defender for Cloud. MDE works only with Standard Tier subscriptions.
- Remediation Procedure
Remediate from Azure Portal 1. From Azure Home select the Portal Menu. 1. Go to
Microsoft Defender for Cloud. 1. UnderManagement, selectEnvironment Settings. 1. Click on the subscription name. 1. ClickSettings & monitoring. 1. Set theStatusforEndpoint protectiontoOn. 1. ClickContinue. Remediate from Azure CLI Use the below command to enable Standard pricing tier for Storage Accountsaz account get-access-token --query {subscription:subscription,accessToken:accessToken} --out tsv | xargs -L1 bash -c 'curl -X PUT -H Authorization: Bearer $1 -H Content-Type: application/json https://management.azure.com/subscriptions/<subscriptionID>/providers/Microsoft.Security/settings/WDATP?api-version=2021-06-01 -d@input.json'Where input.json contains the Request body json data as mentioned below.{ id: /subscriptions/<Your_Subscription_Id>/providers/Microsoft.Security/settings/WDATP, kind: DataExportSettings, type: Microsoft.Security/settings, properties: { enabled: true } }- Additional Information
IMPORTANT: When enabling integration between DfE & DfC it needs to be taken into account that this will have some side effects that may be undesirable. 1. For server 2019 & above if defender is installed (default for these server SKUs) this will trigger a deployment of the new unified agent and link to any of the extended configuration in the Defender portal. 1. If the new unified agent is required for server SKUs of Win 2016 or Linux and lower there is additional integration that needs to be switched on and agents need to be aligned. NOTE: Microsoft Defender for Endpoint (MDE) was formerly known as Windows Defender Advanced Threat Protection (WDATP). There are a number of places (e.g. Azure CLI) where the WDATP acronym is still used within Azure.
8.1.3.4Ensure that 'Agentless scanning for machines' Component Status is Set to 'On'0
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure that 'Agentless scanning for machines' Component Status is Set to 'On'
- Default Value
By default, Agentless scanning for machines is
off.- Audit Procedure
Audit from Azure Portal 1. From the Azure Portal
Homepage, selectMicrosoft Defender for Cloud1. UnderManagementselectEnvironment Settings1. Select a subscription 1. UnderSettings>Defender Plans, clickSettings & monitoring1. Under the Component column, locate the row forAgentless scanning for machines1. Ensure thatOnis selected Repeat the above for any additional subscriptions.- Impact Statement
Agentless scanning for machines requires licensing and is included in these plans: - Defender CSPM - Defender for Servers plan 2
- Assessment Status
Manual
- Rationale Statement
The Microsoft Defender for Cloud agentless machine scanner provides threat detection, vulnerability detection, and discovery of sensitive information.
- Remediation Procedure
Audit from Azure Portal 1. From the Azure Portal
Homepage, selectMicrosoft Defender for Cloud1. UnderManagementselectEnvironment Settings1. Select a subscription 1. UnderSettings>Defender Plans, clickSettings & monitoring1. Under the Component column, locate the row forAgentless scanning for machines1. SelectOn1. ClickContinuein the top left Repeat the above for any additional subscriptions.
8.1.3.5Ensure that 'File Integrity Monitoring' Component Status is Set to 'On'0
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure that 'File Integrity Monitoring' Component Status is Set to 'On'
- Default Value
By default, File Integrity Monitoring is
Off.- Audit Procedure
Audit from Azure Portal 1. From the Azure Portal
Homepage, selectMicrosoft Defender for Cloud1. UnderManagementselectEnvironment Settings1. Select a subscription 1. UnderSettings>Defender Plans, clickSettings & monitoring1. Under the Component column, locate the row forFile Integrity Monitoring1. Ensure thatOnis selected Repeat the above for any additional subscriptions.- Impact Statement
File Integrity Monitoring requires licensing and is included in these plans: - Defender for Servers plan 2
- Assessment Status
Manual
- Rationale Statement
FIM provides a detection mechanism for compromised files. When FIM is enabled, critical system files are monitored for changes that might indicate a threat actor is attempting to modify system files for lateral compromise within a host operating system.
- Remediation Procedure
Audit from Azure Portal 1. From the Azure Portal
Homepage, selectMicrosoft Defender for Cloud1. UnderManagementselectEnvironment Settings1. Select a subscription 1. UnderSettings>Defender Plans, clickSettings & monitoring1. Under the Component column, locate the row forFile Integrity Monitoring1. SelectOn1. ClickContinuein the top left Repeat the above for any additional subscriptions.
8.1.4.1Ensure That Microsoft Defender for Containers Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure That Microsoft Defender for Containers Is Set To 'On'
- Default Value
The Microsoft Defender for Containers plan is disabled by default.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Defender for Cloud. 1. UnderManagement, clickEnvironment settings. 1. Click the name of a subscription. 1. UnderSettings, clickDefender plans. 1. UnderCloud Workload Protection (CWP), in the row forContainers, ensure that theStatusis set toOnandMonitoring coveragedisplaysFull. 1. Repeat steps 1-5 for each subscription. Audit from Azure CLI For Microsoft Defender for Container Registries (deprecated), run the following command:az security pricing show --name ContainerRegistry --query pricingTierEnsure that the command returnsStandard. For Microsoft Defender for Containers, run the following command:az security pricing show --name Containers --query [pricingTier,extensions[*].[name,isEnabled]]Ensure that the command returnsStandard, and that each of the extensions (ContainerRegistriesVulnerabilityAssessments, AgentlessDiscoveryForKubernetes, AgentlessVmScanning, ContainerSensor) returnsTrue. Repeat for each subscription. Audit from PowerShell For Microsoft Defender for Container Registries (deprecated), run the following command:Get-AzSecurityPricing -Name 'ContainerRegistry' | Select-Object Name,PricingTierEnsure the command returnsPricingTierStandard. For Microsoft Defender for Containers, run the following command:Get-AzSecurityPricing -Name 'Containers'Ensure thatPricingTieris set toStandard, and that each of the extensions (ContainerRegistriesVulnerabilityAssessments, AgentlessDiscoveryForKubernetes, AgentlessVmScanning, ContainerSensor) hasisEnabledset toTrue. Repeat for each subscription. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 1c988dd6-ade4-430f-a608-2a3e5b0a6d38 - Name: 'Microsoft Defender for Containers should be enabled'- Impact Statement
Microsoft Defender for Containers incurs a charge per vCore. Refer to https://azure.microsoft.com/en-us/pricing/details/defender-for-cloud/ and https://azure.microsoft.com/en-us/pricing/calculator/ to estimate potential costs.
- Assessment Status
Automated
- Rationale Statement
Enabling Microsoft Defender for Containers enhances defense-in-depth by providing advanced threat detection, vulnerability assessment, and security monitoring for containerized environments, leveraging insights from the Microsoft Security Response Center (MSRC).
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Defender for Cloud. 1. UnderManagement, clickEnvironment settings. 1. Click the name of a subscription. 1. UnderSettings, clickDefender plans. 1. UnderCloud Workload Protection (CWP), in the row forContainers, clickOnin theStatuscolumn. 1. IfMonitoring coveragedisplaysPartial, clickSettingsunderPartial. 1. Set the status of each of the components toOn. 1. ClickContinue. 1. ClickSave. 1. Repeat steps 1-9 for each subscription. Remediate from Azure CLI Note: Microsoft Defender for Container Registries ('ContainerRegistry') is deprecated and has been replaced by Microsoft Defender for Containers ('Containers'). Run the below command to enable the Microsoft Defender for Containers plan and its components:az security pricing create -n 'Containers' --tier 'standard' --extensions name=ContainerRegistriesVulnerabilityAssessments isEnabled=True --extensions name=AgentlessDiscoveryForKubernetes isEnabled=True --extensions name=AgentlessVmScanning isEnabled=True --extensions name=ContainerSensor isEnabled=TrueRemediate from PowerShell Note: Microsoft Defender for Container Registries ('ContainerRegistry') is deprecated and has been replaced by Microsoft Defender for Containers ('Containers'). Run the below command to enable the Microsoft Defender for Containers plan and its components:Set-AzSecurityPricing -Name 'Containers' -PricingTier 'Standard' -Extension '[{name:ContainerRegistriesVulnerabilityAssessments,isEnabled:True},{name:AgentlessDiscoveryForKubernetes,isEnabled:True},{name:AgentlessVmScanning,isEnabled:True},{name:ContainerSensor,isEnabled:True}]'- Additional Information
The Azure Policy 'Microsoft Defender for Containers should be enabled' checks only that the
pricingTierforContainersis set toStandard. It does not check the status of the plan's components.
8.1.5.1Ensure That Microsoft Defender for Storage Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure That Microsoft Defender for Storage Is Set To 'On'
- Default Value
By default, Microsoft Defender plan is off.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Defender for Cloud. 2. UnderManagement, selectEnvironment Settings. 3. Click on the subscription name. 4. Select theDefender plansblade. 5. EnsureStatusis set toOnforStorage. Audit from Azure CLI Ensure the output of the below command is Standardaz security pricing show -n StorageAccountsAudit from PowerShellGet-AzSecurityPricing -Name 'StorageAccounts' | Select-Object Name,PricingTierEnsure output forName PricingTierisStorageAccounts StandardAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 640d2586-54d2-465f-877f-9ffc1d2109f4 - Name: 'Microsoft Defender for Storage should be enabled'- Impact Statement
Turning on Microsoft Defender for Storage incurs an additional cost per resource.
- Assessment Status
Automated
- Rationale Statement
Enabling Microsoft Defender for Storage allows for greater defense-in-depth, with threat detection provided by the Microsoft Security Response Center (MSRC).
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Defender for Cloud. 2. UnderManagement, selectEnvironment Settings. 3. Click on the subscription name. 4. Select theDefender plansblade. 5. SetStatustoOnforStorage. 6. SelectSave. Remediate from Azure CLI Ensure the output of the below command is Standardaz security pricing create -n StorageAccounts --tier 'standard'Remediate from PowerShellSet-AzSecurityPricing -Name 'StorageAccounts' -PricingTier 'Standard'
8.1.5.2Ensure Advanced Threat Protection Alerts for Storage Accounts Are Monitored0
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure Advanced Threat Protection Alerts for Storage Accounts Are Monitored
- Default Value
By default, continuous export is off.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Defender for Cloud. 2. UnderManagement, clickEnvironment Settings. 3. Expand the Tenant Root Group(s) to reveal subscriptions. For each subscription listed: 1. Click the subscription name to open the Defender Plans settings 2. In the settings on the left, clickContinuous ExportEnsure thatExport enabledis set toOnand delivering at leastSecurity Alerts (Medium and High)to an Event Hub or Log Analytics Workspace which is tied to a SIEM that is configured to monitor and alert for security alerts.- Impact Statement
Requires integration effort with SIEM or alerting tools and a defined incident response process. The amount of data logged and, thus, the cost incurred can vary significantly depending on the tenant size and the applications in your tenant that interact with the Microsoft Graph APIs. See pricing: Log Analytics (https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#pricing-model), Azure Storage (https://azure.microsoft.com/en-us/pricing/details/storage/blobs/), Event Hubs (https://azure.microsoft.com/en-us/pricing/details/event-hubs/).
- Assessment Status
Manual
- Rationale Statement
Enabling Microsoft Defender for Storage without a monitoring process limits its value. Continuous monitoring and alert triage ensure that detected threats are acted upon quickly, reducing risk exposure.
- Remediation Procedure
Connect Microsoft Defender for Cloud to a SIEM such as Microsoft Sentinel or another log analytics solution. Remediate from Azure Portal 1. Go to
Microsoft Defender for Cloud. 2. UnderManagement, clickEnvironment Settings. 3. Expand the Tenant Root Group(s) to reveal subscriptions. For each subscription listed: 1. Click the subscription name to open the Defender Plans settings 2. In the settings on the left, clickContinuous Export3. Select eitherEvent Hub,Log Analytics Workspace, or both depending on your environment. 4. SetExport enabledtoOn5. UnderExported data types, ensure that at leastSecurity Alerts (Medium and High)is checked. 6. UnderExport target, set the target Event Hub or Log Analytics Workspace which is tied to a SIEM that is configured to monitor and alert for security alerts. Ensure security alerts are included in the security operations workflow and incident response plan.
8.1.6.1Ensure That Microsoft Defender for App Services Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure That Microsoft Defender for App Services Is Set To 'On'
- Default Value
By default, Microsoft Defender plan is off.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Defender for Cloud2. UnderManagement, selectEnvironment Settings3. Click on the subscription name 4. SelectDefender plans5. Ensure Status isOnforApp ServiceAudit from Azure CLI Run the following command:az security pricing show -n AppServicesEnsure-PricingTieris set toStandardAudit from PowerShell Run the following command:Get-AzSecurityPricing -Name 'AppServices' |Select-Object Name,PricingTierEnsure the-PricingTieris set toStandardAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 2913021d-f2fd-4f3d-b958-22354e2bdbcb - Name: 'Azure Defender for App Service should be enabled'- Impact Statement
Turning on Microsoft Defender for App Service incurs an additional cost per resource.
- Assessment Status
Automated
- Rationale Statement
Enabling Microsoft Defender for App Service allows for greater defense-in-depth, with threat detection provided by the Microsoft Security Response Center (MSRC).
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Defender for Cloud2. UnderManagement, selectEnvironment Settings3. Click on the subscription name 4. SelectDefender plans5. SetApp ServiceStatus toOn6. SelectSaveRemediate from Azure CLI Run the following command:az security pricing create -n Appservices --tier 'standard'Remediate from PowerShell Run the following command:Set-AzSecurityPricing -Name AppServices -PricingTier Standard
8.1.7.1Ensure That Microsoft Defender for Azure Cosmos DB Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure That Microsoft Defender for Azure Cosmos DB Is Set To 'On'
- Default Value
By default, Microsoft Defender for Azure Cosmos DB is not enabled.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Defender for Cloud. 2. UnderManagement, selectEnvironment Settings. 3. Click on the subscription name. 4. Select theDefender plansblade. 5. On theDatabaserow click onSelect types >. 6. Ensure the toggle switch next toAzure Cosmos DBis set toOn. Audit from Azure CLI Ensure the output of the below command is Standardaz security pricing show -n CosmosDbs --query pricingTierAudit from PowerShellGet-AzSecurityPricing -Name 'CosmosDbs' | Select-Object Name,PricingTierEnsure output of-PricingTierisStandardAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: adbe85b5-83e6-4350-ab58-bf3a4f736e5e - Name: 'Microsoft Defender for Azure Cosmos DB should be enabled'- Impact Statement
Enabling Microsoft Defender for Azure Cosmos DB requires enabling Microsoft Defender for your subscription. Both will incur additional charges.
- Assessment Status
Automated
- Rationale Statement
In scanning Azure Cosmos DB requests within a subscription, requests are compared to a heuristic list of potential security threats. These threats could be a result of a security breach within your services, thus scanning for them could prevent a potential security threat from being introduced.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Defender for Cloud. 2. UnderManagement, selectEnvironment Settings. 3. Click on the subscription name. 4. Select theDefender plansblade. 5. On theDatabaserow click onSelect types >. 6. Set the toggle switch next toAzure Cosmos DBtoOn. 7. ClickContinue. 8. ClickSave. Remediate from Azure CLI Run the following command:az security pricing create -n 'CosmosDbs' --tier 'standard'Remediate from PowerShell Use the below command to enable Standard pricing tier for Azure Cosmos DBSet-AzSecurityPricing -Name 'CosmosDbs' -PricingTier 'Standard
8.1.7.2Ensure That Microsoft Defender for Open-Source Relational Databases Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure That Microsoft Defender for Open-Source Relational Databases Is Set To 'On'
- Default Value
By default, Microsoft Defender plan is off.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Defender for Cloud. 1. UnderManagement, selectEnvironment Settings. 1. Click on the subscription name. 1. Select theDefender plansblade. 1. ClickSelect types >in the row forDatabases. 1. Ensure the toggle switch next toOpen-source relational databasesis set toOn. Audit from Azure CLI Run the following command:az security pricing show -n OpenSourceRelationalDatabases --query pricingTierAudit from PowerShellGet-AzSecurityPricing | Where-Object {$_.Name -eq 'OpenSourceRelationalDatabases'} | Select-Object Name, PricingTierEnsure output forName PricingTierisOpenSourceRelationalDatabases StandardAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 0a9fbe0d-c5c4-4da8-87d8-f4fd77338835 - Name: 'Azure Defender for open-source relational databases should be enabled'- Impact Statement
Turning on Microsoft Defender for Open-source relational databases incurs an additional cost per resource.
- Assessment Status
Automated
- Rationale Statement
Enabling Microsoft Defender for Open-source relational databases allows for greater defense-in-depth, with threat detection provided by the Microsoft Security Response Center (MSRC).
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Defender for Cloud. 2. UnderManagement, selectEnvironment Settings. 3. Click on the subscription name. 4. Select theDefender plansblade. 5. ClickSelect types >in the row forDatabases. 6. Set the toggle switch next toOpen-source relational databasestoOn. 7. SelectContinue. 8. SelectSave. Remediate from Azure CLI Run the following command:az security pricing create -n 'OpenSourceRelationalDatabases' --tier 'standard'Remediate from PowerShell Use the below command to enable Standard pricing tier for Open-source relational databasesset-azsecuritypricing -name OpenSourceRelationalDatabases -pricingtier Standard
8.1.7.3Ensure That Microsoft Defender for (Managed Instance) Azure SQL Databases Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure That Microsoft Defender for (Managed Instance) Azure SQL Databases Is Set To 'On'
- Default Value
By default, Microsoft Defender plan is off.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Defender for Cloud. 2. UnderManagement, selectEnvironment Settings. 3. Click on the subscription name. 4. Select theDefender plansblade. 5. ClickSelect types >in the row forDatabases. 6. Ensure the toggle switch next toAzure SQL Databasesis set toOn. Audit from Azure CLI Run the following command:az security pricing show -n SqlServersEnsure-PricingTieris set toStandardAudit from PowerShell Run the following command:Get-AzSecurityPricing -Name 'SqlServers' | Select-Object Name,PricingTierEnsure the-PricingTieris set toStandardAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 7fe3b40f-802b-4cdd-8bd4-fd799c948cc2 - Name: 'Azure Defender for Azure SQL Database servers should be enabled' - Policy ID: abfb7388-5bf4-4ad7-ba99-2cd2f41cebb9 - Name: 'Azure Defender for SQL should be enabled for unprotected SQL Managed Instances'- Impact Statement
Turning on Microsoft Defender for Azure SQL Databases incurs an additional cost per resource.
- Assessment Status
Automated
- Rationale Statement
Enabling Microsoft Defender for Azure SQL Databases allows for greater defense-in-depth, includes functionality for discovering and classifying sensitive data, surfacing and mitigating potential database vulnerabilities, and detecting anomalous activities that could indicate a threat to your database.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Defender for Cloud. 2. UnderManagement, selectEnvironment Settings. 3. Click on the subscription name. 4. Select theDefender plansblade. 5. ClickSelect types >in the row forDatabases. 6. Set the toggle switch next toAzure SQL DatabasestoOn. 7. SelectContinue. 8. SelectSave. Remediate from Azure CLI Run the following command:az security pricing create -n SqlServers --tier 'standard'Remediate from PowerShell Run the following command:Set-AzSecurityPricing -Name 'SqlServers' -PricingTier 'Standard'
8.1.7.4Ensure That Microsoft Defender for SQL Servers on Machines Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure That Microsoft Defender for SQL Servers on Machines Is Set To 'On'
- Default Value
By default, Microsoft Defender plan is off.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Defender for Cloud. 2. UnderManagement, selectEnvironment Settings. 3. Click on the subscription name. 4. Select theDefender plansblade. 5. ClickSelect types >in the row forDatabases. 6. Ensure the toggle switch next toSQL servers on machinesis set toOn. Audit from Azure CLI Ensure Defender for SQL is licensed with the following command:az security pricing show -n SqlServerVirtualMachinesEnsure the 'PricingTier' is set to 'Standard' Audit from PowerShell Run the following command:Get-AzSecurityPricing -Name 'SqlServerVirtualMachines' | Select-Object Name,PricingTierEnsure the 'PricingTier' is set to 'Standard' Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 6581d072-105e-4418-827f-bd446d56421b - Name: 'Azure Defender for SQL servers on machines should be enabled' - Policy ID: abfb4388-5bf4-4ad7-ba82-2cd2f41ceae9 - Name: 'Azure Defender for SQL should be enabled for unprotected Azure SQL servers'- Impact Statement
Turning on Microsoft Defender for SQL servers on machines incurs an additional cost per resource.
- Assessment Status
Automated
- Rationale Statement
Enabling Microsoft Defender for SQL servers on machines allows for greater defense-in-depth, functionality for discovering and classifying sensitive data, surfacing and mitigating potential database vulnerabilities, and detecting anomalous activities that could indicate a threat to your database.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Defender for Cloud. 2. UnderManagement, selectEnvironment Settings. 3. Click on the subscription name. 4. Select theDefender plansblade. 5. ClickSelect types >in the row forDatabases. 6. Set the toggle switch next toSQL servers on machinestoOn. 7. SelectContinue. 8. SelectSave. Remediate from Azure CLI Run the following command:az security pricing create -n SqlServerVirtualMachines --tier 'standard'Remediate from PowerShell Run the following command:Set-AzSecurityPricing -Name 'SqlServerVirtualMachines' -PricingTier 'Standard'
8.1.8.1Ensure That Microsoft Defender for Key Vault Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure That Microsoft Defender for Key Vault Is Set To 'On'
- Default Value
By default, Microsoft Defender plan is off.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Defender for Cloud. 2. UnderManagement, selectEnvironment Settings. 3. Click on the subscription name. 4. Select theDefender plansblade. 5. EnsureStatusis set toOnforKey Vault. Audit from Azure CLI Ensure the output of the below command is Standardaz security pricing show -n 'KeyVaults' --query 'pricingTier'Audit from PowerShellGet-AzSecurityPricing -Name 'KeyVaults' | Select-Object Name,PricingTierEnsure output forPricingTierisStandardAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 0e6763cc-5078-4e64-889d-ff4d9a839047 - Name: 'Azure Defender for Key Vault should be enabled'- Impact Statement
Turning on Microsoft Defender for Key Vault incurs an additional cost per resource.
- Assessment Status
Automated
- Rationale Statement
Enabling Microsoft Defender for Key Vault allows for greater defense-in-depth, with threat detection provided by the Microsoft Security Response Center (MSRC).
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Defender for Cloud. 2. UnderManagement, selectEnvironment Settings. 3. Click on the subscription name. 4. Select theDefender plansblade. 5. SelectOnunderStatusforKey Vault. 6. SelectSave. Remediate from Azure CLI Enable Standard pricing tier for Key Vault:az security pricing create -n 'KeyVaults' --tier 'Standard'Remediate from PowerShell Enable Standard pricing tier for Key Vault:Set-AzSecurityPricing -Name 'KeyVaults' -PricingTier 'Standard'
8.1.9.1Ensure That Microsoft Defender for Resource Manager Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure That Microsoft Defender for Resource Manager Is Set To 'On'
- Default Value
By default, Microsoft Defender for Resource Manager is not enabled.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Defender for Cloud. 2. UnderManagement, selectEnvironment Settings. 3. Click on the subscription name. 4. Select theDefender plansblade. 5. EnsureStatusis set toOnforResource Manager. Audit from Azure CLI Ensure the output of the below command is Standardaz security pricing show -n 'Arm' --query 'pricingTier'Audit from PowerShellGet-AzSecurityPricing -Name 'Arm' | Select-Object Name,PricingTierEnsure the output ofPricingTierisStandardAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: c3d20c29-b36d-48fe-808b-99a87530ad99 - Name: 'Azure Defender for Resource Manager should be enabled'- Impact Statement
Enabling Microsoft Defender for Resource Manager requires enabling Microsoft Defender for your subscription. Both will incur additional charges.
- Assessment Status
Automated
- Rationale Statement
Scanning resource requests lets you be alerted every time there is suspicious activity in order to prevent a security threat from being introduced.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Defender for Cloud. 2. UnderManagement, selectEnvironment Settings. 3. Click on the subscription name. 4. Select theDefender plansblade. 5. SelectOnunderStatusforResource Manager. 6. Select `Save. Remediate from Azure CLI Use the below command to enable Standard pricing tier for Defender for Resource Manageraz security pricing create -n 'Arm' --tier 'Standard'Remediate from PowerShell Use the below command to enable Standard pricing tier for Defender for Resource ManagerSet-AzSecurityPricing -Name 'Arm' -PricingTier 'Standard'
8.1.10Ensure that Microsoft Defender for Cloud is Configured to Check VM Operating Systems for Updates1
Attributes
- Profile
Level 1
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure that Microsoft Defender for Cloud is Configured to Check VM Operating Systems for Updates
- Default Value
By default, patches are not automatically deployed.
- Audit Procedure
Audit from Azure Portal 1. From Azure Home select the Portal Menu 1. Select
Microsoft Defender for Cloud1. Then theRecommendationsblade 1. Ensure that there are no recommendations forSystem updates should be installed on your machines (powered by Update Center)Alternatively, you can employ your own patch assessment and management tool to periodically assess, report and install the required security patches for your OS. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: f85bf3e0-d513-442e-89c3-1784ad63382b - Name: 'System updates should be installed on your machines (powered by Update Center)' - Policy ID: bd876905-5b84-4f73-ab2d-2e7a7c4568d9 - Name: 'Machines should be configured to periodically check for missing system updates'- Impact Statement
Running Microsoft Defender for Cloud incurs additional charges for each resource monitored. Please see attached reference for exact charges per hour.
- Assessment Status
Automated
- Rationale Statement
Windows and Linux virtual machines should be kept updated to: - Address a specific bug or flaw - Improve an OS or applications general stability - Fix a security vulnerability Microsoft Defender for Cloud retrieves a list of available security and critical updates from Windows Update or Windows Server Update Services (WSUS), depending on which service is configured on a Windows VM. The security center also checks for the latest updates in Linux systems. If a VM is missing a system update, the security center will recommend system updates be applied.
- Remediation Procedure
Follow Microsoft Azure documentation to apply security patches from the security center. Alternatively, you can employ your own patch assessment and management tool to periodically assess, report, and install the required security patches for your OS.
8.1.11Ensure that non-deprecated Microsoft Cloud Security Benchmark policies are not set to 'Disabled'1
Attributes
- Profile
Level 1
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure that non-deprecated Microsoft Cloud Security Benchmark policies are not set to 'Disabled'
- Default Value
By default, the MCSB policy initiative is assigned on all subscriptions, and most policies will have an effect of
Audit. Some policies will have a default effect ofDisabled.- Audit Procedure
Audit from Azure Portal 1. From Azure Home select the Portal Menu. 1. Select
Microsoft Defender for Cloud. 1. UnderManagement, selectEnvironment settings. 1. Click on the appropriate Management Group or Subscription. 1. Click onSecurity policiesin the left column. 1. Click onMicrosoft cloud security benchmark. 1. ClickAdd filterand selectEffect. 1. Check theDisabledbox to search for all disabled policies. 1. ClickApply. 1. Ensure that no policies are displayed, signifying that there are no disabled policies. 1. Repeat steps 1-10 for each Management Group or Subscription.- Impact Statement
Policies within the MCSB default to an effect of
Auditand will evaluate—but not enforce—policy recommendations. Ensuring these policies are set toAuditsimply ensures that the evaluation occurs to allow administrators to understand where an improvement may be possible. Administrators will need to determine if the recommendations are relevant and desirable for their environment, then manually take action to resolve the status if desired.- Assessment Status
Manual
- Rationale Statement
A security policy defines the desired configuration of resources in your environment and helps ensure compliance with company or regulatory security requirements. The MCSB Policy Initiative a set of security recommendations based on best practices and is associated with every subscription by default. When a policy Effect is set to
Audit, policies in the MCSB ensure that Defender for Cloud evaluates relevant resources for supported recommendations. To ensure that policies within the MCSB are not being missed when the Policy Initiative is evaluated, none of the policies should have an Effect ofDisabled.- Remediation Procedure
Remediate from Azure Portal 1. From Azure Home select the Portal Menu. 1. Select
Microsoft Defender for Cloud. 1. UnderManagement, selectEnvironment settings. 1. Click on the appropriate Management Group or Subscription. 1. Click onSecurity policiesin the left column. 1. Click onMicrosoft cloud security benchmark1. ClickAdd Filterand selectEffect1. Check theDisabledbox to search for all disabled policies 1. ClickApply1. Click the blue ellipsis...to the right of a policy name. 1. ClickManage effect and parameters. 1. UnderPolicy effect, select the radio button next toAudit. 1. ClickSave. 1. ClickRefresh. 1. Repeat steps 10-14 until all disabled policies are updated. 1. Repeat steps 1-15 for each Management Group or Subscription requiring remediation.
8.1.12Ensure That 'All users with the following roles' is Set to 'Owner'1
Attributes
- Profile
Level 1
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure That 'All users with the following roles' is Set to 'Owner'
- Default Value
By default,
Owneris selected- Audit Procedure
Audit from Azure Portal 1. From Azure Home select the Portal Menu 1. Select
Microsoft Defender for Cloud1. UnderManagement, selectEnvironment Settings1. Click on the appropriate Management Group, Subscription, or Workspace 1. Click onEmail notifications1. Ensure thatAll users with the following rolesis set toOwnerAudit from Azure CLI Ensure the command below returns state ofOnand thatOwnerappears in roles.az account get-access-token --query {subscription:subscription,accessToken:accessToken} --out tsv | xargs -L1 bash -c 'curl -X GET -H Authorization: Bearer $1 -H Content-Type: application/json https://management.azure.com/subscriptions/$0/providers/Microsoft.Security/securityContacts?api-version=2020-01-01-preview'| jq '.[] | select(.name==default).properties.notificationsByRole'- Impact Statement
Owners will receive email notifications for security alerts.
- Assessment Status
Automated
- Rationale Statement
Enabling security alert emails to subscription owners ensures that they receive security alert emails from Microsoft. This ensures that they are aware of any potential security issues and can mitigate the risk in a timely fashion.
- Remediation Procedure
Remediate from Azure Portal 1. From Azure Home select the Portal Menu 1. Select
Microsoft Defender for Cloud1. UnderManagement, selectEnvironment Settings1. Click on the appropriate Management Group, Subscription, or Workspace 1. Click onEmail notifications1. In the drop down of theAll users with the following rolesfield selectOwner1. ClickSaveRemediate from Azure CLI Use the below command to setSend email also to subscription ownerstoOn.az account get-access-token --query {subscription:subscription,accessToken:accessToken} --out tsv | xargs -L1 bash -c 'curl -X PUT -H Authorization: Bearer $1 -H Content-Type: application/json https://management.azure.com/subscriptions/$0/providers/Microsoft.Security/securityContacts/default1?api-version=2017-08-01-preview -d@input.json'Whereinput.jsoncontains the data below, replacingvalidEmailAddresswith a single email address or multiple comma-separated email addresses:{ id: /subscriptions/<Your_Subscription_Id>/providers/Microsoft.Security/securityContacts/default1, name: default1, type: Microsoft.Security/securityContacts, properties: { email: <validEmailAddress>, alertNotifications: On, alertsToAdmins: On, notificationsByRole: Owner } }- Additional Information
Excluding any entries in the input.json properties block disables the specific setting by default.
8.1.13Ensure 'Additional email addresses' is Configured with a Security Contact Email1
Attributes
- Profile
Level 1
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure 'Additional email addresses' is Configured with a Security Contact Email
- Default Value
By default, there are no additional email addresses entered.
- Audit Procedure
Audit from Azure Portal 1. From Azure Home select the Portal Menu. 1. Select
Microsoft Defender for Cloud. 1. UnderManagement, selectEnvironment Settings. 1. Click on the appropriate Management Group, Subscription, or Workspace. 1. Click onEmail notifications. 1. Ensure that a valid security contact email address is listed in theAdditional email addressesfield. Audit from Azure CLI Ensure the output of the below command is not empty and is set with appropriate email ids:az account get-access-token --query {subscription:subscription,accessToken:accessToken} --out tsv | xargs -L1 bash -c 'curl -X GET -H Authorization: Bearer $1 -H Content-Type: application/json https://management.azure.com/subscriptions/$0/providers/Microsoft.Security/securityContacts?api-version=2020-01-01-preview' | jq '.|.[] | select(.name==default)'|jq '.properties.emails'Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 4f4f78b8-e367-4b10-a341-d9a4ad5cf1c7 - Name: 'Subscriptions should have a contact email address for security issues'- Impact Statement
Security contacts will receive email notifications.
- Assessment Status
Automated
- Rationale Statement
Microsoft Defender for Cloud emails the Subscription Owner to notify them about security alerts. Adding your Security Contact's email address to the 'Additional email addresses' field ensures that your organization's Security Team is included in these alerts. This ensures that the proper people are aware of any potential compromise in order to mitigate the risk in a timely fashion.
- Remediation Procedure
Remediate from Azure Portal 1. From Azure Home select the Portal Menu. 1. Select
Microsoft Defender for Cloud. 1. UnderManagement, selectEnvironment Settings. 1. Click on the appropriate Management Group, Subscription, or Workspace. 1. Click onEmail notifications. 1. Enter a valid security contact email address (or multiple addresses separated by commas) in theAdditional email addressesfield. 1. ClickSave. Remediate from Azure CLI Use the below command to setSecurity contact emailstoOn.az account get-access-token --query {subscription:subscription,accessToken:accessToken} --out tsv | xargs -L1 bash -c 'curl -X PUT -H Authorization: Bearer $1 -H Content-Type: application/json https://management.azure.com/subscriptions/$0/providers/Microsoft.Security/securityContacts/default?api-version=2020-01-01-preview -d@input.json'Whereinput.jsoncontains the data below, replacingvalidEmailAddresswith a single email address or multiple comma-separated email addresses:{ id: /subscriptions/<Your_Subscription_Id>/providers/Microsoft.Security/securityContacts/default, name: default, type: Microsoft.Security/securityContacts, properties: { email: <validEmailAddress>, alertNotifications: On, alertsToAdmins: On } }- Additional Information
Excluding any entries in the input.json properties block disables the specific setting by default.
8.1.14Ensure that 'Notify about alerts with the following severity (or higher)' is Enabled1
Attributes
- Profile
Level 1
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure that 'Notify about alerts with the following severity (or higher)' is Enabled
- Default Value
By default, subscription owners receive email notifications for high-severity alerts.
- Audit Procedure
Audit from Azure Portal 1. From Azure Home select the Portal Menu. 1. Select
Microsoft Defender for Cloud. 1. UnderManagement, selectEnvironment settings. 1. Click on the appropriate Subscription. 1. Click onEmail notifications. 1. UnderNotification types, ensure that the box next toNotify about alerts with the following severity (or higher)is checked, and an appropriate severity level is selected. 1. Repeat steps 1-6 for each Subscription. Audit from Azure CLI Including a Subscription ID at the$0in/subscriptions/$0/providers, ensure the below command returnsstate: On, and thatminimalSeverityis set to an appropriate severity level:az account get-access-token --query {subscription:subscription,accessToken:accessToken} --out tsv | xargs -L1 bash -c 'curl -X GET -H Authorization: Bearer $1 -H Content-Type: application/json https://management.azure.com/subscriptions/$0/providers/Microsoft.Security/securityContacts?api-version=2020-01-01-preview' | jq '.|.[] | select(.name==default)'|jq '.properties.alertNotifications'Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 6e2593d9-add6-4083-9c9b-4b7d2188c899 - Name: 'Email notification for high severity alerts should be enabled'- Impact Statement
Enabling security alert emails can cause alert fatigue, increasing the risk of missing important alerts. Select an appropriate severity level to manage notifications. Azure aims to reduce alert fatigue by limiting the daily email volume per severity level. Learn more: https://learn.microsoft.com/en-us/azure/defender-for-cloud/configure-email-notifications#email-frequency.
- Assessment Status
Automated
- Rationale Statement
Enabling security alert emails ensures that security alert emails are sent by Microsoft. This ensures that the right people are aware of any potential security issues and can mitigate the risk.
- Remediation Procedure
Remediate from Azure Portal 1. From Azure Home select the Portal Menu. 1. Select
Microsoft Defender for Cloud. 1. UnderManagement, selectEnvironment settings. 1. Click on the appropriate Subscription. 1. Click onEmail notifications. 1. UnderNotification types, check box next toNotify about alerts with the following severity (or higher)and select an appropriate severity level from the drop-down menu. 1. ClickSave. 1. Repeat steps 1-7 for each Subscription requiring remediation. Remediate from Azure CLI Use the below command to enableSend email notification for high severity alerts:az account get-access-token --query {subscription:subscription,accessToken:accessToken} --out tsv | xargs -L1 bash -c 'curl -X PUT -H Authorization: Bearer $1 -H Content-Type: application/json https://management.azure.com/subscriptions/<$0>/providers/Microsoft.Security/securityContacts/default1?api-version=2017-08-01-preview -d@input.json'Whereinput.jsoncontains the data below, replacingvalidEmailAddresswith a single email address or multiple comma-separated email addresses:{ id: /subscriptions/<subscriptionId>/providers/Microsoft.Security/securityContacts/default, name: default, type: Microsoft.Security/securityContacts, properties: { email: <validEmailAddress>, alertNotifications: On, alertsToAdmins: On } }- Additional Information
Excluding any entries in the
input.jsonproperties block disables the specific setting by default. This recommendation has been updated to reflect recent changes to Microsoft REST APIs for getting and updating security contact information.
8.1.15Ensure that 'Notify about attack paths with the following risk level (or higher)' is Enabled1
Attributes
- Profile
Level 1
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure that 'Notify about attack paths with the following risk level (or higher)' is Enabled
- Audit Procedure
Audit from Azure Portal 1. From Azure Home select the Portal Menu. 1. Select
Microsoft Defender for Cloud. 1. UnderManagement, selectEnvironment settings. 1. Click on the appropriate Subscription. 1. Click onEmail notifications. 1. Under Notification types, ensure that the box next toNotify about attack paths with the following risk level (or higher)is checked, and an appropriate risk level is selected. 1. Repeat steps 1-6 for each Subscription. Audit from Azure CLI Including a Subscription ID at the$0in/subscriptions/$0/providers, ensure the below command returnssourceType: AttackPath, and thatminimalRiskLevelis set to an appropriate risk level:az account get-access-token --query {subscription:subscription,accessToken:accessToken} --out tsv | xargs -L1 bash -c 'curl -X GET -H Authorization: Bearer $1 -H Content-Type: application/json https://management.azure.com/subscriptions/$0/providers/Microsoft.Security/securityContacts?api-version=2023-12-01-preview' | jq '.|.[]'- Impact Statement
Enabling attack path emails can cause alert fatigue, increasing the risk of missing important alerts. Select an appropriate risk level to manage notifications. Azure aims to reduce alert fatigue by limiting the daily email volume per risk level. Learn more: https://learn.microsoft.com/en-us/azure/defender-for-cloud/configure-email-notifications#email-frequency.
- Assessment Status
Automated
- Rationale Statement
Enabling attack path emails ensures that attack path emails are sent by Microsoft. This ensures that the right people are aware of any potential security issues and can mitigate the risk.
- Remediation Procedure
Remediate from Azure Portal 1. From Azure Home select the Portal Menu. 1. Select
Microsoft Defender for Cloud. 1. UnderManagement, selectEnvironment settings. 1. Click on the appropriate Subscription. 1. Click onEmail notifications. 1. Under Notification types, check the box next toNotify about attack paths with the following risk level (or higher), and select an appropriate risk level from the drop-down menu. 1. Repeat steps 1-6 for each Subscription.
8.1.16Ensure that Microsoft Defender External Attack Surface Monitoring (EASM) is Enabled0
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.1 Microsoft Defender for Cloud
- Description
Ensure that Microsoft Defender External Attack Surface Monitoring (EASM) is Enabled
- Default Value
Microsoft Defender EASM is an optional, paid Azure Resource that must be created and configured inside a Subscription and Resource Group.
- Audit Procedure
Audit from Azure Portal 1. Go to
Microsoft Defender EASM. 1. Ensure that at least one Microsoft Defender EASM workspace is listed. 1. Click the name of a workspace. 1. Ensure the workspace is configured appropriately for your environment and organization. 1. Repeat steps 3-4 for each workspace.- Impact Statement
Microsoft Defender EASM workspaces are currently available as Azure Resources with a 30-day free trial period but can quickly accrue significant charges. The costs are calculated daily as (Number of billable inventory items) x (item cost per day; approximately: $0.017). Estimated cost is not provided within the tool, and users are strongly advised to contact their Microsoft sales representative for pricing and set a calendar reminder for the end of the trial period. For an EASM workspace having an Inventory of 5k-10k billable items (IP addresses, hostnames, SSL certificates, etc) a typical cost might be approximately $85-170 per day or $2500-5000 USD/month at the time of publication. If the workspace is deleted by the last day of a free trial period, no charges are billed.
- Assessment Status
Manual
- Rationale Statement
This tool can monitor the externally exposed resources of an organization, provide valuable insights, and export these findings in a variety of formats (including CSV) for use in vulnerability management operations and red/purple team exercises.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Microsoft Defender EASM. 1. Click+ Create. 1. UnderProject details, select a subscription. 1. Select or create a resource group. 1. UnderInstance details, enter a name for the workspace. 1. Select a region. 1. ClickReview + create. 1. ClickCreate. 1. Once the deployment has completed, go toMicrosoft Defender EASM. 1. Click the workspace name. 1. Configure the workspace appropriately for your environment and organization.- Additional Information
Microsoft added its Defender for External Attack Surface management (EASM) offering to Azure following its 2022 acquisition of EASM SaaS tool company RiskIQ.
8.2.1Ensure That Microsoft Defender for IoT Hub Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.2 Microsoft Defender for IoT
- Description
Ensure That Microsoft Defender for IoT Hub Is Set To 'On'
- Default Value
By default, Microsoft Defender for IoT is not enabled.
- Audit Procedure
Audit from Azure Portal 1. Go to
IoT Hub. 2. Select anIoT Hubto validate. 3. SelectOverviewinDefender for IoT. 4. The Threat prevention and Threat detection screen will appear, ifDefender for IoTis Enabled.- Impact Statement
Enabling Microsoft Defender for IoT will incur additional charges dependent on the level of usage.
- Assessment Status
Manual
- Rationale Statement
IoT devices are very rarely patched and can be potential attack vectors for enterprise networks. Updating their network configuration to use a central security hub allows for detection of these breaches.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
IoT Hub. 2. Select anIoT Hubto validate. 3. SelectOverviewinDefender for IoT. 4. Click onSecure your IoT solution, and complete the onboarding.- Additional Information
There are additional configurations for Microsoft Defender for IoT that allow for types of deployments called hybrid or local. Both run on your physical infrastructure. These are complicated setups and are primarily outside of the scope of a purely Azure benchmark. Please see the references to consider these options for your organization.
8.3.1Ensure that the Expiration Date is Set for all Keys in Key Vaults using RBAC1
Attributes
- Profile
Level 1
- Section
8 Security Services
- Sub Section
8.3 Key Vault
- Description
Ensure that the Expiration Date is Set for all Keys in Key Vaults using RBAC
- Default Value
By default, keys do not expire.
- Audit Procedure
Audit from Azure Portal 1. Go to
Key vaults. 2. For each Key vault, click onKeys. 3. In the main pane, ensure that an appropriateExpiration dateis set for any keys that areEnabled. Audit from Azure CLI Get a list of all the key vaults in your Azure environment by running the following command:az keyvault listThen for each key vault listed ensure that the output of the below command contains Key ID (kid), enabled status astrueand Expiration date (expires) is not empty or null:az keyvault key list --vault-name <VaultName> --query '[*].{kid:kid,enabled:attributes.enabled,expires:attributes.expires}'Audit from PowerShell Retrieve a list of Azure Key vaults:Get-AzKeyVaultFor each Key vault run the following command to determine which vaults are configured to use RBAC.Get-AzKeyVault -VaultName <VaultName>For each Key vault with theEnableRbacAuthorizatoinsetting set toTrue, run the following command.Get-AzKeyVaultKey -VaultName <VaultName>Make sure theExpiressetting is configured with a value as appropriate wherever theEnabledsetting is set toTrue. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 152b15f7-8e1f-4c1f-ab71-8c010ba5dbc0 - Name: 'Key Vault keys should have an expiration date'- Impact Statement
Keys cannot be used beyond their assigned expiration dates respectively. Keys need to be rotated periodically wherever they are used.
- Assessment Status
Automated
- Rationale Statement
Azure Key Vault enables users to store and use cryptographic keys within the Microsoft Azure environment. The
exp(expiration date) attribute identifies the expiration date on or after which the key MUST NOT be used for encryption of new data, wrapping of new keys, and signing. By default, keys never expire. It is thus recommended that keys be rotated in the key vault and set an explicit expiration date for all keys to help enforce the key rotation. This ensures that the keys cannot be used beyond their assigned lifetimes.- Remediation Procedure
Remediate from Azure Portal 1. Go to
Key vaults. 2. For each Key vault, click onKeys. 3. In the main pane, ensure that an appropriateExpiration dateis set for any keys that areEnabled. Remediate from Azure CLI Update theExpiration datefor the key using the below command:az keyvault key set-attributes --name <keyName> --vault-name <vaultName> --expires Y-m-d'T'H:M:S'Z'Note: To view the expiration date on all keys in a Key Vault using Microsoft API, the List Key permission is required. To update the expiration date for the keys: 1. Go to the Key vault, click on Access Control (IAM). 2. Click on Add role assignment and assign the role of Key Vault Crypto Officer to the appropriate user. Remediate from PowerShellSet-AzKeyVaultKeyAttribute -VaultName <VaultName> -Name <KeyName> -Expires <DateTime>
8.3.2Ensure that the Expiration Date is set for All Keys in Key Vaults using access policies (legacy)1
Attributes
- Profile
Level 1
- Section
8 Security Services
- Sub Section
8.3 Key Vault
- Description
Ensure that the Expiration Date is set for All Keys in Key Vaults using access policies (legacy)
- Default Value
By default, keys do not expire.
- Audit Procedure
Audit from Azure Portal 1. Go to
Key vaults. 2. For each Key vault, click onKeys. 3. In the main pane, ensure that the status of the key isEnabled. 4. For each enabled key, ensure that an appropriateExpiration dateis set. Audit from Azure CLI Get a list of all the key vaults in your Azure environment by running the following command:az keyvault listFor each key vault, ensure that the output of the below command contains Key ID (kid), enabled status astrueand Expiration date (expires) is not empty or null:az keyvault key list --vault-name <KEYVAULTNAME> --query '[*].{kid:kid,enabled:attributes.enabled,expires:attributes.expires}'Audit from PowerShell Retrieve a list of Azure Key vaults:Get-AzKeyVaultFor each Key vault, run the following command to determine which vaults are configured to not use RBAC:Get-AzKeyVault -VaultName <Vault Name>For each Key vault with theEnableRbacAuthorizatoinsetting set toFalseor empty, run the following command.Get-AzKeyVaultKey -VaultName <Vault Name>Make sure theExpiressetting is configured with a value as appropriate wherever theEnabledsetting is set toTrue. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 152b15f7-8e1f-4c1f-ab71-8c010ba5dbc0 - Name: 'Key Vault keys should have an expiration date'- Impact Statement
Keys cannot be used beyond their assigned expiration dates respectively. Keys need to be rotated periodically wherever they are used.
- Assessment Status
Automated
- Rationale Statement
Azure Key Vault enables users to store and use cryptographic keys within the Microsoft Azure environment. The
exp(expiration date) attribute identifies the expiration date on or after which the key MUST NOT be used for a cryptographic operation. By default, keys never expire. It is thus recommended that keys be rotated in the key vault and set an explicit expiration date for all keys. This ensures that the keys cannot be used beyond their assigned lifetimes.- Remediation Procedure
Remediate from Azure Portal 1. Go to
Key vaults. 2. For each Key vault, click onKeys. 3. In the main pane, ensure that the status of the key isEnabled. 4. For each enabled key, ensure that an appropriateExpiration dateis set. Remediate from Azure CLI Update theExpiration datefor the key using the below command:az keyvault key set-attributes --name <keyName> --vault-name <vaultName> --expires Y-m-d'T'H:M:S'Z'Note: To view the expiration date on all keys in a Key Vault using Microsoft API, the List Key permission is required. To update the expiration date for the keys: 1. Go to Key vault, click onAccess policies. 2. Click onCreateand add an access policy with theUpdatepermission (in the Key Permissions - Key Management Operations section). Remediate from PowerShellSet-AzKeyVaultKeyAttribute -VaultName <Vault Name> -Name <Key Name> -Expires <DateTime>
8.3.3Ensure that the Expiration Date is set for All Secrets in Key Vaults using RBAC1
Attributes
- Profile
Level 1
- Section
8 Security Services
- Sub Section
8.3 Key Vault
- Description
Ensure that the Expiration Date is set for All Secrets in Key Vaults using RBAC
- Default Value
By default, secrets do not expire.
- Audit Procedure
Audit from Azure Portal 1. Go to
Key vaults. 2. For each Key vault, click onSecrets. 3. In the main pane, ensure that the status of the secret isEnabled. 4. For each enabled secret, ensure that an appropriateExpiration dateis set. Audit from Azure CLI Ensure that the output of the below command contains ID (id), enabled status astrueand Expiration date (expires) is not empty or null:az keyvault secret list --vault-name <KEYVAULTNAME> --query '[*].{kid:kid,enabled:attributes.enabled,expires:attributes.expires}'Audit from PowerShell Retrieve a list of Key vaults:Get-AzKeyVaultFor each Key vault, run the following command to determine which vaults are configured to use RBAC:Get-AzKeyVault -VaultName <Vault Name>For each Key vault with theEnableRbacAuthorizationsetting set toTrue, run the following command:Get-AzKeyVaultSecret -VaultName <Vault Name>Make sure theExpiressetting is configured with a value as appropriate wherever theEnabledsetting is set toTrue. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 98728c90-32c7-4049-8429-847dc0f4fe37 - Name: 'Key Vault secrets should have an expiration date'- Impact Statement
Secrets cannot be used beyond their assigned expiry date respectively. Secrets need to be rotated periodically wherever they are used.
- Assessment Status
Automated
- Rationale Statement
The Azure Key Vault enables users to store and keep secrets within the Microsoft Azure environment. Secrets in the Azure Key Vault are octet sequences with a maximum size of 25k bytes each. The
exp(expiration date) attribute identifies the expiration date on or after which the secret MUST NOT be used. By default, secrets never expire. It is thus recommended to rotate secrets in the key vault and set an explicit expiration date for all secrets. This ensures that the secrets cannot be used beyond their assigned lifetimes.- Remediation Procedure
Remediate from Azure Portal 1. Go to
Key vaults. 2. For each Key vault, click onSecrets. 3. In the main pane, ensure that the status of the secret isEnabled. 4. For each enabled secret, ensure that an appropriateExpiration dateis set. Remediate from Azure CLI Update the Expiration date for the secret using the below command:az keyvault secret set-attributes --name <secret_name> --vault-name <vault_name> --expires Y-m-d'T'H:M:S'Z'Note: To view the expiration date on all secrets in a Key Vault using Microsoft API, theList Secretpermission is required. To update the expiration date for the secrets: 1. Go to the Key vault, click onAccess Control (IAM). 2. Click onAdd role assignmentand assign the role ofKey Vault Secrets Officerto the appropriate user. Remediate from PowerShellSet-AzKeyVaultSecretAttribute -VaultName <vault_name> -Name <secret_name> -Expires <date_time>
8.3.4Ensure that the Expiration Date is set for All Secrets in Key Vaults using access policies (legacy)1
Attributes
- Profile
Level 1
- Section
8 Security Services
- Sub Section
8.3 Key Vault
- Description
Ensure that the Expiration Date is set for All Secrets in Key Vaults using access policies (legacy)
- Default Value
By default, secrets do not expire.
- Audit Procedure
Audit from Azure Portal 1. Go to
Key vaults. 2. For each Key vault, click onSecrets. 3. In the main pane, ensure that the status of the secret isEnabled. 4. Set an appropriateExpiration dateon all secrets. Audit from Azure CLI Get a list of all the key vaults in your Azure environment by running the following command:az keyvault listFor each key vault, ensure that the output of the below command contains ID (id), enabled status astrueand Expiration date (expires) is not empty or null:az keyvault secret list --vault-name <KEYVALUTNAME> --query '[*].{kid:kid,enabled:attributes.enabled,expires:attributes.expires}'Audit from PowerShell Retrieve a list of Key vaults:Get-AzKeyVaultFor each Key vault run the following command to determine which vaults are configured to use RBAC:Get-AzKeyVault -VaultName <Vault Name>For each Key Vault with theEnableRbacAuthorizationsetting set toFalseor empty, run the following command.Get-AzKeyVaultSecret -VaultName <Vault Name>Make sure theExpiressetting is configured with a value as appropriate wherever theEnabledsetting is set toTrue. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 98728c90-32c7-4049-8429-847dc0f4fe37 - Name: 'Key Vault secrets should have an expiration date'- Impact Statement
Secrets cannot be used beyond their assigned expiry date respectively. Secrets need to be rotated periodically wherever they are used.
- Assessment Status
Automated
- Rationale Statement
The Azure Key Vault enables users to store and keep secrets within the Microsoft Azure environment. Secrets in the Azure Key Vault are octet sequences with a maximum size of 25k bytes each. The
exp(expiration date) attribute identifies the expiration date on or after which the secret MUST NOT be used. By default, secrets never expire. It is thus recommended to rotate secrets in the key vault and set an explicit expiration date for all secrets. This ensures that the secrets cannot be used beyond their assigned lifetimes.- Remediation Procedure
Remediate from Azure Portal 1. Go to
Key vaults. 2. For each Key vault, click onSecrets. 3. In the main pane, ensure that the status of the secret isEnabled. 4. Set an appropriateExpiration dateon all secrets. Remediate from Azure CLI Update theExpiration datefor the secret using the below command:az keyvault secret set-attributes --name <secret_name> --vault-name <vault_name> --expires Y-m-d'T'H:M:S'Z'Note: To view the expiration date on all secrets in a Key Vault using Microsoft API, theListSecret permission is required. To update the expiration date for the secrets: 1. Go to Key vault, click onAccess policies. 2. Click onCreateand add an access policy with theUpdatepermission (in the Secret Permissions - Secret Management Operations section). Remediate from PowerShell For each Key vault with theEnableRbacAuthorizationsetting set toFalseor empty, run the following command.Set-AzKeyVaultSecret -VaultName <vault_name> -Name <secret_name> -Expires <date_time>
8.3.5Ensure 'Purge protection' is Set to 'Enabled'1
Attributes
- Profile
Level 1
- Section
8 Security Services
- Sub Section
8.3 Key Vault
- Description
Ensure 'Purge protection' is Set to 'Enabled'
- Default Value
Purge protection is disabled by default.
- Audit Procedure
Audit from Azure Portal 1. Go to
Key Vaults. 2. Click the name of a key vault. 3. UnderSettings, clickProperties. 4. Next toPurge protection, ensure thatEnable purge protection (enforce a mandatory retention period for deleted vaults and vault objects)is selected. 5. Repeat steps 1-4 for each key vault. Audit from Azure CLI Run the following command to list key vaults:az resource list --query "[?type=='Microsoft.KeyVault/vaults']"For each key vault, run the following command to get the purge protection setting:az resource show --resource-group <resource-group> --name <key-vault> --resource-type "Microsoft.KeyVault/vaults" --query properties.enablePurgeProtectionEnsure thattrueis returned. Audit from PowerShell Run the following command to list key vaults:Get-AzKeyVaultFor each key vault, run the following command to get the key vault details:Get-AzKeyVault -ResourceGroupName <resource-group> -VaultName <key-vault>EnsurePurge Protection Enabled?is set toTrue. Audit from Azure Policy - Policy ID: 0b60c0b2-2dc2-4e1c-b5c9-abbed971de53 - Name: 'Key vaults should have deletion protection enabled'- Impact Statement
Once purge protection is enabled for a key vault, it cannot be disabled.
- Assessment Status
Automated
- Rationale Statement
Users may accidentally run delete/purge commands on a key vault, or an attacker or malicious user may do so deliberately in order to cause disruption. Deleting or purging a key vault leads to immediate data loss, as keys encrypting data and secrets/certificates allowing access/services will become inaccessible. Enabling purge protection ensures that even if a key vault is deleted, the key vault and its objects remain recoverable during the configurable retention period. If no action is taken, the key vault and its objects will be purged once the retention period elapses.
- Remediation Procedure
Note: Once enabled, purge protection cannot be disabled. Remediate from Azure Portal 1. Go to
Key Vaults. 2. Click the name of a key vault. 3. UnderSettings, clickProperties. 4. Select the radio button next toEnable purge protection (enforce a mandatory retention period for deleted vaults and vault objects). 5. ClickSave. 6. Repeat steps 1-5 for each key vault requiring remediation. Remediate from Azure CLI For each key vault requiring remediation, run the following command to enable purge protection:az resource update --resource-group <resource-group> --name <key-vault> --resource-type "Microsoft.KeyVault/vaults" --set properties.enablePurgeProtection=trueRemediate from PowerShell For each key vault requiring remediation, run the following command to enable purge protection:Update-AzKeyVault -ResourceGroupName <resource-group> -VaultName <key-vault> -EnablePurgeProtection
8.3.6Ensure that Role Based Access Control for Azure Key Vault is Enabled1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.3 Key Vault
- Description
Ensure that Role Based Access Control for Azure Key Vault is Enabled
- Default Value
The default value for Access control in Key Vaults is Vault Policy.
- Audit Procedure
Audit from Azure Portal 1. From Azure Home open the Portal Menu in the top left corner 2. Select Key Vaults 3. Select a Key Vault to audit 4. Select Access configuration 5. Ensure the Permission Model radio button is set to
Azure role-based access controlAudit from Azure CLI Run the following command for each Key Vault in each Resource Group:az keyvault show --resource-group <resource_group> --name <vault_name>Ensure theenableRbacAuthorizationsetting is set totruewithin the output of the above command. Audit from PowerShell Run the following PowerShell command:Get-AzKeyVault -Vaultname <vault_name> -ResourceGroupName <resource_group>Ensure theEnabled For RBAC Authorizationsetting is set toTrueAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 12d4fa5e-1f9f-4c21-97a9-b99b3c6611b5 - Name: 'Azure Key Vault should use RBAC permission model'- Impact Statement
Implementation needs to be properly designed from the ground up, as this is a fundamental change to the way key vaults are accessed/managed. Changing permissions to key vaults will result in loss of service as permissions are re-applied. For the least amount of downtime, map your current groups and users to their corresponding permission needs.
- Assessment Status
Automated
- Rationale Statement
The new RBAC permissions model for Key Vaults enables a much finer grained access control for key vault secrets, keys, certificates, etc., than the vault access policy. This in turn will permit the use of privileged identity management over these roles, thus securing the key vaults with JIT Access management.
- Remediation Procedure
Remediate from Azure Portal Key Vaults can be configured to use
Azure role-based access controlon creation. For existing Key Vaults: 1. From Azure Home open the Portal Menu in the top left corner 2. SelectKey Vaults3. Select a Key Vault to audit 4. SelectAccess configuration5. Set the Permission model radio button toAzure role-based access control, taking note of the warning message 6. ClickSave7. SelectAccess Control (IAM)8. Select theRole Assignmentstab 9. Reapply permissions as needed to groups or users Remediate from Azure CLI To enable RBAC Authorization for each Key Vault, run the following Azure CLI command:az keyvault update --resource-group <resource_group> --name <vault_name> --enable-rbac-authorization trueRemediate from PowerShell To enable RBAC authorization on each Key Vault, run the following PowerShell command:Update-AzKeyVault -ResourceGroupName <resource_group> -VaultName <vault_name> -EnableRbacAuthorization $True
8.3.7Ensure Public Network Access is Disabled1
Attributes
- Profile
Level 1
- Section
8 Security Services
- Sub Section
8.3 Key Vault
- Description
Ensure Public Network Access is Disabled
- Default Value
Public network access is enabled by default.
- Audit Procedure
Audit from Azure Portal 1. Go to
Key vaults. 2. Click the name of a key vault. 3. UnderSettings, clickNetworking. 4. UnderFirewalls and virtual networks, ensure thatAllow access from:is set toDisable public access. 5. Repeat steps 1-4 for each key vault. Audit from Azure CLI Run the following command to list key vaults:az keyvault listFor each key vault, run the following command to get the public network access setting:az keyvault show --resource-group <resource-group> --name <key-vault> --query properties.publicNetworkAccessEnsure thatDisabledis returned. Audit from PowerShell Run the following command to list key vaults:Get-AzKeyVaultRun the following command to get the key vault in a resource group with a given name:$vault = Get-AzKeyVault -ResourceGroupName <resource-group> -Name <key-vault>Run the following command to get the public network access setting for the key vault:$vault.PublicNetworkAccessEnsure thatDisabledis returned. Repeat for each key vault. Audit from Azure Policy - Policy ID: 405c5871-3e91-4644-8a63-58e19d68ff5b - Name: 'Azure Key Vault should disable public network access'- Impact Statement
NOTE: Prior to disabling public network access, it is strongly recommended that, for each key vault, either: virtual network integration is completed OR private endpoints/links are set up as described in 'Ensure Private Endpoints are used to access Azure Key Vault.' Disabling public network access restricts access to the service. This enhances security but will require the configuration of a virtual network and/or private endpoints for any services or users needing access within trusted networks.
- Assessment Status
Automated
- Rationale Statement
Disabling public network access improves security by ensuring that a service is not exposed on the public internet. Removing a point of interconnection from the internet edge to your key vault can strengthen the network security boundary of your system and reduce the risk of exposing the control plane or vault objects to untrusted clients. Although Azure resources are never truly isolated from the public internet, disabling the public endpoint removes a line of sight from the public internet and increases the effort required for an attack.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Key vaults. 2. Click the name of a key vault. 3. UnderSettings, clickNetworking. 4. UnderFirewalls and virtual networks, next toAllow access from:, click the radio button next toDisable public access. 5. ClickApply. 6. Repeat steps 1-5 for each key vault requiring remediation. Remediate from Azure CLI For each key vault requiring remediation, run the following command to disable public network access:az keyvault update --resource-group <resource-group> --name <key-vault> --public-network-access DisabledRemediate from PowerShell For each key vault requiring remediation, run the following command to disable public network access:Update-AzKeyVault -ResourceGroupName <resource-group> -VaultName <vault-name> -PublicNetworkAccess "Disabled"- Additional Information
This Common Reference Recommendation is referenced in the following Service Recommendations: - Storage Services > Storage Accounts > Networking > Ensure that 'Public Network Access' is 'Disabled' for storage accounts
8.3.8Ensure Private Endpoints are Used to Access Azure Key Vault1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.3 Key Vault
- Description
Ensure Private Endpoints are Used to Access Azure Key Vault
- Default Value
By default, Private Endpoints are not enabled for any services within Azure.
- Audit Procedure
Audit from Azure Portal 1. From Azure Home open the Portal Menu in the top left. 2. Select Key Vaults. 3. Select a Key Vault to audit. 4. Select
Networkingin the left column. 5. SelectPrivate endpoint connectionsfrom the top row. 6. View if there is an endpoint attached. Audit from Azure CLI Run the following command within a subscription for each Key Vault you wish to audit.az keyvault show --name <keyVaultName>Ensure thatprivateEndpointConnectionsis notnull. Audit from PowerShell Run the following command within a subscription for each Key Vault you wish to audit.Get-AzPrivateEndpointConnection -PrivateLinkResourceId '/subscriptions/<subscriptionNumber>/resourceGroups/<resourceGroup>/providers/Microsoft.KeyVault/vaults/<keyVaultName>/'Ensure that the response contains details of a private endpoint. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: a6abeaec-4d90-4a02-805f-6b26c4d3fbe9 - Name: 'Azure Key Vaults should use private link'- Impact Statement
Incorrect or poorly-timed changing of network configuration could result in service interruption. There are also additional costs tiers for running a private endpoint per petabyte or more of networking traffic.
- Assessment Status
Automated
- Rationale Statement
Private endpoints will keep network requests to Azure Key Vault limited to the endpoints attached to the resources that are whitelisted to communicate with each other. Assigning the Key Vault to a network without an endpoint will allow other resources on that network to view all traffic from the Key Vault to its destination. In spite of the complexity in configuration, this is recommended for high security secrets.
- Remediation Procedure
Please see the additional information about the requirements needed before starting this remediation procedure. Remediate from Azure Portal 1. From Azure Home open the Portal Menu in the top left. 2. Select Key Vaults. 3. Select a Key Vault to audit. 4. Select
Networkingin the left column. 5. SelectPrivate endpoint connectionsfrom the top row. 6. Select+ Create. 7. Select the subscription the Key Vault is within, and other desired configuration. 8. SelectNext. 9. For resource type selectMicrosoft.KeyVault/vaults. 10. Select the Key Vault to associate the Private Endpoint with. 11. SelectNext. 12. In theVirtual Networkingfield, select the network to assign the Endpoint. 13. Select other configuration options as desired, including an existing or new application security group. 14. SelectNext. 15. Select the private DNS the Private Endpoints will use. 16. SelectNext. 17. Optionally addTags. 18. SelectNext : Review + Create. 19. Review the information and selectCreate. Follow the Audit Procedure to determine if it has successfully applied. 20. Repeat steps 3-19 for each Key Vault. Remediate from Azure CLI 1. To create an endpoint, run the following command:az network private-endpoint create --resource-group <resourceGroup --vnet-name <vnetName> --subnet <subnetName> --name <PrivateEndpointName> --private-connection-resource-id /subscriptions/<AZURE SUBSCRIPTION ID>/resourceGroups/<resourceGroup>/providers/Microsoft.KeyVault/vaults/<keyVaultName> --group-ids vault --connection-name <privateLinkConnectionName> --location <azureRegion> --manual-request2. To manually approve the endpoint request, run the following command:az keyvault private-endpoint-connection approve --resource-group <resourceGroup> --vault-name <keyVaultName> –name <privateLinkName>3. Determine the Private Endpoint's IP address to connect the Key Vault to the Private DNS you have previously created: 4. Look for the property networkInterfaces then id; the value must be placed in the variable <privateEndpointNIC> within step 7.az network private-endpoint show -g <resourceGroupName> -n <privateEndpointName>5. Look for the property networkInterfaces then id; the value must be placed on <privateEndpointNIC> in step 7.az network nic show --ids <privateEndpointName>6. Create a Private DNS record within the DNS Zone you created for the Private Endpoint:az network private-dns record-set a add-record -g <resourcecGroupName> -z privatelink.vaultcore.azure.net -n <keyVaultName> -a <privateEndpointNIC>7. nslookup the private endpoint to determine if the DNS record is correct:nslookup <keyVaultName>.vault.azure.net nslookup <keyVaultName>.privatelink.vaultcore.azure.n- Additional Information
This recommendation assumes that you have created a Resource Group containing a Virtual Network that the services are already associated with and configured private DNS. A Bastion on the virtual network is also required, and the service to which you are connecting must already have a Private Endpoint. For information concerning the installation of these services, please see the attached documentation. Microsoft's own documentation lists the requirements as: A Key Vault. An Azure virtual network. A subnet in the virtual network. Owner or contributor permissions for both the Key Vault and the virtual network.
8.3.9Ensure Automatic Key Rotation is Enabled within Azure Key Vault1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.3 Key Vault
- Description
Ensure Automatic Key Rotation is Enabled within Azure Key Vault
- Default Value
By default, automatic key rotation is not enabled.
- Audit Procedure
Audit from Azure Portal 1. Go to
Key Vaults. 1. Select a Key Vault. 1. UnderObjects, selectKeys. 1. Select a key. 1. From the top row, selectRotation policy. 1. EnsureEnable auto rotationis set toEnabled. 1. Ensure theRotation timeis set to an appropriate value. 1. Repeat steps 1-7 for each Key Vault and Key. Audit from Azure CLI Run the following command:az keyvault key rotation-policy show --vault-name <vault-name> --name <key-name>Ensure that the response contains alifetimeActionofRotateand thattimeAfterCreateis set to an appropriate value. Audit from PowerShell Run the following command:Get-AzKeyVaultKeyRotationPolicy -VaultName <vault-name> -Name <key-name>Ensure that the response contains aLifetimeActionofRotateand thatTimeAfterCreateis set to an appropriate value. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: d8cf8476-a2ec-4916-896e-992351803c44 - Name: 'Keys should have a rotation policy ensuring that their rotation is scheduled within the specified number of days after creation.'- Impact Statement
There is an additional cost for each scheduled key rotation.
- Assessment Status
Automated
- Rationale Statement
Automatic key rotation reduces risk by ensuring that keys are rotated without manual intervention. Azure and NIST recommend that keys be rotated every two years or less. Refer to 'Table 1: Suggested cryptoperiods for key types' on page 46 of the following document for more information: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57pt1r5.pdf.
- Remediation Procedure
Note: Azure CLI and PowerShell use the ISO8601 duration format for time spans. The format is
P<timespanInISO8601Format>(Y,M,D). The leading P is required and is referred to asperiod. The(Y,M,D)are for the duration of Year, Month, and Day, respectively. A time frame of 2 years, 2 months, 2 days would beP2Y2M2D. For Azure CLI and PowerShell, it is easiest to supply the policy flags in a.json file, for example:{ lifetimeActions: [ { trigger: { timeAfterCreate: P<timespanInISO8601Format>(Y,M,D), timeBeforeExpiry : null }, action: { type: Rotate } }, { trigger: { timeBeforeExpiry : P<timespanInISO8601Format>(Y,M,D) }, action: { type: Notify } } ], attributes: { expiryTime: P<timespanInISO8601Format>(Y,M,D) } }Remediate from Azure Portal 1. Go toKey Vaults. 1. Select a Key Vault. 1. UnderObjects, selectKeys. 1. Select a key. 1. From the top row, selectRotation policy. 1. Select an appropriateExpiry time. 1. SetEnable auto rotationtoEnabled. 1. Set an appropriateRotation optionandRotation time. 1. Optionally, set aNotification time. 1. ClickSave. 1. Repeat steps 1-10 for each Key Vault and Key. Remediate from Azure CLI Run the following command for each key to enable automatic rotation:az keyvault key rotation-policy update --vault-name <vault-name> --name <key-name> --value <path/to/policy.json>Remediate from PowerShell Run the following command for each key to enable automatic rotation:Set-AzKeyVaultKeyRotationPolicy -VaultName <vault-name> -Name <key-name> -PolicyPath <path/to/policy.json>
8.3.10Ensure that Azure Key Vault Managed HSM is Used when Required0
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.3 Key Vault
- Description
Ensure that Azure Key Vault Managed HSM is Used when Required
- Audit Procedure
Audit from Azure CLI Run the following command to list key vaults:
az keyvault list --query [*].[name,type]Ensure that at least one key vault with typeMicrosoft.KeyVault/managedHSMsexists.- Impact Statement
Managed HSM incurs a cost of $0.40 to $5 per month for each actively used HSM-protected key, depending on the key type and quantity. Each key version is billed separately. Additionally, there is an hourly usage fee of $3.20 per Managed HSM pool.
- Assessment Status
Manual
- Rationale Statement
Managed HSM is a fully managed, highly available, single-tenant service that ensures FIPS 140-2 Level 3 compliance. It provides centralized key management, isolated access control, and private endpoints for secure access. Integrated with Azure services, it supports migration from Key Vault, ensures data residency, and offers monitoring and auditing for enhanced security.
- Remediation Procedure
Remediate from Azure CLI Run the following command to set
oidto be theOIDof the signed-in user:$oid = az ad signed-in-user show --query id -o tsvAlternatively, prepare a space-separated list of OIDs to be provided as theadministratorsof the HSM. Run the following command to create a Managed HSM:az keyvault create --resource-group <resource-group> --hsm-name <hsm-name> --retention-days <retention-days> --administrators $oidThe command can take several minutes to complete. After the HSM has been created, it must be activated before it can be used. Activation requires providing a minimum of three and a maximum of ten RSA key pairs, as well as the minimum number of keys required to decrypt the security domain (called a quorum). OpenSSL can be used to generate the self-signed certificates, for example:openssl req -newkey rsa:2048 -nodes -keyout cert_1.key -x509 -days 365 -out cert_1.cerRun the following command to download the security domain and activate the Managed HSM:az keyvault security-domain download --hsm-name <managed-hsm> --sd-wrapping-keys <key-1> <key-2> <key-3> --sd-quorum <quorum> --security-domain-file <managed-hsm-security-domain>.jsonStore the security domain file and the RSA key pairs securely. They will be required for disaster recovery or for creating another Managed HSM that shares the same security domain so that the two can share keys. The Managed HSM will now be in an active state and ready for use.
8.3.11Ensure Certificate 'Validity Period (in months)' is Less Than or Equal to '12'0
Attributes
- Profile
Level 1
- Section
8 Security Services
- Sub Section
8.3 Key Vault
- Description
Ensure Certificate 'Validity Period (in months)' is Less Than or Equal to '12'
- Default Value
Validity Period (in months) is set to 12 by default.
- Audit Procedure
Audit from Azure Portal 1. Go to
Key vaults. 2. Click the name of a key vault. 3. UnderObjects, clickCertificates. 4. Click the name of a certificate. 5. ClickIssuance Policy. 6. Ensure thatValidity Period (in months)is set to 12 or less. 7. Repeat steps 1-6 for each key vault and certificate. Audit from Azure CLI Run the following command to list key vaults:az keyvault listFor each key vault, run the following command to list certificates:az keyvault certificate list --vault-name <key-vault-name>For each certificate, run the following command to get the certificate policy's validityInMonths setting:az keyvault certificate show --id <certificate-id> --query policy.x509CertificateProperties.validityInMonthsEnsure that 12 or less is returned. Audit from PowerShell Run the following command to list key vaults:Get-AzKeyVaultRun the following command to get the key vault with a given name:$vault = Get-AzKeyVault -Name <key-vault-name>Run the following command to list certificates in the key vault:Get-AzKeyVaultCertificate -VaultName $vault.VaultNameRun the following command to get the policy of a certificate with a given name:$certificate = Get-AzKeyVaultCertificatePolicy -VaultName $vault.VaultName -Name <certificate-name>Run the following command to get the certificate policy's ValidityInMonths setting:$certificate.ValidityInMonthsEnsure that 12 or less is returned. Repeat for each key vault and certificate. Audit from Azure Policy - Policy ID: 0a075868-4c26-42ef-914c-5bc007359560 - Name: 'Certificates should have the specified maximum validity period'- Impact Statement
Minor administrative effort required to ensure certificate renewal and lifecycle management.
- Assessment Status
Automated
- Rationale Statement
Limiting certificate validity reduces the risk of misuse if compromised and helps ensure timely renewal, improving security and reliability.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Key vaults. 2. Click the name of a key vault. 3. UnderObjects, clickCertificates. 4. Click the name of a certificate. 5. ClickIssuance Policy. 6. SetValidity Period (in months)to an integer between 1 and 12, inclusive. 7. ClickSave. 8. Repeat steps 1-7 for each key vault and certificate requiring remediation. Remediate from PowerShell For each certificate requiring remediation, run the following command to set ValidityInMonths to an integer between 1 and 12, inclusive:Set-AzKeyVaultCertificatePolicy -VaultName $vault.VaultName -Name <certificate-name> -ValidityInMonths <validity-in-months>
8.4.1Ensure an Azure Bastion Host Exists1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Sub Section
8.4 Azure Bastion
- Description
Ensure an Azure Bastion Host Exists
- Default Value
By default, the Azure Bastion service is not configured.
- Audit Procedure
Audit from Azure Portal 1. Click on
Bastions2. Ensure there is at least oneBastionhost listed under theNamecolumn Audit from Azure CLI Note: The Azure CLInetwork bastionmodule is inPreviewas of this writingaz network bastion list --subscription <subscription ID>Ensure the output of the above command is not empty. Audit from PowerShell Retrieve theBastionhost(s) information for a specificResource GroupGet-AzBastion -ResourceGroupName <resource group name>Ensure the output of the above command is not empty.- Impact Statement
The Azure Bastion service incurs additional costs and requires a specific virtual network configuration. The
Standardtier offers additional configuration options compared to theBasictier and may incur additional costs for those added features.- Assessment Status
Automated
- Rationale Statement
The Azure Bastion service allows organizations a more secure means of accessing Azure Virtual Machines over the Internet without assigning public IP addresses to those Virtual Machines. The Azure Bastion service provides Remote Desktop Protocol (RDP) and Secure Shell (SSH) access to Virtual Machines using TLS within a web browser, thus preventing organizations from opening up 3389/TCP and 22/TCP to the Internet on Azure Virtual Machines. Additional benefits of the Bastion service includes Multi-Factor Authentication, Conditional Access Policies, and any other hardening measures configured within Azure Active Directory using a central point of access.
- Remediation Procedure
Remediate from Azure Portal 1. Click on
Bastions2. Select theSubscription3. Select theResource group4. Type aNamefor the new Bastion host 5. Select aRegion6. ChooseStandardnext toTier7. Use the slider to set theInstance count8. Select theVirtual networkorCreate new9. Select theSubnetnamedAzureBastionSubnet. Create aSubnetnamedAzureBastionSubnetusing a/26CIDR range if it doesn't already exist. 10. Select the appropriatePublic IP addressoption. 11. IfCreate newis selected for thePublic IP addressoption, provide aPublic IP address name. 12. IfUse existingis selected forPublic IP addressoption, select an IP address fromChoose public IP address13. ClickNext: Tags >14. Configure the appropriateTags15. ClickNext: Advanced >16. Select the appropriateAdvancedoptions 17. ClickNext: Review + create >18. ClickCreateRemediate from Azure CLIaz network bastion create --location <location> --name <name of bastion host> --public-ip-address <public IP address name or ID> --resource-group <resource group name or ID> --vnet-name <virtual network containing subnet called AzureBastionSubnet> --scale-units <integer> --sku Standard [--disable-copy-paste true|false] [--enable-ip-connect true|false] [--enable-tunneling true|false]Remediate from PowerShell Create the appropriateVirtual networksettings andPublic IP Addresssettings.$subnetName = AzureBastionSubnet $subnet = New-AzVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix <IP address range in CIDR notation making sure to use a /26> $virtualNet = New-AzVirtualNetwork -Name <virtual network name> -ResourceGroupName <resource group name> -Location <location> -AddressPrefix <IP address range in CIDR notation> -Subnet $subnet $publicip = New-AzPublicIpAddress -ResourceGroupName <resource group name> -Name <public IP address name> -Location <location> -AllocationMethod Dynamic -Sku StandardCreate theAzure Bastionservice using the information within the created variables from above.New-AzBastion -ResourceGroupName <resource group name> -Name <bastion name> -PublicIpAddress $publicip -VirtualNetwork $virtualNet -Sku Standard -ScaleUnit <integer>
8.5Ensure Azure DDoS Network Protection is Enabled on Virtual Networks1
Attributes
- Profile
Level 2
- Section
8 Security Services
- Description
Ensure Azure DDoS Network Protection is Enabled on Virtual Networks
- Default Value
DDoS protection is disabled by default.
- Audit Procedure
Audit from Azure Portal 1. Go to
Virtual networks. 2. Click the name of a virtual network. 3. UnderSettings, clickDDoS protection. 4. EnsureDDoS Network Protectionis set toEnable. 5. Repeat steps 1-4 for each virtual network. Audit from Azure CLI Run the following command to list virtual networks:az network vnet listFor each virtual network, run the following command to get the DDoS protection setting:az network vnet show --resource-group <resource-group> --name <virtual-network> --query enableDdosProtectionEnsuretrueis returned. Audit from Azure Policy - Policy ID: a7aca53f-2ed4-4466-a25e-0b45ade68efd - Name: 'Azure DDoS Protection should be enabled'- Impact Statement
Azure DDoS Network Protection incurs a significant fixed monthly charge, with additional charges if more than 100 public IP resources are protected. Careful consideration and analysis should be applied before enabling DDoS protection. Refer to https://azure.microsoft.com/en-us/pricing/details/ddos-protection for detailed pricing information.
- Assessment Status
Automated
- Rationale Statement
Virtual networks and resources are protected against attacks, helping to ensure reliability and availability for critical workloads.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Virtual networks. 2. Click the name of a virtual network. 3. UnderSettings, clickDDoS protection. 4. Next toDDoS Network Protection, clickEnable. 5. Provide a DDoS protection plan resource ID, or select a DDoS protection plan from the drop-down menu. 6. ClickSave. 7. Repeat steps 1-6 for each virtual network requiring remediation. Remediate from Azure CLI For each virtual network requiring remediation, run the following command to enable DDoS protection:az network vnet update --resource-group <resource-group> --name <virtual-network> --ddos-protection true --ddos-protection-plan <ddos-protection-plan>
9 Storage Services2119
9.1.1Ensure Soft Delete for Azure File Shares is Enabled1
Attributes
- Profile
Level 1
- Section
9 Storage Services
- Sub Section
9.1 Azure Files
- Description
Ensure Soft Delete for Azure File Shares is Enabled
- Default Value
Soft delete is enabled by default at the storage account file share setting level.
- Audit Procedure
Audit from Azure Portal 1. Go to
Storage Accounts. 1. For each storage account with file shares, underData storage, click onFile shares. 1. UnderFile share settings, ensure the value forSoft deleteshows a number of days between 1 and 365, inclusive. Audit from Azure CLI Run the following command to list storage accounts:az storage account listRun the following command to determine if a storage account has file shares:az storage share list --account-name <storage-account>For each storage account with file shares, run the following command:az storage account file-service-properties show --resource-group <resource-group> --account-name <storage-account>Ensure that undershareDeleteRetentionPolicy,enabledis set totrue, anddaysis set to an appropriate value between 1 and 365, inclusive. Audit from PowerShell Run the following command to list storage accounts:Get-AzStorageAccount -ResourceGroupName <resource-group>With a storage account context set, run the following command to determine if a storage account has file shares:Get-AzStorageShareFor each storage account with file shares, run the following command:Get-AzStorageFileServiceProperty -ResourceGroupName <resource-group> -AccountName <storage-account>Ensure thatShareDeleteRetentionPolicy.Enabledis set toTrueandShareDeleteRetentionPolicy.Daysis set to an appropriate value between 1 and 365, inclusive.- Impact Statement
When a file share is soft-deleted, the used portion of the storage is charged for the indicated soft-deleted period. All other meters are not charged unless the share is restored.
- Assessment Status
Automated
- Rationale Statement
Important data could be accidentally deleted or removed by a malicious actor. With soft delete enabled, the data is retained for the defined retention period before permanent deletion, allowing for recovery of the data.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Storage Accounts. 1. For each storage account with file shares, underData storage, clickFile shares. 1. UnderFile share settings, click the value next toSoft delete. 1. UnderSoft delete for all file shares, click the toggle to set it toEnabled. 1. UnderRetention policies, set an appropriate number of days to retain soft deleted data between 1 and 365, inclusive. 1. ClickSave. Remediate from Azure CLI For each storage account requiring remediation, run the following command to enable soft delete for file shares and set an appropriate number of days for deleted data to be retained, between 1 and 365, inclusive:az storage account file-service-properties update --account-name <storage-account> --enable-delete-retention true --delete-retention-days <retention-days>Remediate from PowerShell For each storage account requiring remediation, run the following command to enable soft delete for file shares and set an appropriate number of days for deleted data to be retained, between 1 and 365, inclusive:Update-AzStorageFileServiceProperty -ResourceGroupName <resource-group> -AccountName <storage-account> -EnableShareDeleteRetentionPolicy $true -ShareRetentionDays <retention-days>
9.1.2Ensure 'SMB protocol version' is Set to 'SMB 3.1.1' or Higher for SMB file shares1
Attributes
- Profile
Level 1
- Section
9 Storage Services
- Sub Section
9.1 Azure Files
- Description
Ensure 'SMB protocol version' is Set to 'SMB 3.1.1' or Higher for SMB file shares
- Default Value
By default, all SMB versions are allowed.
- Audit Procedure
Audit from Azure Portal 1. Go to
Storage accounts. 1. Click the name of a storage account. 1. UnderData storage, clickFile shares. 1. UnderFile share settings, click the link next toSecurity. 1. UnderSMB protocol versions, ensure thatSMB3.1.1is the only checked protocol version. 1. Repeat steps 1-5 for each storage account. Audit from Azure CLI Run the following command to list storage accounts:az storage account listFor each storage account, run the following command:az storage account file-service-properties show --resource-group <resource-group> --account-name <storage-account>Ensure that underprotocolSettings>smb,versionsis set toSMB3.1.1;only. Audit from PowerShell Run the following command to list storage accounts:Get-AzStorageAccountRun the following command to get the file service properties for a storage account in a resource group with a given name:$storageaccountfileservice = Get-AzStorageFileServiceProperty -ResourceGroupName <resource-group> -AccountName <storage-account>Run the following command to get the SMB protocol version setting:$storageaccountfileservice.ProtocolSettings.Smb.VersionsEnsure that the command returnsSMB3.1.1only. Repeat for each storage account.- Impact Statement
Using the latest SMB protocol version may impact client compatibility.
- Assessment Status
Automated
- Rationale Statement
Using the latest supported SMB protocol version enhances the security of SMB file shares by preventing the exploitation of known vulnerabilities in outdated SMB versions.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Storage accounts. 1. Click the name of a storage account. 1. UnderData storage, clickFile shares. 1. UnderFile share settings, click the link next toSecurity. 1. IfProfileis set toMaximum compatibility, click the drop-down menu and selectMaximum securityorCustom. 1. If selectingCustom, underSMB protocol versions, uncheck the boxes next toSMB 2.1andSMB 3.0. 1. ClickSave. 1. Repeat steps 1-7 for each storage account requiring remediation. Remediate from Azure CLI For each storage account requiring remediation, run the following command to set the SMB protocol version:az storage account file-service-properties update --resource-group <resource-group> --account-name <storage-account> --versions SMB3.1.1Remediate from PowerShell For each storage account requiring remediation, run the following command to set the SMB protocol version:Update-AzStorageFileServiceProperty -ResourceGroupName <resource-group> -StorageAccountName <storage-account> -SmbProtocolVersion SMB3.1.1
9.1.3Ensure 'SMB channel encryption' is Set to 'AES-256-GCM' or Higher for SMB file shares1
Attributes
- Profile
Level 1
- Section
9 Storage Services
- Sub Section
9.1 Azure Files
- Description
Ensure 'SMB channel encryption' is Set to 'AES-256-GCM' or Higher for SMB file shares
- Default Value
By default, the following SMB channel encryption algorithms are allowed: - AES-128-CCM - AES-128-GCM - AES-256-GCM
- Audit Procedure
Audit from Azure Portal 1. Go to
Storage accounts. 1. Click the name of a storage account. 1. UnderData storage, clickFile shares. 1. UnderFile share settings, click the link next toSecurity. 1. UnderSMB channel encryption, ensure thatAES-256-GCM, or higher, is the only checked SMB channel encryption setting. 1. Repeat steps 1-5 for each storage account. Audit from Azure CLI Run the following command to list storage accounts:az storage account listFor each storage account, run the following command:az storage account file-service-properties show --resource-group <resource-group> --account-name <storage-account>Ensure that underprotocolSettings>smb,channelEncryptionis set toAES-256-GCM;, or higher, only. Audit from PowerShell Run the following command to list storage accounts:Get-AzStorageAccountRun the following command to get the file service properties for a storage account in a resource group with a given name:$storageaccountfileservice = Get-AzStorageFileServiceProperty -ResourceGroupName <resource-group> -AccountName <storage-account>Run the following command to get the SMB channel encryption setting:$storageaccountfileservice.ProtocolSettings.Smb.ChannelEncryptionEnsure that the command returnsAES-256-GCM, or higher, only. Repeat for each storage account.- Impact Statement
Using the AES-256-GCM SMB channel encryption may impact client compatibility.
- Assessment Status
Automated
- Rationale Statement
AES-256-GCM encryption enhances the security of data transmitted over SMB channels by safeguarding it from unauthorized interception and tampering.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Storage accounts. 1. Click the name of a storage account. 1. UnderData storage, clickFile shares. 1. UnderFile share settings, click the link next toSecurity. 1. IfProfileis set toMaximum compatibility, click the drop-down menu and selectMaximum securityorCustom. 1. If selectingCustom, underSMB channel encryption, uncheck the boxes next toAES-128-CCMandAES-128-GCM. 1. ClickSave. 1. Repeat steps 1-7 for each storage account requiring remediation. Remediate from Azure CLI For each storage account requiring remediation, run the following command to set the SMB channel encryption:az storage account file-service-properties update --resource-group <resource-group> --account-name <storage-account> --channel-encryption AES-256-GCMRemediate from PowerShell For each storage account requiring remediation, run the following command to set the SMB channel encryption:Update-AzStorageFileServiceProperty -ResourceGroupName <resource-group> -StorageAccountName <storage-account> -SmbChannelEncryption AES-256-GCM
9.2.1Ensure That Soft Delete for Blobs on Azure Blob Storage Storage Accounts is Enabled1
Attributes
- Profile
Level 1
- Section
9 Storage Services
- Sub Section
9.2 Azure Blob Storage
- Description
Ensure That Soft Delete for Blobs on Azure Blob Storage Storage Accounts is Enabled
- Default Value
Soft delete for blob storage is enabled by default on storage accounts created via the Azure Portal, and disabled by default on storage accounts created via Azure CLI or PowerShell.
- Audit Procedure
Audit from Azure Portal 1. Go to
Storage Accounts. 1. For each Storage Account with blob storage, underData management, go toData protection. 1. Ensure thatEnable soft delete for blobsis checked. 1. Ensure that the retention period is a sufficient length for your organization. Audit from Azure CLI Run the following command to list storage accounts:az storage account listRun the following command to determine if a storage account has containers:az storage container list --account-name <storage-account>For each storage account with containers, ensure that the output of the below command containsenabled: trueanddaysis notnull:az storage blob service-properties delete-policy show --account-name <storage-account>- Impact Statement
All soft-deleted data is billed at the same rate as active data. Additional costs may be incurred for deleted blobs until the soft delete period ends and the data is permanently removed.
- Assessment Status
Automated
- Rationale Statement
Blobs can be deleted incorrectly. An attacker or malicious user may do this deliberately in order to cause disruption. Deleting an Azure storage blob results in immediate data loss. Enabling this configuration for Azure storage accounts ensures that even if blobs are deleted from the storage account, the blobs are recoverable for a specific period of time, which is defined in the Retention policies, ranging from 7 to 365 days.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Storage Accounts. 1. For each Storage Account with blob storage, underData management, go toData protection. 1. Check the box next toEnable soft delete for blobs. 1. Set the retention period to a sufficient length for your organization. 1. ClickSave. Remediate from Azure CLI For each storage account requiring remediation, run the following command to enable soft delete for blobs:az storage blob service-properties delete-policy update --days-retained <retention-days> --account-name <storage-account> --enable true
9.2.2Ensure that Soft Delete for Containers on Azure Blob Storage Storage Accounts is Enabled1
Attributes
- Profile
Level 1
- Section
9 Storage Services
- Sub Section
9.2 Azure Blob Storage
- Description
Ensure that Soft Delete for Containers on Azure Blob Storage Storage Accounts is Enabled
- Default Value
Soft delete for blob storage is enabled by default on storage accounts created via the Azure Portal, and disabled by default on storage accounts created via Azure CLI or PowerShell.
- Audit Procedure
Audit from Azure Portal 1. Go to
Storage Accounts. 1. For each Storage Account with blob storage, underData management, go toData protection. 1. Ensure thatEnable soft delete for blobsis checked. 1. Ensure that the retention period is a sufficient length for your organization. Audit from Azure CLI Run the following command to list storage accounts:az storage account listRun the following command to determine if a storage account has containers:az storage container list --account-name <storage-account>For each storage account with containers, ensure that the output of the below command containsenabled: trueanddaysis notnull:az storage blob service-properties delete-policy show --account-name <storage-account>- Impact Statement
All soft-deleted data is billed at the same rate as active data. Additional costs may be incurred for deleted blobs until the soft delete period ends and the data is permanently removed.
- Assessment Status
Automated
- Rationale Statement
Blobs can be deleted incorrectly. An attacker or malicious user may do this deliberately in order to cause disruption. Deleting an Azure storage blob results in immediate data loss. Enabling this configuration for Azure storage accounts ensures that even if blobs are deleted from the storage account, the blobs are recoverable for a specific period of time, which is defined in the Retention policies, ranging from 7 to 365 days.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Storage Accounts. 1. For each Storage Account with blob storage, underData management, go toData protection. 1. Check the box next toEnable soft delete for blobs. 1. Set the retention period to a sufficient length for your organization. 1. ClickSave. Remediate from Azure CLI For each storage account requiring remediation, run the following command to enable soft delete for blobs:az storage blob service-properties delete-policy update --days-retained <retention-days> --account-name <storage-account> --enable true
9.2.3Ensure 'Versioning' is Set to 'Enabled' on Azure Blob Storage Storage Accounts1
Attributes
- Profile
Level 2
- Section
9 Storage Services
- Sub Section
9.2 Azure Blob Storage
- Description
Ensure 'Versioning' is Set to 'Enabled' on Azure Blob Storage Storage Accounts
- Default Value
Blob versioning is disabled by default on storage accounts.
- Audit Procedure
Audit from Azure Portal 1. Go to
Storage accounts. 1. Click the name of a storage account with blob storage. 1. In theOverviewpage, on thePropertiestab, underBlob service, ensureVersioningis set toEnabled. 1. Repeat steps 1-3 for each storage account with blob storage. Audit from Azure CLI Run the following command to list storage accounts:az storage account listRun the following command to determine if a storage account has containers:az storage container list --account-name <storage-account>For each storage account with containers, ensure that the output of the below command containsisVersioningEnabled: true:az storage account blob-service-properties show --account-name <storage-account>Audit from PowerShell Run the following command to list storage accounts:Get-AzStorageAccountRun the following command to create an Azure Storage context for a storage account:$context = New-AzStorageContext -StorageAccountName <storage-account>Run the following command to list containers for the storage account:Get-AzStorageContainer -Context $contextIf the storage account has containers, run the following command to get the blob service properties of the storage account:$account = Get-AzStorageBlobServiceProperty -ResourceGroupName <resource-group> -AccountName <storage-account>Run the following command to get the blob versioning setting for the storage account:$account.IsVersioningEnabledEnsure that the command returnsTrue. Repeat for each storage account. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: c36a325b-ae04-4863-ad4f-19c6678f8e08 - Name: 'Configure your Storage account to enable blob versioning'- Impact Statement
Enabling blob versioning for a storage account creates a new version with each write operation to a blob, which can increase storage costs. To control these costs, a lifecycle management policy can be applied to automatically delete older versions.
- Assessment Status
Automated
- Rationale Statement
Blob versioning safeguards data integrity and enables recovery by retaining previous versions of stored objects, facilitating quick restoration from accidental deletion, modification, or malicious activity.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Storage accounts. 1. Click the name of a storage account with blob storage. 1. In theOverviewpage, on thePropertiestab, underBlob service, clickDisablednext toVersioning. 1. UnderTracking, check the box next toEnable versioning for blobs. 1. Select the radio button next toKeep all versionsorDelete versions after (in days). 1. If selecting to delete versions, enter a number of in the box after which to delete blob versions. 1. ClickSave. 1. Repeat steps 1-7 for each storage account with blob storage. Remediate from Azure CLI For each storage account requiring remediation, run the following command to enable blob versioning:az storage account blob-service-properties update --account-name <storage-account> --enable-versioning trueRemediate from PowerShell For each storage account requiring remediation, run the following command to enable blob versioning:Update-AzStorageBlobServiceProperty -ResourceGroupName <resource-group> -StorageAccountName <storage-account> -IsVersioningEnabled $true
9.3.1.1Ensure That 'Enable key rotation reminders' is Enabled for Each Storage Account1
Attributes
- Profile
Level 1
- Section
9 Storage Services
- Sub Section
9.3 Storage Accounts
- Description
Ensure That 'Enable key rotation reminders' is Enabled for Each Storage Account
- Default Value
By default, Key rotation reminders are not configured.
- Audit Procedure
Audit from Azure Portal 1. Go to
Storage Accounts2. For each Storage Account, underSecurity + networking, go toAccess keys3. If the buttonEdit rotation reminderis displayed, the Storage Account is compliant. ClickEdit rotation reminderand review theRemind me everyfield for a desirable periodic setting that fits your security program's needs. If the buttonSet rotation reminderis displayed, the Storage Account is not compliant. Audit from Powershell$rgName = <resource group name for the storage> $accountName = <storage account name> $account = Get-AzStorageAccount -ResourceGroupName $rgName -Name $accountName Write-Output $accountName -> Write-Output Expiration Reminder set to: $($account.KeyPolicy.KeyExpirationPeriodInDays) Days Write-Output Key1 Last Rotated: $($account.KeyCreationTime.Key1.ToShortDateString()) Write-Output Key2 Last Rotated: $($account.KeyCreationTime.Key2.ToShortDateString())Key rotation is recommended if the creation date for any key is empty. If the reminder is set, the period in days will be returned. The recommended period is 90 days. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 044985bb-afe1-42cd-8a36-9d5d42424537 - Name: 'Storage account keys should not be expired'- Impact Statement
This recommendation only creates a periodic reminder to regenerate access keys. Regenerating access keys can affect services in Azure as well as the organization's applications that are dependent on the storage account. All clients that use the access key to access the storage account must be updated to use the new key.
- Assessment Status
Automated
- Rationale Statement
Reminders such as those generated by this recommendation will help maintain a regular and healthy cadence for activities which improve the overall efficacy of a security program. Cryptographic key rotation periods will vary depending on your organization's security requirements and the type of data which is being stored in the Storage Account. For example, PCI DSS mandates that cryptographic keys be replaced or rotated 'regularly,' and advises that keys for static data stores be rotated every 'few months.' For the purposes of this recommendation, 90 days will be prescribed for the reminder. Review and adjustment of the 90 day period is recommended, and may even be necessary. Your organization's security requirements should dictate the appropriate setting.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Storage Accounts1. For each Storage Account that is not compliant, underSecurity + networking, go toAccess keys1. ClickSet rotation reminder1. CheckEnable key rotation reminders1. In theSend remindersfield selectCustom, then set theRemind me everyfield to90and the period drop down toDays1. ClickSaveRemediate from Powershell$rgName = <resource group name for the storage> $accountName = <storage account name> $account = Get-AzStorageAccount -ResourceGroupName $rgName -Name $accountName if ($account.KeyCreationTime.Key1 -eq $null -or $account.KeyCreationTime.Key2 -eq $null){ Write-output (You must regenerate both keys at least once before setting expiration policy) } else { $account = Set-AzStorageAccount -ResourceGroupName $rgName -Name $accountName -KeyExpirationPeriodInDay 90 } $account.KeyPolicy.KeyExpirationPeriodInDays
9.3.1.2Ensure That Storage Account Access keys are Periodically Regenerated1
Attributes
- Profile
Level 1
- Section
9 Storage Services
- Sub Section
9.3 Storage Accounts
- Description
Ensure That Storage Account Access keys are Periodically Regenerated
- Default Value
By default, access keys are not regenerated periodically.
- Audit Procedure
Audit from Azure Portal 1. Go to
Storage Accounts. 2. For each Storage Account, underSecurity + networking, go toAccess keys. 3. Review the date and days in theLast rotatedfield for each key. If theLast rotatedfield indicates a number or days greater than 90 [or greater than your organization's period of validity], the key should be rotated. Audit from Azure CLI 1. Get a list of storage accountsaz storage account list --subscription <subscription-id>Make a note ofid,nameandresourceGroup. 2. For every storage account make sure that key is regenerated in the past 90 days.az monitor activity-log list --namespace Microsoft.Storage --offset 90d --query [?contains(authorization.action, 'regenerateKey')] --resource-id <resource id>The output should containauthorization/scope: <your_storage_account> AND authorization/action: Microsoft.Storage/storageAccounts/regeneratekey/action AND status/localizedValue: Succeeded status/Value: SucceededAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 044985bb-afe1-42cd-8a36-9d5d42424537 - Name: 'Storage account keys should not be expired'- Impact Statement
Regenerating access keys can affect services in Azure as well as the organization's applications that are dependent on the storage account. All clients who use the access key to access the storage account must be updated to use the new key.
- Assessment Status
Automated
- Rationale Statement
When a storage account is created, Azure generates two 512-bit storage access keys which are used for authentication when the storage account is accessed. Rotating these keys periodically ensures that any inadvertent access or exposure does not result from the compromise of these keys. Cryptographic key rotation periods will vary depending on your organization's security requirements and the type of data which is being stored in the Storage Account. For example, PCI DSS mandates that cryptographic keys be replaced or rotated 'regularly,' and advises that keys for static data stores be rotated every 'few months.' For the purposes of this recommendation, 90 days will be prescribed for the reminder. Review and adjustment of the 90 day period is recommended, and may even be necessary. Your organization's security requirements should dictate the appropriate setting.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Storage Accounts. 2. For each Storage Account with outdated keys, underSecurity + networking, go toAccess keys. 3. ClickRotate keynext to the outdated key, then clickYesto the prompt confirming that you want to regenerate the access key. After Azure regenerates the Access Key, you can confirm thatAccess keysreflects aLast rotateddate of(0 days ago).
9.3.1.3Ensure 'Allow storage account key access' for Azure Storage Accounts is 'Disabled'1
Attributes
- Profile
Level 1
- Section
9 Storage Services
- Sub Section
9.3 Storage Accounts
- Description
Ensure 'Allow storage account key access' for Azure Storage Accounts is 'Disabled'
- Default Value
The AllowSharedKeyAccess property of a storage account is not set by default and does not return a value until you explicitly set it. The storage account permits requests that are authorized with the Shared Key when the property value is null or when it is true.
- Audit Procedure
Audit from Azure Portal 1. Go to
Storage accounts. 1. Click on a storage account. 1. UnderSettings, clickConfiguration. 1. UnderAllow storage account key access, ensure that the radio button next toDisabledis selected. 1. Repeat steps 1-4 for each storage account. Audit from Azure CLI Run the following command to list storage accounts:az storage account listFor each storage account, run the following command:az storage account show --resource-group <resource-group> --name <storage-account>Ensure thatallowSharedKeyAccessis set tofalse. Audit from PowerShell Run the following command to list storage accounts:Get-AzStorageAccountRun the following command to get the storage account in a resource group with a given name:$storageAccount = Get-AzStorageAccount -ResourceGroupName <resource-group> -Name <storage-account>Run the following command to get the shared key access setting for the storage account:$storageAccount.allowSharedKeyAccessEnsure that the command returnsFalse. Repeat for each storage account. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 8c6a50c6-9ffd-4ae7-986f-5fa6111f9a54 - Name: 'Storage accounts should prevent shared key access'- Impact Statement
When you disallow Shared Key authorization for a storage account, any requests to the account that are authorized with Shared Key, including shared access signatures (SAS), will be denied. Client applications that currently access the storage account using the Shared Key will no longer function.
- Assessment Status
Automated
- Rationale Statement
Microsoft Entra ID provides superior security and ease of use compared to Shared Key and is recommended by Microsoft. To require clients to use Microsoft Entra ID for authorizing requests, you can disallow requests to the storage account that are authorized with Shared Key.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Storage accounts. 1. Click on a storage account. 1. UnderSettings, clickConfiguration. 1. UnderAllow storage account key access, click the radio button next toDisabled. 1. ClickSave. 1. Repeat steps 1-5 for each storage account requiring remediation. Remediate from Azure CLI For each storage account requiring remediation, run the following command to disallow shared key authorization:az storage account update --resource-group <resource-group> --name <storage-account> --allow-shared-key-access falseRemediate from PowerShell For each storage account requiring remediation, run the following command to disallow shared key authorization:Set-AzStorageAccount -ResourceGroupName <resource-group> -Name <storage-account> -AllowSharedKeyAccess $false
9.3.2.1Ensure Private Endpoints are Used to Access Storage Accounts1
Attributes
- Profile
Level 2
- Section
9 Storage Services
- Sub Section
9.3 Storage Accounts
- Description
Ensure Private Endpoints are Used to Access Storage Accounts
- Default Value
By default, Private Endpoints are not created for Storage Accounts.
- Audit Procedure
Audit from Azure Portal 1. Open the
Storage Accountsblade. 1. For each listed Storage Account, perform the following check: 1. Under theSecurity + networkingheading, click onNetworking. 1. Click on thePrivate endpoint connectionstab at the top of the networking window. 1. Ensure that for each VNet that the Storage Account must be accessed from, a unique Private Endpoint is deployed and theConnection statefor each Private Endpoint isApproved. Repeat the procedure for each Storage Account. Audit from PowerShell$storageAccount = Get-AzStorageAccount -ResourceGroup '<ResourceGroupName>' -Name '<storageaccountname>' Get-AzPrivateEndpoint -ResourceGroup '<ResourceGroupName>'|Where-Object {$_.PrivateLinkServiceConnectionsText -match $storageAccount.id}If the results of the second command returns information, the Storage Account is using a Private Endpoint and complies with this Benchmark, otherwise if the results of the second command are empty, the Storage Account generates a finding. Audit from Azure CLIaz storage account show --name '<storage account name>' --query privateEndpointConnections[0].idIf the above command returns data, the Storage Account complies with this Benchmark, otherwise if the results are empty, the Storage Account generates a finding. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 6edd7eda-6dd8-40f7-810d-67160c639cd9 - Name: 'Storage accounts should use private link'- Impact Statement
If an Azure Virtual Network is not implemented correctly, this may result in the loss of critical network traffic. Private endpoints are charged per hour of use. Refer to https://azure.microsoft.com/en-us/pricing/details/private-link/ and https://azure.microsoft.com/en-us/pricing/calculator/ to estimate potential costs.
- Assessment Status
Automated
- Rationale Statement
Securing traffic between services through encryption protects the data from easy interception and reading.
- Remediation Procedure
Remediate from Azure Portal 1. Open the
Storage Accountsblade 1. For each listed Storage Account, perform the following: 1. Under theSecurity + networkingheading, click onNetworking1. Click on thePrivate endpoint connectionstab at the top of the networking window 1. Click the+ Private endpointbutton 1. In the1 - Basicstab/step: -Enter a namethat will be easily recognizable as associated with the Storage Account (Note: The Network Interface Name will be automatically completed, but you can customize it if needed.) - Ensure that theRegionmatches the region of the Storage Account - ClickNext1. In the2 - Resourcetab/step: - Select thetarget sub-resourcebased on what type of storage resource is being made available - ClickNext1. In the3 - Virtual Networktab/step: - Select theVirtual networkthat your Storage Account will be connecting to - Select theSubnetthat your Storage Account will be connecting to - (Optional) Select other network settings as appropriate for your environment - ClickNext1. In the4 - DNStab/step: - (Optional) Select other DNS settings as appropriate for your environment - ClickNext1. In the5 - Tagstab/step: - (Optional) Set any tags that are relevant to your organization - ClickNext1. In the6 - Review + createtab/step: - A validation attempt will be made and after a few moments it should indicateValidation Passed- if it does not pass, double-check your settings before beginning more in depth troubleshooting. - If validation has passed, clickCreatethen wait for a few minutes for the scripted deployment to complete. Repeat the above procedure for each Private Endpoint required within every Storage Account. Remediate from PowerShell$storageAccount = Get-AzStorageAccount -ResourceGroupName '<ResourceGroupName>' -Name '<storageaccountname>' $privateEndpointConnection = @{ Name = 'connectionName' PrivateLinkServiceId = $storageAccount.Id GroupID = blob|blob_secondary|file|file_secondary|table|table_secondary|queue|queue_secondary|web|web_secondary|dfs|dfs_secondary } $privateLinkServiceConnection = New-AzPrivateLinkServiceConnection @privateEndpointConnection $virtualNetDetails = Get-AzVirtualNetwork -ResourceGroupName '<ResourceGroupName>' -Name '<name>' $privateEndpoint = @{ ResourceGroupName = '<ResourceGroupName>' Name = '<PrivateEndpointName>' Location = '<location>' Subnet = $virtualNetDetails.Subnets[0] PrivateLinkServiceConnection = $privateLinkServiceConnection } New-AzPrivateEndpoint @privateEndpointRemediate from Azure CLIaz network private-endpoint create --resource-group <ResourceGroupName --location <location> --name <private endpoint name> --vnet-name <VNET Name> --subnet <subnet name> --private-connection-resource-id <storage account ID> --connection-name <private link service connection name> --group-id <blob|blob_secondary|file|file_secondary|table|table_secondary|queue|queue_secondary|web|web_secondary|dfs|dfs_secondary>- Additional Information
A NAT gateway is the recommended solution for outbound internet access. This recommendation is based on the Common Reference Recommendation
Ensure Private Endpoints are used to access {service}, from theCommon Reference Recommendations > Networking > Private Endpointssection.
9.3.2.2Ensure that 'Public Network Access' is 'Disabled' for Storage Accounts1
Attributes
- Profile
Level 1
- Section
9 Storage Services
- Sub Section
9.3 Storage Accounts
- Description
Ensure that 'Public Network Access' is 'Disabled' for Storage Accounts
- Default Value
By default,
Public Network Accessis set toEnabled from all networksfor the Storage Account.- Audit Procedure
Audit from Azure Portal 1. Go to
Storage Accounts. 2. For each storage account, under theSecurity + networkingsection, clickNetworking. 3. Ensure thePublic network accesssetting is set toDisabled. Audit from Azure CLI EnsurepublicNetworkAccessisDisabledaz storage account show --name <storage-account> --resource-group <resource-group> --query {publicNetworkAccess:publicNetworkAccess}Audit from PowerShell For each Storage Account, ensurePublicNetworkAccessisDisabledGet-AzStorageAccount -Name <storage account name> -ResourceGroupName <resource group name> |select PublicNetworkAccessAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: b2982f36-99f2-4db5-8eff-283140c09693 - Name: 'Storage accounts should disable public network access'- Impact Statement
Access will have to be managed using shared access signatures or via Azure AD RBAC. For classic storage accounts (to be retired on August 31, 2024), each container in the account must be configured to block anonymous access. Either configure all containers or to configure at the storage account level, migrate to the Azure Resource Manager deployment model.
- Assessment Status
Automated
- Rationale Statement
The default network configuration for a storage account permits a user with appropriate permissions to configure public network access to containers and blobs in a storage account. Keep in mind that public access to a container is always turned off by default and must be explicitly configured to permit anonymous requests. It grants read-only access to these resources without sharing the account key, and without requiring a shared access signature. It is recommended not to provide public network access to storage accounts until, and unless, it is strongly desired. A shared access signature token or Azure AD RBAC should be used for providing controlled and timed access to blob containers.
- Remediation Procedure
Remediate from Azure Portal First, follow Microsoft documentation and create shared access signature tokens for your blob containers. Then, 1. Go to
Storage Accounts. 1. For each storage account, under theSecurity + networkingsection, clickNetworking. 1. SetPublic network accesstoDisabled. 1. ClickSave. Remediate from Azure CLI Set 'Public Network Access' toDisabledon the storage accountaz storage account update --name <storage-account> --resource-group <resource-group> --public-network-access DisabledRemediate from PowerShell For each Storage Account, run the following to set thePublicNetworkAccesssetting toDisabledSet-AzStorageAccount -ResourceGroupName <resource group name> -Name <storage account name> -PublicNetworkAccess Disabled- Additional Information
This recommendation is based on the Common Reference Recommendation
Ensure public network access is Disabled, from theCommon Reference Recommendations > Networking > Virtual Networks (VNets)section.
9.3.2.3Ensure Default Network Access Rule for Storage Accounts is Set to Deny1
Attributes
- Profile
Level 1
- Section
9 Storage Services
- Sub Section
9.3 Storage Accounts
- Description
Ensure Default Network Access Rule for Storage Accounts is Set to Deny
- Default Value
By default, Storage Accounts will accept connections from clients on any network.
- Audit Procedure
Audit from Azure Portal 1. Go to Storage Accounts. 2. For each storage account, under
Security + networking, clickNetworking. 4. Click theFirewalls and virtual networksheading. 3. Ensure thatPublic network accessis not set toEnabled from all networks. Audit from Azure CLI EnsuredefaultActionis not set toAllow.az storage account list --query '[*].networkRuleSet'Audit from PowerShellConnect-AzAccount Set-AzContext -Subscription <subscription ID> Get-AzStorageAccountNetworkRuleset -ResourceGroupName <resource group> -Name <storage account name> |Select-Object DefaultActionPowerShell Result - Non-CompliantDefaultAction : AllowPowerShell Result - CompliantDefaultAction : DenyAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 34c877ad-507e-4c82-993e-3452a6e0ad3c - Name: 'Storage accounts should restrict network access' - Policy ID: 2a1a9cdf-e04d-429a-8416-3bfb72a1b26f - Name: 'Storage accounts should restrict network access using virtual network rules'- Impact Statement
All allowed networks will need to be whitelisted on each specific network, creating administrative overhead. This may result in loss of network connectivity, so do not turn on for critical resources during business hours.
- Assessment Status
Automated
- Rationale Statement
Storage accounts should be configured to deny access to traffic from all networks (including internet traffic). Access can be granted to traffic from specific Azure Virtual networks, allowing a secure network boundary for specific applications to be built. Access can also be granted to public internet IP address ranges to enable connections from specific internet or on-premises clients. When network rules are configured, only applications from allowed networks can access a storage account. When calling from an allowed network, applications continue to require proper authorization (a valid access key or SAS token) to access the storage account.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Storage Accounts. 1. For each storage account, underSecurity + networking, clickNetworking. 1. Click theFirewalls and virtual networksheading. 1. SetPublic network accesstoEnabled from selected virtual networks and IP addresses. 1. Add rules to allow traffic from specific networks and IP addresses. 1. ClickSave. Remediate from Azure CLI Use the below command to updatedefault-actiontoDeny.az storage account update --name <StorageAccountName> --resource-group <resourceGroupName> --default-action Deny- Additional Information
This recommendation is based on the Common Reference Recommendation
Ensure Network Access Rules are set to Deny-by-default, from theCommon Reference Recommendations > Networking > Virtual Networks (VNets)section.
9.3.3.1Ensure that 'Default to Microsoft Entra authorization in the Azure portal' is Set to 'Enabled'1
Attributes
- Profile
Level 1
- Section
9 Storage Services
- Sub Section
9.3 Storage Accounts
- Description
Ensure that 'Default to Microsoft Entra authorization in the Azure portal' is Set to 'Enabled'
- Default Value
By default,
defaultToOAuthAuthenticationis disabled.- Audit Procedure
Audit from Azure Portal 1. Go to
Storage accounts. 1. Click the name of a storage account. 1. UnderSettings, clickConfiguration. 1. Ensure thatDefault to Microsoft Entra authorization in the Azure portalis set toEnabled. 1. Repeat steps 1-4 for each storage account. Audit from Azure CLI Run the following command to get thenameanddefaultToOAuthAuthenticationsetting for each storage account:az storage account list --query [*].[name,defaultToOAuthAuthentication]Ensure thattrueis returned for each storage account.- Impact Statement
Users will need appropriate RBAC permissions to access storage data.
- Assessment Status
Automated
- Rationale Statement
Microsoft Entra ID provides superior security and ease of use over Shared Key.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Storage accounts. 1. Click the name of a storage account. 1. UnderSettings, clickConfiguration. 1. UnderDefault to Microsoft Entra authorization in the Azure portal, click the radio button next toEnabled. 1. ClickSave. 1. Repeat steps 1-5 for each storage account requiring remediation. Remediate from Azure CLI For each storage account requiring remediation, run the following command to enabledefaultToOAuthAuthentication:az storage account update --resource-group <resource-group> --name <storage-account> --set defaultToOAuthAuthentication=true
9.3.4Ensure that 'Secure transfer required' is Set to 'Enabled'1
Attributes
- Profile
Level 1
- Section
9 Storage Services
- Sub Section
9.3 Storage Accounts
- Description
Ensure that 'Secure transfer required' is Set to 'Enabled'
- Default Value
By default,
Secure transfer requiredis set toDisabled.- Audit Procedure
Audit from Azure Portal 1. Go to
Storage Accounts. 1. For each storage account, underSettings, clickConfiguration. 1. Ensure thatSecure transfer requiredis set toEnabled. Audit from Azure CLI Use the below command to ensure theSecure transfer requiredis enabled for all theStorage Accountsby ensuring the output containstruefor each of theStorage Accounts.az storage account list --query [*].[name,enableHttpsTrafficOnly]Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 404c3081-a854-4457-ae30-26a93ef643f9 - Name: 'Secure transfer to storage accounts should be enabled'- Impact Statement
Applications using HTTP will need to be updated to use HTTPS.
- Assessment Status
Automated
- Rationale Statement
The secure transfer option enhances the security of a storage account by only allowing requests to the storage account by a secure connection. For example, when calling REST APIs to access storage accounts, the connection must use HTTPS. Any requests using HTTP will be rejected when 'secure transfer required' is enabled. When using the Azure files service, connection without encryption will fail, including scenarios using SMB 2.1, SMB 3.0 without encryption, and some flavors of the Linux SMB client. Because Azure storage doesnt support HTTPS for custom domain names, this option is not applied when using a custom domain name.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Storage Accounts. 1. For each storage account, underSettings, clickConfiguration. 1. SetSecure transfer requiredtoEnabled. 1. ClickSave. Remediate from Azure CLI Use the below command to enableSecure transfer requiredfor aStorage Accountaz storage account update --name <storageAccountName> --resource-group <resourceGroupName> --https-only true
9.3.5Ensure 'Allow trusted Microsoft services to access this resource' is Enabled for Storage Account Access1
Attributes
- Profile
Level 2
- Section
9 Storage Services
- Sub Section
9.3 Storage Accounts
- Description
Ensure 'Allow trusted Microsoft services to access this resource' is Enabled for Storage Account Access
- Default Value
By default, Storage Accounts will accept connections from clients on any network.
- Audit Procedure
Audit from Azure Portal 1. Go to
Storage Accounts. 1. For each storage account, underSecurity + networking, clickNetworking. 1. Click on theFirewalls and virtual networksheading. 1. UnderExceptions, ensure thatAllow Azure services on the trusted services list to access this storage accountis checked. Audit from Azure CLI EnsurebypasscontainsAzureServicesaz storage account list --query '[*].networkRuleSet'Audit from PowerShellConnect-AzAccount Set-AzContext -Subscription <subscription ID> Get-AzStorageAccountNetworkRuleset -ResourceGroupName <resource group> -Name <storage account name> |Select-Object BypassIf the response from the above command isNone, the storage account configuration is out of compliance with this check. If the response isAzureServices, the storage account configuration is in compliance with this check. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: c9d007d0-c057-4772-b18c-01e546713bcd - Name: 'Storage accounts should allow access from trusted Microsoft services'- Impact Statement
This creates authentication credentials for services that need access to storage resources so that services will no longer need to communicate via network request. There may be a temporary loss of communication as you set each Storage Account. It is recommended to not do this on mission-critical resources during business hours.
- Assessment Status
Automated
- Rationale Statement
Turning on firewall rules for a storage account will block access to incoming requests for data, including from other Azure services. We can re-enable this functionality by allowing access to
trusted Azure servicesthrough networking exceptions.- Remediation Procedure
Remediate from Azure Portal 1. Go to
Storage Accounts. 1. For each storage account, underSecurity + networking, clickNetworking. 1. Click on theFirewalls and virtual networksheading. 1. UnderExceptions, check the box next toAllow Azure services on the trusted services list to access this storage account. 1. ClickSave. Remediate from Azure CLI Use the below command to updatebypasstoAzure services.az storage account update --name <StorageAccountName> --resource-group <resourceGroupName> --bypass AzureServices
9.3.6Ensure the 'Minimum TLS version' for Storage Accounts is Set to 'Version 1.2'1
Attributes
- Profile
Level 1
- Section
9 Storage Services
- Sub Section
9.3 Storage Accounts
- Description
Ensure the 'Minimum TLS version' for Storage Accounts is Set to 'Version 1.2'
- Default Value
If a storage account is created through the portal, the MinimumTlsVersion property for that storage account will be set to TLS 1.2. If a storage account is created through PowerShell or CLI, the MinimumTlsVersion property for that storage account will not be set, and defaults to TLS 1.0.
- Audit Procedure
Audit from Azure Portal 1. Go to
Storage Accounts. 1. For each storage account, underSettings, clickConfiguration. 1. Ensure that theMinimum TLS versionis set toVersion 1.2. Audit from Azure CLI Get a list of all storage accounts and their resource groupsaz storage account list | jq '.[] | {name, resourceGroup}'Then query the minimumTLSVersion fieldaz storage account show \ --name <storage-account> \ --resource-group <resource-group> \ --query minimumTlsVersion \ --output tsvAudit from PowerShell To get the minimum TLS version, run the following command:(Get-AzStorageAccount -Name <STORAGEACCOUNTNAME> -ResourceGroupName <RESOURCEGROUPNAME>).MinimumTlsVersionAudit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: fe83a0eb-a853-422d-aac2-1bffd182c5d0 - Name: 'Storage accounts should have the specified minimum TLS version'- Impact Statement
When set to TLS 1.2 all requests must leverage this version of the protocol. Applications leveraging legacy versions of the protocol will fail.
- Assessment Status
Automated
- Rationale Statement
TLS 1.0 has known vulnerabilities and has been replaced by later versions of the TLS protocol. Continued use of this legacy protocol affects the security of data in transit.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Storage Accounts. 1. For each storage account, underSettings, clickConfiguration. 1. Set theMinimum TLS versiontoVersion 1.2. 1. ClickSave. Remediate from Azure CLIaz storage account update \ --name <storage-account> \ --resource-group <resource-group> \ --min-tls-version TLS1_2Remediate from PowerShell To set the minimum TLS version, run the following command:Set-AzStorageAccount -AccountName <STORAGEACCOUNTNAME> ` -ResourceGroupName <RESOURCEGROUPNAME> ` -MinimumTlsVersion TLS1_2
9.3.7Ensure 'Cross Tenant Replication' is Not Enabled1
Attributes
- Profile
Level 1
- Section
9 Storage Services
- Sub Section
9.3 Storage Accounts
- Description
Ensure 'Cross Tenant Replication' is Not Enabled
- Default Value
For new storage accounts created after Dec 15, 2023 cross tenant replication is not enabled.
- Audit Procedure
Audit from Azure Portal 1. Go to
Storage Accounts. 1. For each storage account, underData management, clickObject replication. 1. ClickAdvanced settings. 1. EnsureAllow cross-tenant replicationis not checked. Audit from Azure CLIaz storage account list --query [*].[name,allowCrossTenantReplication]The value offalseshould be returned for each storage account listed. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 92a89a79-6c52-4a7e-a03f-61306fc49312 - Name: 'Storage accounts should prevent cross tenant object replication'- Impact Statement
Disabling Cross Tenant Replication may affect data availability and sharing across different Azure tenants. Ensure that this change aligns with your organizational data sharing and availability requirements.
- Assessment Status
Automated
- Rationale Statement
Disabling Cross Tenant Replication minimizes the risk of unauthorized data access and ensures that data governance policies are strictly adhered to. This control is especially critical for organizations with stringent data security and privacy requirements, as it prevents the accidental sharing of sensitive information.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Storage Accounts. 1. For each storage account, underData management, clickObject replication. 1. ClickAdvanced settings. 1. UncheckAllow cross-tenant replication. 1. ClickOK. Remediate from Azure CLI Replace the information within <> with appropriate values:az storage account update --name <storageAccountName> --resource-group <resourceGroupName> --allow-cross-tenant-replication false
9.3.8Ensure that 'Allow Blob Anonymous Access' is Set to 'Disabled'1
Attributes
- Profile
Level 1
- Section
9 Storage Services
- Sub Section
9.3 Storage Accounts
- Description
Ensure that 'Allow Blob Anonymous Access' is Set to 'Disabled'
- Default Value
Disabled
- Audit Procedure
Audit from Azure Portal 1. Go to
Storage Accounts. 1. For each storage account, underSettings, clickConfiguration. 1. EnsureAllow Blob Anonymous Accessis set toDisabled. Audit from Azure CLI For every storage account in scope:az storage account show --name <yourStorageAccountName> --query allowBlobPublicAccessEnsure that every storage account in scope returnsfalsefor the allowBlobPublicAccess setting. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: 4fa4b6c0-31ca-4c0d-b10d-24b96f62a751 - Name: 'Storage account public access should be disallowed'- Impact Statement
Additional consideration may be required for exceptional circumstances where elements of a storage account require public accessibility. In these circumstances, it is highly recommended that all data stored in the public facing storage account be reviewed for sensitive or potentially compromising data, and that sensitive or compromising data is never stored in these storage accounts.
- Assessment Status
Automated
- Rationale Statement
If Allow Blob Anonymous Access is enabled, blobs can be accessed by adding the blob name to the URL to see the contents. An attacker can enumerate a blob using methods, such as brute force, and access them. Exfiltration of data by brute force enumeration of items from a storage account may occur if this setting is set to 'Enabled'.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Storage Accounts. 1. For each storage account, underSettings, clickConfiguration. 1. SetAllow Blob Anonymous AccesstoDisabled. 1. ClickSave. Remediate from Powershell For every storage account in scope, run the following:$storageAccount = Get-AzStorageAccount -ResourceGroupName <yourResourceGroup> -Name <yourStorageAccountName> $storageAccount.AllowBlobPublicAccess = $false Set-AzStorageAccount -InputObject $storageAccount- Additional Information
Azure Storage accounts that use the classic deployment model will be retired on August 31, 2024.
9.3.9Ensure Azure Resource Manager Delete Locks are Applied to Azure Storage Accounts0
Attributes
- Profile
Level 1
- Section
9 Storage Services
- Sub Section
9.3 Storage Accounts
- Description
Ensure Azure Resource Manager Delete Locks are Applied to Azure Storage Accounts
- Default Value
By default, no locks are applied to Azure resources, including storage accounts. Locks must be manually configured after resource creation.
- Audit Procedure
Audit from Azure Portal 1. Navigate to the storage account in the Azure portal. 1. For each storage account, under
Settings, clickLocks. 1. Ensure that aDeletelock exists on the storage account. Audit from Azure CLIaz lock list --resource-group <resource-group> \ --resource-name <storage-account> \ --resource-type Microsoft.Storage/storageAccountsAudit from PowerShellGet-AzResourceLock -ResourceGroupName <RESOURCEGROUPNAME> ` -ResourceName <STORAGEACCOUNTNAME> ` -ResourceType Microsoft.Storage/storageAccountsAudit from Azure Policy There is currently no built-in Microsoft policy to audit resource locks on storage accounts. Custom and community policy definitions can check for the existence of a “Microsoft.Authorization/locks” resource with an AuditIfNotExists effect.- Impact Statement
- Prevents the deletion of the Storage account Resource entirely. - Prevents the deletion of the parent Resource Group containing the locked Storage account resource. - Does not prevent other control plane operations, including modification of configurations, network settings, containers, and access. - Does not prevent deletion of containers or other objects within the storage account.
- Assessment Status
Manual
- Rationale Statement
Applying a Delete lock on storage accounts protects the availability of data by preventing the accidental or unauthorized deletion of the entire storage account. It is a fundamental protective control that can prevent data loss
- Remediation Procedure
Remediate from Azure Portal 1. Navigate to the storage account in the Azure portal. 1. Under the
Settingssection, selectLocks. 1. SelectAdd. 1. Provide a Name, and chooseDeletefor the type of lock. 1. Add a note about the lock if desired. Remediate from Azure CLI Replace the information within <> with appropriate values:az lock create --name <lock> \ --resource-group <resource-group> \ --resource <storage-account> \ --lock-type CanNotDelete \ --resource-type Microsoft.Storage/storageAccountsRemediate from PowerShell Replace the information within <> with appropriate values:New-AzResourceLock -LockLevel CanNotDelete ` -LockName <lock> ` -ResourceName <storage-account> ` -ResourceType Microsoft.Storage/storageAccounts ` -ResourceGroupName <resource-group>
9.3.10Ensure Azure Resource Manager ReadOnly Locks are Considered for Azure Storage Accounts0
Attributes
- Profile
Level 2
- Section
9 Storage Services
- Sub Section
9.3 Storage Accounts
- Description
Ensure Azure Resource Manager ReadOnly Locks are Considered for Azure Storage Accounts
- Default Value
By default, no locks are applied to Azure resources, including storage accounts. Locks must be manually configured after resource creation.
- Audit Procedure
Audit from Azure Portal 1. Navigate to the storage account in the Azure portal. 1. For each storage account, under
Settings, clickLocks. 1. Ensure that aReadOnlylock exists on the storage account. Audit from Azure CLIaz lock list --resource-group <resource-group> \ --resource-name <storage-account> \ --resource-type Microsoft.Storage/storageAccountsAudit from PowerShellGet-AzResourceLock -ResourceGroupName <RESOURCEGROUPNAME> ` -ResourceName <STORAGEACCOUNTNAME> ` -ResourceType Microsoft.Storage/storageAccountsAudit from Azure Policy There is currently no built-in Microsoft policy to audit resource locks on storage accounts. Custom and community policy definitions can check for the existence of a “Microsoft.Authorization/locks” resource with an AuditIfNotExists effect.- Impact Statement
- Prevents the deletion of the Storage account Resource entirely. - Prevents the deletion of the parent Resource Group containing the locked Storage account resource. - Prevents clients from obtaining the storage account shared access keys using a
listKeysoperation. - Requires Entra credentials to access blob and queue data in the Portal. - Data in Azure Files or the Table service may be inaccessible to clients using the account shared access keys. - Prevents modification of account properties, network settings, containers, and RBAC assignments. - Does not prevent access using existing account shared access keys issued to clients. - Does not prevent deletion of containers or other objects within the storage account.
- Prevents the deletion of the Storage account Resource entirely. - Prevents the deletion of the parent Resource Group containing the locked Storage account resource. - Prevents clients from obtaining the storage account shared access keys using a
- Assessment Status
Manual
- Rationale Statement
Applying a
ReadOnlylock on storage accounts protects the confidentiality and availability of data by preventing the accidental or unauthorized deletion of the entire storage account and modification of the account, container properties, or access permissions. It can offer enhanced protection for blob and queue workloads with tradeoffs in usability and compatibility for clients using account shared access keys.- Remediation Procedure
Remediate from Azure Portal 1. Navigate to the storage account in the Azure portal. 1. Under the
Settingssection, selectLocks. 1. SelectAdd. 1. Provide a Name, and chooseReadOnlyfor the type of lock. 1. Add a note about the lock if desired. Remediate from Azure CLI Replace the information within <> with appropriate values:az lock create --name <lock> \ --resource-group <resource-group> \ --resource <storage-account> \ --lock-type ReadOnly \ --resource-type Microsoft.Storage/storageAccountsRemediate from PowerShell Replace the information within <> with appropriate values:New-AzResourceLock -LockLevel ReadOnly ` -LockName <lock> ` -ResourceName <storage-account> ` -ResourceType Microsoft.Storage/storageAccounts ` -ResourceGroupName <resource-group>
9.3.11Ensure Redundancy is Set to 'geo-redundant storage (GRS)' on Critical Azure Storage Accounts1
Attributes
- Profile
Level 2
- Section
9 Storage Services
- Sub Section
9.3 Storage Accounts
- Description
Ensure Redundancy is Set to 'geo-redundant storage (GRS)' on Critical Azure Storage Accounts
- Default Value
When creating a storage account in the Azure Portal, the default redundancy setting is geo-redundant storage (GRS). Using the Azure CLI, the default is read-access geo-redundant storage (RA-GRS). In PowerShell, a redundancy level must be explicitly specified during account creation.
- Audit Procedure
Audit from Azure Portal 1. Go to
Storage accounts. 1. Click on a storage account. 1. UnderData management, clickRedundancy. 1. Ensure thatRedundancyis set toGeo-redundant storage (GRS). 1. Repeat steps 1-4 for each storage account. Audit from Azure CLI Run the following command to list storage accounts:az storage account listFor each storage account, run the following command:az storage account show --resource-group <resource-group> --name <storage-account>Undersku, ensure thatnameis set toStandard_GRS. Audit from PowerShell Run the following command to list storage accounts:Get-AzStorageAccountRun the following command to get the storage account in a resource group with a given name:$storageAccount = Get-AzStorageAccount -ResourceGroupName <resource-group> -Name <storage-account>Run the following command to get the redundancy setting for the storage account:$storageAccount.SKU.NameEnsure that the command returnsStandard_GRS. Repeat for each storage account. Audit 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. If referencing a printed copy, you can search Policy IDs from this URL: https://portal.azure.com/#view/Microsoft_Azure_Policy/PolicyMenuBlade/~/Definitions - Policy ID: bf045164-79ba-4215-8f95-f8048dc1780b - Name: 'Geo-redundant storage should be enabled for Storage Accounts'- Impact Statement
Enabling geo-redundant storage on Azure storage accounts increases costs due to cross-region data replication.
- Assessment Status
Automated
- Rationale Statement
Enabling GRS protects critical data from regional failures by maintaining a copy in a geographically separate location. This significantly reduces the risk of data loss, supports business continuity, and meets high availability requirements for disaster recovery.
- Remediation Procedure
Remediate from Azure Portal 1. Go to
Storage accounts. 1. Click on a storage account. 1. UnderData management, clickRedundancy. 1. From theRedundancydrop-down menu, selectGeo-redundant storage (GRS). 1. ClickSave. 1. Repeat steps 1-5 for each storage account requiring remediation. Remediate from Azure CLI For each storage account requiring remediation, run the following command to enable geo-redundant storage:az storage account update --resource-group <resource-group> --name <storage-account> --sku Standard_GRSRemediate from PowerShell For each storage account requiring remediation, run the following command to enable geo-redundant storage:Set-AzStorageAccount -ResourceGroupName <resource-group> -Name <storage-account> -SkuName Standard_GRS- Additional Information
When choosing the best redundancy option, weigh the trade-offs between lower costs and higher availability. Key factors to consider include: - The method of data replication within the primary region. - The replication of data from a primary to a geographically distant secondary region for protection against regional disasters (geo-replication). - The necessity for read access to replicated data in the secondary region during an outage in the primary region (geo-replication with read access).