CIS Microsoft Azure Foundations Benchmark v3.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_3.0_azureRequirements (159)
2 Identity3617
2.1.1Ensure Security Defaults is enabled on Microsoft Entra ID1
Attributes
- Profile
Level 1
- Section
2 Identity
- Sub Section
2.1 Security Defaults (Per-User MFA)
- Description
[IMPORTANT - Please read the section overview: If your organization pays for Microsoft Entra ID licensing (included in Microsoft 365 E3, E5, or F5, and EM&S E3 or E5 licenses) and CAN use Conditional Access, ignore the recommendations in this section and proceed to the Conditional Access section.]Security defaults in Microsoft Entra ID make it easier to be secure and help protect your organization. Security defaults contain preconfigured security settings for common attacks.Security defaults is available to everyone. The goal is to ensure that all organizations have a basic level of security enabled at no extra cost. You may turn on security defaults in the Azure portal.
- 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 PortalTo 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
Manual
- 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 can’t do MFA.
- Remediation Procedure
Remediate from Azure PortalTo 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.
2.1.2Ensure that 'Multi-Factor Auth Status' is 'Enabled' for all Privileged Users1
Attributes
- Profile
Level 1
- Section
2 Identity
- Sub Section
2.1 Security Defaults (Per-User MFA)
- Description
[IMPORTANT - Please read the section overview: If your organization pays for Microsoft Entra ID licensing (included in Microsoft 365 E3, E5, or F5, and EM&S E3 or E5 licenses) and CAN use Conditional Access, ignore the recommendations in this section and proceed to the Conditional Access section.]Enable multi-factor authentication for all roles, groups, and users that have write access or permissions to Azure resources. These include custom created objects or built-in roles such as;- Service Co-Administrators- Subscription Owners- Contributors
- Default Value
By default, multi-factor authentication is disabled for all users.
- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select the
Microsoft Entra IDblade1. UnderManage, clickRoles and administrators1. Take note of all users with the roleService Co-Administrators,OwnersorContributors1. Return to theOverview1. UnderManage, clickUsers1. Click on thePer-User MFAbutton in the top row menu1. Ensure thatStatusisEnabledfor all noted usersAudit from REST APIFor Every Subscription, For Every Tenant Step 1: Identify Users with Administrative Access 1. List All Users Using Microsoft Graph API:GET https://graph.microsoft.com/v1.0/usersCaptureidand correspondinguserPrincipalName('$uid', '$userPrincipalName') 2. List all Role Definitions Using Azure management API:https://management.azure.com/subscriptions/:subscriptionId/providers/Microsoft.Authorization/roleDefinitions?api-version=2017-05-01Capture Role Definition IDs/Name ('$name') and role names ('$properties/roleName') where 'properties/roleName' contains (Owneror*contributororadmin) 3. List All Role Assignments (Mappings$A.uidto$B.name) Using Azure Management API:GET https://management.azure.com/subscriptions/:subscriptionId/providers/Microsoft.Authorization/roleassignments?api-version=2017-10-01-previewFind all administrative roles ($B.name) in'Properties/roleDefinitionId'mapped with user ids ($A.id) in'Properties/principalId'where'Properties/principalType' == 'User'4. Now Match ($CProperties/principalId) with$A.uidand get$A.userPrincipalNamesave this asD.userPrincipalNameStep 2: Run Graph PowerShell command:get-mguser -All | where {$_.StrongAuthenticationMethods.Count -eq 0} | Select-Object -Property UserPrincipalNameIf the output contains any of the$D.userPrincipalName, then this recommendation is non-compliant.Audit from Azure PolicyIf 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: e3e008c3-56b9-4133-8fd7-d3347377402a - Name: 'Accounts with owner permissions on Azure resources should be MFA enabled'- Policy ID: 931e118d-50a1-4457-a5e4-78550e086c52 - Name: 'Accounts with write permissions on Azure resources should be MFA enabled'- 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 multi-factor authentication.
- Assessment Status
Manual
- Rationale Statement
Multi-factor authentication requires an individual to present a minimum of two separate forms of authentication before access is granted. Multi-factor authentication provides additional assurance that the individual attempting to gain access is who they claim to be. With multi-factor 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 Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra IDblade1. UnderManage, clickRoles and administrators1. Take note of all users with the roleService Co-Administrators,OwnersorContributors1. Return to theOverview1. UnderManage, clickUsers1. Click on thePer-User MFAbutton in the top row menu1. Check the box next to each noted user1. ClickEnable MFA1. ClickEnableOther Options within Azure PortalFollow Microsoft Azure documentation and enable multi-factor authentication in your environment.https://docs.microsoft.com/en-us/azure/active-directory/authentication/tutorial-enable-azure-mfaEnabling and configuring MFA with conditional access policy is a multi-step process. Here are some additional resources on the process within Entra ID to enable multi-factor authentication for users within your subscriptions with conditional access policy.https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/howto-conditional-access-policy-admin-mfahttps://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-getstarted#enable-multi-factor-authentication-with-conditional-accesshttps://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-mfasettings
2.1.3Ensure that 'Multi-Factor Auth Status' is 'Enabled' for all Non-Privileged Users1
Attributes
- Profile
Level 2
- Section
2 Identity
- Sub Section
2.1 Security Defaults (Per-User MFA)
- Description
[IMPORTANT - Please read the section overview: If your organization pays for Microsoft Entra ID licensing (included in Microsoft 365 E3, E5, or F5, and EM&S E3 or E5 licenses) and CAN use Conditional Access, ignore the recommendations in this section and proceed to the Conditional Access section.]Enable multi-factor authentication for all non-privileged users.
- Default Value
By default, multi-factor authentication is disabled for all users.
- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select the
Microsoft Entra IDblade1. UnderManage, clickUsers1. Click thePer-User MFAbutton on the top barFor every user listed, ensure that theStatuscolumn indicatesEnabledAudit from REST APIFor Every Subscription, For Every Tenant Step 1: Identify Users with non-administrative Access 1. List All Users Using Microsoft Graph API:GET https://graph.microsoft.com/v1.0/usersCaptureidand correspondinguserPrincipalName($uid,$userPrincipalName) 2. List all Role Definitions Using Azure management API:https://management.azure.com/subscriptions/<subscriptionId>/providers/Microsoft.Authorization/roleDefinitions?api-version=2017-05-01Capture Role Definition IDs/Name ($name) and role names ($properties/roleName) where'properties/roleName'does NOT contain (Owneror*contributororadmin) 3. List All Role Assignments (Mappings$A.uidto$B.name) Using Azure Management API:GET https://management.azure.com/subscriptions/<subscriptionId>/providers/Microsoft.Authorization/roleassignments?api-version=2017-10-01-previewFind all non-administrative roles ($B.name) in'Properties/roleDefinationId'mapped with user ids ($A.id) in'Properties/principalId'where'Properties/principalType' == 'User'D> Now Match ($CProperties/principalId) with$A.uidand get$A.userPrincipalNamesave this asD.userPrincipleNameStep 2: Run Graph PowerShell command:get-mguser -All | where {$_.StrongAuthenticationMethods.Count -eq 0} | Select-Object -Property UserPrincipalNameIf the output contains any of the$D.userPrincipleName, then this recommendation is non-compliant.Audit from Azure PolicyIf 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: 81b3ccb4-e6e8-4e4a-8d05-5df25cd29fd4 - Name: 'Accounts with read permissions on Azure resources should be MFA enabled'- Impact Statement
Users would require two forms of authentication before any access is granted. Also, this requires an overhead for managing dual forms of authentication.
- Assessment Status
Manual
- Rationale Statement
Multi-factor authentication requires an individual to present a minimum of two separate forms of authentication before access is granted. Multi-factor authentication provides additional assurance that the individual attempting to gain access is who they claim to be. With multi-factor 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 Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra IDblade1. UnderManage, clickUsers1. Click on thePer-User MFAbutton in the top row menu1. Check the box next to each user1. ClickEnable MFA1. ClickEnableOther Options within Azure PortalFollow Microsoft Azure documentation and enable multi-factor authentication in your environment.https://docs.microsoft.com/en-us/azure/active-directory/authentication/tutorial-enable-azure-mfaEnabling and configuring MFA is a multi-step process. Here are some additional resources on the process within Microsoft Entra ID:https://learn.microsoft.com/en-us/entra/identity/conditional-access/howto-conditional-access-policy-admin-mfahttps://learn.microsoft.com/en-us/entra/identity/authentication/howto-mfa-getstarted#enable-multi-factor-authentication-with-conditional-accesshttps://learn.microsoft.com/en-us/entra/identity/authentication/howto-mfa-mfasettings
2.1.4Ensure that 'Allow users to remember multi-factor authentication on devices they trust' is Disabled0
Attributes
- Profile
Level 1
- Section
2 Identity
- Sub Section
2.1 Security Defaults (Per-User MFA)
- Description
[IMPORTANT - Please read the section overview: If your organization pays for Microsoft Entra ID licensing (included in Microsoft 365 E3, E5, or F5, and EM&S E3 or E5 licenses) and CAN use Conditional Access, ignore the recommendations in this section and proceed to the Conditional Access section.]Do not allow users to remember multi-factor authentication on devices.
- Default Value
By default,
Allow users to remember multi-factor authentication on devices they trustis disabled.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, clickUsers1. Click thePer-user MFAbutton on the top bar1. 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 Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, clickUsers1. Click thePer-user MFAbutton on the top bar1. Click onService settings1. Uncheck the box next toAllow users to remember multi-factor authentication on devices they trust1. ClickSave
2.2.1Ensure Trusted Locations Are Defined1
Attributes
- Profile
Level 2
- Section
2 Identity
- Sub Section
2.2 Conditional Access
- Description
Microsoft Entra ID Conditional Access allows an organization to configure
Named locationsand configure whether those locations are trusted or untrusted. These settings provide organizations the means to specify Geographical locations for use in conditional access policies, or define actual IP addresses and IP ranges and whether or not those IP addresses and/or ranges are trusted by the organization.- Default Value
By default, no locations are configured under the
Named locationsblade within the Microsoft Entra ID Conditional Access blade.- Audit Procedure
Audit from Azure Portal1. In the Azure Portal, navigate to
Microsoft Entra ID1. UnderManage, clickSecurity1. UnderProtect, clickConditional Access1. UnderManage, clickNamed locationsEnsure there areIP ranges locationsettings configured and marked asTrustedAudit from PowerShellGet-MgIdentityConditionalAccessNamedLocationIn the output from the above command, for each Named location group, make sure at least one entry contains theIsTrustedparameter with a value ofTrue. Otherwise, if there is no output as a result of the above command or all of the entries contain theIsTrustedparameter with an empty value, aNULLvalue, or a value ofFalse, the results are out of compliance with this check.- Impact Statement
When configuring
Named locations, the organization can create locations using Geographical location data or by defining source IP addresses or ranges. ConfiguringNamed locationsusing a Country location does not provide the organization the ability to mark those locations as trusted, and any Conditional Access policy relying on thoseCountries locationsetting will not be able to use theAll trusted locationssetting within the Conditional Access policy. They instead will have to rely on theSelect locationssetting. This may add additional resource requirements when configuring and will require thorough organizational testing.In general, Conditional Access policies may completely prevent users from authenticating to Microsoft Entra ID, and thorough testing is recommended. To avoid complete lockout, a 'Break Glass' account with full Global Administrator rights is recommended in the event all other administrators are locked out of authenticating to Microsoft Entra ID. This 'Break Glass' account should be excluded from Conditional Access Policies and should be configured with the longest pass phrase feasible in addition to a FIDO2 security key or certificate kept in a very secure physical location. This account should only be used in the event of an emergency and complete administrator lockout.NOTE: Starting July 2024, Microsoft will begin requiring MFA for All Users - including Break Glass Accounts. By the end of October 2024, this requirement will be enforced. Physical FIDO2 security keys, or a certificate kept on secure removable storage can fulfill this MFA requirement. If opting for a physical device, that device should be kept in a very secure, documented physical location.- Assessment Status
Manual
- Rationale Statement
Defining trusted source IP addresses or ranges helps organizations create and enforce Conditional Access policies around those trusted or untrusted IP addresses and ranges. Users authenticating from trusted IP addresses and/or ranges may have less access restrictions or access requirements when compared to users that try to authenticate to Microsoft Entra ID from untrusted locations or untrusted source IP addresses/ranges.
- Remediation Procedure
Remediate from Azure Portal1. In the Azure Portal, navigate to
Microsoft Entra ID1. UnderManage, clickSecurity1. UnderProtect, clickConditional Access1. UnderManage, clickNamed locations1. Within theNamed locationsblade, click onIP ranges location1. Enter a name for this location setting in theNametext box1. Click on the+sign1. Add an IP Address Range in CIDR notation inside the text box that appears1. Click on theAddbutton1. Repeat steps 7 through 9 for each IP Range that needs to be added1. If the information entered are trusted ranges, select theMark as trusted locationcheck box1. Once finished, click onCreateRemediate from PowerShellCreate a new trusted IP-based Named location policy[System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]]$ipRanges = @()$ipRanges.Add('<first IP range in CIDR notation>')$ipRanges.Add('<second IP range in CIDR notation>')$ipRanges.Add('<third IP range in CIDR notation>')New-MgIdentityConditionalAccessNamedLocation -dataType '#microsoft.graph.ipNamedLocation' -DisplayName '<name of IP Named location policy>' -IsTrusted $true -IpRanges $ipRangesSet an existing IP-based Named location policy to trustedUpdate-MgIdentityConditionalAccessNamedLocation -PolicyId '<ID of the policy>' -dataType '#microsoft.graph.ipNamedLocation' -IsTrusted $true
2.2.2Ensure that an exclusionary Geographic Access Policy is considered0
Attributes
- Profile
Level 2
- Section
2 Identity
- Sub Section
2.2 Conditional Access
- Description
CAUTION: If these policies are created without first auditing and testing the result, misconfiguration can potentially lock out administrators or create undesired access issues.Conditional Access Policies can be used to block access from geographic locations that are deemed out-of-scope for your organization or application. The scope and variables for this policy should be carefully examined and defined.
- Default Value
This policy does not exist by default.
- Audit Procedure
Audit from Azure Portal1. From Azure Home open the Portal menu in the top left, and select
Microsoft Entra ID.1. Scroll down in the menu on the left, and selectSecurity.1. Select on the left sideConditional Access.1. SelectPolicies.1. Select the policy you wish to audit, then: - UnderAssignments>Users, review the users and groups for the personnel the policy will apply to - UnderAssignments>Target resources, review the cloud apps or actions for the systems the policy will apply to - UnderConditions>Locations, Review theIncludelocations for those that should be blocked - UnderConditions>Locations, Review theExcludelocations for those that should be allowed (Note: locations set up in the previous recommendation for Trusted Location should be in theExcludelist.) - UnderAccess Controls>Grant- Confirm thatBlock accessis selected.Audit from Azure CLIAs of this writing there are no subcommands for Conditional Access Policies within the Azure CLIAudit from PowerShell$conditionalAccessPolicies = Get-MgIdentityConditionalAccessPolicy foreach($policy in $conditionalAccessPolicies) {$policy | Select-Object @{N='Policy ID'; E={$policy.id}}, @{N='Included Locations'; E={$policy.Conditions.Locations.IncludeLocations}}, @{N='Excluded Locations'; E={$policy.Conditions.Locations.ExcludeLocations}}, @{N='BuiltIn GrantControls'; E={$policy.GrantControls.BuiltInControls}}}Make sure there is at least 1 row in the output of the above PowerShell command that containsBlockunder theBuiltIn GrantControlscolumn and location IDs under theIncluded LocationsandExcluded Locationscolumns. If not, a policy containing these options has not been created and is considered a finding.- Impact Statement
Microsoft Entra ID P1 or P2 is required. Limiting access geographically will deny access to users that are traveling or working remotely in a different part of the world. A point-to-site or site to site tunnel such as a VPN is recommended to address exceptions to geographic access policies.
- Assessment Status
Manual
- Rationale Statement
Conditional Access, when used as a deny list for the tenant or subscription, is able to prevent ingress or egress of traffic to countries that are outside of the scope of interest (e.g.: customers, suppliers) or jurisdiction of an organization. This is an effective way to prevent unnecessary and long-lasting exposure to international threats such as APTs.
- Remediation Procedure
Remediate from Azure PortalPart 1 of 2 - Create the policy and enable it in
Report-onlymode.1. From Azure Home open the portal menu in the top left, and selectMicrosoft Entra ID.1. Scroll down in the menu on the left, and selectSecurity.1. Select on the left sideConditional Access.1. SelectPolicies.1. Click the+ New policybutton, then:1. Provide a name for the policy. 1. UnderAssignments, selectUsersthen: - UnderInclude, selectAll users- UnderExclude, check Users and groups and only select emergency access accounts and service accounts (NOTE: Service accounts are excluded here because service accounts are non-interactive and cannot complete MFA)1. UnderAssignments, selectTarget resourcesthen: - UnderInclude, selectAll cloud apps- LeaveExcludeblank unless you have a well defined exception1. UnderConditions, selectLocationsthen: - SelectInclude, then add entries for locations for those that should be blocked - SelectExclude, then add entries for those that should be allowed (IMPORTANT: Ensure that all Trusted Locations are in theExcludelist.)1. UnderAccess Controls, selectGrantselectBlock Access.1. SetEnable policytoReport-only.1. ClickCreate.Allow some time to pass to ensure the sign-in logs capture relevant conditional access events. These events will need to be reviewed to determine if additional considerations are necessary for your organization (e.g. legitimate locations are being blocked and investigation is needed for exception).NOTE: The policy is not yet 'live,' sinceReport-onlyis being used to audit the effect of the policy.Part 2 of 2 - Confirm that the policy is not blocking access that should be granted, then toggle toOn.1. With your policy now in report-only mode, return to the Microsoft Entra blade and click onSign-in logs.1. Review the recent sign-in events - click an event then review the event details (specifically theReport-onlytab) to ensure: - The sign-in event you're reviewing occurred after turning on the policy in report-only mode - The policy name from step 6 above is listed in thePolicy Namecolumn - TheResultcolumn for the new policy shows that the policy wasNot applied(indicating the location origin was not blocked)1. If the above conditions are present, navigate back to the policy name in Conditional Access and open it.1. Toggle the policy fromReport-onlytoOn.1. ClickSave.Remediate from PowerShellFirst, set up the conditions objects values before updating an existing conditional access policy or before creating a new one. You may need to use additional PowerShell cmdlets to retrieve specific IDs such as theGet-MgIdentityConditionalAccessNamedLocationwhich outputs theLocation IDsfor use with conditional access policies.$conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet$conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition$conditions.Applications.IncludeApplications = <'All' | 'Office365' | 'app ID' | @('app ID 1', 'app ID 2', etc...>$conditions.Applications.ExcludeApplications = <'Office365' | 'app ID' | @('app ID 1', 'app ID 2', etc...)>$conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition$conditions.Users.IncludeUsers = <'All' | 'None' | 'GuestsOrExternalUsers' | 'Specific User ID' | @('User ID 1', 'User ID 2', etc.)>$conditions.Users.ExcludeUsers = <'GuestsOrExternalUsers' | 'Specific User ID' | @('User ID 1', 'User ID 2', etc.)>$conditions.Users.IncludeGroups = <'group ID' | 'All' | @('Group ID 1', 'Group ID 2', etc...)>$conditions.Users.ExcludeGroups = <'group ID' | @('Group ID 1', 'Group ID 2', etc...)>$conditions.Users.IncludeRoles = <'Role ID' | 'All' | @('Role ID 1', 'Role ID 2', etc...)>$conditions.Users.ExcludeRoles = <'Role ID' | @('Role ID 1', 'Role ID 2', etc...)>$conditions.Locations = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessLocationCondition$conditions.Locations.IncludeLocations = <'Location ID' | @('Location ID 1', 'Location ID 2', etc...) >$conditions.Locations.ExcludeLocations = <'AllTrusted' | 'Location ID' | @('Location ID 1', 'Location ID 2', etc...)>$controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls$controls._Operator = 'OR'$controls.BuiltInControls = 'block'Next, update the existing conditional access policy with the condition set options configured with the previous commands.Update-MgIdentityConditionalAccessPolicy -PolicyId <policy ID> -Conditions $conditions -GrantControls $controlsTo create a new conditional access policy that complies with this best practice, run the following commands after creating the condition set aboveNew-MgIdentityConditionalAccessPolicy -Name 'Policy Name' -State <enabled|disabled> -Conditions $conditions -GrantControls $controls- Additional Information
These policies should be tested by using the What If tool in the References. Setting these can and will create issues with logging in for users until they use an MFA device linked to their accounts. Further testing can also be done via the insights and reporting resource in References which monitors Azure sign ins.
2.2.3Ensure that an exclusionary Device code flow policy is considered0
Attributes
- Profile
Level 2
- Section
2 Identity
- Sub Section
2.2 Conditional Access
- Description
Conditional Access Policies can be used to prevent the Device code authentication flow. Device code flow should be permitted only for users that regularly perform duties that explicitly require the use of Device Code to authenticate, such as utilizing Azure with PowerShell.
- Default Value
This policy does not exist by default.
- Audit Procedure
Audit from Azure Portal1. From Azure Home open the Portal menu in the top left and select
Microsoft Entra ID.1. Scroll down in the menu on the left and selectSecurity.1. Select on the left sideConditional Access.1. SelectPolicies.1. Select the policy you wish to audit, then: - UnderAssignments>Users, review the users and groups for the personnel the policy will apply to - UnderAssignments>Target resources, review the cloud apps or actions for the systems the policy will apply to - UnderConditions>Authentication Flows, review the configuration to ensureDevice code flowis selected - UnderAccess Controls>Grant- Confirm thatBlock accessis selected.- Impact Statement
Microsoft Entra ID P1 or P2 is required. This policy should be tested using the
Report-only modebefore implementation. Without a full and careful understanding of the accounts and personnel who require Device code authentication flow, implementing this policy can block authentication for users and devices who rely on Device code flow. For users and devices that rely on device code flow authentication, more secure alternatives should be implemented wherever possible.- Assessment Status
Manual
- Rationale Statement
Attackers use Device code flow in phishing attacks and, if successful, results in the attacker gaining access tokens and refresh tokens which are scoped to 'user_impersonation', which can perform any action the user has permission to perform.
- Remediation Procedure
Remediate from Azure PortalPart 1 of 2 - Create the policy and enable it in
Report-onlymode.1. From Azure Home open the portal menu in the top left and selectMicrosoft Entra ID.1. Scroll down in the menu on the left and selectSecurity.1. Select on the left sideConditional Access.1. SelectPolicies.1. Click the+ New policybutton, then:1. Provide a name for the policy. 1. UnderAssignments, selectUsersthen: - UnderInclude, selectAll users- UnderExclude, check Users and groups and only select emergency access accounts1. UnderAssignments, selectTarget resourcesthen: - UnderInclude, selectAll cloud apps- LeaveExcludeblank unless you have a well defined exception1. UnderConditions>Authentication Flows, set Configure toYesthen: - SelectDevice code flow- SelectDone1. UnderAccess Controls>Grant, selectBlock Access.1. SetEnable policytoReport-only.1. ClickCreate.Allow some time to pass to ensure the sign-in logs capture relevant conditional access events. These events will need to be reviewed to determine if additional considerations are necessary for your organization (e.g. many legitimate use cases of device code authentication are observed).NOTE: The policy is not yet 'live,' sinceReport-onlyis being used to audit the effect of the policy.Part 2 of 2 - Confirm that the policy is not blocking access that should be granted, then toggle toOn.1. With your policy now in report-only mode, return to the Microsoft Entra blade and click onSign-in logs.1. Review the recent sign-in events - click an event then review the event details (specifically theReport-onlytab) to ensure: - The sign-in event you're reviewing occurred after turning on the policy in report-only mode - The policy name from step 6 above is listed in thePolicy Namecolumn - TheResultcolumn for the new policy shows that the policy wasNot applied(indicating the device code authentication flow was not blocked)1. If the above conditions are present, navigate back to the policy name in Conditional Access and open it.1. Toggle the policy fromReport-onlytoOn.1. ClickSave.- Additional Information
These policies should be tested by using the What If tool in the References. Setting these can and will create issues with logging in for users until they use an MFA device linked to their accounts. Further testing can also be done via the insights and reporting resource in References which monitors Azure sign ins.
2.2.4Ensure that A Multi-factor Authentication Policy Exists for Administrative Groups0
Attributes
- Profile
Level 2
- Section
2 Identity
- Sub Section
2.2 Conditional Access
- Description
For designated users, they will be prompted to use their multi-factor authentication (MFA) process on login.
- Default Value
Starting October 2024, MFA will be required for all accounts by default.
- Audit Procedure
Audit from Azure Portal1. From Azure Home open the Portal Menu in the top left, and select
Microsoft Entra ID.1. SelectSecurity.1. SelectConditional Access.1. SelectPolicies.1. Select the policy you wish to audit.1. Click the blue text underUsers.1. View underIncludethe corresponding users and groups to whom the policy is applied. Be certain the emergency access account is not in the list.1. View underExcludeto determine which Users and groups to whom the policy is not applied.- Impact Statement
There is an increased cost, as Conditional Access policies require Microsoft Entra ID P1. Similarly, MFA may require additional overhead to maintain. There is also a potential scenario in which the multi-factor authentication method can be lost, and administrative users are no longer able to log in. For this scenario, there should be an emergency access account. Please see References for creating this.NOTE: Starting July 2024, Microsoft will begin requiring MFA for All Users - including Break Glass Accounts. By the end of October 2024, this requirement will be enforced. Physical FIDO2 security keys, or a certificate kept on secure removable storage can fulfill this MFA requirement. If opting for a physical device, that device should be kept in a very secure, documented physical location.
- Assessment Status
Manual
- Rationale Statement
Enabling multi-factor authentication is a recommended setting to limit the use of Administrative accounts to authenticated personnel.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home open the Portal Menu in top left, and select Microsoft Entra ID.1. Select
Security.1. SelectConditional Access.1. SelectPolicies.1. Click+ New policy.1. Enter a name for the policy.1. Click the blue text underUsers.1. SelectSelect users and groups.1. Select administrative groups this policy should apply to and clickSelect.1. UnderExclude, checkUsers and groups.1. Select users this policy not should apply to and clickSelect.1. Click the blue text underTarget resources.1. SelectAll cloud apps.1. Click the blue text underGrant.1. Under Grant access, checkRequire multifactor authenticationand clickSelect.1. SetEnable policytoReport-only.1. ClickCreate.After testing the policy in report-only mode, update theEnable policysetting fromReport-onlytoOn.- Additional Information
These policies should be tested by using the What If tool in the References. Setting these can and will create issues with logging in for users until they use an MFA device linked to their accounts. Further testing can also be done via the insights and reporting resource in References which monitors Azure sign ins.
2.2.5Ensure that A Multi-factor Authentication Policy Exists for All Users0
Attributes
- Profile
Level 2
- Section
2 Identity
- Sub Section
2.2 Conditional Access
- Description
For designated users, they will be prompted to use their multi-factor authentication (MFA) process on logins.
- Default Value
Starting October 2024, MFA will be required for all accounts by default.
- Audit Procedure
Audit from Azure Portal1. From Azure Home open the Portal Menu in the top left, and select
Microsoft Entra ID.1. Scroll down in the menu on the left, and selectSecurity.1. Select on the left sideConditional Access.1. SelectPolicies.1. Select the policy you wish to audit.1. Click the blue text underUsers.1. View underIncludethe corresponding users and groups to whom the policy is applied.1. View underExcludeto determine which users and groups to whom the policy is not applied.- Impact Statement
There is an increased cost, as Conditional Access policies require Microsoft Entra ID P1 or P2. Similarly, this may require additional overhead to maintain if users lose access to their MFA.NOTE: Starting July 2024, Microsoft will begin requiring MFA for All Users - including Break Glass Accounts. By the end of October 2024, this requirement will be enforced. Physical FIDO2 security keys, or a certificate kept on secure removable storage can fulfill this MFA requirement. If opting for a physical device, that device should be kept in a very secure, documented physical location.
- Assessment Status
Manual
- Rationale Statement
Enabling multi-factor authentication is a recommended setting to limit the potential of accounts being compromised and limiting access to authenticated personnel.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home open Portal menu in the top left, and select
Microsoft Entra ID.1. SelectSecurity.1. SelectConditional Access.1. SelectPolicies.1. Click+ New policy.1. Enter a name for the policy.1. Click the blue text underUsers.1. UnderInclude, selectAll users.1. UnderExclude, checkUsers and groups.1. Select users this policy should not apply to and clickSelect.1. Click the blue text underTarget resources.1. SelectAll cloud apps.1. Click the blue text underGrant.1. UnderGrant access, checkRequire multifactor authenticationand clickSelect.1. SetEnable policytoReport-only.1. ClickCreate.After testing the policy in report-only mode, update theEnable policysetting fromReport-onlytoOn.- Additional Information
These policies should be tested by using the What If tool in the References. Setting these can and will create issues with logging in for users until they use an MFA device linked to their accounts. Further testing can also be done via the insights and reporting resource the in References which monitors Azure sign ins.
2.2.6Ensure Multi-factor Authentication is Required for Risky Sign-ins0
Attributes
- Profile
Level 2
- Section
2 Identity
- Sub Section
2.2 Conditional Access
- Description
Entra ID tracks the behavior of sign-in events. If the Entra ID domain is licensed with P2, the sign-in behavior can be used as a detection mechanism for additional scrutiny during the sign-in event. If this policy is set up, then Risky Sign-in events will prompt users to use multi-factor authentication (MFA) tokens on login for additional verification.
- Default Value
MFA is not enabled by default.
- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu in the top left and select
Microsoft Entra ID.1. SelectSecurity.1. Select on the left sideConditional Access.1. SelectPolicies.1. Select the policy you wish to audit.1. Click the blue text underUsers.1. View underIncludethe corresponding users and groups to whom the policy is applied.1. View underExcludeto determine which users and groups to whom the policy is not applied.- Impact Statement
Risk Policies for Conditional Access require Microsoft Entra ID P2. Additional overhead to support or maintain these policies may also be required if users lose access to their MFA tokens.
- Assessment Status
Manual
- Rationale Statement
Enabling multi-factor authentication is a recommended setting to limit the potential of accounts being compromised and limiting access to authenticated personnel. Enabling this policy allows Entra ID's risk-detection mechanisms to force additional scrutiny on the login event, providing a deterrent response to potentially malicious sign-in events, and adding an additional authentication layer as a reaction to potentially malicious behavior.
- Remediation Procedure
Remediate from Azure Portal 1. From Azure Home select the Portal Menu in the top left and select
Microsoft Entra ID.1. SelectSecurity1. SelectConditional Access.1. SelectPolicies.1. Click+ New policy.1. Enter a name for the policy.1. Click the blue text underUsers.1. UnderInclude, selectAll users.1. UnderExclude, checkUsers and groups.1. Select users this policy should not apply to and clickSelect.1. Click the blue text underTarget resources.1. SelectAll cloud apps.1. Click the blue text underConditions.1. SelectSign-in risk.1. Update theConfiguretoggle toYes.1. Check the sign-in risk level this policy should apply to, e.g.HighandMedium.1. SelectDone.1. Click the blue text underGrantand checkRequire multifactor authenticationthen click theSelectbutton.1. Click the blue text underSessionthen checkSign-in frequencyand selectEvery timeand click theSelectbutton. 1. SetEnable policytoReport-only.1. ClickCreate.After testing the policy in report-only mode, update theEnable policysetting fromReport-onlytoOn.- Additional Information
These policies should be tested by using the What If tool in the References. Setting these can and will create issues with logging in for users until they use an MFA device linked to their accounts. Further testing can also be done via the insights and reporting resource the in References which monitors Azure sign ins.
2.2.7Ensure Multi-factor Authentication is Required for Windows Azure Service Management API1
Attributes
- Profile
Level 2
- Section
2 Identity
- Sub Section
2.2 Conditional Access
- Description
This recommendation ensures that users accessing the Windows Azure Service Management API (i.e. Azure Powershell, Azure CLI, Azure Resource Manager API, etc.) are required to use multi-factor authentication (MFA) credentials when accessing resources through the Windows Azure Service Management API.
- Default Value
MFA is not enabled by default for administrative actions.
- Audit Procedure
Audit from Azure Portal1. From the Azure Admin Portal dashboard, open
Microsoft Entra ID.1. In the menu on the left of the Entra ID blade, clickSecurity.1. In the menu on the left of the Security blade, clickConditional Access.1. In the menu on the left of the Conditional Access blade, clickPolicies.1. Click on the name of the policy you wish to audit.1. Click the blue text underUsers.1. Under theIncludesection of Users, ensure thatAll Usersis selected.1. Under theExcludesection of Users, review theUsers and Groupsthat are excluded from the policy (NOTE: this should be limited to break-glass emergency access accounts, non-interactive service accounts, and other carefully considered exceptions).1. On the left side, click the blue text underTarget resources.1. Under theIncludesection of Target Resources, ensure that theSelect appsradio button is selected.1. UnderSelect, ensure thatWindows Azure Service Management APIis listed.- Impact Statement
Conditional Access policies require Microsoft Entra ID P1 or P2 licenses. Similarly, they may require additional overhead to maintain if users lose access to their MFA. Any users or groups which are granted an exception to this policy should be carefully tracked, be granted only minimal necessary privileges, and conditional access exceptions should be regularly reviewed or investigated.
- Assessment Status
Manual
- Rationale Statement
Administrative access to the Windows Azure Service Management API should be secured with a higher level of scrutiny to authenticating mechanisms. Enabling multi-factor authentication is recommended to reduce the potential for abuse of Administrative actions, and to prevent intruders or compromised admin credentials from changing administrative settings.IMPORTANT: While this recommendation allows exceptions to specific Users or Groups, they should be very carefully tracked and reviewed for necessity on a regular interval through an Access Review process. It is important that this rule be built to include 'All Users' to ensure that all users not specifically excepted will be required to use MFA to access the Azure Service Management API.
- Remediation Procedure
Remediate from Azure Portal1. From the Azure Admin Portal dashboard, open
Microsoft Entra ID.1. ClickSecurityin the Entra ID blade.1. ClickConditional Accessin the Security blade.1. ClickPoliciesin the Conditional Access blade.1. Click+ New policy.1. Enter a name for the policy.1. Click the blue text underUsers.1. UnderInclude, selectAll users.1. UnderExclude, checkUsers and groups.1. Select users or groups to be exempted from this policy (e.g. break-glass emergency accounts, and non-interactive service accounts) then click theSelectbutton.1. Click the blue text underTarget resources.1. UnderInclude, click theSelect appsradio button.1. Click the blue text underSelect.1. Check the box next toWindows Azure Service Management APIsthen click theSelectbutton.1. Click the blue text underGrant.1. UnderGrant accesscheck the box forRequire multi-factor authenticationthen click theSelectbutton.1. Before creating, setEnable policytoReport-only.1. ClickCreate.After testing the policy in report-only mode, update theEnable policysetting fromReport-onlytoOn.- Additional Information
These policies should be tested by using the What If tool in the References. Setting these can and will create issues with administrators changing settings until they use an MFA device linked to their accounts. An emergency access account is recommended for this eventuality if all administrators are locked out. Please see the documentation in the references for further information. Similarly further testing can also be done via the insights and reporting resource in References which monitors Azure sign ins.
2.2.8Ensure Multi-factor Authentication is Required to access Microsoft Admin Portals1
Attributes
- Profile
Level 2
- Section
2 Identity
- Sub Section
2.2 Conditional Access
- Description
This recommendation ensures that users accessing Microsoft Admin Portals (i.e. Microsoft 365 Admin, Microsoft 365 Defender, Exchange Admin Center, Azure Portal, etc.) are required to use multi-factor authentication (MFA) credentials when logging into an Admin Portal.
- Default Value
MFA is not enabled by default for administrative actions.
- Audit Procedure
Audit from Azure Portal1. From the Azure Admin Portal dashboard, open
Microsoft Entra ID.1. In the menu on the left of the Entra ID blade, clickSecurity.1. In the menu on the left of the Security blade, clickConditional Access.1. In the menu on the left of the Conditional Access blade, clickPolicies.1. Click on the name of the policy you wish to audit.1. Click the blue text underUsers.1. Under theIncludesection of Users, reviewUsers and Groupsto ensure thatAll Usersis selected.1. Under theExcludesection of Users, review theUsers and Groupsthat are excluded from the policy (NOTE: this should be limited to break-glass emergency access accounts, non-interactive service accounts, and other carefully considered exceptions).1. On the left side, click the blue text underTarget Resources.1. Under theIncludesection of Target resources, ensure theSelect appsradio button is selected.1. UnderSelect, ensureMicrosoft Admin Portalsis listed.- Impact Statement
Conditional Access policies require Microsoft Entra ID P1 or P2 licenses. Similarly, they may require additional overhead to maintain if users lose access to their MFA. Any users or groups which are granted an exception to this policy should be carefully tracked, be granted only minimal necessary privileges, and conditional access exceptions should be reviewed or investigated.
- Assessment Status
Manual
- Rationale Statement
Administrative Portals for Microsoft Azure should be secured with a higher level of scrutiny to authenticating mechanisms. Enabling multi-factor authentication is recommended to reduce the potential for abuse of Administrative actions, and to prevent intruders or compromised admin credentials from changing administrative settings.IMPORTANT: While this recommendation allows exceptions to specific Users or Groups, they should be very carefully tracked and reviewed for necessity on a regular interval through an Access Review process. It is important that this rule be built to include 'All Users' to ensure that all users not specifically excepted will be required to use MFA to access Admin Portals.
- Remediation Procedure
Remediate from Azure Portal1. From the Azure Admin Portal dashboard, open
Microsoft Entra ID.1. ClickSecurityin the Entra ID blade.1. ClickConditional Accessin the Security blade.1. ClickPoliciesin the Conditional Access blade.1. Click+ New policy.1. Enter a name for the policy.1. Click the blue text underUsers.1. UnderInclude, selectAll users.1. UnderExclude, checkUsers and groups.1. Select users or groups to be exempted from this policy (e.g. break-glass emergency accounts, and non-interactive service accounts) then click theSelectbutton.1. Click the blue text underTarget resources.1. UnderInclude, click theSelect appsradio button.1. Click the blue text underSelect.1. Check the box next toMicrosoft Admin Portalsthen click theSelectbutton.1. Click the blue text underGrant.1. UnderGrant accesscheck the box forRequire multifactor authenticationthen click theSelectbutton.1. Before creating, setEnable policytoReport-only.1. ClickCreate.After testing the policy in report-only mode, update theEnable policysetting fromReport-onlytoOn.- Additional Information
These policies should be tested by using the What If tool in the References. Setting these can and will create issues with administrators changing settings until they use an MFA device linked to their accounts. An emergency access account is recommended for this eventuality if all administrators are locked out. Please see the documentation in the references for further information. Similarly further testing can also be done via the insights and reporting resource in References which monitors Azure sign ins.
2.3Ensure that 'Restrict non-admin users from creating tenants' is set to 'Yes'1
Attributes
- Profile
Level 1
- Section
2 Identity
- Description
Require administrators or appropriately delegated users to create new tenants.
- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. UnderManage, selectUser settings1. Ensure thatRestrict non-admin users from creating tenantsis set toYesAudit from PowerShellImport-Module Microsoft.Graph.Identity.SignIns Connect-MgGraph -Scopes 'Policy.ReadWrite.Authorization' Get-MgPolicyAuthorizationPolicy | Select-Object -ExpandProperty DefaultUserRolePermissions | Format-ListReview the 'DefaultUserRolePermissions' section of the output. Ensure thatAllowedToCreateTenantsis not'True'.- Impact Statement
Enforcing this setting will ensure that only authorized users are able to create new tenants.
- Assessment Status
Automated
- Rationale Statement
It is recommended to only allow an administrator to create new tenants. This prevent users from creating new Microsoft Entra ID or Azure AD B2C tenants and ensures that only authorized users are able to do so.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. UnderManage, selectUser settings1. SetRestrict non-admin users from creating tenantstoYes1. ClickSaveRemediate from PowerShellImport-Module Microsoft.Graph.Identity.SignIns Connect-MgGraph -Scopes 'Policy.ReadWrite.Authorization' Select-MgProfile -Name beta $params = @{ DefaultUserRolePermissions = @{ AllowedToCreateTenants = $false } } Update-MgPolicyAuthorizationPolicy -AuthorizationPolicyId -BodyParameter $params
2.4Ensure Guest Users Are Reviewed on a Regular Basis0
Attributes
- Profile
Level 1
- Section
2 Identity
- Description
Microsoft Entra ID has native and extended identity functionality allowing you to invite people from outside your organization to be guest users in your cloud account and sign in with their own work, school, or social identities.
- Default Value
By default no guest users are created.
- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. Click onAdd filter1. SelectUser type1. SelectGuestfrom the Value dropdown1. ClickApply1. Audit the listed guest usersAudit 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 PolicyIf 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 Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. Click onAdd filter1. SelectUser type1. SelectGuestfrom the Value dropdown1. ClickApply1. Check the box next to allGuestusers that are no longer required or are inactive1. ClickDelete1. ClickOKRemediate from Azure CLIBefore 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 PowerShellBefore 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 Portal2. Select the 'Groups' item3. Create new4. 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.
2.5Ensure That 'Number of methods required to reset' is set to '2'0
Attributes
- Profile
Level 1
- Section
2 Identity
- Description
Ensures that two alternate forms of identification are provided before allowing a password reset.
- Default Value
By default, the
Number of methods required to resetis set to '2'.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. UnderManage, selectPassword reset1. SelectAuthentication methods1. Ensure thatNumber of methods required to resetis set to2- Impact Statement
There may be administrative overhead, as users who lose access to their secondary authentication methods will need an administrator with permissions to remove it. There will also need to be organization-wide security policies and training to teach administrators to verify the identity of the requesting user so that social engineering cannot render this setting useless.
- Assessment Status
Manual
- Rationale Statement
A Self-service Password Reset (SSPR) through Azure Multi-factor Authentication (MFA) ensures the user's identity is confirmed using two separate methods of identification. With multiple methods set, an attacker would have to compromise both methods before they could maliciously reset a user's password.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. UnderManage, selectPassword reset1. SelectAuthentication methods1. Set theNumber of methods required to resetto21. ClickSave
2.6Ensure that account 'Lockout Threshold' is less than or equal to '10'0
Attributes
- Profile
Level 1
- Section
2 Identity
- Description
The account lockout threshold determines how many failed login attempts are permitted prior to placing the account in a locked-out state and initiating a variable lockout duration.
- Default Value
By default, Lockout threshold is set to
10.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu.1. Select
Microsoft Entra ID.1. UnderManage, selectSecurity.1. UnderManage, selectAuthentication methods.1. UnderManage, selectPassword protection.1. Ensure thatLockout thresholdis set to10or fewer.- Impact Statement
If account lockout threshold is set too low (less than 3), users may experience frequent lockout events and the resulting security alerts may contribute to alert fatigue.If account lockout threshold is set too high (more than 10), malicious actors can programmatically execute more password attempts in a given period of time.
- Assessment Status
Manual
- Rationale Statement
Account lockout is a method of protecting against brute-force and password spray attacks. Once the lockout threshold has been exceeded, the account enters a locked-out state which prevents all login attempts for a variable duration. The lockout in combination with a reasonable duration reduces the total number of failed login attempts that a malicious actor can execute in a given period of time.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu.1. Select
Microsoft Entra ID.1. UnderManage, selectSecurity.1. UnderManage, selectAuthentication methods.1. UnderManage, selectPassword protection.1. Set theLockout thresholdto10or fewer.1. ClickSave.- Additional Information
NOTE: The variable number for failed login attempts allowed before lockout is prescribed by many security and compliance frameworks. The appropriate setting for this variable should be determined by the most restrictive security or compliance framework that your organization follows.
2.7Ensure that account 'Lockout duration in seconds' is greater than or equal to '60'0
Attributes
- Profile
Level 1
- Section
2 Identity
- Description
The account lockout duration value determines how long an account retains the status of lockout, and therefore how long before a user can continue to attempt to login after passing the lockout threshold.
- Default Value
By default, Lockout duration in seconds is set to
60.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu.1. Select
Microsoft Entra ID.1. UnderManage, selectSecurity.1. UnderManage, selectAuthentication methods.1. UnderManage, selectPassword protection.1. Ensure thatLockout duration in secondsis set to60or higher.- Impact Statement
If account lockout duration is set too low (less than 60 seconds), malicious actors can perform more password spray and brute-force attempts over a given period of time. If the account lockout duration is set too high (more than 300 seconds) users may experience inconvenient delays during lockout.
- Assessment Status
Manual
- Rationale Statement
Account lockout is a method of protecting against brute-force and password spray attacks. Once the lockout threshold has been exceeded, the account enters a locked-out state which prevents all login attempts for a variable duration. The lockout in combination with a reasonable duration reduces the total number of failed login attempts that a malicious actor can execute in a given period of time.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu.1. Select
Microsoft Entra ID.1. UnderManage, selectSecurity.1. UnderManage, selectAuthentication methods.1. UnderManage, selectPassword protection.1. Set theLockout duration in secondsto60or higher.1. ClickSave.
2.8Ensure that a Custom Bad Password List is set to 'Enforce' for your Organization0
Attributes
- Profile
Level 1
- Section
2 Identity
- Description
Microsoft Azure provides a Global Banned Password policy that applies to Azure administrative and normal user accounts. This is not applied to user accounts that are synced from an on-premise Active Directory unless Microsoft Entra ID Connect is used and you enable EnforceCloudPasswordPolicyForPasswordSyncedUsers.Please see the list in default values on the specifics of this policy. To further password security, it is recommended to further define a custom banned password policy.
- Default Value
By default the custom bad password list is not 'Enabled'.Organizational-specific terms can be added to the custom banned password list, such as the following examples:- Brand names- Product names- Locations, such as company headquarters- Company-specific internal terms- Abbreviations that have specific company meaning- Months and weekdays with your company's local languagesThe default Azure bad password policy is already applied to your resources which applies the following basic requirements:Characters allowed: - Uppercase characters (A - Z)- Lowercase characters (a - z)- Numbers (0 - 9)- Symbols:- @ # $ % ^ & * - _ ! + = [ ] { } | \ : ' , . ? / ` ~ ' ( ) ; < >- blank spaceCharacters not allowed:- Unicode characters- Password length Passwords require- A minimum of eight characters- A maximum of 256 characters**Password complexity:**Passwords require three out of four of the following categories:- Uppercase characters- Lowercase characters- Numbers- SymbolsNote: Password complexity check isn't required for Education tenants.Password not recently used:- When a user changes or resets their password, the new password can't be the same as the current or recently used passwords.- Password isn't banned by Entra ID Password Protection.- The password can't be on the global list of banned passwords for Azure AD Password Protection, or on the customizable list of banned passwords specific to your organization.
- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu.1. Select
Microsoft Entra ID.1. UnderManage, selectSecurity.1. UnderManage, selectAuthentication methods.1. UnderManage, selectPassword protection.1. EnsureEnforce custom listis set toYes.1. Review the list of words banned from use in passwords.- Impact Statement
Increasing needed password complexity might increase overhead on administration of user accounts.Licensing requirement for Global Banned Password List and Custom Banned Password list requires Microsoft Entra ID P1 or P2. On-premises Active Directory Domain Services users that are not synchronized to Microsoft Entra ID also benefit from Microsoft Entra ID Password Protection based on existing licensing for synchronized users.
- Assessment Status
Manual
- Rationale Statement
Enabling this gives your organization further customization on what secure passwords are allowed. Setting a bad password list enables your organization to fine-tune its password policy further, depending on your needs. Removing easy-to-guess passwords increases the security of access to your Azure resources.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectSecurity.1. UnderManage, selectAuthentication methods.1. UnderManage, selectPassword protection.1. Set theEnforce custom listoption toYes.1. Click in theCustom banned password listtext box to add a string.1. ClickSave.
2.9Ensure that 'Number of days before users are asked to re-confirm their authentication information' is not set to '0'0
Attributes
- Profile
Level 1
- Section
2 Identity
- Description
Ensure that the number of days before users are asked to re-confirm their authentication information is not set to 0.
- Default Value
By default, the
Number of days before users are asked to re-confirm their authentication informationis set to '180 days'.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. UnderManage, selectPassword reset1. UnderManage, selectRegistration1. Ensure thatNumber of days before users are asked to re-confirm their authentication informationis not set to0`- Impact Statement
Users will be prompted for their multifactor authentication at the duration set here.
- Assessment Status
Manual
- Rationale Statement
This setting is necessary if you have setup 'Require users to register when signing in option'. If authentication re-confirmation is disabled, registered users will never be prompted to re-confirm their existing authentication information. If the authentication information for a user changes, such as a phone number or email, then the password reset information for that user reverts to the previously registered authentication information.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. UnderManage, selectPassword reset1. UnderManage, selectRegistration1. Set theNumber of days before users are asked to re-confirm their authentication informationto your organization-defined frequency1. ClickSave`
2.10Ensure that 'Notify users on password resets?' is set to 'Yes'0
Attributes
- Profile
Level 1
- Section
2 Identity
- Description
Ensure that users are notified on their primary and alternate emails on password resets.
- Default Value
By default,
Notify users on password resets?is set to 'Yes'.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. UnderManage, selectPassword reset1. UnderManage, selectNotifications1. Ensure thatNotify users on password resets?is set toYes- Impact Statement
Users will receive emails alerting them to password changes to both their primary and alternate emails.
- Assessment Status
Manual
- Rationale Statement
User notification on password reset is a proactive way of confirming password reset activity. It helps the user to recognize unauthorized password reset activities.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. UnderManage, selectPassword reset1. UnderManage, selectNotifications1. SetNotify users on password resets?toYes1. ClickSave
2.11Ensure That 'Notify all admins when other admins reset their password?' is set to 'Yes'0
Attributes
- Profile
Level 1
- Section
2 Identity
- Description
Ensure that all Global Administrators are notified if any other administrator resets their password.
- Default Value
By default,
Notify all admins when other admins reset their password?is set to 'No'.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. UnderManage, selectPassword reset1. UnderManage, selectNotifications1. Ensure thatNotify all admins when other admins reset their password?is set toYes- Impact Statement
All Global Administrators will receive a notification from Azure every time a password is reset. This is useful for auditing procedures to confirm that there are no out of the ordinary password resets for Administrators. There is additional overhead, however, in the time required for Global Administrators to audit the notifications. This setting is only useful if all Global Administrators pay attention to the notifications and audit each one.
- Assessment Status
Manual
- Rationale Statement
Administrator accounts are sensitive. Any password reset activity notification, when sent to all Administrators, ensures that all Global Administrators can passively confirm if such a reset is a common pattern within their group. For example, if all Administrators change their password every 30 days, any password reset activity before that may require administrator(s) to evaluate any unusual activity and confirm its origin.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. UnderManage, selectPassword reset1. UnderManage, selectNotifications1. SetNotify all admins when other admins reset their password?toYes1. ClickSave
2.12Ensure `User consent for applications` is set to `Do not allow user consent`1
Attributes
- Profile
Level 1
- Section
2 Identity
- Description
Require administrators to provide consent for applications before use.
- Default Value
By default,
Users consent for applicationsis set toAllow user consent for apps.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectEnterprise applications1. UnderSecurity, selectConsent and permissions1. UnderManage, selectUser consent settings1. EnsureUser consent for applicationsis set toDo not allow user consentAudit from PowerShellConnect-MgGraph(Get-MgPolicyAuthorizationPolicy).DefaultUserRolePermissions | Select-Object -ExpandProperty PermissionGrantPoliciesAssignedIf the command returns no values in response, the configuration complies with the recommendation.- Impact Statement
Enforcing this setting may create additional requests that administrators need to review.
- Assessment Status
Manual
- Rationale Statement
If Microsoft Entra ID is running as an identity provider for third-party applications, permissions and consent should be limited to administrators or pre-approved. Malicious applications may attempt to exfiltrate data or abuse privileged user accounts.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectEnterprise applications1. UnderSecurity, selectConsent and permissions1. UnderManage, selectUser consent settings1. SetUser consent for applicationstoDo not allow user consent1. ClickSave
2.13Ensure ‘User consent for applications’ Is Set To ‘Allow for Verified Publishers’1
Attributes
- Profile
Level 2
- Section
2 Identity
- Description
Allow users to provide consent for selected permissions when a request is coming from a verified publisher.
- Default Value
By default,
User consent for applicationsis set toAllow user consent for apps.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectEnterprise applications1. UnderSecurity, selectConsent and permissions1. UnderManage, selectUser consent settings1. UnderUser consent for applications, ensureAllow user consent for apps from verified publishers, for selected permissionsis selected**Audit from PowerShell**```Connect-MgGraph(Get-MgPolicyAuthorizationPolicy).DefaultUserRolePermissions | Select-Object -ExpandProperty PermissionGrantPoliciesAssigned```The command should return eitherManagePermissionGrantsForSelf.microsoft-user-default-low` or a custom app consent policy id if one is in use.- Impact Statement
Enforcing this setting may create additional requests that administrators need to review.
- Assessment Status
Manual
- Rationale Statement
If Microsoft Entra ID is running as an identity provider for third-party applications, permissions and consent should be limited to administrators or pre-approved. Malicious applications may attempt to exfiltrate data or abuse privileged user accounts.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectEnterprise applications1. UnderSecurity, selectConsent and permissions1. UnderManage, selectUser consent settings1. UnderUser consent for applications, selectAllow user consent for apps from verified publishers, for selected permissions1. ClickSave`
2.14Ensure That ‘Users Can Register Applications’ Is Set to ‘No’1
Attributes
- Profile
Level 1
- Section
2 Identity
- Description
Require administrators or appropriately delegated users to register third-party applications.
- Default Value
By default,
Users can register applicationsis set to 'Yes'.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. UnderManage, selectUser settings1. Ensure thatUsers can register applicationsis set toNoAudit from PowerShell(Get-MgPolicyAuthorizationPolicy).DefaultUserRolePermissions | Format-List AllowedToCreateAppsCommand should return the value ofFalse- Impact Statement
Enforcing this setting will create additional requests for approval that will need to be addressed by an administrator. If permissions are delegated, a user may approve a malevolent third party application, potentially giving it access to your data.
- Assessment Status
Automated
- Rationale Statement
It is recommended to only allow an administrator to register custom-developed applications. This ensures that the application undergoes a formal security review and approval process prior to exposing Microsoft Entra ID data. Certain users like developers or other high-request users may also be delegated permissions to prevent them from waiting on an administrative user. Your organization should review your policies and decide your needs.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. UnderManage, selectUser settings1. SetUsers can register applicationstoNo1. ClickSaveRemediate from PowerShell$param = @{ AllowedToCreateApps = '$false' } Update-MgPolicyAuthorizationPolicy -DefaultUserRolePermissions $param
2.15Ensure That 'Guest users access restrictions' is set to 'Guest user access is restricted to properties and memberships of their own directory objects'1
Attributes
- Profile
Level 1
- Section
2 Identity
- Description
Limit guest user permissions.
- Default Value
By default,
Guest user access restrictionsis set toGuest users have limited access to properties and memberships of directory objects.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectExternal Identities1. SelectExternal collaboration settings1. UnderGuest user access, ensure thatGuest user access restrictionsis set toGuest user access is restricted to properties and memberships of their own directory objectsAudit from PowerShell1. Enter the following:Connect-MgGraph(Get-MgPolicyAuthorizationPolicy).GuestUserRoleIdWhich will give a result like:Id : authorizationPolicyOdataType :Description : Used to manage authorization related settings across the company.DisplayName : Authorization PolicyEnabledPreviewFeatures : {}GuestUserRoleId : 10dae51f-b6af-4016-8d66-8c2a99b929b3PermissionGrantPolicyIdsAssignedToDefaultUserRole : {user-default-legacy}If the GuestUserRoleID property does not equal2af84b1e-32c8-42b7-82bc-daa82404023bthen it is not set to most restrictive.- Impact Statement
This may create additional requests for permissions to access resources that administrators will need to approve.According to https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/users-restrict-guest-permissions#services-currently-not-supportedService without current support might have compatibility issues with the new guest restriction setting.- Forms- Project- Yammer- Planner in SharePoint
- Assessment Status
Automated
- Rationale Statement
Limiting guest access ensures that guest accounts do not have permission for certain directory tasks, such as enumerating users, groups or other directory resources, and cannot be assigned to administrative roles in your directory. Guest access has three levels of restriction.1. Guest users have the same access as members (most inclusive),2. Guest users have limited access to properties and memberships of directory objects (default value),3. Guest user access is restricted to properties and memberships of their own directory objects (most restrictive).The recommended option is the 3rd, most restrictive: 'Guest user access is restricted to their own directory object'.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectExternal Identities1. SelectExternal collaboration settings1. UnderGuest user access, setGuest user access restrictionstoGuest user access is restricted to properties and memberships of their own directory objects1. ClickSaveRemediate from PowerShell1. Enter the following to update the policy ID:Update-MgPolicyAuthorizationPolicy -GuestUserRoleId '2af84b1e-32c8-42b7-82bc-daa82404023b'1. Check the GuestUserRoleId again:(Get-MgPolicyAuthorizationPolicy).GuestUserRoleId1. Ensure that the GuestUserRoleId is equal to the earlier entered value of2af84b1e-32c8-42b7-82bc-daa82404023b.
2.16Ensure that 'Guest invite restrictions' is set to 'Only users assigned to specific admin roles can invite guest users'1
Attributes
- Profile
Level 2
- Section
2 Identity
- Description
Restrict invitations to users with specific administrative roles only.
- Default Value
By default,
Guest invite restrictionsis set toAnyone in the organization can invite guest users including guests and non-admins- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectExternal Identities1. SelectExternal collaboration settings1. UnderGuest invite settings, forGuest invite restrictions, ensure thatOnly users assigned to specific admin roles can invite guest usersis selectedNote: This setting has 4 levels of restriction, which include:- Anyone in the organization can invite guest users including guests and non-admins (most inclusive),- Member users and users assigned to specific admin roles can invite guest users including guests with member permissions,- Only users assigned to specific admin roles can invite guest users,- No one in the organization can invite guest users including admins (most restrictive).Audit from PowershellEnter the following:Connect-MgGraph(Get-MgPolicyAuthorizationPolicy).AllowInvitesFromIf the resulting value isadminsAndGuestInvitersthe configuration complies.- Impact Statement
With the option of
Only users assigned to specific admin roles can invite guest usersselected, users with specific admin roles will be in charge of sending invitations to the external users, requiring additional overhead by them to manage user accounts. This will mean coordinating with other departments as they are onboarding new users.- Assessment Status
Automated
- Rationale Statement
Restricting invitations to users with specific administrator roles ensures that only authorized accounts have access to cloud resources. This helps to maintain 'Need to Know' permissions and prevents inadvertent access to data.By default the setting
Guest invite restrictionsis set toAnyone in the organization can invite guest users including guests and non-admins. This would allow anyone within the organization to invite guests and non-admins to the tenant, posing a security risk.- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectExternal Identities1. SelectExternal collaboration settings1. UnderGuest invite settings, setGuest invite restrictions, toOnly users assigned to specific admin roles can invite guest users1. ClickSaveRemediate from PowershellEnter the following:Connect-MgGraphUpdate-MgPolicyAuthorizationPolicy -AllowInvitesFrom 'adminsAndGuestInviters'
2.17Ensure That 'Restrict access to Microsoft Entra admin center' is Set to 'Yes'0
Attributes
- Profile
Level 1
- Section
2 Identity
- Description
Restrict access to the Microsoft Entra ID administration center to administrators only.NOTE: This only affects access to the Entra ID administrator's web portal. This setting does not prohibit privileged users from using other methods such as Rest API or Powershell to obtain sensitive information from Microsoft Entra ID.
- Default Value
By default,
Restrict access to Microsoft Entra admin centeris set toNo- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. UnderManage, selectUser settings1. UnderAdministration centre, ensure thatRestrict access to Microsoft Entra admin centeris set toYes- Impact Statement
All administrative tasks will need to be done by Administrators, causing additional overhead in management of users and resources.
- Assessment Status
Manual
- Rationale Statement
The Microsoft Entra ID administrative center has sensitive data and permission settings. All non-administrators should be prohibited from accessing any Microsoft Entra ID data in the administration center to avoid exposure.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectUsers1. UnderManage, selectUser settings1. UnderAdministration centre, setRestrict access to Microsoft Entra admin centertoYes1. ClickSave
2.18Ensure that 'Restrict user ability to access groups features in the Access Pane' is Set to 'Yes'0
Attributes
- Profile
Level 2
- Section
2 Identity
- Description
Restrict access to group web interface in the Access Panel portal.
- Default Value
By default,
Restrict user ability to access groups features in the Access Paneis set toNo- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectGroups1. UnderSettings, selectGeneral1. UnderSelf Service Group Management, ensure thatRestrict user ability to access groups features in My Groupsis set toYes- Impact Statement
Setting to
Yescould create administrative overhead by customers seeking certain group memberships that will have to be manually managed by administrators with appropriate permissions.- Assessment Status
Manual
- Rationale Statement
Self-service group management enables users to create and manage security groups or Office 365 groups in Microsoft Entra ID. Unless a business requires this day-to-day delegation for some users, self-service group management should be disabled. Any user can access the Access Panel, where they can reset their passwords, view their information, etc. By default, users are also allowed to access the Group feature, which shows groups, members, related resources (SharePoint URL, Group email address, Yammer URL, and Teams URL). By setting this feature to 'Yes', users will no longer have access to the web interface, but still have access to the data using the API. This is useful to prevent non-technical users from enumerating groups-related information, but technical users will still be able to access this information using APIs.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectGroups1. UnderSettings, selectGeneral1. UnderSelf Service Group Management, setRestrict user ability to access groups features in My GroupstoYes1. ClickSave
2.19Ensure that 'Users can create security groups in Azure portals, API or PowerShell' is set to 'No'1
Attributes
- Profile
Level 2
- Section
2 Identity
- Description
Restrict security group creation to administrators only.
- Default Value
By default,
Users can create security groups in Azure portals, API or PowerShellis set toYes- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectGroups1. UnderSettings, selectGeneral1. UnderSecurity Groups, ensure thatUsers can create security groups in Azure portals, API or PowerShellis set toNo- Impact Statement
Enabling this setting could create a number of requests that would need to be managed by an administrator.
- Assessment Status
Manual
- Rationale Statement
When creating security groups is enabled, all users in the directory are allowed to create new security groups and add members to those groups. Unless a business requires this day-to-day delegation, security group creation should be restricted to administrators only.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectGroups1. UnderSettings, selectGeneral1. UnderSecurity Groups, setUsers can create security groups in Azure portals, API or PowerShelltoNo1. ClickSave
2.20Ensure that 'Owners can manage group membership requests in My Groups' is set to 'No'0
Attributes
- Profile
Level 2
- Section
2 Identity
- Description
Restrict security group management to administrators only.
- Default Value
By default,
Owners can manage group membership requests in My Groupsis set toNo.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectGroups1. UnderSettings, selectGeneral1. UnderSelf Service Group Management, ensure thatOwners can manage group membership requests in My Groupsis set toNo- Impact Statement
Group Membership for user accounts will need to be handled by Admins and cause administrative overhead.
- Assessment Status
Manual
- Rationale Statement
Restricting security group management to administrators only prohibits users from making changes to security groups. This ensures that security groups are appropriately managed and their management is not delegated to non-administrators.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectGroups1. UnderSettings, selectGeneral1. UnderSelf Service Group Management, setOwners can manage group membership requests in My GroupstoNo1. ClickSave
2.21Ensure that 'Users can create Microsoft 365 groups in Azure portals, API or PowerShell' is set to 'No'1
Attributes
- Profile
Level 2
- Section
2 Identity
- Description
Restrict Microsoft 365 group creation to administrators only.
- Default Value
By default,
Users can create Microsoft 365 groups in Azure portals, API or PowerShellis set toYes.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectGroups1. UnderSettings, selectGeneral1. UnderMicrosoft 365 Groups, ensure thatUsers can create Microsoft 365 groups in Azure portals, API or PowerShellis set toNo- Impact Statement
Enabling this setting could create a number of requests that would need to be managed by an administrator.
- Assessment Status
Manual
- Rationale Statement
Restricting Microsoft 365 group creation to administrators only ensures that creation of Microsoft 365 groups is controlled by the administrator. Appropriate groups should be created and managed by the administrator and group creation rights should not be delegated to any other user.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectGroups1. UnderSettings, selectGeneral1. UnderMicrosoft 365 Groups, setUsers can create Microsoft 365 groups in Azure portals, API or PowerShelltoNo1. ClickSave
2.22Ensure that 'Require Multifactor Authentication to register or join devices with Microsoft Entra' is set to 'Yes'0
Attributes
- Profile
Level 1
- Section
2 Identity
- Description
NOTE: This recommendation is only relevant if your subscription is using Per-User MFA. If your organization is licensed to use Conditional Access, the preferred method of requiring MFA to join devices to Entra ID is to use a Conditional Access policy (see additional information below for link).Joining or registering devices to Microsoft Entra ID should require multi-factor authentication.
- Default Value
By default,
Require Multifactor Authentication to register or join devices with Microsoft Entrais set toNo.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. 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 Portal1. From Azure Home select the Portal Menu1. 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
2.23Ensure That No Custom Subscription Administrator Roles Exist1
Attributes
- Profile
Level 1
- Section
2 Identity
- Description
The principle of least privilege should be followed and only necessary privileges should be assigned instead of allowing full administrative access.
- Default Value
By default, no custom owner roles are created.
- Audit Procedure
Audit from Azure Portal1. 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 CLIList custom roles:az role definition list --custom-role-only TrueCheck for entries withassignableScopeof thesubscription, and an action of*Audit from PowerShellConnect-AzAccountGet-AzRoleDefinition |Where-Object {($_.IsCustom -eq $true) -and ($_.Actions.contains('*'))}Check the output forAssignableScopesvalue set to the subscription.Audit from Azure PolicyIf 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 Portal1. 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 CLIList 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.
2.24Ensure a Custom Role is Assigned Permissions for Administering Resource Locks1
Attributes
- Profile
Level 2
- Section
2 Identity
- Description
Resource locking is a powerful protection mechanism that can prevent inadvertent modification/deletion of resources within Azure subscriptions/Resource Groups and is a recommended NIST configuration.
- Audit Procedure
Audit from Azure Portal1. In the Azure portal, open a subscription or resource group where you want to view assigned roles.2. Select
Access control (IAM)3. SelectRoles4. Search for the custom role named <role_name> e.g. from remediationResource Lock Administrator5. Ensure that the role is assigned to the appropriate users.- Impact Statement
By adding this role, specific permissions may be granted for managing just resource locks rather than needing to provide the wide Owner or User Access Administrator role, reducing the risk of the user being able to do unintentional damage.
- Assessment Status
Manual
- Rationale Statement
Given 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 Portal1. In the Azure portal, open a subscription or resource group where you want the custom role to be assigned.1. Select
Access control (IAM).1. ClickAdd.1. SelectAdd custom role.1. In theCustom role namefield enterResource Lock Administrator.1. In the Description field enterCan Administer Resource Locks.1. For Baseline permissions selectStart from scratch1. SelectNext.1. In the Permissions tab selectAdd permissions.1. In the Search for a permission box, type inMicrosoft.Authorization/locksto search for permissions.1. Click on the result.1. Check the box next toPermission.1. SelectAdd.1. SelectReview + create.1. SelectCreate.1. Assign the newly created role to the appropriate user.**Remediate from PowerShell:**Below is a power shell definition for a resource lock administrator role created at an Azure Management group levelImport-Module Az.AccountsConnect-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 $roleGet-AzureRmRoleDefinition 'Resource Lock Administrator'
2.25Ensure That 'Subscription leaving Microsoft Entra tenant' and 'Subscription entering Microsoft Entra tenant' Is Set To 'Permit no one'0
Attributes
- Profile
Level 2
- Section
2 Identity
- Description
Users who are set as subscription owners are able to make administrative changes to the subscriptions and move them into and out of Microsoft Entra ID.
- Default Value
By default
Subscription leaving Microsoft Entra tenantandSubscription entering Microsoft Entra tenantare set toAllow everyone (default)- Audit Procedure
Audit from Azure Portal1. From the Azure Portal Home select the portal menu1. 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 Portal1. From the Azure Portal Home select the portal menu1. Select
Subscriptions1. In theAdvanced optionsdrop-down menu, selectManage Policies1. SetSubscription leaving Microsoft Entra tenantandSubscription entering Microsoft Entra tenanttoPermit no one1. ClickSave changes
2.26Ensure fewer than 5 users have global administrator assignment1
Attributes
- Profile
Level 1
- Section
2 Identity
- Description
This recommendation aims to maintain a balance between security and operational efficiency by ensuring that a minimum of 2 and a maximum of 4 users are assigned the Global Administrator role in Microsoft Entra ID. Having at least two Global Administrators ensures redundancy, while limiting the number to four reduces the risk of excessive privileged access.
- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectRoles and administrators1. UnderAdministrative Roles, selectGlobal Administrator1. Ensure less than 5 users are actively assigned the role.1. Ensure that at least 2 users are actively assigned the role.- Impact Statement
Implementing this recommendation may require changes in administrative workflows or the redistribution of roles and responsibilities. Adequate training and awareness should be provided to all Global Administrators.
- Assessment Status
Manual
- Rationale Statement
The Global Administrator role has extensive privileges across all services in Microsoft Entra ID. The Global Administrator role should never be used in regular daily activities; administrators should have a regular user account for daily activities, and a separate account for administrative responsibilities. Limiting the number of Global Administrators helps mitigate the risk of unauthorized access, reduces the potential impact of human error, and aligns with the principle of least privilege to reduce the attack surface of an Azure tenant. Conversely, having at least two Global Administrators ensures that administrative functions can be performed without interruption in case of unavailability of a single admin.
- Remediation Procedure
Remediate from Azure Portal 1. From Azure Home select the Portal Menu1. Select
Microsoft Entra ID1. UnderManage, selectRoles and administrators1. UnderAdministrative Roles, selectGlobal AdministratorIf more than 4 users are assigned:1. Remove Global Administrator role for users which do not or no longer require the role.1. Assign Global Administrator role via PIM which can be activated when required.1. Assign more granular roles to users to conduct their duties.If only one user is assigned:1. Provide the Global Administrator role to a trusted user or create a break glass admin account.
3 Security3428
3.1.1.1Ensure that Auto provisioning of 'Log Analytics agent for Azure VMs' is Set to 'On'1
Attributes
- Profile
Level 1
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Enable automatic provisioning of the monitoring agent to collect security data.DEPRECATION PLANNED: The Log Analytics Agent is slated for deprecation in August 2024. The Microsoft Defender for Endpoint agent, in tandem with new agentless capabilities will be providing replacement functionality. More detail is available here: https://techcommunity.microsoft.com/t5/microsoft-defender-for-cloud/microsoft-defender-for-cloud-strategy-and-plan-towards-log/ba-p/3883341.
- Default Value
By default,
Automatic provisioning of monitoring agentis set toOn.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Defender for Cloud1. UnderManagement, selectEnvironment Settings1. Select a subscription1. Click onSettings & monitoring1. Ensure thatLog Analytics agentis set toOnRepeat the above for any additional subscriptions.Audit from Azure CLIEnsure the output of the below command isOn````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/<subscriptionID>/providers/Microsoft.Security/autoProvisioningSettings?api-version=2017-08-01-preview' | jq '.|.value[] | select(.name=='default')'|jq '.properties.autoProvision'```**Audit from PowerShell**```Connect-AzAccountGet-AzSecurityAutoProvisioningSetting | Select-Object Name, AutoProvision```Ensure output forId Name AutoProvisionis/subscriptions//providers/Microsoft.Security/autoProvisioningSettings/default default On`Audit from Azure PolicyIf 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: 475aae12-b88a-4572-8b36-9b712b2b3a17 - Name: 'Auto provisioning of the Log Analytics agent should be enabled on your subscription'- Assessment Status
Automated
- Rationale Statement
When
Log Analytics agent for Azure VMsis turned on, Microsoft Defender for Cloud provisions the Microsoft Monitoring Agent on all existing supported Azure virtual machines and any new ones that are created. The Microsoft Monitoring Agent scans for various security-related configurations and events such as system updates, OS vulnerabilities, endpoint protection, and provides alerts.- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Defender for Cloud1. UnderManagement, selectEnvironment Settings1. Select a subscription1. Click onSettings & monitoring1. Set theStatusofLog Analytics agenttoOn1. Select a Workspace1. ClickApply1. ClickContinueRepeat the above for any additional subscriptions.Remediate from Azure CLIUse the below command to setAutomatic provisioning of monitoring agenttoOn.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/subscriptionID/providers/Microsoft.Security/autoProvisioningSettings/default?api-version=2017-08-01-preview -d@'input.json''Whereinput.jsoncontains the Request body json data as mentioned below.{ 'id': '/subscriptions/<Your_Subscription_Id>/providers/Microsoft.Security/autoProvisioningSettings/default', 'name': 'default', 'type': 'Microsoft.Security/autoProvisioningSettings', 'properties': { 'autoProvision': 'On' }}- Additional Information
'- Excluding any of the entries in
input.jsonmay disable the specific setting by default- Microsoft has recently changed APIs to get and Update Automatic Provisioning Setting. This recommendation is updated accordingly.DEPRECATION PLANNED: The Log Analytics Agent is slated for deprecation in August 2024. The Microsoft Defender for Endpoint agent, in tandem with new agentless capabilities will be providing replacement functionality. More detail is available here: https://techcommunity.microsoft.com/t5/microsoft-defender-for-cloud/microsoft-defender-for-cloud-strategy-and-plan-towards-log/ba-p/3883341.
3.1.1.2Ensure that Microsoft Defender for Cloud Apps integration with Microsoft Defender for Cloud is Selected1
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
This integration setting enables Microsoft Defender for Cloud Apps (formerly 'Microsoft Cloud App Security' or 'MCAS' - see additional info) to communicate with Microsoft Defender for Cloud.
- Default Value
With Cloud App Security license, these alerts are enabled by default.
- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu.1. Select
Microsoft Defender for Cloud.1. UnderManagement, selectEnvironment Settings.1. Click on the subscription name.1. Select theIntegrationsblade.1. Ensure settingAllow Microsoft Defender for Cloud Apps to access my datais selected.Audit from Azure CLIEnsure the output of the below command is `true````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/<subscription_ID>/providers/Microsoft.Security/settings?api-version=2021-06-01' | jq '.|.value[] | select(.name=='MCAS')'|jq '.properties.enabled'**Audit from PowerShell**Run the following series of commands to audit this configurationGet-AzAccount Set-AzContext -Subscription <subscription ID> Get-AzSecuritySetting | Select-Object name,enabled |where-object {$_.name -eq 'MCAS'}**PowerShell Output - Non-Compliant**Name Enabled---- -------MCAS False**PowerShell Output - Compliant**Name Enabled---- -------MCAS True```- Impact Statement
Microsoft Defender for Cloud Apps works with Standard pricing tier Subscription. Choosing the Standard pricing tier of Microsoft Defender for Cloud incurs an additional cost per resource.
- Assessment Status
Automated
- Rationale Statement
Microsoft Defender for Cloud offers an additional layer of protection by using Azure Resource Manager events, which is considered to be the control plane for Azure. By analyzing the Azure Resource Manager records, Microsoft Defender for Cloud detects unusual or potentially harmful operations in the Azure subscription environment.Several of the preceding analytics are powered by Microsoft Defender for Cloud Apps. To benefit from these analytics, subscription must have a Cloud App Security license. Microsoft Defender for Cloud Apps works only with Standard Tier subscriptions.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu.1. Select
Microsoft Defender for Cloud.1. UnderManagement, selectEnvironment Settings.1. Select the subscription.1. SelectIntegrations.1. CheckAllow Microsoft Defender for Cloud Apps to access my data.1. SelectSave.Remediate from Azure CLIUse 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/<subscription_ID>/providers/Microsoft.Security/settings/MCAS?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/MCAS', 'kind': 'DataExportSetting', 'type': 'Microsoft.Security/settings', 'properties': { 'enabled': true }}- Additional Information
NOTE: 'Microsoft Defender for Cloud Apps' ('MDCA') is formerly known as 'Microsoft Cloud App Security' ('MCAS'). There are a number of places (e.g. Azure CLI) where the 'MCAS' acronym is still used within Azure.
3.1.3.1Ensure That Microsoft Defender for Servers Is Set to 'On'1
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Turning on Microsoft Defender for Servers enables threat detection for Servers, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud.
- Default Value
By default, Microsoft Defender for Servers plan is off.
- Audit Procedure
Audit from Azure Portal1. Go to
Microsoft Defender for Cloud1. UnderManagement, selectEnvironment Settings1. Click on the subscription name1. SelectDefender plansin the left pane1. UnderCloud Workload Protection (CWP), locateServerin the Plan column, ensure Status is set toOn.Audit from Azure CLIRun the following command:az security pricing show -n VirtualMachines --query pricingTierIf the tenant is licensed and enabled, the output should indicateStandardAudit from PowerShellRun the following command:Get-AzSecurityPricing -Name 'VirtualMachines' |Select-Object Name,PricingTierIf the tenant is licensed and enabled, the-PricingTierparameter will indicateStandardAudit from Azure PolicyIf 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
Turning on Microsoft Defender for Servers in Microsoft Defender for Cloud incurs an additional cost per resource.Two Defender for Servers plans exist:- Plan 1: Subscription only- Plan 2: Subscription and workspace
- Assessment Status
Automated
- Rationale Statement
Enabling Microsoft 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 Portal1. Go to
Microsoft Defender for Cloud1. UnderManagement, selectEnvironment Settings1. Click on the subscription name1. ClickDefender plansin the left pane1. UnderCloud Workload Protection (CWP), locateServerin the Plan column, set Status toOn1. SelectSaveRemediate from Azure CLIRun the following command:az security pricing create -n VirtualMachines --tier 'standard'Remediate from PowerShellRun the following command:Set-AzSecurityPricing -Name 'VirtualMachines' -PricingTier 'Standard'
3.1.3.2Ensure that 'Vulnerability assessment for machines' component status is set to 'On'1
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Enable vulnerability assessment for machines on both Azure and hybrid (Arc enabled) machines.
- Default Value
By default,
Automatic provisioning of monitoring agentis set toOff.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Defender for Cloud1. UnderManagement, selectEnvironment Settings1. Select a subscription1. 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 Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Defender for Cloud1. UnderManagement, selectEnvironment Settings1. Select a subscription1. 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.
3.1.3.3Ensure that 'Endpoint protection' component status is set to 'On'0
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
The Endpoint protection component enables Microsoft Defender for Endpoint (formerly 'Advanced Threat Protection' or 'ATP' or 'WDATP' - see additional info) to communicate with Microsoft Defender for Cloud.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.
- Default Value
By default, Endpoint protection is
off.- Audit Procedure
Audit from Azure Portal1. 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 CLIEnsure the output of the below command is `True````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/<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-Compliant**Name Enabled---- -------WDATP False**PowerShell Output - Compliant**Name 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
Manual
- 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 Portal1. 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 CLIUse 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.
3.1.3.4Ensure that 'Agentless scanning for machines' component status is set to 'On'0
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Using disk snapshots, the agentless scanner scans for installed software, vulnerabilities, and plain text secrets.
- Default Value
By default, Agentless scanning for machines is
off.- Audit Procedure
Audit from Azure Portal1. From the Azure Portal
Homepage, selectMicrosoft Defender for Cloud1. UnderManagementselectEnvironment Settings1. Select a subscription1. UnderSettings>Defender Plans, clickSettings & monitoring1. Under the Component column, locate the row forAgentless scanning for machines1. Ensure thatOnis selectedRepeat 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 Portal1. From the Azure Portal
Homepage, selectMicrosoft Defender for Cloud1. UnderManagementselectEnvironment Settings1. Select a subscription1. 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.
3.1.3.5Ensure that 'File Integrity Monitoring' component status is set to 'On'0
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
File Integrity Monitoring (FIM) is a feature that monitors critical system files in Windows or Linux for potential signs of attack or compromise.
- Default Value
By default, File Integrity Monitoring is
Off.- Audit Procedure
Audit from Azure Portal1. From the Azure Portal
Homepage, selectMicrosoft Defender for Cloud1. UnderManagementselectEnvironment Settings1. Select a subscription1. UnderSettings>Defender Plans, clickSettings & monitoring1. Under the Component column, locate the row forFile Integrity Monitoring1. Ensure thatOnis selectedRepeat 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 Portal1. From the Azure Portal
Homepage, selectMicrosoft Defender for Cloud1. UnderManagementselectEnvironment Settings1. Select a subscription1. 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.
3.1.4.1Ensure That Microsoft Defender for Containers Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Turning on Microsoft Defender for Containers enables threat detection for Container Registries including Kubernetes, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud. The following services will be enabled for container instances:- Defender agent in Azure- Azure Policy for Kubernetes- Agentless discovery for Kubernetes- Agentless container vulnerability assessment
- Default Value
By default, Microsoft Defender for Containers is off.
- Audit Procedure
Audit from Azure Portal1. Go to
Microsoft Defender for Cloud.2. UnderManagement, selectEnvironment Settings.3. Click on the subscription name.4. SelectDefender plans.5. Ensure theStatusforContainersis set toOn.Audit from Azure CLIEnsure the output of the commands below indicatesStandardpricing.For legacy Defender for Container Registries instances:az security pricing show --name 'ContainerRegistry' --query pricingTierFor new Defender for Containers instances:az security pricing show --name 'Containers' --query pricingTierAudit from PowerShellEnsure the output of the commands below indicatesStandardpricing.For legacy Defender for Container Registries instances:Get-AzSecurityPricing -Name 'ContainerRegistry' | Select-Object Name,PricingTierFor new Defender for Containers instances:Get-AzSecurityPricing -Name 'Containers' | Select-Object Name,PricingTierAudit from Azure PolicyIf 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
Turning on Microsoft Defender for Containers incurs an additional cost per resource.
- Assessment Status
Automated
- Rationale Statement
Enabling Microsoft Defender for Container Registries allows for greater defense-in-depth, with threat detection provided by the Microsoft Security Response Center (MSRC).
- Remediation Procedure
Remediate from Azure Portal1. Go to
Microsoft Defender for Cloud.2. UnderManagement, selectEnvironment Settings.3. Click on the subscription name.4. SelectDefender plans.5. SetStatustoOnforContainers.6. ClickSave.Remediate from Azure CLI(Note: 'ContainerRegistry' has been deprecated and is replaced by 'Containers')Use the below command to enable Standard pricing tier for Containers.az security pricing create -n 'Containers' --tier 'standard'Remediate from PowerShell(Note: 'ContainerRegistry' has been deprecated and is replaced by 'Containers')Use the below command to enable Standard pricing tier for Containers.Set-AzSecurityPricing -Name 'Containers' -PricingTier 'Standard'- Additional Information
Deprecation of previous product plans 'Container registries' and 'Kubernetes' plans for Microsoft Defender are being deprecated and replaced with 'Containers' or Microsoft Defender for Containers.
3.1.4.2Ensure that 'Agentless discovery for Kubernetes' component status 'On'0
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Enable automatic discovery and configuration scanning of the Microsoft Kubernetes clusters.
- Default Value
By default, Microsoft Defender for Containers is
Off.If Defender for Containers is enabled from the Microsoft Defender for Cloud portal, auto provisioning will be enabled.- Audit Procedure
Audit from Azure Portal1. From the Azure Portal
Homepage, selectMicrosoft Defender for Cloud1. UnderManagementselectEnvironment Settings1. Select a subscription1. UnderSettings>Defender Plans, clickSettings & monitoring1. Locate the row forAgentless discovery for Kubernetes1. Ensure thatOnis selectedRepeat the above for any additional subscriptions.Audit from Azure PolicyIf 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
Agentless discovery for Kubernetes requires licensing and is included in:- Defender CSPM- Defender for Containers plans.
- Assessment Status
Automated
- Rationale Statement
As with any compute resource, Container environments require hardening and run-time protection to ensure safe operations and detection of threats and vulnerabilities.
- Remediation Procedure
Audit from Azure Portal1. From the Azure Portal
Homepage, selectMicrosoft Defender for Cloud1. UnderManagementselectEnvironment Settings1. Select a subscription1. UnderSettings>Defender Plans, clickSettings & monitoring1. Locate the row forAgentless discovery for Kubernetes1. SelectOn1. ClickContinuein the top left Repeat the above for any additional subscriptions.
3.1.4.3Ensure that 'Agentless container vulnerability assessment' component status is 'On'0
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Enable automatic vulnerability management for images stored in ACR or running in AKS clusters.
- Default Value
By default, Microsoft Defender for Containers is
Off.If Defender for Containers is enabled from the Microsoft Defender for Cloud portal, auto provisioning will be enabled.- Audit Procedure
Audit from Azure Portal1. From the Azure Portal
Homepage, selectMicrosoft Defender for Cloud1. UnderManagementselectEnvironment Settings1. Select a subscription1. UnderSettings>Defender Plans, clickSettings & monitoring1. Locate the row forAgentless container vulnerability assessment1. Ensure thatOnis selectedRepeat the above for any additional subscriptions.Audit from Azure PolicyIf 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
Agentless container vulnerability assessment requires licensing and is included in:- Defender CSPM- Defender for Containers plans.
- Assessment Status
Automated
- Rationale Statement
Agentless vulnerability scanning will examine container images - whether running or in storage - for vulnerable configurations.
- Remediation Procedure
Audit from Azure Portal1. From the Azure Portal
Homepage, selectMicrosoft Defender for Cloud1. UnderManagementselectEnvironment Settings1. Select a subscription1. UnderSettings>Defender Plans, clickSettings & monitoring1. Locate the row forAgentless container vulnerability assessment1. SelectOn1. ClickContinuein the top left Repeat the above for any additional subscriptions.
3.1.5.1Ensure That Microsoft Defender for Storage Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Turning on Microsoft Defender for Storage enables threat detection for Storage, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud.
- Default Value
By default, Microsoft Defender plan is off.
- Audit Procedure
Audit from Azure Portal1. 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 CLIEnsure 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 PolicyIf 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: 308fbb08-4ab8-4e67-9b29-592e93fb94fa - Name: 'Microsoft Defender for Storage (Classic) 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 Portal1. 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 CLIEnsure the output of the below command is Standardaz security pricing create -n StorageAccounts --tier 'standard'Remediate from PowerShellSet-AzSecurityPricing -Name 'StorageAccounts' -PricingTier 'Standard'
3.1.6.1Ensure That Microsoft Defender for App Services Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Turning on Microsoft Defender for App Service enables threat detection for App Service, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud.
- Default Value
By default, Microsoft Defender plan is off.
- Audit Procedure
Audit from Azure Portal1. Go to
Microsoft Defender for Cloud2. UnderManagement, selectEnvironment Settings3. Click on the subscription name4. SelectDefender plans5. Ensure Status isOnforApp ServiceAudit from Azure CLIRun the following command:az security pricing show -n AppServicesEnsure-PricingTieris set toStandardAudit from PowerShellRun the following command:Get-AzSecurityPricing -Name 'AppServices' |Select-Object Name,PricingTierEnsure the-PricingTieris set toStandardAudit from Azure PolicyIf 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 Portal1. Go to
Microsoft Defender for Cloud2. UnderManagement, selectEnvironment Settings3. Click on the subscription name4. SelectDefender plans5. SetApp ServiceStatus toOn6. SelectSaveRemediate from Azure CLIRun the following command:az security pricing create -n Appservices --tier 'standard'Remediate from PowerShellRun the following command:Set-AzSecurityPricing -Name 'AppServices' -PricingTier 'Standard'
3.1.7.1Ensure That Microsoft Defender for Azure Cosmos DB Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Microsoft Defender for Azure Cosmos DB scans all incoming network requests for threats to your Azure Cosmos DB resources.
- Default Value
By default, Microsoft Defender for Azure Cosmos DB is not enabled.
- Audit Procedure
Audit from Azure Portal1. 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 CLIEnsure 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 PolicyIf 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 Portal1. 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 CLIRun the following command:az security pricing create -n 'CosmosDbs' --tier 'standard'Remediate from PowerShellUse the below command to enable Standard pricing tier for Azure Cosmos DBSet-AzSecurityPricing -Name 'CosmosDbs' -PricingTier 'Standard
3.1.7.2Ensure That Microsoft Defender for Open-Source Relational Databases Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Turning on Microsoft Defender for Open-source relational databases enables threat detection for Open-source relational databases, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud.
- Default Value
By default, Microsoft Defender plan is off.
- Audit Procedure
Audit from Azure Portal1. 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 CLIRun 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 PolicyIf 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 Portal1. 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 CLIRun the following command:az security pricing create -n 'OpenSourceRelationalDatabases' --tier 'standard'Remediate from PowerShellUse the below command to enable Standard pricing tier for Open-source relational databasesset-azsecuritypricing -name 'OpenSourceRelationalDatabases' -pricingtier 'Standard'
3.1.7.3Ensure That Microsoft Defender for (Managed Instance) Azure SQL Databases Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Turning on Microsoft Defender for Azure SQL Databases enables threat detection for Managed Instance Azure SQL databases, providing threat intelligence, anomaly detection, and behavior analytics in Microsoft Defender for Cloud.
- Default Value
By default, Microsoft Defender plan is off.
- Audit Procedure
Audit from Azure Portal1. 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 CLIRun the following command:az security pricing show -n SqlServersEnsure-PricingTieris set toStandardAudit from PowerShellRun the following command:Get-AzSecurityPricing -Name 'SqlServers' | Select-Object Name,PricingTierEnsure the-PricingTieris set toStandardAudit from Azure PolicyIf 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 Portal1. 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 CLIRun the following command:az security pricing create -n SqlServers --tier 'standard'Remediate from PowerShellRun the following command:Set-AzSecurityPricing -Name 'SqlServers' -PricingTier 'Standard'
3.1.7.4Ensure That Microsoft Defender for SQL Servers on Machines Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Turning on Microsoft Defender for SQL servers on machines enables threat detection for SQL servers on machines, providing threat intelligence, anomaly detection, and behavior analytics in Microsoft Defender for Cloud.
- Default Value
By default, Microsoft Defender plan is off.
- Audit Procedure
Audit from Azure Portal1. 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 CLIEnsure Defender for SQL is licensed with the following command:az security pricing show -n SqlServerVirtualMachinesEnsure the 'PricingTier' is set to 'Standard'Audit from PowerShellRun the following command:Get-AzSecurityPricing -Name 'SqlServerVirtualMachines' | Select-Object Name,PricingTierEnsure the 'PricingTier' is set to 'Standard'Audit from Azure PolicyIf 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 Portal1. 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 CLIRun the following command:az security pricing create -n SqlServerVirtualMachines --tier 'standard'Remediate from PowerShellRun the following command:Set-AzSecurityPricing -Name 'SqlServerVirtualMachines' -PricingTier 'Standard'
3.1.8.1Ensure That Microsoft Defender for Key Vault Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Turning on Microsoft Defender for Key Vault enables threat detection for Key Vault, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud.
- Default Value
By default, Microsoft Defender plan is off.
- Audit Procedure
Audit from Azure Portal1. 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 CLIEnsure 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 PolicyIf 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 Portal1. 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 CLIEnable Standard pricing tier for Key Vault:az security pricing create -n 'KeyVaults' --tier 'Standard'Remediate from PowerShellEnable Standard pricing tier for Key Vault:Set-AzSecurityPricing -Name 'KeyVaults' -PricingTier 'Standard'
3.1.9.1Ensure That Microsoft Defender for Resource Manager Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Microsoft Defender for Resource Manager scans incoming administrative requests to change your infrastructure from both CLI and the Azure portal.
- Default Value
By default, Microsoft Defender for Resource Manager is not enabled.
- Audit Procedure
Audit from Azure Portal1. 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 CLIEnsure 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 PolicyIf 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 Portal1. 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 CLIUse the below command to enable Standard pricing tier for Defender for Resource Manageraz security pricing create -n 'Arm' --tier 'Standard'Remediate from PowerShellUse the below command to enable Standard pricing tier for Defender for Resource ManagerSet-AzSecurityPricing -Name 'Arm' -PricingTier 'Standard'
3.1.10Ensure that Microsoft Defender Recommendation for 'Apply system updates' status is 'Completed'1
Attributes
- Profile
Level 1
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Ensure that the latest OS patches for all virtual machines are applied.
- Default Value
By default, patches are not automatically deployed.
- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Defender for Cloud1. Then theRecommendationsblade1. Ensure that there are no recommendations forApply system updatesAlternatively, 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 PolicyIf 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: 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 application’s general stability- Fix a security vulnerabilityMicrosoft 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.
3.1.11Ensure that Microsoft Cloud Security Benchmark policies are not set to 'Disabled'1
Attributes
- Profile
Level 1
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
The Microsoft Cloud Security Benchmark (or 'MCSB') is an Azure Policy Initiative containing many security policies to evaluate resource configuration against best practice recommendations. If a policy in the MCSB is set with effect type
Disabled, it is not evaluated and may prevent administrators from being informed of valuable security recommendations.- Default Value
By default, the MCSB policy initiative is associated to all subscriptions and most policies will have an effect of
Audit. Some policies will have a default effect ofDisabled.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu.1. Select
Microsoft Defender for Cloud.1. UnderManagement, selectEnvironment Settings.1. Select the appropriate 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.If no Policies are shown, no Policies are inDisabledstatus and no remediation is necessary. If any Policies remain in the list, the policyEffectshould be changed toAudit.- 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 PortalPart A - List all disabled policies1. From Azure Home select the Portal Menu1. Select
Microsoft Defender for Cloud1. UnderManagement, selectEnvironment Settings1. Select the appropriate Subscription1. Click onSecurity policiesin the left column1. Click onMicrosoft cloud security benchmark1. ClickAdd Filterand selectEffect1. Check theDisabledbox to search for all disabled policies1. ClickApplyPart B - Remediate Policy EffectFor each policy that remains in the list:1. Click the blue ellipses...to the right of the policy name1. ClickManage effect and parameters1. Under Policy effect, select theAuditradio button1. ClickSave1. ClickRefreshRepeat 'Part B - Remediate Policy Effect' until no more policies are listed.
3.1.12Ensure That 'All users with the following roles' is set to 'Owner'1
Attributes
- Profile
Level 1
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Enable security alert emails to subscription owners.
- Default Value
By default,
Owneris selected- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Defender for Cloud1. UnderManagement, selectEnvironment Settings1. Click on the appropriate Management Group, Subscription, or Workspace1. Click onEmail notifications1. Ensure thatAll users with the following rolesis set toOwnerAudit from Azure CLIEnsure 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'- 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 Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Defender for Cloud1. UnderManagement, selectEnvironment Settings1. Click on the appropriate Management Group, Subscription, or Workspace1. Click onEmail notifications1. In the drop down of theAll users with the following rolesfield selectOwner1. ClickSaveRemediate from Azure CLIUse 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.
3.1.13Ensure 'Additional email addresses' is Configured with a Security Contact Email1
Attributes
- Profile
Level 1
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Microsoft Defender for Cloud emails the subscription owners whenever a high-severity alert is triggered for their subscription. You should provide a security contact email address as an additional email address.
- Default Value
By default, there are no additional email addresses entered.
- Audit Procedure
Audit from Azure Portal1. 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 CLIEnsure 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 PolicyIf 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'- 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 Portal1. 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 CLIUse 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.
3.1.14Ensure That 'Notify about alerts with the following severity' is Set to 'High'1
Attributes
- Profile
Level 1
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
Enables emailing security alerts to the subscription owner or other designated security contact.
- Default Value
By default,
Notify about alerts with the following severity (or higher):is set toHigh.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Defender for Cloud1. UnderManagement, selectEnvironment Settings1. Click on the appropriate Management Group, Subscription, or Workspace1. Click onEmail notifications1. UnderNotification types, ensure that theNotify about alerts with the following severity (or higher):setting is checked and set toHighAudit from Azure CLIEnsure the output of below command is set totrue, enter your Subscription ID at the $0 between /subscriptions/<$0>/providers.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 PolicyIf 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'- Assessment Status
Automated
- Rationale Statement
Enabling security alert emails ensures that security alert emails are received from Microsoft. This ensures that the right people are aware of any potential security issues and are able to mitigate the risk.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu1. Select
Microsoft Defender for Cloud1. UnderManagement, selectEnvironment Settings1. Click on the appropriate Management Group, Subscription, or Workspace1. Click onEmail notifications1. UnderNotification types, check the check box next toNotify about alerts with the following severity (or higher):and selectHighfrom the drop down menu1. ClickSaveRemediate from Azure CLIUse the below command to setSend email notification for high severity alertstoOn.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' } }- Additional Information
Excluding any entries in the input.json properties 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.
3.1.15Ensure that Microsoft Defender External Attack Surface Monitoring (EASM) is enabled0
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
An organization's attack surface is the collection of assets with a public network identifier or URI that an external threat actor can see or access from outside your cloud. It is the set of points on the boundary of a system, a system element, system component, or an environment where an attacker can try to enter, cause an effect on, or extract data from, that system, system element, system component, or environment. The larger the attack surface, the harder it is to protect.This tool can be configured to scan your organization's online infrastructure such as specified domains, hosts, CIDR blocks, and SSL certificates, and store them in an Inventory. Inventory items can be added, reviewed, approved, and removed, and may contain enrichments ('insights') and additional information collected from the tool's different scan engines and open-source intelligence sources.A Defender EASM workspace will generate an Inventory of publicly exposed assets by crawling and scanning the internet using Seeds you provide when setting up the tool. Seeds can be FQDNs, IP CIDR blocks, and WHOIS records.Defender EASM will generate Insights within 24-48 hours after Seeds are provided, and these insights include vulnerability data (CVEs), ports and protocols, and weak or expired SSL certificates that could be used by an attacker for reconnaisance or exploitation.Results are classified High/Medium/Low and some of them include proposed mitigations.
- 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
To view Defender EASM workspaces created for your Subscriptions, search for EASM in the Azure Portal using the search box.
- 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 approximiately $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
To begin remediation, a Microsoft Defender EASM workspace must be created. The resources and inventory items added to this workspace will depend on your environment.
- 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.
3.1.16[LEGACY] Ensure That Microsoft Defender for DNS Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.1 Microsoft Defender For Cloud
- Description
[NOTE: As of August 1, 2023 customers with an existing subscription to Defender for DNS can continue to use the service, but new subscribers will receive alerts about suspicious DNS activity as part of Defender for Servers P2.]Microsoft Defender for DNS scans all network traffic exiting from within a subscription.
- Default Value
By default, Microsoft Defender for DNS is not enabled.
- Audit Procedure
Audit from Azure Portal1. Go to
Microsoft Defender for Cloud2. UnderManagement, selectEnvironment Settings3. Click on the subscription name4. Select theDefender plansblade5. EnsureStatusis set toOnforDNS.Audit from Azure CLIEnsure the output of the below command is Standardaz security pricing show -n 'DNS' --query 'PricingTier'Audit from PowerShellGet-AzSecurityPricing --Name 'DNS' | Select-Object Name,PricingTierEnsure output ofPricingTierisStandardAudit from Azure PolicyIf 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: bdc59948-5574-49b3-bb91-76b7c986428d - Name: 'Azure Defender for DNS should be enabled'- Impact Statement
Enabling Microsoft Defender for DNS requires enabling Microsoft Defender for your subscription. Both will incur additional charges, with Defender for DNS being a small amount per million queries.
- Assessment Status
Automated
- Rationale Statement
DNS lookups within a subscription are scanned and compared to a dynamic list of websites that might be 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 Portal1. Go to
Microsoft Defender for Cloud.2. UnderManagement, selectEnvironment Settings.3. Click on the subscription name.4. Select theDefender plansblade.5. SelectOnunderStatusforDNS.6. SelectSave.Remediate from Azure CLIEnable Standard pricing tier for DNS:az security pricing create -n 'DNS' --tier 'Standard'Remediate from PowerShellEnable Standard pricing tier for DNS:Set-AzSecurityPricing -Name 'DNS' -PricingTier 'Standard'- Additional Information
[NOTE: As of August 1, 2023 customers with an existing subscription to Defender for DNS can continue to use the service, but new subscribers will receive alerts about suspicious DNS activity as part of Defender for Servers P2.]
3.2.1Ensure That Microsoft Defender for IoT Hub Is Set To 'On'1
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.2 Microsoft Defender for IoT
- Description
Microsoft Defender for IoT acts as a central security hub for IoT devices within your organization.
- Default Value
By default, Microsoft Defender for IoT is not enabled.
- Audit Procedure
Audit from Azure Portal1. Go to
IoT Hub.2. Select aIoT 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 Portal1. Go to
IoT Hub.2. Select aIoT 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.
3.3.1Ensure that the Expiration Date is set for all Keys in RBAC Key Vaults1
Attributes
- Profile
Level 1
- Section
3 Security
- Sub Section
3.3 Key Vault
- Description
Ensure that all Keys in Role Based Access Control (RBAC) Azure Key Vaults have an expiration date set.
- Default Value
By default, keys do not expire.
- Audit Procedure
Audit from Azure Portal1. 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 CLIGet 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 PowerShellRetrieve 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 PolicyIf 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 Portal1. 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 CLIUpdate 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>
3.3.2Ensure that the Expiration Date is set for all Keys in Non-RBAC Key Vaults.1
Attributes
- Profile
Level 1
- Section
3 Security
- Sub Section
3.3 Key Vault
- Description
Ensure that all Keys in Non Role Based Access Control (RBAC) Azure Key Vaults have an expiration date set.
- Default Value
By default, keys do not expire.
- Audit Procedure
Audit from Azure Portal1. 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 CLIGet 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 PowerShellRetrieve 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 PolicyIf 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 Portal1. 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 CLIUpdate 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>
3.3.3Ensure that the Expiration Date is set for all Secrets in RBAC Key Vaults1
Attributes
- Profile
Level 1
- Section
3 Security
- Sub Section
3.3 Key Vault
- Description
Ensure that all Secrets in Role Based Access Control (RBAC) Azure Key Vaults have an expiration date set.
- Default Value
By default, secrets do not expire.
- Audit Procedure
Audit from Azure Portal1. 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 CLIEnsure 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 PowerShellRetrieve 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 PolicyIf 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 Portal1. 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 CLIUpdate 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>
3.3.4Ensure that the Expiration Date is set for all Secrets in Non-RBAC Key Vaults1
Attributes
- Profile
Level 1
- Section
3 Security
- Sub Section
3.3 Key Vault
- Description
Ensure that all Secrets in Non Role Based Access Control (RBAC) Azure Key Vaults have an expiration date set.
- Default Value
By default, secrets do not expire.
- Audit Procedure
Audit from Azure Portal1. 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 CLIGet 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 PowerShellRetrieve 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 PolicyIf 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 Portal1. 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 CLIUpdate 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 PowerShellFor each Key vault with theEnableRbacAuthorizationsetting set toFalseor empty, run the following command.Set-AzKeyVaultSecret -VaultName <vault_name> -Name <secret_name> -Expires <date_time>
3.3.5Ensure the Key Vault is Recoverable1
Attributes
- Profile
Level 1
- Section
3 Security
- Sub Section
3.3 Key Vault
- Description
The Key Vault contains object keys, secrets, and certificates. Accidental unavailability of a Key Vault can cause immediate data loss or loss of security functions (authentication, validation, verification, non-repudiation, etc.) supported by the Key Vault objects.It is recommended the Key Vault be made recoverable by enabling the 'Do Not Purge' and 'Soft Delete' functions. This is in order to prevent loss of encrypted data, including storage accounts, SQL databases, and/or dependent services provided by Key Vault objects (Keys, Secrets, Certificates) etc. This may happen in the case of accidental deletion by a user or from disruptive activity by a malicious user.NOTE: In February 2025, Microsoft will enable soft-delete protection on all key vaults, and users will no longer be able to opt out of or turn off soft-delete. WARNING: A current limitation is that role assignments disappearing when Key Vault is deleted. All role assignments will need to be recreated after recovery.
- Default Value
When a new Key Vault is created,-
enableSoftDeleteis enabled by default, and -enablePurgeProtectionis disabled by default.NOTE: In February 2025, Microsoft will enable soft-delete protection on all key vaults, and users will no longer be able to opt out of or turn off soft-delete.- Audit Procedure
Audit from Azure Portal1. Go to
Key Vaults.2. For each Key Vault.3. ClickProperties.4. Ensure the 'Enable purge protection (enforce a mandatory retention period for deleted vaults and vault objects)' is selected for Purge protection option on this key vault.**Audit from Azure CLI**1. List all Resources of type Key Vaults:```az resource list --query '[?type=='Microsoft.KeyVault/vaults']'```2. For Every Key Vault ID ensure check parametersenablePurgeProtectionis set to true.```az resource show --id /subscriptions/xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/<resourceGroupName>/providers/Microsoft.KeyVault/vaults/<keyVaultName>```**Audit from PowerShell**Get all Key Vaults.```Get-AzKeyVault```For each Key Vault run the following command.```Get-AzKeyVault -VaultName <Vault Name>```Examine the results of the above command for theEnablePurgeProtectionsetting. Make sure enablePurgeProtection is set toTrue`.Audit from Azure PolicyIf 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: 0b60c0b2-2dc2-4e1c-b5c9-abbed971de53 - Name: 'Key vaults should have deletion protection enabled'- Policy ID: 1e66c121-a66a-4b1f-9b83-0fd99bf0fc2d - Name: 'Key vaults should have soft delete enabled'- Impact Statement
Once purge-protection and soft-delete are enabled for a Key Vault, the action is irreversible.
- Assessment Status
Automated
- Rationale Statement
There could be scenarios where users accidentally run delete/purge commands on Key Vault or an attacker/malicious user deliberately does so 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 non-accessible. There is a Key Vault property that plays a role in permanent unavailability of a Key Vault:
enablePurgeProtection: Setting this parameter to 'true' for a Key Vault ensures that even if Key Vault is deleted, Key Vault itself or its objects remain recoverable for the next 90 days. Key Vault/objects can either be recovered or purged (permanent deletion) during those 90 days. If no action is taken, the key vault and its objects will subsequently be purged.Enabling the enablePurgeProtection parameter on Key Vaults ensures that Key Vaults and their objects cannot be deleted/purged permanently.- Remediation Procedure
To enable 'Do Not Purge' and 'Soft Delete' for a Key Vault: Remediate from Azure Portal1. Go to
Key Vaults.2. For each Key Vault.3. ClickProperties.4. Ensure the status of Purge protection readsEnable purge protection (enforce a mandatory retention period for deleted vaults and vault objects).Note, once enabled you cannot disable it.Remediate from Azure CLIaz resource update --id /subscriptions/xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/<resourceGroupName>/providers/Microsoft.KeyVault/vaults/<keyVaultName> --set properties.enablePurgeProtection=trueRemediate from PowerShellUpdate-AzKeyVault -VaultName <vaultName -ResourceGroupName <resourceGroupName -EnablePurgeProtection- Additional Information
When a key is used for SQL server TDE or Encrypting Storage Account, both the features 'Do Not Purge' and 'Soft Delete' are enabled for the corresponding Key Vault by default by Azure Backend.WARNING: A current limitation of the soft-delete feature across all Azure services is role assignments disappearing when Key Vault is deleted. All role assignments will need to be recreated after recovery.
3.3.6Enable Role Based Access Control for Azure Key Vault1
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.3 Key Vault
- Description
The recommended way to access Key Vaults is to use the Azure Role-Based Access Control (RBAC) permissions model.Azure RBAC is an authorization system built on Azure Resource Manager that provides fine-grained access management of Azure resources. It allows users to manage Key, Secret, and Certificate permissions. It provides one place to manage all permissions across all key vaults.
- Default Value
The default value for Access control in Key Vaults is Vault Policy.
- Audit Procedure
Audit from Azure Portal1. From Azure Home open the Portal Menu in the top left corner2. Select Key Vaults3. Select a Key Vault to audit4. Select Access configuration5. Ensure the Permission Model radio button is set to
Azure role-based access controlAudit from Azure CLIRun 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 PowerShellRun the following PowerShell command:Get-AzKeyVault -Vaultname <vault_name> -ResourceGroupName <resource_group>Ensure theEnabled For RBAC Authorizationsetting is set toTrueAudit from Azure PolicyIf 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 PortalKey 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 corner2. SelectKey Vaults3. Select a Key Vault to audit4. SelectAccess configuration5. Set the Permission model radio button toAzure role-based access control, taking note of the warning message6. ClickSave7. SelectAccess Control (IAM)8. Select theRole Assignmentstab9. Reapply permissions as needed to groups or usersRemediate from Azure CLITo 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 PowerShellTo enable RBAC authorization on each Key Vault, run the following PowerShell command:Update-AzKeyVault -ResourceGroupName <resource_group> -VaultName <vault_name> -EnableRbacAuthorization $True
3.3.7Ensure that Private Endpoints are Used for Azure Key Vault1
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.3 Key Vault
- Description
Private endpoints will secure network traffic from Azure Key Vault to the resources requesting secrets and keys.
- Default Value
By default, Private Endpoints are not enabled for any services within Azure.
- Audit Procedure
Audit from Azure Portal1. 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 CLIRun the following command within a subscription for each Key Vault you wish to audit.az keyvault show --name <keyVaultName>Ensure thatprivateEndpointConnectionsis notnull.Audit from PowerShellRun 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 PolicyIf 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 Portal1. 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 CLI1. 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.netnslookup <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.
3.3.8Ensure Automatic Key Rotation is Enabled Within Azure Key Vault for the Supported Services1
Attributes
- Profile
Level 2
- Section
3 Security
- Sub Section
3.3 Key Vault
- Description
Automatic Key Rotation is available in Public Preview. The currently supported applications are Key Vault, Managed Disks, and Storage accounts accessing keys within Key Vault. The number of supported applications will incrementally increased.
- Default Value
By default, Automatic Key Rotation is not enabled.
- Audit Procedure
Audit from Azure Portal1. From Azure Portal select the Portal Menu in the top left.2. Select Key Vaults.3. Select a Key Vault to audit. 4. Under
ObjectsselectKeys.5. Select a key to audit.6. In the top row selectRotation policy. 7. EnsureEnable auto rotationis set toEnabled.8. Repeat steps 3-7 for each Key Vault and Key.Audit from Azure CLIRun the following command:az keyvault key rotation-policy show --vault-name <vaultName> --name <keyName>Ensure that the response contains alifetime actionofRotate.Audit from PowerShellRun the following command:Get-AzKeyVaultKeyRotationPolicy -VaultName <vaultName> -Name <keyName>Ensure that the response contains alifetime actionofRotate.Audit from Azure PolicyIf 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 are an additional costs per operation in running the needed applications.
- Assessment Status
Automated
- Rationale Statement
Once set up, Automatic Private Key Rotation removes the need for manual administration when keys expire at intervals determined by your organization's policy. The recommended key lifetime is 2 years. Your organization should determine its own key expiration policy.
- Remediation Procedure
**Note:**Azure CLI and Powershell use ISO8601 flags to input timespans. Every timespan input will be in the format P<timespanInISO8601Format>(Y,M,D). The leading P is required with it denoting
period. 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 be (P2Y2M2D).Remediate from Azure Portal1. From Azure Portal select the Portal Menu in the top left.2. Select Key Vaults.3. Select a Key Vault to audit. 4. UnderObjectsselectKeys.5. Select a key to audit.6. In the top row selectRotation policy. 7. Select anExpiry time.8. SetEnable auto rotationtoEnabled.9. Set an appropriateRotation optionandRotation time.10. Optionally set theNotification time.11. SelectSave.12. Repeat steps 3-11 for each Key Vault and Key.Remediate from Azure CLIRun the following command for each key to update its policy to be auto-rotated:az keyvault key rotation-policy update -n <keyName> --vault-name <vaultName> --value <path/to/policy.json>Note: It is easiest to supply the policy flags in a .json file. An example json file would be:{ 'lifetimeActions': [ { 'trigger': { 'timeAfterCreate': '<timespanInISO8601Format>', 'timeBeforeExpiry' : null }, 'action': { 'type': 'Rotate' } }, { 'trigger': { 'timeBeforeExpiry' : '<timespanInISO8601Format>' }, 'action': { 'type': 'Notify' } } ], 'attributes': { 'expiryTime': '<timespanInISO8601Format>' }}Remediate from PowerShellRun the following command for each key to update its policy:Set-AzKeyVaultKeyRotationPolicy -VaultName test-kv -Name test-key -PolicyPath rotation_policy.jsonNote: It is easiest to supply the policy flags in a .json file. An example json file would be:<# rotation_policy.json{ 'lifetimeActions': [ { 'trigger': { 'timeAfterCreate': 'P<timespanInISO8601Format>M', 'timeBeforeExpiry': null }, 'action': { 'type': 'Rotate' } }, { 'trigger': { 'timeBeforeExpiry': 'P<timespanInISO8601Format>D' }, 'action': { 'type': 'Notify' } } ], 'attributes': { 'expiryTime': 'P<timespanInISO8601Format>Y' } }#>- Additional Information
Automatic Key Rotation is in public preview, so any configuration will not change upon full release.**Note: **Azure CLI and Powershell use ISO8601 flags to input timespans. Every timespan input will be in the format P<timespanInISO8601Format>(Y,M,D). The leading P is required with it denoting
period. The (Y,M,D) are for the duration of Year, Month, Day respectively. A time frame of 2 years, 2 months, 2 days would be (P2Y2M2D).
4 Storage Accounts1710
4.1Ensure that 'Secure transfer required' is set to 'Enabled'1
Attributes
- Profile
Level 1
- Section
4 Storage Accounts
- Description
Enable data encryption in transit.
- Default Value
By default,
Secure transfer requiredis set toDisabled.- Audit Procedure
Audit from Azure Portal1. Go to
Storage Accounts.1. For each storage account, underSettings, clickConfiguration.1. Ensure thatSecure transfer requiredis set toEnabled.Audit from Azure CLIUse 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 PolicyIf 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'- 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 doesn’t support HTTPS for custom domain names, this option is not applied when using a custom domain name.
- Remediation Procedure
Remediate from Azure Portal1. Go to
Storage Accounts.1. For each storage account, underSettings, clickConfiguration.1. SetSecure transfer requiredtoEnabled.1. ClickSave.Remediate from Azure CLIUse the below command to enableSecure transfer requiredfor a `Storage Account````az storage account update --name <storageAccountName> --resource-group <resourceGroupName> --https-only true```
4.2Ensure that ‘Enable Infrastructure Encryption’ for Each Storage Account in Azure Storage is Set to ‘enabled’0
Attributes
- Profile
Level 2
- Section
4 Storage Accounts
- Description
Enabling encryption at the hardware level on top of the default software encryption for Storage Accounts accessing Azure storage solutions.
- Default Value
By default, Infrastructure Encryption is disabled in blob creation.
- Audit Procedure
Audit from Azure Portal1. From Azure Portal select the portal menu in the top left.2. Select
Storage Accounts.3. Click on each storage account within each resource group you wish to audit.4. In the overview, under Security, ensureInfrastructure encryptionis set toEnabled.Audit from Azure CLIaz storage blob show \ --account-name <storage-account> \ --container-name <container> \ --name <blob> \ --query 'properties.serverEncrypted'Audit from PowerShell$account = Get-AzStorageAccount -ResourceGroupName <resource-group> ` -Name <storage-account>$blob = Get-AzStorageBlob -Context $account.Context ` -Container <container> ` -Blob <blob>$blob.ICloudBlob.Properties.IsServerEncryptedAudit from Azure PolicyIf 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: 4733ea7b-a883-42fe-8cac-97454c2a9e4a - Name: 'Storage accounts should have infrastructure encryption'- Impact Statement
The read and write speeds to the storage will be impacted if both default encryption and Infrastructure Encryption are checked, as a secondary form of encryption requires more resource overhead for the cryptography of information. This performance impact should be considered in an analysis for justifying use of the feature in your environment. Customer-managed keys are recommended for the most secure implementation, leading to overhead of key management. The key will also need to be backed up in a secure location, as loss of the key will mean loss of the information in the storage.
- Assessment Status
Automated
- Rationale Statement
Azure Storage automatically encrypts all data in a storage account at the network level using 256-bit AES encryption, which is one of the strongest, FIPS 140-2-compliant block ciphers available. Customers who require higher levels of assurance that their data is secure can also enable 256-bit AES encryption at the Azure Storage infrastructure level for double encryption. Double encryption of Azure Storage data protects against a scenario where one of the encryption algorithms or keys may be compromised. Similarly, data is encrypted even before network transmission and in all backups. In this scenario, the additional layer of encryption continues to protect your data. For the most secure implementation of key based encryption, it is recommended to use a Customer Managed asymmetric RSA 2048 Key in Azure Key Vault.
- Remediation Procedure
Remediate from Azure Portal1. During Storage Account creation, in the
Encryptiontab, check the box next toEnable infrastructure encryption.Remediate from Azure CLIReplace the information within <> with appropriate values:az storage account create \ --name <storage-account> \ --resource-group <resource-group> \ --location <location> \ --sku Standard_RAGRS \ --kind StorageV2 \ --require-infrastructure-encryptionRemediate from PowerShellReplace the information within <> with appropriate values:New-AzStorageAccount -ResourceGroupName <resource_group> ` -AccountName <storage-account> ` -Location <location> ` -SkuName 'Standard_RAGRS' ` -Kind StorageV2 ` -RequireInfrastructureEncryptionEnabling Infrastructure Encryption after Storage Account CreationIf infrastructure encryption was not enabled on blob storage creation, there is no official way to enable it. Please see the additional information section.- Additional Information
The default service side encryption for Azure Storage is enabled on every block blob, append blob, or page blob that was written to Azure Storage after October 20, 2017. Hardware encryption, however, cannot be enabled on a blob storage after its creation. There are ways to copy all data from a blob storage into another or download and reupload into another blob storage. This could result in data loss and is not recommended.
4.3Ensure that 'Enable key rotation reminders' is enabled for each Storage Account1
Attributes
- Profile
Level 1
- Section
4 Storage Accounts
- Description
Access Keys authenticate application access requests to data contained in Storage Accounts. A periodic rotation of these keys is recommended to ensure that potentially compromised keys cannot result in a long-term exploitable credential. The 'Rotation Reminder' is an automatic reminder feature for a manual procedure.
- Default Value
By default, Key rotation reminders is not configured.
- Audit Procedure
Audit from Azure Portal1. 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 $accountNameWrite-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.- 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
Manual
- 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 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 Portal1. 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 $accountNameif ($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
4.4Ensure that Storage Account Access Keys are Periodically Regenerated1
Attributes
- Profile
Level 1
- Section
4 Storage Accounts
- Description
For increased security, regenerate storage account access keys periodically.
- Default Value
By default, access keys are not regenerated periodically.
- Audit Procedure
Audit from Azure Portal1. 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 CLI1. 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 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 contain'authorization'/'scope': <your_storage_account> AND 'authorization'/'action': 'Microsoft.Storage/storageAccounts/regeneratekey/action' AND 'status'/'localizedValue': 'Succeeded' 'status'/'Value': 'Succeeded'- 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
Manual
- 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 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 Portal1. 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).
4.5Ensure that Shared Access Signature Tokens Expire Within an Hour0
Attributes
- Profile
Level 1
- Section
4 Storage Accounts
- Description
Expire shared access signature tokens within an hour.
- Default Value
By default, expiration for shared access signature is set to 8 hours.
- Audit Procedure
Currently, SAS token expiration times cannot be audited. Until Microsoft makes token expiration time a setting rather than a token creation parameter, this recommendation would require a manual verification.
- Assessment Status
Manual
- Rationale Statement
A shared access signature (SAS) is a URI that grants restricted access rights to Azure Storage resources. A shared access signature can be provided to clients who should not be trusted with the storage account key but for whom it may be necessary to delegate access to certain storage account resources. Providing a shared access signature URI to these clients allows them access to a resource for a specified period of time. This time should be set as low as possible and preferably no longer than an hour.
- Remediation Procedure
When generating shared access signature tokens, use start and end time such that it falls within an hour.Remediate from Azure Portal1. Go to Storage Accounts1. For each storage account where a shared access signature is required, under
Security + networking, go toShared access signature1. Select the appropriateAllowed resource types1. Set theStart and expiry date/timeto be within one hour1. ClickGenerate SAS and connection string
4.6Ensure that 'Public Network Access' is 'Disabled' for storage accounts1
Attributes
- Profile
Level 1
- Section
4 Storage Accounts
- Description
Disallowing public network access for a storage account overrides the public access settings for individual containers in that storage account for Azure Resource Manager Deployment Model storage accounts. Azure Storage accounts that use the classic deployment model will be retired on August 31, 2024.
- Default Value
By default,
Public Network Accessis set toEnabled from all networksfor the Storage Account.- Audit Procedure
Audit from Azure Portal1. Go to
Storage Accounts.2. For each storage account, under theSecurity + networkingsection, clickNetworking.3. Ensure thePublic network accesssetting is set toDisabled.Audit from Azure CLIEnsurepublicNetworkAccessisDisabledaz storage account show --name <storage-account> --resource-group <resource-group> --query '{publicNetworkAccess:publicNetworkAccess}'Audit from PowerShellFor each Storage Account, ensurePublicNetworkAccessis `Disabled````Get-AzStorageAccount -Name <storage account name> -ResourceGroupName <resource group name> |select PublicNetworkAccess```Audit from Azure PolicyIf 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.
- 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 PortalFirst, 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 CLISet 'Public Network Access' toDisabledon the storage accountaz storage account update --name <storage-account> --resource-group <resource-group> --public-network-access DisabledRemediate from PowerShellFor each Storage Account, run the following to set thePublicNetworkAccesssetting to `Disabled````Set-AzStorageAccount -ResourceGroupName <resource group name> -Name <storage account name> -PublicNetworkAccess Disabled```- Additional Information
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.
4.7Ensure Default Network Access Rule for Storage Accounts is Set to Deny1
Attributes
- Profile
Level 1
- Section
4 Storage Accounts
- Description
Restricting default network access helps to provide a new layer of security, since storage accounts accept connections from clients on any network. To limit access to selected networks, the default action must be changed.
- Default Value
By default, Storage Accounts will accept connections from clients on any network.
- Audit Procedure
Audit from Azure Portal1. 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 CLIEnsuredefaultActionis not set toAllow.az storage account list --query '[*].networkRuleSet'Audit from PowerShellConnect-AzAccountSet-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 PolicyIf 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 Portal1. 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 CLIUse the below command to updatedefault-actiontoDeny.az storage account update --name <StorageAccountName> --resource-group <resourceGroupName> --default-action Deny
4.8Ensure 'Allow Azure services on the trusted services list to access this storage account' is Enabled for Storage Account Access1
Attributes
- Profile
Level 2
- Section
4 Storage Accounts
- Description
NOTE: This recommendation assumes that the
Public network accessparameter is set toEnabled from selected virtual networks and IP addresses. Please ensure the prerequisite recommendation has been implemented before proceeding: - Ensure Default Network Access Rule for Storage Accounts is Set to DenySome Azure services that interact with storage accounts operate from networks that can't be granted access through network rules. To help this type of service work as intended, allow the set of trusted Azure services to bypass the network rules. These services will then use strong authentication to access the storage account. If theAllow Azure services on the trusted services list to access this storage accountexception is enabled, the following services are granted access to the storage account: Azure Backup, Azure Data Box, Azure DevTest Labs, Azure Event Grid, Azure Event Hubs, Azure File Sync, Azure HDInsight, Azure Import/Export, Azure Monitor, Azure Networking Services, and Azure Site Recovery (when registered in the subscription).- Default Value
By default, Storage Accounts will accept connections from clients on any network.
- Audit Procedure
Audit from Azure Portal1. 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 CLIEnsurebypasscontainsAzureServices````az storage account list --query '[*].networkRuleSet'```**Audit from PowerShell**```Connect-AzAccountSet-AzContext -Subscription <subscription ID>Get-AzStorageAccountNetworkRuleset -ResourceGroupName <resource group> -Name <storage account name> |Select-Object Bypass```If 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 PolicyIf 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 Portal1. 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 CLIUse the below command to updatebypasstoAzure services.az storage account update --name <StorageAccountName> --resource-group <resourceGroupName> --bypass AzureServices
4.9Ensure Private Endpoints are used to access Storage Accounts1
Attributes
- Profile
Level 2
- Section
4 Storage Accounts
- Description
Use private endpoints for your Azure Storage accounts to allow clients and services to securely access data located over a network via an encrypted Private Link. To do this, the private endpoint uses an IP address from the VNet for each service. Network traffic between disparate services securely traverses encrypted over the VNet. This VNet can also link addressing space, extending your network and accessing resources on it. Similarly, it can be a tunnel through public networks to connect remote infrastructures together. This creates further security through segmenting network traffic and preventing outside sources from accessing it.
- Default Value
By default, Private Endpoints are not created for Storage Accounts.
- Audit Procedure
Audit from Azure Portal1. 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].id'If 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 PolicyIf 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
A Private Endpoint costs approximately US$7.30 per month. If an Azure Virtual Network is not implemented correctly, this may result in the loss of critical network traffic.
- Assessment Status
Automated
- Rationale Statement
Securing traffic between services through encryption protects the data from easy interception and reading.
- Remediation Procedure
Remediate from Azure Portal1. Open the
Storage Accountsblade1. 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 window1. Click the+ Private endpointbutton1. 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.
4.10Ensure Soft Delete is Enabled for Azure Containers and Blob Storage1
Attributes
- Profile
Level 1
- Section
4 Storage Accounts
- Description
The Azure Storage blobs contain data like ePHI or Financial, which can be secret or personal. Data that is erroneously modified or deleted by an application or other storage account user will cause data loss or unavailability.It is recommended that both Azure Containers with attached Blob Storage and standalone containers with Blob Storage be made recoverable by enabling the soft delete configuration. This is to save and recover data when blobs or blob snapshots are deleted.
- Default Value
Soft delete for containers and 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 Portal1. Go to
Storage Accounts.1. For each Storage Account, underData management, go toData protection.1. Ensure thatEnable soft delete for blobsis checked.1. Ensure thatEnable soft delete for containersis checked.1. Ensure that the retention period for both is a sufficient length for your organization.Audit from Azure CLIBlob Storage: Ensure that the output of the below command contains enabled status as true and days is not empty or nullaz storage blob service-properties delete-policy show --account-name <storageAccount> --account-key <accountkey>Azure Containers: Ensure that withincontainerDeleteRetentionPolicy, theenabledproperty is set totrue.az storage account blob-service-properties show --account-name <storageAccount> --resource-group <resourceGroup>- Impact Statement
Additional storage costs may be incurred as snapshots are retained.
- Assessment Status
Automated
- Rationale Statement
Containers and Blob Storage data can be incorrectly deleted. An attacker/malicious user may do this deliberately in order to cause disruption. Deleting an Azure Storage blob causes immediate data loss. Enabling this configuration for Azure storage ensures that even if blobs/data were deleted from the storage account, Blobs/data objects are recoverable for a particular time which is set in the 'Retention policies,' ranging from 7 days to 365 days.
- Remediation Procedure
Remediate from Azure Portal1. Go to
Storage Accounts.1. For each Storage Account, underData management, go toData protection.1. Check the box next toEnable soft delete for blobs.1. Check the box next toEnable soft delete for containers.1. Set the retention period for both to a sufficient length for your organization.1. ClickSave.Remediate from Azure CLIUpdate blob storage retention days in below commandaz storage blob service-properties delete-policy update --days-retained <RetentionDaysValue> --account-name <StorageAccountName> --account-key <AccountKey> --enable trueUpdate container retention with the below commandaz storage account blob-service-properties update --enable-container-delete-retention true --container-delete-retention-days <days> --account-name <storageAccount> --resource-group <resourceGroup>
4.11Ensure Storage for Critical Data are Encrypted with Customer Managed Keys (CMK)1
Attributes
- Profile
Level 2
- Section
4 Storage Accounts
- Description
Enable sensitive data encryption at rest using Customer Managed Keys (CMK) rather than Microsoft Managed keys.
- Default Value
By default, Encryption type is set to Microsoft Managed Keys.
- Audit Procedure
Audit from Azure Portal1. Go to
Storage Accounts2. For each storage account, underSecurity + networking, go toEncryption3. Ensure thatEncryption typeis set toCustomer-managed keysAudit from PowerShellConnect-AzAccountSet-AzContext -Subscription <subscription id>Get-AzStorageAccount |Select-Object -ExpandProperty EncryptionPowerShell Results - Non-Compliant...KeySource : Microsoft.Storage...PowerShell Results - Compliant...KeySource : Microsoft.Keyvault...Audit from Azure PolicyIf 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: 6fac406b-40ca-413b-bf8e-0bf964659c25 - Name: 'Storage accounts should use customer-managed key for encryption'- Impact Statement
If the key expires by setting the 'activation date' and 'expiration date', the user must rotate the key 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, data in the storage account is encrypted using Microsoft Managed Keys at rest. All Azure Storage resources are encrypted, including blobs, disks, files, queues, and tables. All object metadata is also encrypted. If you want to control and manage this encryption key yourself, however, you can specify a customer-managed key. That key is used to protect and control access to the key that encrypts your data. You can also choose to automatically update the key version used for Azure Storage encryption whenever a new version is available in the associated Key Vault.While it is possible to automate the assessment of this recommendation, the assessment status for this recommendation remains 'Manual.' This is because the recommendation pertains to storage accounts that store critical data and is therefore not applicable to all storage accounts.
- Remediation Procedure
Remediate from Azure Portal1. Go to
Storage Accounts2. For each storage account, underSecurity + networking, go toEncryption3. SetEncryption typetoCustomer-managed keys4. Select an encryption key or enter a key URI5. ClickSave
4.12Ensure Storage Logging is Enabled for Queue Service for 'Read', 'Write', and 'Delete' requests0
Attributes
- Profile
Level 2
- Section
4 Storage Accounts
- Description
The Storage Queue service stores messages that may be read by any client who has access to the storage account. A queue can contain an unlimited number of messages, each of which can be up to 64KB in size using version 2011-08-18 or newer. Storage Logging happens server-side and allows details for both successful and failed requests to be recorded in the storage account. These logs allow users to see the details of read, write, and delete operations against the queues. Storage Logging log entries contain the following information about individual requests: Timing information such as start time, end-to-end latency, and server latency, authentication details, concurrency information, and the sizes of the request and response messages.
- Default Value
By default storage account queue services are not logged.
- Audit Procedure
Audit from Azure Portal1. Go to
Storage Accounts.1. For each storage account, underMonitoring, clickDiagnostics settings.1. Select thequeuetab indented below the storage account.1. Ensure that at least one diagnostic setting is listed.1. ClickEdit settingon a diagnostic setting.1. Ensure that at least one diagnostic setting hasStorageRead,StorageWrite, andStorageDeleteoptions selected under theLogssection and that they are sent to an appropriate destination.Audit from Azure CLIEnsure the below command's output contains propertiesdelete,readandwriteset totrue.az storage logging show --services q --account-name <storageAccountName>Audit from Azure PolicyIf 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: 7bd000e3-37c7-4928-9f31-86c4b77c5c45 - Name: 'Configure diagnostic settings for Queue Services to Log Analytics workspace'- Impact Statement
Enabling this setting can have a high impact on the cost of the log analytics service and data storage used by logging more data per each request. Do not enable this without determining your need for this level of logging, and do not forget to check in on data usage and projected cost. Some users have seen their logging costs increase from $10 per month to $10,000 per month.
- Assessment Status
Automated
- Rationale Statement
Storage Analytics logs contain detailed information about successful and failed requests to a storage service. This information can be used to monitor individual requests and to diagnose issues with a storage service. Requests are logged on a best-effort basis.Storage Analytics logging is not enabled by default for your storage account.
- Remediation Procedure
Remediate from Azure Portal1. Go to
Storage Accounts.1. For each storage account, underMonitoring, clickDiagnostics settings.1. Select thequeuetab indented below the storage account.1. To create a new diagnostic setting, click+ Add diagnostic setting. To update an existing diagnostic setting, clickEdit settingon the diagnostic setting.1. Check the boxes next toStorageRead,StorageWrite, andStorageDelete.1. Select an appropriate destination.1. ClickSave.Remediate from Azure CLIUse the below command to enable the Storage Logging for Queue service.az storage logging update --account-name <storageAccountName> --account-key <storageAccountKey> --services q --log rwd --retention 90- Additional Information
We cannot practically generalize detailed audit log requirements for every queue due to their nature and intent. This recommendation may be applicable to storage account queue services where the security is paramount.
4.13Ensure Storage logging is Enabled for Blob Service for 'Read', 'Write', and 'Delete' requests0
Attributes
- Profile
Level 2
- Section
4 Storage Accounts
- Description
The Storage Blob service provides scalable, cost-efficient object storage in the cloud. Storage Logging happens server-side and allows details for both successful and failed requests to be recorded in the storage account. These logs allow users to see the details of read, write, and delete operations against the blobs. Storage Logging log entries contain the following information about individual requests: timing information such as start time, end-to-end latency, and server latency; authentication details; concurrency information; and the sizes of the request and response messages.
- Default Value
By default, storage account blob service logging is disabled for read, write, and delete operations.
- Audit Procedure
Audit from Azure Portal1. Go to
Storage Accounts.1. For each storage account, underMonitoring, clickDiagnostics settings.1. Select theblobtab indented below the storage account.1. Ensure that at least one diagnostic setting is listed.1. ClickEdit settingon a diagnostic setting.1. Ensure that at least one diagnostic setting hasStorageRead,StorageWrite, andStorageDeleteoptions selected under theLogssection and that they are sent to an appropriate destination.Audit from Azure CLIEnsure the below command's output contains properties delete, read and write set to true.az storage logging show --services b --account-name <storageAccountName>Audit from Azure PolicyIf 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: b4fe1a3b-0715-4c6c-a5ea-ffc33cf823cb - Name: 'Configure diagnostic settings for Blob Services to Log Analytics workspace'- Impact Statement
Being a level 2, enabling this setting can have a high impact on the cost of data storage used for logging more data per each request. Do not enable this without determining your need for this level of logging or forget to check in on data usage and projected cost.
- Assessment Status
Automated
- Rationale Statement
Storage Analytics logs contain detailed information about successful and failed requests to a storage service. This information can be used to monitor each individual request to a storage service for increased security or diagnostics. Requests are logged on a best-effort basis.Storage Analytics logging is not enabled by default for your storage account.
- Remediation Procedure
Remediate from Azure Portal1. Go to
Storage Accounts.1. For each storage account, underMonitoring, clickDiagnostics settings.1. Select theblobtab indented below the storage account.1. To create a new diagnostic setting, click+ Add diagnostic setting. To update an existing diagnostic setting, clickEdit settingon the diagnostic setting.1. Check the boxes next toStorageRead,StorageWrite, andStorageDelete.1. Select an appropriate destination.1. ClickSave.Remediate from Azure CLIUse the below command to enable the Storage Logging for Blob service.az storage logging update --account-name <storageAccountName> --account-key <storageAccountKey> --services b --log rwd --retention 90- Additional Information
We cannot practically generalize detailed audit log requirements for every blob due to their nature and intent. This recommendation may be applicable to storage account blob service where the security is paramount.
4.14Ensure Storage Logging is Enabled for Table Service for 'Read', 'Write', and 'Delete' Requests0
Attributes
- Profile
Level 2
- Section
4 Storage Accounts
- Description
Azure Table storage is a service that stores structured NoSQL data in the cloud, providing a key/attribute store with a schema-less design. Storage Logging happens server-side and allows details for both successful and failed requests to be recorded in the storage account. These logs allow users to see the details of read, write, and delete operations against the tables. Storage Logging log entries contain the following information about individual requests: timing information such as start time, end-to-end latency, and server latency; authentication details; concurrency information; and the sizes of the request and response messages.
- Default Value
By default, storage account table service logging is disabled for read, write, an delete operations
- Audit Procedure
Audit from Azure Portal1. Go to
Storage Accounts.1. For each storage account, underMonitoring, clickDiagnostics settings.1. Select thetabletab indented below the storage account.1. Ensure that at least one diagnostic setting is listed.1. ClickEdit settingon a diagnostic setting.1. Ensure that at least one diagnostic setting hasStorageRead,StorageWrite, andStorageDeleteoptions selected under theLogssection and that they are sent to an appropriate destination.Audit from Azure CLIEnsure the below command's output contains properties delete, read and write set to true.az storage logging show --services t --account-name <storageAccountName>Audit from Azure PolicyIf 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: 2fb86bf3-d221-43d1-96d1-2434af34eaa0 - Name: 'Configure diagnostic settings for Table Services to Log Analytics workspace'- Impact Statement
Being a level 2, enabling this setting can have a high impact on the cost of data storage used for logging more data per each request. Do not enable this without determining your need for this level of logging or forget to check in on data usage and projected cost.
- Assessment Status
Automated
- Rationale Statement
Storage Analytics logs contain detailed information about successful and failed requests to a storage service. This information can be used to monitor each individual request to a storage service for increased security or diagnostics. Requests are logged on a best-effort basis.Storage Analytics logging is not enabled by default for your storage account.
- Remediation Procedure
Remediate from Azure Portal1. Go to
Storage Accounts.1. For each storage account, underMonitoring, clickDiagnostics settings.1. Select thetabletab indented below the storage account.1. To create a new diagnostic setting, click+ Add diagnostic setting. To update an existing diagnostic setting, clickEdit settingon the diagnostic setting.1. Check the boxes next toStorageRead,StorageWrite, andStorageDelete.1. Select an appropriate destination.1. ClickSave.Remediate from Azure CLIUse the below command to enable the Storage Logging for Table service.az storage logging update --account-name <storageAccountName> --account-key <storageAccountKey> --services t --log rwd --retention 90- Additional Information
We cannot practically generalize detailed audit log requirements for every table due to their nature and intent. This recommendation may be applicable to storage account table service where the security is paramount.
4.15Ensure the 'Minimum TLS version' for storage accounts is set to 'Version 1.2'1
Attributes
- Profile
Level 1
- Section
4 Storage Accounts
- Description
In some cases, Azure Storage sets the minimum TLS version to be version 1.0 by default. TLS 1.0 is a legacy version and has known vulnerabilities. This minimum TLS version can be configured to be later protocols such as TLS 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 Portal1. Go to
Storage Accounts.1. For each storage account, underSettings, clickConfiguration.1. Ensure that theMinimum TLS versionis set toVersion 1.2.Audit from Azure CLIGet 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 PowerShellTo get the minimum TLS version, run the following command:(Get-AzStorageAccount -Name <STORAGEACCOUNTNAME> -ResourceGroupName <RESOURCEGROUPNAME>).MinimumTlsVersionAudit from Azure PolicyIf 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 Portal1. 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 PowerShellTo set the minimum TLS version, run the following command:Set-AzStorageAccount -AccountName <STORAGEACCOUNTNAME> ` -ResourceGroupName <RESOURCEGROUPNAME> ` -MinimumTlsVersion TLS1_2
4.16Ensure 'Cross Tenant Replication' is not enabled0
Attributes
- Profile
Level 1
- Section
4 Storage Accounts
- Description
Cross Tenant Replication in Azure allows data to be replicated across multiple Azure tenants. While this feature can be beneficial for data sharing and availability, it also poses a significant security risk if not properly managed. Unauthorized data access, data leakage, and compliance violations are potential risks. Disabling Cross Tenant Replication ensures that data is not inadvertently replicated across different tenant boundaries without explicit authorization.
- Default Value
For new storage accounts created after Dec 15, 2023 cross tenant replication is not enabled.
- Audit Procedure
Audit from Azure Portal1. 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 PolicyIf 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 Portal1. 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 CLIReplace the information within <> with appropriate values:az storage account update --name <storageAccountName> --resource-group <resourceGroupName> --allow-cross-tenant-replication false
4.17Ensure that 'Allow Blob Anonymous Access' is set to 'Disabled'0
Attributes
- Profile
Level 1
- Section
4 Storage Accounts
- Description
The Azure Storage setting ‘Allow Blob Anonymous Access’ (aka 'allowBlobPublicAccess') controls whether anonymous access is allowed for blob data in a storage account. When this property is set to True, it enables public read access to blob data, which can be convenient for sharing data but may carry security risks. When set to False, it disallows public access to blob data, providing a more secure storage environment.
- Default Value
Disabled
- Audit Procedure
Audit from Azure Portal1. Go to
Storage Accounts.1. For each storage account, underSettings, clickConfiguration.1. EnsureAllow Blob Anonymous Accessis set toDisabled.Audit from Azure CLIFor 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 PolicyIf 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: '[Preview]: 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 Portal1. Go to
Storage Accounts.1. For each storage account, underSettings, clickConfiguration.1. SetAllow Blob Anonymous AccesstoDisabled.1. ClickSave.Remediate from PowershellFor every storage account in scope, run the following:$storageAccount = Get-AzStorageAccount -ResourceGroupName '<yourResourceGroup>' -Name '<yourStorageAccountName>'$storageAccount.AllowBlobPublicAccess = $falseSet-AzStorageAccount -InputObject $storageAccount- Additional Information
Azure Storage accounts that use the classic deployment model will be retired on August 31, 2024.
5 Database Services2219
5.1.1Ensure that 'Auditing' is set to 'On'1
Attributes
- Profile
Level 1
- Section
5 Database Services
- Sub Section
5.1 Azure SQL Database
- Description
Enable auditing on SQL Servers.
- Default Value
By default,
Enable Azure SQL Auditingis set toOff.- Audit Procedure
Audit from Azure Portal1. Go to
SQL servers2. For each server instance3. UnderSecurity, clickAuditing4. Ensure thatEnable Azure SQL Auditingis set toOnAudit from PowerShellGet the list of all SQL ServersGet-AzSqlServerFor each ServerGet-AzSqlServerAudit -ResourceGroupName <ResourceGroupName> -ServerName <SQLServerName>Ensure thatBlobStorageTargetState,EventHubTargetState, orLogAnalyticsTargetStateis set toEnabled.Audit from Azure PolicyIf 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: a6fb4358-5bf4-4ad7-ba82-2cd2f41ce5e9 - Name: 'Auditing on SQL server should be enabled'- Assessment Status
Automated
- Rationale Statement
The Azure platform allows a SQL server to be created as a service. Enabling auditing at the server level ensures that all existing and newly created databases on the SQL server instance are audited. Auditing policy applied on the SQL database does not override auditing policy and settings applied on the particular SQL server where the database is hosted.Auditing tracks database events and writes them to an audit log in the Azure storage account. It also helps to maintain regulatory compliance, understand database activity, and gain insight into discrepancies and anomalies that could indicate business concerns or suspected security violations.
- Remediation Procedure
Remediate from Azure Portal1. Go to
SQL servers2. Select the SQL server instance3. UnderSecurity, clickAuditing4. Click the toggle next toEnable Azure SQL Auditing5. Select an Audit log destination6. ClickSaveRemediate from PowerShellGet the list of all SQL ServersGet-AzSqlServerFor each Server, enable auditing and set the retention for at least 90 days.Log Analytics ExampleSet-AzSqlServerAudit -ResourceGroupName <resource group name> -ServerName <SQL Server name> -RetentionInDays <Number of Days to retain the audit logs, should be 90days minimum> -LogAnalyticsTargetState Enabled -WorkspaceResourceId '/subscriptions/<subscription ID>/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/<workspace name>Event Hub ExampleSet-AzSqlServerAudit -ResourceGroupName '<resource group name>' -ServerName '<SQL Server name>' -EventHubTargetState Enabled -EventHubName '<Event Hub name>' -EventHubAuthorizationRuleResourceId '<Event Hub Authorization Rule Resource ID>'Blob Storage ExampleSet-AzSqlServerAudit -ResourceGroupName '<resource group name>' -ServerName '<SQL Server name>' -BlobStorageTargetState Enabled -StorageAccountResourceId '/subscriptions/<subscription_ID>/resourceGroups/<Resource_Group>/providers/Microsoft.Stora ge/storageAccounts/<Storage Account name>'- Additional Information
'- A server policy applies to all existing and newly created databases on the server.- If server blob auditing is enabled, it always applies to the database. The database will be audited, regardless of the database auditing settings. Auditing type table is already deprecated leaving only type blob available.- Enabling blob auditing on the database, in addition to enabling it on the server, does not override or change any of the settings of the server blob auditing. Both audits will exist side by side. In other words, the database is audited twice in parallel; once by the server policy and once by the database policy.
5.1.2Ensure no Azure SQL Databases allow ingress from 0.0.0.0/0 (ANY IP)1
Attributes
- Profile
Level 1
- Section
5 Database Services
- Sub Section
5.1 Azure SQL Database
- Description
Ensure that no SQL Databases allow ingress from 0.0.0.0/0 (ANY IP).
- Default Value
By default,
Allow access to Azure Servicesis set toNO.- Audit Procedure
Audit from Azure Portal1. Go to
SQL servers2. For each SQL server3. UnderSecurity, clickNetworking4. Ensure thatAllow Azure services and resources to access this serveris unchecked5. Ensure that no firewall rule exists with - Start IP of0.0.0.0- or other combinations which allows access to wider public IP rangesAudit from Azure CLIList all SQL serversaz sql server listFor each SQL server run the following commandaz sql server firewall-rule list --resource-group <resource group name> --server <sql server name>Ensure the output does not contain any firewallallowrules with a source of0.0.0.0, or any rules namedAllowAllWindowsAzureIpsAudit from PowerShellGet the list of all SQL ServersGet-AzSqlServerFor each ServerGet-AzSqlServerFirewallRule -ResourceGroupName <resource group name> -ServerName <server name>Ensure thatStartIpAddressis not set to0.0.0.0,/0or other combinations which allows access to wider public IP ranges including Windows Azure IP ranges. Also ensure thatFirewallRuleNamedoesn't containAllowAllWindowsAzureIpswhich is the rule created when theAllow Azure services and resources to access this serversetting is enabled for that SQL Server.Audit from Azure PolicyIf 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: 1b8ca024-1d5c-4dec-8995-b1a932b41780 - Name: 'Public network access on Azure SQL Database should be disabled'- Impact Statement
Disabling
Allow Azure services and resources to access this serverwill break all connections to SQL server and Hosted Databases unless custom IP specific rules are added in Firewall Policy.- Assessment Status
Automated
- Rationale Statement
Azure SQL Server includes a firewall to block access to unauthorized connections. More granular IP addresses can be defined by referencing the range of addresses available from specific datacenters.By default, for a SQL server, a Firewall exists with StartIp of 0.0.0.0 and EndIP of 0.0.0.0 allowing access to all the Azure services. Additionally, a custom rule can be set up with StartIp of 0.0.0.0 and EndIP of 255.255.255.255 allowing access from ANY IP over the Internet.In order to reduce the potential attack surface for a SQL server, firewall rules should be defined with more granular IP addresses by referencing the range of addresses available from specific datacenters.If
Allow Azure services and resources to access this serveris 'Checked', this will allow resources outside of the subscription/tenant/organization boundary, within any region of Azure, to effectively bypass the defined SQL Server Network ACL on public endpoint. A malicious attacker can successfully launch a SQL server password bruteforce attack by creating a virtual machine in any Azure subscription/region, from outside of the subscription boundary where the SQL Server is residing.- Remediation Procedure
Remediate from Azure Portal1. Go to
SQL servers1. For each SQL server1. UnderSecurity, clickNetworking1. UncheckAllow Azure services and resources to access this server1. Set firewall rules to limit access to only authorized connections1. ClickSaveRemediate from Azure CLIDisable default firewall ruleAllow access to Azure services:az sql server firewall-rule delete --resource-group <resource group> --server <sql server name> --name 'AllowAllWindowsAzureIps'Remove a custom firewall rule:az sql server firewall-rule delete --resource-group <resource group> --server <sql server name> --name <firewall rule name>Create a firewall rule:az sql server firewall-rule create --resource-group <resource group> --server <sql server name> --name <firewall rule name> --start-ip-address '<IP Address other than 0.0.0.0>' --end-ip-address '<IP Address other than 0.0.0.0 or 255.255.255.255>'Update a firewall rule:az sql server firewall-rule update --resource-group <resource group> --server <sql server name> --name <firewall rule name> --start-ip-address '<IP Address other than 0.0.0.0>' --end-ip-address '<IP Address other than 0.0.0.0 or 255.255.255.255>'Remediate from PowerShellDisable Default Firewall RuleAllow access to Azure services:Remove-AzSqlServerFirewallRule -FirewallRuleName 'AllowAllWindowsAzureIps' -ResourceGroupName <resource group name> -ServerName <server name>Remove a custom Firewall rule:Remove-AzSqlServerFirewallRule -FirewallRuleName '<firewall rule name>' -ResourceGroupName <resource group name> -ServerName <server name>Set the appropriate firewall rules:Set-AzSqlServerFirewallRule -ResourceGroupName <resource group name> -ServerName <server name> -FirewallRuleName '<firewall rule name>' -StartIpAddress '<IP Address other than 0.0.0.0>' -EndIpAddress '<IP Address other than 0.0.0.0 or 255.255.255.255>'- Additional Information
Firewall rules configured on individual SQL Database using Transact-sql overrides the rules set on SQL server. Azure does not provide any Powershell, API, CLI, Portal option to check database level firewall rules, and so far Transact-SQL is the only way to check for the same. For comprehensive control over egress traffic on SQL Databases, Firewall rules should be checked using SQL client.
5.1.3Ensure SQL server's Transparent Data Encryption (TDE) protector is encrypted with Customer-managed key1
Attributes
- Profile
Level 2
- Section
5 Database Services
- Sub Section
5.1 Azure SQL Database
- Description
Transparent Data Encryption (TDE) with Customer-managed key support provides increased transparency and control over the TDE Protector, increased security with an HSM-backed external service, and promotion of separation of duties.With TDE, data is encrypted at rest with a symmetric key (called the database encryption key) stored in the database or data warehouse distribution. To protect this data encryption key (DEK) in the past, only a certificate that the Azure SQL Service managed could be used. Now, with Customer-managed key support for TDE, the DEK can be protected with an asymmetric key that is stored in the Azure Key Vault. The Azure Key Vault is a highly available and scalable cloud-based key store which offers central key management, leverages FIPS 140-2 Level 2 validated hardware security modules (HSMs), and allows separation of management of keys and data for additional security.Based on business needs or criticality of data/databases hosted on a SQL server, it is recommended that the TDE protector is encrypted by a key that is managed by the data owner (Customer-managed key).
- Default Value
By Default, Microsoft managed TDE protector is enabled for a SQL server.
- Audit Procedure
Audit from Azure Portal1. Go to
SQL servers1. For each SQL server, underSecurity, clickTransparent data encryption1. Ensure thatCustomer-managed keyis selected1. EnsureMake this key the default TDE protectoris checkedAudit from Azure CLIaz account get-access-token --query '{subscripton: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/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector?api-version=2015-05-01-preview'Ensure the output of the command contains propertieskindset toazurekeyvault``serverKeyTypeset toAzureKeyVault``uriis not nullAudit from PowerShellGet-AzSqlServerTransparentDataEncryptionProtector -ServerName <ServerName> -ResourceGroupName <ResourceGroupName>Ensure the output of the command contains propertiesTypeset toAzureKeyVault``ServerKeyVaultKeyNameset toKeyVaultName_KeyName_KeyIdentifierVersion``KeyIdset toKeyIdentifierAudit from Azure PolicyIf 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: 0a370ff3-6cab-4e85-8995-295fd854c5b8 - Name: 'SQL servers should use customer-managed keys to encrypt data at rest'- Policy ID: ac01ad65-10e5-46df-bdd9-6b0cad13e1d2 - Name: 'SQL managed instances should use customer-managed keys to encrypt data at rest'- Impact Statement
Once TDE protector is encrypted with a Customer-managed key, it transfers entire responsibility of respective key management on to you, and hence you should be more careful about doing any operations on the particular key in order to keep data from corresponding SQL server and Databases hosted accessible.When deploying Customer Managed Keys, it is prudent to ensure that you also deploy an automated toolset for managing these keys (this should include discovery and key rotation), and Keys should be stored in an HSM or hardware backed keystore, such as Azure Key Vault.As far as toolsets go, check with your cryptographic key provider, as they may well provide one as an add-on to their service.
- Assessment Status
Automated
- Rationale Statement
Customer-managed key support for Transparent Data Encryption (TDE) allows user control of TDE encryption keys and restricts who can access them and when. Azure Key Vault, Azure’s cloud-based external key management system, is the first key management service where TDE has integrated support for Customer-managed keys. With Customer-managed key support, the database encryption key is protected by an asymmetric key stored in the Key Vault. The asymmetric key is set at the server level and inherited by all databases under that server.
- Remediation Procedure
Remediate from Azure Portal1. Go to
SQL servers1. For each SQL server, underSecurity, clickTransparent data encryption1. SetTransparent data encryptiontoCustomer-managed key1. Select a key or enter a key identifier1. CheckMake this key the default TDE protector1. ClickSaveRemediate from Azure CLIUse the below command to encrypt SQL server's TDE protector with a Customer-managed keyaz sql server tde-key set --resource-group <resourceName> --server <dbServerName> --server-key-type {AzureKeyVault} --kid <keyIdentifier>Remediate from PowerShellUse the below command to encrypt SQL server's TDE protector with a Customer-managed Key Vault keySet-AzSqlServerTransparentDataEncryptionProtector -Type AzureKeyVault -KeyId <KeyIdentifier> -ServerName <ServerName> -ResourceGroupName <ResourceGroupName>SelectYwhen prompted- Additional Information
'- This configuration is audited or can be done only on SQL server. The same configuration will be in effect on SQL Databases hosted on SQL Server.- Ensuring TDE is protected by a Customer-managed key on SQL Server does not ensure the encryption of SQL Databases.
Transparent Data Encryption : Data Encryption (ON/OFF)setting on individual SQL Database decides whether database is encrypted or not.
5.1.4Ensure that Microsoft Entra authentication is Configured for SQL Servers1
Attributes
- Profile
Level 1
- Section
5 Database Services
- Sub Section
5.1 Azure SQL Database
- Description
Use Microsoft Entra authentication for authentication with SQL Database to manage credentials in a single place.
- Default Value
Entra ID Authentication for SQL Database/Server is not enabled by default
- Audit Procedure
Audit from Azure Portal1. Go to
SQL servers1. For each SQL server, underSettings, clickMicrosoft Entra ID1. UnderMicrosoft Entra admin, ensure a value has been set forAdmin NameAudit from Azure CLITo list SQL Server Admins on a specific server:az sql server ad-admin list --resource-group <resource-group> --server <server>Audit from PowerShellPrint a list of all SQL Servers to find which one you want to auditGet-AzSqlServerAudit a list of Administrators on a Specific ServerGet-AzSqlServerActiveDirectoryAdministrator -ResourceGroupName <resource group name> -ServerName <server name>Ensure Output showsDisplayNameset toAD account.Audit from Azure PolicyIf 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: 1f314764-cb73-4fc9-b863-8eca98ac36e9 - Name: 'An Azure Active Directory administrator should be provisioned for SQL servers'- Impact Statement
This will create administrative overhead with user account and permission management. For further security on these administrative accounts, you may want to consider licensing which supports features like Multi Factor Authentication.
- Assessment Status
Automated
- Rationale Statement
Microsoft Entra authentication is a mechanism to connect to Microsoft Azure SQL Database and SQL Data Warehouse by using identities in the Microsoft Entra ID directory. With Entra ID authentication, identities of database users and other Microsoft services can be managed in one central location. Central ID management provides a single place to manage database users and simplifies permission management.- It provides an alternative to SQL Server authentication.- Helps stop the proliferation of user identities across database servers.- Allows password rotation in a single place.- Customers can manage database permissions using external (Entra ID) groups.- It can eliminate storing passwords by enabling integrated Windows authentication and other forms of authentication supported by Microsoft Entra.- Entra ID authentication uses contained database users to authenticate identities at the database level.- Entra ID supports token-based authentication for applications connecting to SQL Database.- Entra ID authentication supports ADFS (domain federation) or native user/password authentication for a local Active Directory without domain synchronization.- Entra ID supports connections from SQL Server Management Studio that use Active Directory Universal Authentication, which includes Multi-Factor Authentication (MFA). MFA includes strong authentication with a range of easy verification options — phone call, text message, smart cards with pin, or mobile app notification.
- Remediation Procedure
Remediate from Azure Portal1. Go to
SQL servers1. For each SQL server, underSettings, clickMicrosoft Entra ID1. ClickSet admin1. Select an admin1. ClickSelect1. ClickSaveRemediate from Azure CLIaz ad user show --idFor each Server, set AD Adminaz sql server ad-admin create --resource-group <resource group name> --server <server name> --display-name <display name> --object-id <object id of user>Remediate from PowerShellFor each Server, set Entra ID AdminSet-AzSqlServerActiveDirectoryAdministrator -ResourceGroupName <resource group name> -ServerName <server name> -DisplayName '<Display name of AD account to set as DB administrator>'- Additional Information
NOTE - Assigning an Administrator in Entra ID is just the first step. When using Entra ID for central authentication there are many other groups and roles that need to be configured base on the needs of your organization. The How-to Guides should be used to determine what roles should be assigned and what groups should be created to manage permissions and access to resources.
5.1.5Ensure that 'Data encryption' is set to 'On' on a SQL Database1
Attributes
- Profile
Level 1
- Section
5 Database Services
- Sub Section
5.1 Azure SQL Database
- Description
Enable Transparent Data Encryption on every SQL server.
- Default Value
By default,
Data encryptionis set toOn.- Audit Procedure
Audit from Azure Portal1. Go to
SQL databases1. For each DB instance, underSecurity, clickData Encryption1. UnderTransparent data encryption, ensure thatData encryptionis set toOnAudit from Azure CLIEnsure the output of the below command isEnabled````az sql db tde show --resource-group <resourceGroup> --server <dbServerName> --database <dbName> --query status```**Audit from PowerShell**Get a list of SQL Servers.```Get-AzSqlServer```For each server, list the databases.```Get-AzSqlDatabase -ServerName <SQL Server Name> -ResourceGroupName <Resource Group Name>```For each database not listed as aMasterdatabase, check for Transparent Data Encryption.```Get-AzSqlDatabaseTransparentDataEncryption -ResourceGroupName <Resource Group Name> -ServerName <SQL Server Name> -DatabaseName <Database Name>```Make sureDataEncryptionisEnabledfor each database except theMaster` database.Audit from Azure PolicyIf 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: 17k78e20-9358-41c9-923c-fb736d382a12 - Name: 'Transparent Data Encryption on SQL databases should be enabled'- Assessment Status
Automated
- Rationale Statement
Azure SQL Database transparent data encryption helps protect against the threat of malicious activity by performing real-time encryption and decryption of the database, associated backups, and transaction log files at rest without requiring changes to the application.
- Remediation Procedure
Remediate from Azure Portal1. Go to
SQL databases1. For each DB instance, underSecurity, clickData Encryption1. UnderTransparent data encryption, setData encryptiontoOn1. ClickSaveRemediate from Azure CLIUse the below command to enableTransparent data encryptionfor SQL DB instance.az sql db tde set --resource-group <resourceGroup> --server <dbServerName> --database <dbName> --status EnabledRemediate from PowerShellUse the below command to enableTransparent data encryptionfor SQL DB instance.Set-AzSqlDatabaseTransparentDataEncryption -ResourceGroupName <Resource Group Name> -ServerName <SQL Server Name> -DatabaseName <Database Name> -State 'Enabled'Note:- TDE cannot be used to encrypt the logical master database in SQL Database. The master database contains objects that are needed to perform the TDE operations on the user databases.- Azure Portal does not show master databases per SQL server. However, CLI/API responses will show master databases.- Additional Information
'- Transparent Data Encryption (TDE) can be enabled or disabled on individual
SQL Databaselevel and not on theSQL Serverlevel.- TDE cannot be used to encrypt the logical master database in SQL Database. The master database contains objects that are needed to perform the TDE operations on the user databases.
5.1.6Ensure that 'Auditing' Retention is 'greater than 90 days'1
Attributes
- Profile
Level 1
- Section
5 Database Services
- Sub Section
5.1 Azure SQL Database
- Description
SQL Server Audit Retention should be configured to be greater than 90 days.
- Default Value
By default, SQL Server audit storage is
disabled.- Audit Procedure
Audit from Azure Portal1. Go to
SQL servers.1. For each SQL server, underSecurity, clickAuditing.1. IfStorageis checked, expandAdvanced properties.1. EnsureRetention (days)is set to a value greater than90, or0for unlimited retention.Audit from PowerShellGet the list of all SQL ServersGet-AzSqlServerFor each ServerGet-AzSqlServerAudit -ResourceGroupName <resource group name> -ServerName <server name>Ensure thatRetentionInDaysis set tomore than 90Note: If the SQL server is set withLogAnalyticsTargetStatesetting set toEnabled, run the following additional command.Get-AzOperationalInsightsWorkspace | Where-Object {$_.ResourceId -eq <SQL Server WorkSpaceResourceId>}Ensure thatRetentionInDaysis set tomore than 90Audit from Azure PolicyIf 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: 89099bee-89e0-4b26-a5f4-165451757743 - Name: 'SQL servers with auditing to storage account destination should be configured with 90 days retention or higher'- Assessment Status
Automated
- Rationale Statement
Audit Logs can be used to check for anomalies and give insight into suspected breaches or misuse of information and access.
- Remediation Procedure
Remediate from Azure Portal1. Go to
SQL servers.1. For each SQL server, underSecurity, clickAuditing.1. IfStorageis checked, expandAdvanced properties.1. SetRetention (days)to a value greater than90, or0for unlimited retention.1. ClickSave.Remediate from PowerShellFor each Server, set retention policy to more than 90 daysLog Analytics ExampleSet-AzSqlServerAudit -ResourceGroupName <resource group name> -ServerName <SQL Server name> -RetentionInDays <Number of Days to retain the audit logs, should be more than 90 days> -LogAnalyticsTargetState Enabled -WorkspaceResourceId '/subscriptions/<subscription ID>/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/<workspace name>Event Hub ExampleSet-AzSqlServerAudit -ResourceGroupName '<resource group name>' -ServerName '<SQL Server name>' -EventHubTargetState Enabled -EventHubName '<Event Hub name>' -EventHubAuthorizationRuleResourceId '<Event Hub Authorization Rule Resource ID>'Blob Storage ExampleSet-AzSqlServerAudit -ResourceGroupName '<resource group name>' -ServerName '<SQL Server name>' -BlobStorageTargetState Enabled -StorageAccountResourceId '/subscriptions/<subscription_ID>/resourceGroups/<Resource_Group>/providers/Microsoft.Stora ge/storageAccounts/<Storage Account name>'
5.1.7Ensure Public Network Access is Disabled0
Attributes
- Profile
Level 1
- Section
5 Database Services
- Sub Section
5.1 Azure SQL Database
- Description
Disabling public network access restricts the service from accessing public networks.
- Default Value
By default, Azure SQL Server's Public network access is set to
Disable.- Audit Procedure
From Azure Portal1. Go to
SQL servers.1. For each SQL server, underSecurity, clickNetworking.1. Ensure thatPublic network accessis set toDisable.- Impact Statement
Some architectural consideration may be necessary to ensure that required network connectivity is still made available. No additional cost or performance impact is required to deploy this recommendation.
- Assessment Status
Manual
- Rationale Statement
A secure network architecture requires carefully constructed network segmentation. Public Network Access tends to be overly permissive and introduces unintended vectors for threat activity.
- Remediation Procedure
From Azure Portal1. Go to
SQL servers.1. For each SQL server, underSecurity, clickNetworking.1. SetPublic network accesstoDisable.1. ClickSave.
5.2.1Ensure server parameter 'require_secure_transport' is set to 'ON' for PostgreSQL flexible server1
Attributes
- Profile
Level 1
- Section
5 Database Services
- Sub Section
5.2 Azure SQL Database for PostgreSQL
- Description
Enable
require_secure_transportonPostgreSQL flexible servers.- Default Value
By default, secure connectivity is enforced, but some application frameworks may not enable it during deployment.
- Audit Procedure
Audit from Azure Portal1. Login to Azure Portal using https://portal.azure.com.1. Go to
Azure Database for PostgreSQL flexible servers.1. For each database, underSettings, clickServer parameters.1. In the filter bar, typerequire_secure_transport.1. Ensure that theVALUEforrequire_secure_transportis set toON.Audit from Azure CLIEnsure the below command returns avalueofon:az postgres flexible-server parameter show --resource-group <resourceGroup> --server-name <serverName> --name require_secure_transportAudit from PowerShellEnsure the below command returns aValueofon:Get-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name require_secure_transportAudit from Azure PolicyIf 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: c29c38cb-74a7-4505-9a06-e588ab86620a - Name: 'Enforce SSL connection should be enabled for PostgreSQL flexible servers'- Assessment Status
Automated
- Rationale Statement
SSL connectivityhelps to provide a new layer of security by connecting database server to client applications using Secure Sockets Layer (SSL). Enforcing SSL connections between database server and client applications helps protect against 'man in the middle' attacks by encrypting the data stream between the server and application.- Remediation Procedure
Remediate from Azure Portal1. Login to Azure Portal using https://portal.azure.com.1. Go to
Azure Database for PostgreSQL flexible servers.1. For each database, underSettings, clickServer parameters.1. In the filter bar, typerequire_secure_transport.1. Set theVALUEforrequire_secure_transporttoON.1. ClickSave.Remediate from Azure CLIUse the below command to enablerequire_secure_transport:az postgres flexible-server parameter set --resource-group <resourceGroup> --server-name <serverName> --name require_secure_transport --value onRemediate from PowerShellUpdate-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name require_secure_transport -Value on
5.2.2Ensure server parameter 'log_checkpoints' is set to 'ON' for PostgreSQL flexible server1
Attributes
- Profile
Level 1
- Section
5 Database Services
- Sub Section
5.2 Azure SQL Database for PostgreSQL
- Description
Enable
log_checkpointsonPostgreSQL flexible servers.- Default Value
By default
log_checkpointsis enabled (set toon).- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu.1. Go to
Azure Database for PostgreSQL flexible servers.1. For each database, underSettings, clickServer parameters.1. In the filter bar, typelog_checkpoints.1. Ensure that theVALUEforlog_checkpointsis set toON.Audit from Azure CLIEnsure the below command returns avalueofon:az postgres flexible-server parameter show --resource-group <resourceGroup> --server-name <serverName> --name log_checkpointsAudit from PowerShellEnsure the below command returns aValueofon:Get-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name log_checkpointsAudit from Azure PolicyIf 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: 70be9e12-c935-49ac-9bd8-fd64b85c1f87 - Name: 'Log checkpoints should be enabled for PostgreSQL flexible servers'- Assessment Status
Automated
- Rationale Statement
Enabling
log_checkpointshelps the PostgreSQL Database toLog each checkpoint, which in turn generates query and error logs. However, access to transaction logs is not supported. Query and error logs can be used to identify, troubleshoot, and repair configuration errors and sub-optimal performance.- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu.1. Go to
Azure Database for PostgreSQL flexible servers.1. For each database, underSettings, clickServer parameters.1. In the filter bar, typelog_checkpoints.1. Set theVALUEforlog_checkpointstoON.1. ClickSave.Remediate from Azure CLIUse the below command to enablelog_checkpoints:az postgres flexible-server parameter set --resource-group <resourceGroup> --server-name <serverName> --name log_checkpoints --value onRemediate from PowerShellUpdate-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name log_checkpoints -Value on
5.2.3Ensure server parameter 'connection_throttle.enable' is set to 'ON' for PostgreSQL flexible server1
Attributes
- Profile
Level 1
- Section
5 Database Services
- Sub Section
5.2 Azure SQL Database for PostgreSQL
- Description
Enable connection throttling on
PostgreSQL flexible servers.- Default Value
By default,
connection_throttle.enableis disabled (set tooff).- Audit Procedure
Audit from Azure Portal1. Login to Azure Portal using https://portal.azure.com.1. Go to
Azure Database for PostgreSQL flexible servers.1. For each database, underSettings, clickServer parameters.1. In the filter bar, typeconnection_throttle.enable.1. Ensure thatVALUEforconnection_throttle.enableis set toON.Audit from Azure CLIEnsure the below command returns avalueofon:az postgres flexible-server parameter show --resource-group <resourceGroup> --server-name <serverName> --name connection_throttle.enableAudit from PowerShellEnsure the below command returns aValueofon:Get-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name connection_throttle.enableAudit from Azure PolicyIf 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: dacf07fa-0eea-4486-80bc-b93fae88ac40 - Name: 'Connection throttling should be enabled for PostgreSQL flexible servers'- Assessment Status
Automated
- Rationale Statement
Enabling
connection throttlinghelps the PostgreSQL Database toSet the verbosity of logged messages. This in turn generates query and error logs with respect to concurrent connections that could lead to a successful Denial of Service (DoS) attack by exhausting connection resources. A system can also fail or be degraded by an overload of legitimate users. Query and error logs can be used to identify, troubleshoot, and repair configuration errors and sub-optimal performance.- Remediation Procedure
Remediate from Azure Portal1. Login to Azure Portal using https://portal.azure.com.1. Go to
Azure Database for PostgreSQL flexible servers.1. For each database, underSettings, clickServer parameters.1. In the filter bar, typeconnection_throttle.enable.1. Setconnection_throttle.enabletoON.1. ClickSave.Remediate from Azure CLIUse the below command to enableconnection_throttle.enable:az postgres flexible-server parameter set --resource-group <resourceGroup> --server-name <serverName> --name connection_throttle.enable --value onRemediate from PowerShellUse the below command to updateconnection_throttlingconfiguration.Update-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name connection_throttle.enable -Value on
5.2.4Ensure server parameter 'logfiles.retention_days' is greater than 3 days for PostgreSQL flexible server1
Attributes
- Profile
Level 1
- Section
5 Database Services
- Sub Section
5.2 Azure SQL Database for PostgreSQL
- Description
Ensure
logfiles.retention_daysonPostgreSQL flexible serversis set to an appropriate value.- Default Value
By default
logfiles.retention_daysis set to3.- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu.1. Go to
Azure Database for PostgreSQL flexible servers.1. For each database, underSettings, clickServer parameters.1. In the filter bar, typelogfiles.retention_days.1. Ensure that theVALUEis between 4 and 7 (inclusive).Audit from Azure CLIEnsurelogfiles.retention_daysvalue is greater than 3.az postgres flexible-server parameter show --resource-group <resourceGroup> --server-name <serverName> --name logfiles.retention_daysAudit from PowershellEnsurelogfiles.retention_daysvalue is greater than 3:Get-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name logfiles.retention_days- Impact Statement
Configuring this setting will result in logs being retained for the specified number of days. If this is configured on a high traffic server, the log may grow quickly to occupy a large amount of disk space. In this case you may want to set this to a lower number.
- Assessment Status
Automated
- Rationale Statement
Configuring
logfiles.retention_daysdetermines the duration in days thatAzure Database for PostgreSQLretains log files. Query and error logs can be used to identify, troubleshoot, and repair configuration errors and sub-optimal performance.- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu.1. Go to
Azure Database for PostgreSQL flexible servers.1. For each database, underSettings, clickServer parameters.1. In the filter bar, typelogfiles.retention_days.1. Input a value between 4 and 7 (inclusive).1. ClickSave.Remediate from Azure CLIUse the below command to updatelogfiles.retention_daysconfiguration:az postgres flexible-server parameter set --resource-group <resourceGroup> --server-name <serverName> --name logfiles.retention_days --value <4-7>Remediate from PowershellUse the below command to updatelogfiles.retention_daysconfiguration:Update-AzPostgreSqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name logfiles.retention_days -Value <4-7>
5.2.5Ensure 'Allow public access from any Azure service within Azure to this server' for PostgreSQL flexible server is disabled1
Attributes
- Profile
Level 1
- Section
5 Database Services
- Sub Section
5.2 Azure SQL Database for PostgreSQL
- Description
Disable access from Azure services to
PostgreSQL flexible server.- Default Value
The Azure Postgres firewall is set to block all access by default.
- Audit Procedure
Audit from Azure Portal1. Login to Azure Portal using https://portal.azure.com.1. Go to
Azure Database for PostgreSQL flexible servers.1. For each database, underSettings, clickNetworking.1. UnderFirewall rules, ensureAllow public access from any Azure service within Azure to this serveris not checked.Audit from Azure CLIEnsure the below command does not return a rule with a name beginningAllowAllAzureServicesAndResourcesWithinAzureIpsor with'startIpAddress': '0.0.0.0'or'endIpAddress': '0.0.0.0':az postgres flexible-server firewall-rule list --resource-group <resourceGroup> --name <serverName>Audit from PowerShellEnsure the below command does not return a rule with a name beginningAllowAllAzureServicesAndResourcesWithinAzureIps:Get-AzPostgreSqlFlexibleServerFirewallRule -ResourceGroupName <resourceGroup> -ServerName <serverName>Audit from Azure PolicyIf 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: 5e1de0e3-42cb-4ebc-a86d-61d0c619ca48 - Name: 'Public network access should be disabled for PostgreSQL flexible servers'- Assessment Status
Automated
- Rationale Statement
If access from Azure services is enabled, the server's firewall will accept connections from all Azure resources, including resources not in your subscription. This is usually not a desired configuration. Instead, set up firewall rules to allow access from specific network ranges or VNET rules to allow access from specific virtual networks.
- Remediation Procedure
Remediate from Azure Portal1. Login to Azure Portal using https://portal.azure.com.1. Go to
Azure Database for PostgreSQL flexible servers.1. For each database, underSettings, clickNetworking.1. UnderFirewall rules, uncheckAllow public access from any Azure service within Azure to this server.1. ClickSave.Remediate from Azure CLIUsing the firewall rule name from theAudit from Azure CLIsteps, use the below command to delete theAllowAllAzureServicesAndResourcesWithinAzureIpsrule for PostgreSQL flexible server:az postgres flexible-server firewall-rule delete --resource-group <resourceGroup> --name <serverName> --rule-name <ruleName>Typeyand pressenterto confirm.Remediate from PowerShellUsing the firewall rule name from theAudit from PowerShellsteps, use the below command to delete theAllowAllAzureServicesAndResourcesWithinAzureIpsrule for PostgreSQL flexible server:Remove-AzPostgreSqlFlexibleServerFirewallRule -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name <ruleName>
5.2.6[LEGACY] Ensure server parameter 'log_connections' is set to 'ON' for PostgreSQL single server1
Attributes
- Profile
Level 1
- Section
5 Database Services
- Sub Section
5.2 Azure SQL Database for PostgreSQL
- Description
Enable
log_connectionsonPostgreSQL single servers.NOTE: This recommendation currently only applies to Single Server, not Flexible Server. See additional information below for details about the planned retirement of Azure PostgreSQL Single Server.- Default Value
By default
log_connectionsis enabled (set toon).- Audit Procedure
Audit from Azure Portal1. Login to Azure Portal using https://portal.azure.com.1. Go to
Azure Database for PostgreSQL servers.1. For each database, underSettings, clickServer parameters.1. In the filter bar, typelog_connections.1. Ensure thatlog_connectionsis set toON.Audit from Azure CLIEnsure the below command returns aValueofon:az postgres server configuration show --resource-group <resourceGroup> --server-name <serverName> --name log_connectionsAudit from PowerShellEnsure the below command returns aValueofon:Get-AzPostgreSqlConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name log_connectionsAudit from Azure PolicyIf 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: eb6f77b9-bd53-4e35-a23d-7f65d5f0e442 - Name: 'Log connections should be enabled for PostgreSQL database servers'- Assessment Status
Automated
- Rationale Statement
Enabling
log_connectionshelps PostgreSQL Database to log attempted connection to the server, as well as successful completion of client authentication. Log data can be used to identify, troubleshoot, and repair configuration errors and suboptimal performance.- Remediation Procedure
Remediate from Azure Portal1. Login to Azure Portal using https://portal.azure.com.1. Go to
Azure Database for PostgreSQL servers.1. For each database, underSettings, clickServer parameters.1. In the filter bar, typelog_connections.1. Setlog_connectionstoON.1. ClickSave.Remediate from Azure CLIUse the below command to updatelog_connectionsconfiguration.az postgres server configuration set --resource-group <resourceGroupName> --server-name <serverName> --name log_connections --value onRemediate from PowerShellUse the below command to updatelog_connectionsconfiguration.Update-AzPostgreSqlConfiguration -ResourceGroupName <ResourceGroupName> -ServerName <ServerName> -Name log_connections -Value on- Additional Information
RETIREMENT of Azure PostgreSQL Single Server: Azure PostgreSQL Single Server is slated for retirement by March 25, 2025. Please use these resources to consider and prepare for migration:- https://learn.microsoft.com/en-us/azure/postgresql/single-server/whats-happening-to-postgresql-single-server- https://learn.microsoft.com/en-us/azure/postgresql/migrate/concepts-single-to-flexible
5.2.7[LEGACY] Ensure server parameter 'log_disconnections' is set to 'ON' for PostgreSQL single server1
Attributes
- Profile
Level 1
- Section
5 Database Services
- Sub Section
5.2 Azure SQL Database for PostgreSQL
- Description
Enable
log_disconnectionsonPostgreSQL Servers.NOTE: This recommendation currently only applies to Single Server, not Flexible Server. See additional information below for details about the planned retirement of Azure PostgreSQL Single Server.- Default Value
By default
log_disconnectionsis disabled (set tooff).- Audit Procedure
Audit from Azure Portal1. From Azure Home select the Portal Menu.1. Go to
Azure DatabaseforPostgreSQL servers.1. For each database, underSettings, clickServer parameters.1. Search forlog_disconnections.1. Ensure thatlog_disconnectionsis set toON.Audit from Azure CLIEnsurelog_disconnectionsvalue is set toON````az postgres server configuration show --resource-group <resourceGroupName> --server-name <serverName> --name log_disconnections```**Audit from PowerShell**Ensurelog_disconnectionsvalue is set toON````Get-AzPostgreSqlConfiguration -ResourceGroupName <ResourceGroupName> -ServerName <ServerName> -Name log_disconnections```Audit from Azure PolicyIf 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: eb6f77b9-bd53-4e35-a23d-7f65d5f0e446 - Name: 'Disconnections should be logged for PostgreSQL database servers.'- Impact Statement
Enabling this setting will enable a log of all disconnections. If this is enabled for a high traffic server, the log may grow exponentially.
- Assessment Status
Automated
- Rationale Statement
Enabling
log_disconnectionshelps PostgreSQL Database toLogs end of a session, including duration, which in turn generates query and error logs. Query and error logs can be used to identify, troubleshoot, and repair configuration errors and sub-optimal performance.- Remediation Procedure
Remediate from Azure Portal1. From Azure Home select the Portal Menu.1. Go to
Azure DatabaseforPostgreSQL servers.1. For each database, underSettings, clickServer parameters.1. Search forlog_disconnections.1. Setlog_disconnectionstoON.1. ClickSave.Remediate from Azure CLIUse the below command to updatelog_disconnectionsconfiguration.az postgres server configuration set --resource-group <resourceGroupName> --server-name <serverName> --name log_disconnections --value onRemediate from PowerShellUse the below command to updatelog_disconnectionsconfiguration.Update-AzPostgreSqlConfiguration -ResourceGroupName <ResourceGroupName> -ServerName <ServerName> -Name log_disconnections -Value on- Additional Information
RETIREMENT of Azure PostgreSQL Single Server: Azure PostgreSQL Single Server is slated for retirement by March 25, 2025. Please use these resources to consider and prepare for migration:- https://learn.microsoft.com/en-us/azure/postgresql/single-server/whats-happening-to-postgresql-single-server- https://learn.microsoft.com/en-us/azure/postgresql/migrate/concepts-single-to-flexible
5.2.8[LEGACY] Ensure 'Infrastructure double encryption' for PostgreSQL single server is 'Enabled'0
Attributes
- Profile
Level 1
- Section
5 Database Services
- Sub Section
5.2 Azure SQL Database for PostgreSQL
- Description
Azure Database for PostgreSQL servers should be created with 'infrastructure double encryption' enabled.NOTE: This recommendation currently only applies to Single Server, not Flexible Server. See additional information below for details about the planned retirement of Azure PostgreSQL Single Server.
- Default Value
By Default, Double Encryption is disabled.
- Audit Procedure
Audit from Azure Portal1. From Azure Home, click on more services.2. Click on
Databases.3. Click onAzure Database for PostgreSQL servers.4. Select the database by clicking on its name.5. Under Security, click Data encryption.6. Ensure thatInfrastructure encryption enabledis displayed and is checked.Audit from Azure CLI1. Enter the commandaz postgres server configuration show --name <servername> --resource-group <resourcegroup> --query 'properties.infrastructureEncryption' -o tsv2. Verify that Infrastructure encryption is enabled.Audit from Azure PolicyIf 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: 24fba194-95d6-48c0-aea7-f65bf859c598 - Name: 'Infrastructure encryption should be enabled for Azure Database for PostgreSQL servers'- Impact Statement
The read and write speeds to the database will be impacted if both default encryption and Infrastructure Encryption are checked, as a secondary form of encryption requires more resource overhead for the cryptography of information. This cost is justified for information security.Customer managed keys are recommended for the most secure implementation, leading to overhead of key management. The key will also need to be backed up in a secure location, as loss of the key will mean loss of the information in the database.
- Assessment Status
Automated
- Rationale Statement
If Double Encryption is enabled, another layer of encryption is implemented at the hardware level before the storage or network level. Information will be encrypted before it is even accessed, preventing both interception of data in motion if the network layer encryption is broken and data at rest in system resources such as memory or processor cache. Encryption will also be in place for any backups taken of the database, so the key will secure access the data in all forms. For the most secure implementation of key based encryption, it is recommended to use a Customer Managed asymmetric RSA 2048 Key in Azure Key Vault.
- Remediation Procedure
It is not possible to enable 'infrastructure double encryption' on an existing Azure Database for PostgreSQL server.The remediation steps detail the creation of a new Azure Database for PostgreSQL server with 'infrastructure double encryption' enabled.Remediate from Azure Portal1. Go through the normal process of database creation.2. On step 2 titled
Additional settingsensure thatInfrastructure double encryption enabledis checked.3. Acknowledge that you understand this will impact database performance.4. Finish database creation as normal.Remediate from Azure CLIaz postgres server create --resource-group <resourcegroup> --name <servername> --location <location> --admin-user <adminusername> --admin-password <server_admin_password> --sku-name GP_Gen4_2 --version 11 --infrastructure-encryption Enabled- Additional Information
RETIREMENT of Azure PostgreSQL Single Server: Azure PostgreSQL Single Server is slated for retirement by March 25, 2025. Please use these resources to consider and prepare for migration:- https://learn.microsoft.com/en-us/azure/postgresql/single-server/whats-happening-to-postgresql-single-server- https://learn.microsoft.com/en-us/azure/postgresql/migrate/concepts-single-to-flexible
5.3.1Ensure server parameter 'require_secure_transport' is set to 'ON' for MySQL flexible server1
Attributes
- Profile
Level 1
- Section
5 Database Services
- Sub Section
5.3 Azure for MySQL
- Description
Enable
require_secure_transportonMySQL flexible servers.- Default Value
Azure Database for MySQL when provisioned through the Azure portal or CLI will require SSL connections by default.
- Audit Procedure
Audit from Azure Portal1. Login to Azure Portal using https://portal.azure.com.1. Go to
Azure Database for MySQL flexible servers.1. For each database, underSettings, clickServer parameters.1. In the filter bar, typerequire_secure_transport.1. Ensure that theVALUEforrequire_secure_transportisON.Audit from Azure CLIEnsure the below command returns avalueofon:az mysql flexible-server parameter show --resource-group <resourceGroup> --server-name <serverName> --name require_secure_transportAudit from PowerShellEnsure the below command returns aValueofon:Get-AzMySqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name require_secure_transport- Assessment Status
Automated
- Rationale Statement
SSL connectivity helps to provide a new layer of security by connecting database server to client applications using Secure Sockets Layer (SSL). Enforcing SSL connections between database server and client applications helps protect against 'man in the middle' attacks by encrypting the data stream between the server and application.
- Remediation Procedure
Remediate from Azure Portal1. Login to Azure Portal using https://portal.azure.com.1. Go to
Azure Database for MySQL flexible servers.1. For each database, underSettings, clickServer parameters.1. In the filter bar, typerequire_secure_transport.1. Set theVALUEforrequire_secure_transporttoON.1. ClickSave.Remediate from Azure CLIUse the below command to enablerequire_secure_transport:az mysql flexible-server parameter set --resource-group <resourceGroup> --server-name <serverName> --name require_secure_transport --value onRemediate from PowerShellUse the below command to enablerequire_secure_transport:Update-AzMySqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name require_secure_transport -Value on
5.3.2Ensure server parameter 'tls_version' is set to 'TLSv1.2' (or higher) for MySQL flexible server0
Attributes
- Profile
Level 1
- Section
5 Database Services
- Sub Section
5.3 Azure for MySQL
- Description
Ensure
tls_versiononMySQL flexible serversis set to use TLS version 1.2 or higher.- Default Value
By default, TLS is set to v1.2 for MySQL Flexible servers.
- Audit Procedure
Audit from Azure Portal1. Login to Azure Portal using https://portal.azure.com.1. Go to
Azure Database for MySQL flexible servers.1. For each database, underSettings, clickServer parameters.1. In the filter bar, typetls_version.1. Ensuretls_versionis set toTLSv1.2(or higher).Audit from Azure CLIEnsure thevalueof the below command containsTLSv1.2or higher, and does not contain anything lower thanTLSv1.2:az mysql flexible-server parameter show --resource-group <resourceGroup> --server-name <serverName> --name tls_versionExample output:{ 'allowedValues': 'TLSv1,TLSv1.1,TLSv1.2', 'dataType': 'Set', 'defaultValue': 'TLSv1.2', 'description': 'Which protocols the server permits for encrypted connections. By default, TLS 1.2 is enforced', 'id': '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.DBforMySQL/flexibleServers/<serverName>/configurations/tls_version', 'isConfigPendingRestart': 'False', 'isDynamicConfig': 'False', 'isReadOnly': 'False', 'name': 'tls_version', 'resourceGroup': '<resourceGroupName>', 'source': 'system-default', 'systemData': null, 'type': 'Microsoft.DBforMySQL/flexibleServers/configurations', 'value': 'TLSv1.2'}Audit from PowerShellEnsure theValueof the below command containsTLSv1.2or higher, and does not contain anything lower thanTLSv1.2:Get-AzMySqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <ServerName> -Name tls_version- Assessment Status
Automated
- Rationale Statement
TLS connectivity helps to provide a new layer of security by connecting database server to client applications using Transport Layer Security (TLS). Enforcing TLS connections between database server and client applications helps protect against 'man in the middle' attacks by encrypting the data stream between the server and application.
- Remediation Procedure
Remediate from Azure Portal1. Login to Azure Portal using https://portal.azure.com.1. Go to
Azure Database for MySQL flexible servers.1. For each database, underSettings, clickServer parameters.1. In the filter bar, typetls_version.1. Click on the VALUE dropdown next totls_version, and checkTLSv1.2(or higher).1. Uncheck anything lower thanTLSv1.2.1. ClickSave.Remediate from Azure CLIUse the below command to update MySQL flexible servers to use TLS version 1.2:az mysql flexible-server parameter set --resource-group <resourceGroup> --server-name <serverName> --name tls_version --value TLSv1.2Remediate from PowerShellUse the below command to update MySQL flexible servers to use TLS version 1.2:Update-AzMySqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name tls_version -Value TLSv1.2
5.3.3Ensure server parameter 'audit_log_enabled' is set to 'ON' for MySQL flexible server1
Attributes
- Profile
Level 2
- Section
5 Database Services
- Sub Section
5.3 Azure for MySQL
- Description
Enable
audit_log_enabledonMySQL flexible servers.- Default Value
audit_log_enabled is set to OFF by default
- Audit Procedure
Audit from Azure Portal1. Login to Azure Portal using https://portal.azure.com.1. Go to
Azure Database for MySQL Servers.1. For each database, underSettings, clickServer parameters.1. In the filter bar, typeaudit_log_enabled.1. Ensure that theVALUEforaudit_log_enabledisON.Audit from Azure CLIEnsure the below command returns avalueofon:az mysql flexible-server parameter show --resource-group <resourceGroup> --server-name <serverName> --name audit_log_enabledAudit from PowerShellEnsure the below command returns aValueofon:Get-AzMySqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name audit_log_enabled- Impact Statement
There are further costs incurred for storage of logs. For high traffic databases these logs will be significant. Determine your organization's needs before enabling.
- Assessment Status
Automated
- Rationale Statement
Enabling
audit_log_enabledhelps MySQL Database to log items such as connection attempts to the server, DDL/DML access, and more. Log data can be used to identify, troubleshoot, and repair configuration errors and suboptimal performance.- Remediation Procedure
Remediate from Azure PortalPart 1 - Turn on audit logs1. Login to Azure Portal using https://portal.azure.com.1. Go to
Azure Database for MySQL flexible servers.1. For each database, underSettings, clickServer parameters.1. Setaudit_log_enabledtoON.1. ClickSave.Part 2 - Capture audit logs (diagnostic settings is for example only, send these logs to the appropriate data sink for your logging needs)1. Under Monitoring, selectDiagnostic settings.1. Select+ Add diagnostic setting.1. Provide a diagnostic setting name.1. Under Categories, selectMySQL Audit Logs.1. Specify destination details.1. ClickSave.It may take up to 10 minutes for the logs to appear in the configured destination.Remediate from Azure CLIUse the below command to enableaudit_log_enabled:az mysql flexible-server parameter set --resource-group <resourceGroup> --server-name <serverName> --name audit_log_enabled --value onRemediate from PowerShellUse the below command to enableaudit_log_enabled:Update-AzMySqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name audit_log_enabled -Value on
5.3.4Ensure server parameter 'audit_log_events' has 'CONNECTION' set for MySQL flexible server1
Attributes
- Profile
Level 2
- Section
5 Database Services
- Sub Section
5.3 Azure for MySQL
- Description
Set
audit_log_eventsto includeCONNECTIONonMySQL flexible servers.- Default Value
By default
audit_log_eventsis set toCONNECTION.- Audit Procedure
Audit from Azure Portal1. Login to Azure Portal using https://portal.azure.com.1. Go to
Azure Database for MySQL flexible servers.1. For each database, underSettings, clickServer parameters.1. In the filter bar, typeaudit_log.1. Ensure that theVALUEforaudit_log_enabledisON.1. Ensure that theVALUEforaudit_log_eventsincludesCONNECTION.Audit from Azure CLIEnsure the below command returns avaluethat includesCONNECTION:az mysql flexible-server parameter show --resource-group <resourceGroup> --server-name <serverName> --name audit_log_eventsAudit from PowerShellEnsure the below command returns aValuethat includesCONNECTION:Get-AzMySqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name audit_log_events- Impact Statement
There are further costs incurred for storage of logs. For high traffic databases these logs will be significant. Determine your organization's needs before enabling.
- Assessment Status
Automated
- Rationale Statement
Enabling
CONNECTIONhelps MySQL Database to log items such as successful and failed connection attempts to the server. Log data can be used to identify, troubleshoot, and repair configuration errors and suboptimal performance.- Remediation Procedure
Remediate from Azure Portal1. Login to Azure Portal using https://portal.azure.com.1. Go to
Azure Database for MySQL flexible servers.1. For each database, underSettings, clickServer parameters.1. In the filter bar, typeaudit_log.1. Setaudit_log_enabledtoON.1. In the drop-down next toaudit_log_events, checkCONNECTION.1. ClickSave.1. UnderMonitoring, selectDiagnostic settings.1. Select+ Add diagnostic setting.1. Provide a diagnostic setting name.1. UnderCategories, selectMySQL Audit Logs.1. Specify destination details.1. ClickSave.It may take up to 10 minutes for the logs to appear in the configured destination.Remediate from Azure CLIUse the below command to setaudit_log_eventstoCONNECTION:az mysql flexible-server parameter set --resource-group <resourceGroup> --server-name <serverName> --name audit_log_events --value CONNECTIONRemediate from PowerShellUse the below command to setaudit_log_eventstoCONNECTION:Update-AzMySqlFlexibleServerConfiguration -ResourceGroupName <resourceGroup> -ServerName <serverName> -Name audit_log_events -Value CONNECTION
5.4.1Ensure That 'Firewalls & Networks' Is Limited to Use Selected Networks Instead of All Networks1
Attributes
- Profile
Level 2
- Section
5 Database Services
- Sub Section
5.4 Azure Cosmos DB
- Description
Limiting your Cosmos DB to only communicate on whitelisted networks lowers its attack footprint.
- Default Value
By default, Cosmos DBs are set to have access all networks.
- Audit Procedure
Audit from Azure Portal1. Open the portal menu.2. Select the Azure Cosmos DB blade3. Select a Cosmos DB to audit.4. Select
Networking.5. UnderPublic network access, ensureSelected networksis selected.6. UnderVirtual networks, ensure appropriate virtual networks are configured.Audit from Azure CLIRetrieve a list of all CosmosDB database names:az cosmosdb listFor each database listed, run the following command:az cosmosdb show <database id>For each database, ensure thatisVirtualNetworkFilterEnabledis set totrueAudit from Azure PolicyIf 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: 862e97cf-49fc-4a5c-9de4-40d4e2e7c8eb - Name: 'Azure Cosmos DB accounts should have firewall rules'- Impact Statement
WARNING: Failure to whitelist the correct networks will result in a connection loss.WARNING: Changes to Cosmos DB firewalls may take up to 15 minutes to apply. Ensure that sufficient time is planned for remediation or changes to avoid disruption.
- Assessment Status
Automated
- Rationale Statement
Selecting certain networks for your Cosmos DB to communicate restricts the number of networks including the internet that can interact with what is stored within the database.
- Remediation Procedure
Remediate from Azure Portal1. Open the portal menu.2. Select the Azure Cosmos DB blade.3. Select a Cosmos DB account to audit.4. Select
Networking.5. UnderPublic network access, selectSelected networks.6. UnderVirtual networks, select+ Add existing virtual networkor+ Add a new virtual network.7. For existing networks, select subscription, virtual network, subnet and clickAdd. For new networks, provide a name, update the default values if required, and clickCreate.8. ClickSave.
5.4.2Ensure That Private Endpoints Are Used Where Possible1
Attributes
- Profile
Level 2
- Section
5 Database Services
- Sub Section
5.4 Azure Cosmos DB
- Description
Private endpoints limit network traffic to approved sources.
- Default Value
By default Cosmos DB does not have private endpoints enabled and its traffic is public to the network.
- Audit Procedure
Audit from Azure Portal1. Open the portal menu.2. Select the Azure Cosmos DB blade.3. Select the Azure Cosmos DB account.4. Select
Networking.5. EnsurePublic network accessis set toSelected networks.6. Ensure the listed networks are set appropriately.7. SelectPrivate access.8. Ensure a private endpoint exists andConnection stateisApproved.Audit from Azure PolicyIf 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: 58440f8a-10c5-4151-bdce-dfbaad4a20b7 - Name: 'CosmosDB accounts should use private link'- Impact Statement
Only whitelisted services will have access to communicate with the Cosmos DB.
- Assessment Status
Automated
- Rationale Statement
For sensitive data, private endpoints allow granular control of which services can communicate with Cosmos DB and ensure that this network traffic is private. You set this up on a case by case basis for each service you wish to be connected.
- Remediation Procedure
Remediate from Azure Portal1. Open the portal menu.2. Select the Azure Cosmos DB blade.3. Select the Azure Cosmos DB account.4. Select
Networking.5. SelectPrivate access.6. Click+ Private Endpoint.7. Provide a Name.8. ClickNext.9. From the Resource type drop down, selectMicrosoft.AzureCosmosDB/databaseAccounts.10. From the Resource drop down, select the Cosmos DB account.11. ClickNext.12. Provide appropriate Virtual Network details.13. ClickNext.14. Provide appropriate DNS details.15. ClickNext.16. Optionally provide Tags.17. ClickNext : Review + create.18. ClickCreate.
5.4.3Use Entra ID Client Authentication and Azure RBAC where possible1
Attributes
- Profile
Level 1
- Section
5 Database Services
- Sub Section
5.4 Azure Cosmos DB
- Description
Cosmos DB can use tokens or Entra ID for client authentication which in turn will use Azure RBAC for authorization. Using Entra ID is significantly more secure because Entra ID handles the credentials and allows for MFA and centralized management, and the Azure RBAC is better integrated with the rest of Azure.
- Default Value
The default is to use tokens/keys for client authentication.
- Audit Procedure
Audit from PowerShell
$cosmosdbname = '<your-cosmos-db-account-name>'$resourcegroup = '<your-resource-group-name>'az cosmosdb show --name $cosmosdbname --resource-group $resourcegroup | ConvertFrom-JsonIn the resulting output, disableLocalAuth should be trueAudit from Azure PolicyIf 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: 5450f5bd-9c72-4390-a9c4-a7aba4edfdd2 - Name: 'Cosmos DB database accounts should have local authentication methods disabled'- Assessment Status
Manual
- Rationale Statement
Entra ID client authentication is considerably more secure than token-based authentication because the tokens must be persistent at the client. Entra ID does not require this.
- Remediation Procedure
Map all the resources that currently have access to the Azure Cosmos DB account with keys or access tokens.Create an Entra ID identity for each of these resources:- For Azure resources, you can create a managed identity. You may choose between system-assigned and user-assigned managed identities.- For non-Azure resources, create an Entra ID identity. Grant each Entra ID identity the minimum permission it requires. When possible, we recommend you use one of the 2 built-in role definitions: Cosmos DB Built-in Data Reader or Cosmos DB Built-in Data Contributor. Validate that the new resource is functioning correctly. After new permissions are granted to identities, it may take a few hours until they propagate. When all resources are working correctly with the new identities, continue to the next step.Remediate from PowerShell
$cosmosdbname = '<your-cosmos-db-account-name>'$resourcegroup = '<your-resource-group-name>'az cosmosdb show --name $cosmosdbname --resource-group $resourcegroup | ConvertFrom-Jsonaz resource update --ids $cosmosdb.id --set properties.disableLocalAuth=true --latest-include-preview
6 Logging and Monitoring1917
6.1.1Ensure that a 'Diagnostic Setting' exists for Subscription Activity Logs1
Attributes
- Profile
Level 1
- Section
6 Logging and Monitoring
- Sub Section
6.1 Configuring Diagnostic Settings
- Description
Enable Diagnostic settings for exporting activity logs.Diagnostic settings are available for each individual resource within a subscription. Settings should be configured for all appropriate resources for your environment.
- Default Value
By default, diagnostic setting is not set.
- Audit Procedure
Audit from Azure PortalTo identify Diagnostic Settings on a subscription:1. Go to
Monitor2. ClickActivity Log3. ClickExport Activity Logs4. Select aSubscription5. Ensure aDiagnostic settingexists for the selected SubscriptionTo identify Diagnostic Settings on specific resources:1. Go toMonitoring2. ClickDiagnostic settings3. Ensure aDiagnostic settingexists for all appropriate resources.Audit from Azure CLITo 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 PowerShellTo identify Diagnostic Settings on a Subscription:Get-AzDiagnosticSetting -SubscriptionId <subscription ID>To identify Diagnostic Settings on a specific resource:Get-AzDiagnosticSetting -ResourceId <resource ID>- Assessment Status
Manual
- 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 in order to analyze security activities within an Azure subscription.
- Remediation Procedure
Remediate from Azure PortalTo 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 setting7. 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 CLITo 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 PowerShellTo 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 $trueNew-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 $trueRepeat 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.2Ensure Diagnostic Setting captures appropriate categories1
Attributes
- Profile
Level 1
- Section
6 Logging and Monitoring
- Sub Section
6.1 Configuring Diagnostic Settings
- Description
Prerequisite: A Diagnostic Setting must exist. If a Diagnostic Setting does not exist, the navigation and options within this recommendation will not be available. Please review the recommendation at the beginning of this subsection titled: 'Ensure that a 'Diagnostic Setting' exists.'The diagnostic setting should be configured to log the appropriate activities from the control/management plane.
- Default Value
When the diagnostic setting is created using Azure Portal, by default no categories are selected.
- Audit Procedure
Audit from Azure Portal1. 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 CLIEnsure the categories'Administrative', 'Alert', 'Policy', and 'Security'set to: 'enabled: true'az monitor diagnostic-settings subscription list --subscription <subscription ID>Audit from PowerShellEnsure the categories Administrative, Alert, Policy, and Security are set to Enabled:TrueGet-AzSubscriptionDiagnosticSetting -Subscription <subscriptionID>Audit from Azure PolicyIf 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'- 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 Portal1. 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 $trueNew-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.3Ensure the storage account containing the container with activity logs is encrypted with Customer Managed Key (CMK)1
Attributes
- Profile
Level 2
- Section
6 Logging and Monitoring
- Sub Section
6.1 Configuring Diagnostic Settings
- Description
Storage accounts with the activity log exports can be configured to use Customer Managed Keys (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 Portal1. 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 CLI1. 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 PolicyIf 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
Automated
- 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 Portal1. 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.4Ensure that logging for Azure Key Vault is 'Enabled'1
Attributes
- Profile
Level 1
- Section
6 Logging and Monitoring
- Sub Section
6.1 Configuring Diagnostic Settings
- Description
Enable AuditEvent logging for key vault instances to ensure interactions with key vaults are logged and available.
- Default Value
By default, Diagnostic AuditEvent logging is not enabled for Key Vault instances.
- Audit Procedure
Audit from Azure Portal1. 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 CLIList all key vaultsaz keyvault listFor each keyvaultid````az 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 subscription```Get-AzKeyVault```For 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 bothauditandallLogs` category groups.Audit from Azure PolicyIf 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'- 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 Portal1. 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 CLITo update an existingDiagnostic Settings````az 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 the `Log` settings object```$logSettings = @()$logSettings += New-AzDiagnosticSettingLogSettingsObject -Enabled $true -Category audit$logSettings += New-AzDiagnosticSettingLogSettingsObject -Enabled $true -Category allLogs```Create the `Metric` settings object```$metricSettings = @()$metricSettings += New-AzDiagnosticSettingMetricSettingsObject -Enabled $true -Category AllMetrics```Create the `Diagnostic Settings` for each `Key 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 WARNINGRetention 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.5Ensure that Network Security Group Flow logs are captured and sent to Log Analytics1
Attributes
- Profile
Level 2
- Section
6 Logging and Monitoring
- Sub Section
6.1 Configuring Diagnostic Settings
- Description
Ensure that network flow logs are captured and fed into a central log analytics workspace.
- Default Value
By default Network Security Group logs are not sent to Log Analytics.
- Audit Procedure
Audit from Azure Portal1. 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 PolicyIf 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.
6.1.6Ensure that logging for Azure AppService 'HTTP logs' is enabled1
Attributes
- Profile
Level 2
- Section
6 Logging and Monitoring
- Sub Section
6.1 Configuring Diagnostic Settings
- Description
Enable AppServiceHTTPLogs diagnostic log category for Azure App Service instances to ensure all http requests are captured and centrally logged.
- Default Value
Not configured.
- Audit Procedure
Audit from Azure Portal1. Go to
App Services.For eachApp Service:2. UnderMonitoring, go toDiagnostic settings.3. Ensure a diagnostic setting exists that logsHTTP logsto a destination aligned to your environment's approach to log consumption (event hub, storage account, etc. dependent on what is consuming the logs such as SIEM or other log aggregation utility).- Impact Statement
Log consumption and processing will incur additional cost.
- Assessment Status
Manual
- Rationale Statement
Capturing web requests can be important supporting information for security analysts performing monitoring and incident response activities. Once logging, these logs can be ingested into SIEM or other central aggregation point for the organization.
- Remediation Procedure
Remediate from Azure Portal1. Go to
App Services.For eachApp Service:2. UnderMonitoring, go toDiagnostic settings.3. To update an existing diagnostic setting, clickEdit settingagainst the setting. To create a new diagnostic setting, clickAdd diagnostic settingand provide a name for the new setting.4. Check the checkbox next toHTTP logs.5. Configure a destination based on your specific logging consumption capability (for example Stream to an event hub and then consuming with SIEM integration for Event Hub logging).6. ClickSave.
6.2.1Ensure that Activity Log Alert exists for Create Policy Assignment1
Attributes
- Profile
Level 1
- Section
6 Logging and Monitoring
- Sub Section
6.2 Monitoring using Activity Log Alerts
- Description
Create an activity log alert for the Create Policy Assignment event.
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal1. 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 PolicyIf 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'- 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 Portal1. 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 PowerShellCreate 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 Rulefor `Microsoft.Authorization/policyAssignments/write````New-AzActivityLogAlert -Name '<activity alert rule name>' -ResourceGroupName '<resource group name>' -Condition $conditions -Scope $scope -Location global -Action $actionObject -Subscription <subscription ID> -Enabled $true```
6.2.2Ensure that Activity Log Alert exists for Delete Policy Assignment1
Attributes
- Profile
Level 1
- Section
6 Logging and Monitoring
- Sub Section
6.2 Monitoring using Activity Log Alerts
- Description
Create an activity log alert for the Delete Policy Assignment event.
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal1. 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 outputAudit from PowerShellGet-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match 'Microsoft.Authorization/policyAssignments/delete'}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfAudit from Azure PolicyIf 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'- 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 Portal1. 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 PowerShellCreate 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.2.3Ensure that Activity Log Alert exists for Create or Update Network Security Group1
Attributes
- Profile
Level 1
- Section
6 Logging and Monitoring
- Sub Section
6.2 Monitoring using Activity Log Alerts
- Description
Create an Activity Log Alert for the Create or Update Network Security Group event.
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal1. 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 outputAudit from PowerShellGet-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match 'Microsoft.Network/networkSecurityGroups/write'}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfAudit from Azure PolicyIf 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'- 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 Portal1. 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 PowerShellCreate 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 Rulefor `Microsoft.Network/networkSecurityGroups/write````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```
6.2.4Ensure that Activity Log Alert exists for Delete Network Security Group1
Attributes
- Profile
Level 1
- Section
6 Logging and Monitoring
- Sub Section
6.2 Monitoring using Activity Log Alerts
- Description
Create an activity log alert for the Delete Network Security Group event.
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal1. 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 outputAudit from PowerShellGet-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match 'Microsoft.Network/networkSecurityGroups/delete'}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfAudit from Azure PolicyIf 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'- 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 Portal1. 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 PowerShellCreate 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 Rulefor `Microsoft.Network/networkSecurityGroups/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```
6.2.5Ensure that Activity Log Alert exists for Create or Update Security Solution1
Attributes
- Profile
Level 1
- Section
6 Logging and Monitoring
- Sub Section
6.2 Monitoring using Activity Log Alerts
- Description
Create an activity log alert for the Create or Update Security Solution event.
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal1. 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 outputAudit from PowerShellGet-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match 'Microsoft.Security/securitySolutions/write'}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfAudit from Azure PolicyIf 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'- 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 Portal1. 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 PowerShellCreate 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 Rulefor `Microsoft.Security/securitySolutions/write````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```
6.2.6Ensure that Activity Log Alert exists for Delete Security Solution1
Attributes
- Profile
Level 1
- Section
6 Logging and Monitoring
- Sub Section
6.2 Monitoring using Activity Log Alerts
- Description
Create an activity log alert for the Delete Security Solution event.
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal1. 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 outputAudit from PowerShellGet-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match 'Microsoft.Security/securitySolutions/delete'}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfAudit from Azure PolicyIf 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'- 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 Portal1. 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 PowerShellCreate 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 Rulefor `Microsoft.Security/securitySolutions/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```
6.2.7Ensure that Activity Log Alert exists for Create or Update SQL Server Firewall Rule1
Attributes
- Profile
Level 1
- Section
6 Logging and Monitoring
- Sub Section
6.2 Monitoring using Activity Log Alerts
- Description
Create an activity log alert for the Create or Update SQL Server Firewall Rule event.
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal1. 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 outputAudit 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 PolicyIf 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 Portal1. 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 PowerShellCreate 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 Rulefor `Microsoft.Sql/servers/firewallRules/write````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```
6.2.8Ensure that Activity Log Alert exists for Delete SQL Server Firewall Rule1
Attributes
- Profile
Level 1
- Section
6 Logging and Monitoring
- Sub Section
6.2 Monitoring using Activity Log Alerts
- Description
Create an activity log alert for the 'Delete SQL Server Firewall Rule.
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal1. 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 outputAudit 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 PolicyIf 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 Portal1. 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 PowerShellCreate 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 Rulefor `Microsoft.Sql/servers/firewallRules/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```
6.2.9Ensure that Activity Log Alert exists for Create or Update Public IP Address rule1
Attributes
- Profile
Level 1
- Section
6 Logging and Monitoring
- Sub Section
6.2 Monitoring using Activity Log Alerts
- Description
Create an activity log alert for the Create or Update Public IP Addresses rule.
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal1. 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 outputAudit from PowerShellGet-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match 'Microsoft.Network/publicIPAddresses/write'}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfAudit from Azure PolicyIf 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 Portal1. 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 PowerShellCreate 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 Rulefor `Microsoft.Network/publicIPAddresses/write````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```
6.2.10Ensure that Activity Log Alert exists for Delete Public IP Address rule1
Attributes
- Profile
Level 1
- Section
6 Logging and Monitoring
- Sub Section
6.2 Monitoring using Activity Log Alerts
- Description
Create an activity log alert for the Delete Public IP Address rule.
- Default Value
By default, no monitoring alerts are created.
- Audit Procedure
Audit from Azure Portal1. 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 outputAudit from PowerShellGet-AzActivityLogAlert -SubscriptionId <subscription ID>|where-object {$_.ConditionAllOf.Equal -match 'Microsoft.Network/publicIPAddresses/delete'}|select-object Location,Name,Enabled,ResourceGroupName,ConditionAllOfAudit from Azure PolicyIf 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 Portal1. 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 PowerShellCreate 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 Rulefor `Microsoft.Network/publicIPAddresses/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```
6.3.1Ensure Application Insights are Configured1
Attributes
- Profile
Level 2
- Section
6 Logging and Monitoring
- Sub Section
6.3. Configuring Application Insights
- Description
Application Insights within Azure act as an Application Performance Monitoring solution providing valuable data into how well an application performs and additional information when performing incident response. The types of log data collected include application metrics, telemetry data, and application trace logging data providing organizations with detailed information about application activity and application transactions. Both data sets help organizations adopt a proactive and retroactive means to handle security and performance related metrics within their modern applications.
- 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.4Ensure that Azure Monitor Resource Logging is Enabled for All Services that Support it0
Attributes
- Profile
Level 1
- Section
6 Logging and Monitoring
- Description
Resource Logs capture activity to the data access plane while the Activity log is a subscription-level log for the control plane. Resource-level diagnostic logs provide insight into operations that were performed within that resource itself; for example, reading or updating a secret from a Key Vault. Currently, 95 Azure resources support Azure Monitoring (See the more information section for a complete list), including Network Security Groups, Load Balancers, Key Vault, AD, Logic Apps, and CosmosDB. The content of these logs varies by resource type.A number of back-end services were not configured to log and store Resource Logs for certain activities or for a sufficient length. It is crucial that monitoring is correctly configured to log all relevant activities and retain those logs for a sufficient length of time. Given that the mean time to detection in an enterprise is 240 days, a minimum retention period of two years is recommended.
- Default Value
By default, Azure Monitor Resource Logs are 'Disabled' for all resources.
- Audit Procedure
Audit from Azure PortalThe specific steps for configuring resources within the Azureconsole vary depending on resource, but typically the steps are:1. Go to the resource2. Click on Diagnostic settings3. In the blade that appears, click 'Add diagnostic setting'4. Configure the diagnostic settings5. Click on SaveAudit from Azure CLIList all
resourcesfor asubscription````az resource list --subscription <subscription id>```For eachresourcerun the following```az 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-AzResource```Loop 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 Settings` for a resource.Audit from Azure PolicyIf 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 PortalThe specific steps for configuring resources within the Azure console vary depending on resource, but typically the steps are:1. Go to the resource2. Click on Diagnostic settings3. In the blade that appears, click 'Add diagnostic setting'4. Configure the diagnostic settings5. Click on SaveRemediate from Azure CLIFor 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 PowerShellCreate 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
Note: The CIS Benchmark covers some specific Diagnostic Logs separately.
Section 3 - Storage Accounts: Ensure Storage Logging is Enabled for Queue Service for 'Read', 'Write', and 'Delete' requestsSection 6 - Network: Ensure that Network Security Group Flow Log retention period is 'greater than 90 days'For an up-to-date list of Azure resources which support Azure Monitor, refer to the 'Supported Log Categories' reference.
6.5Ensure that SKU Basic/Consumption is not used on artifacts that need to be monitored (Particularly for Production Workloads)0
Attributes
- Profile
Level 2
- Section
6 Logging and Monitoring
- Description
The use of Basic or Free SKUs in Azure whilst cost effective have significant limitations in terms of what can be monitored and what support can be realized from Microsoft. Typically, these SKU’s do not have a service SLA and Microsoft may refuse to provide support for them. Consequently Basic/Free SKUs should never be used for production workloads.
- 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 Portal1. 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 type'Alternatively, 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 type'Ensure 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 twofold1) There will be a cost increase2) 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 artifact has its own process for upgrading from basic to standard SKU's and this should be followed if required.
7 Networking76
7.1Ensure that RDP access from the Internet is evaluated and restricted1
Attributes
- Profile
Level 1
- Section
7 Networking
- Description
Network security groups should be periodically evaluated for port misconfigurations. Where certain ports and protocols may be exposed to the Internet, they should be evaluated for necessity and restricted wherever they are not explicitly required.
- Default Value
By default, RDP access from internet is not
enabled.- Audit Procedure
Audit from Azure Portal1. For each VM, open the
Networkingblade2. Verify that theINBOUND PORT RULESdoes not have a rule for RDP such as - port =3389, - protocol =TCPORANY, - Source =AnyORInternetAudit from Azure CLIList 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 below'access' : 'Allow''destinationPortRange' : '3389' or '*' or '[port range containing 3389]''direction' : 'Inbound''protocol' : 'TCP' or '*''sourceAddressPrefix' : '*' or '0.0.0.0' or '<nw>/0' or '/0' or 'internet' or 'any'Audit from Azure PolicyIf 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'- 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
Where RDP 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:ExpressRouteSite-to-site VPNPoint-to-site VPN
7.2Ensure that SSH access from the Internet is evaluated and restricted1
Attributes
- Profile
Level 1
- Section
7 Networking
- Description
Network security groups should be periodically evaluated for port misconfigurations. Where certain ports and protocols may be exposed to the Internet, they should be evaluated for necessity and restricted wherever they are not explicitly required.
- Default Value
By default, SSH access from internet is not
enabled.- Audit Procedure
Audit from Azure Portal1. Open the
Networkingblade for the specific Virtual machine in Azure portal2. Verify that theINBOUND PORT RULESdoes not have a rule for SSH such as - port =22, - protocol =TCPORANY, - Source =AnyORInternetAudit from Azure CLIList 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 below'access' : '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 'any'Audit from Azure PolicyIf 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'- 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:ExpressRouteSite-to-site VPNPoint-to-site VPN
7.3Ensure that UDP access from the Internet is evaluated and restricted1
Attributes
- Profile
Level 1
- Section
7 Networking
- Description
Network security groups should be periodically evaluated for port misconfigurations. Where certain ports and protocols may be exposed to the Internet, they should be evaluated for necessity and restricted wherever they are not explicitly required.
- Default Value
By default, UDP access from internet is not
enabled.- Audit Procedure
Audit from Azure Portal1. Open the
Networkingblade for the specific Virtual machine in Azure portal2. Verify that theINBOUND PORT RULESdoes not have a rule for UDP such as- protocol =UDP,- Source =AnyORInternetAudit from Azure CLIList 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 below'access' : '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'- 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:ExpressRouteSite-to-site VPNPoint-to-site VPN
7.4Ensure that HTTP(S) access from the Internet is evaluated and restricted1
Attributes
- Profile
Level 1
- Section
7 Networking
- 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
Network security groups should be periodically evaluated for port misconfigurations. Where certain ports and protocols may be exposed to the Internet, they should be evaluated for necessity and restricted wherever they are not explicitly required and narrowly configured.
- Audit Procedure
Audit from Azure Portal1. For each VM, open the Networking blade2. 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 CLIList 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 below'access' : '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'- 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 Portal1. 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 = AllowRemediate from Azure CLI1. 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 period is 'greater than 90 days'1
Attributes
- Profile
Level 2
- Section
7 Networking
- Description
Network Security Group Flow Logs should be enabled and the retention period set to greater than or equal to 90 days.
- Default Value
By default, Network Security Group Flow Logs are
disabled.- Audit Procedure
Audit from Azure Portal1. Go to
Network Watcher.1. SelectFlow logs.1. Review existingNetwork security groupflow logs, if any remain, and ensureStatusis set toOnandRetention (days)is set to0,90, or a number greater than90.1. ReviewVirtual networkflow logs for new or migrated coverage.Audit from Azure CLIaz network watcher flow-log list --location <location> --query [*].[name,retentionPolicy,targetResourceId]Ensure each relevant flow log has retention days set to0,90, or a number greater than90.Audit from Azure PolicyIf 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: 5e1cd26a-5090-4fdb-9d6a-84a90335e22d - Name: 'Configure network security groups to use specific workspace, storage account and flowlog retention policy for traffic analytics'- Impact Statement
This will keep IP traffic logs for longer than 90 days. As a level 2, first determine your need to retain data, then apply your selection here. As this is data stored for longer, your monthly storage costs will increase depending on your data use.
- Assessment Status
Automated
- Rationale Statement
Flow logs enable capturing information about IP traffic flowing in and out of network security groups. Logs can be used to check for anomalies and give insight into suspected breaches.
- 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, ensureStatusis set toOnandRetention (days)is set to0,90, or a number greater than90until migration is complete. Azure no longer allows creation of new NSG flow logs after June 30, 2025. For new or migrated deployments, configureVirtual networkflow logs instead and setRetention daysto0,90, or a number greater than90.Remediate from Azure CLIUpdate an existing flow log retention policy with:az network watcher flow-log update --location <location> --name <flow-log> --retention <number-of-days>- 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.
7.6Ensure that Network Watcher is 'Enabled' for Azure Regions that are in use1
Attributes
- Profile
Level 2
- Section
7 Networking
- Description
Enable Network Watcher for physical regions in Azure subscriptions.
- 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 Portal1. 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 PowerShellGet 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 PolicyIf 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 Portal1. 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 Basis0
Attributes
- Profile
Level 1
- Section
7 Networking
- Description
Public IP Addresses provide tenant accounts with Internet connectivity for resources contained within the tenant. During the creation of certain resources in Azure, a Public IP Address may be created. All Public IP Addresses within the tenant should be periodically reviewed for accuracy and necessity.
- Default Value
During Virtual Machine and Application creation, a setting may create and attach a public IP.
- Audit Procedure
Audit from Azure Portal1. Open the
All Resourcesblade2. Click onAdd Filter3. In the Add Filter window, select the following: Filter:TypeOperator:EqualsValue:Public IP address4. Click theApplybutton5. For each Public IP address in the list, use Overview (or Properties) to review the'Associated 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 CLIList all Public IP addresses:az network public-ip listFor each Public IP address in the output, review the'name'property 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.- 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.
8 Virtual Machines117
8.1Ensure an Azure Bastion Host Exists1
Attributes
- Profile
Level 2
- Section
8 Virtual Machines
- Description
The Azure Bastion service allows secure remote access to Azure Virtual Machines over the Internet without exposing remote access protocol ports and services directly to the Internet. The Azure Bastion service provides this access using TLS over 443/TCP, and subscribes to hardened configurations within an organization's Azure Active Directory service.
- Default Value
By default, the Azure Bastion service is not configured.
- Audit Procedure
Audit from Azure Portal1. Click on
Bastions2. Ensure there is at least oneBastionhost listed under theNamecolumnAudit 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 PowerShellRetrieve theBastionhost(s) information for a specific `Resource Group````Get-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 Portal1. Click on
Bastions2. Select theSubscription3. Select theResource group4. Type aNamefor the new Bastion host5. 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. Selct 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 appropriateAdvancedoptions17. 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 PowerShellCreate 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.2Ensure Virtual Machines are utilizing Managed Disks1
Attributes
- Profile
Level 1
- Section
8 Virtual Machines
- Description
Migrate blob-based VHDs to Managed Disks on Virtual Machines to exploit the default features of this configuration.The features include: 1) Default Disk Encryption2) Resilience, as Microsoft will managed the disk storage and move around if underlying hardware goes faulty3) Reduction of costs over storage accounts
- Default Value
Managed disks or are an option upon the creation of VMs.
- Audit Procedure
Audit from Azure Portal1. Using the search feature, go to
Virtual Machines2. Click theManage viewdropdown, then selectEdit columns3. AddUses managed disksto the selected columns4. SelectSave5. Ensure all virtual machines listed are using managed disksAudit from PowerShellGet-AzVM | ForEach-Object {'Name: ' + $_.Name;'ManagedDisk Id: ' + $_.StorageProfile.OsDisk.ManagedDisk.Id;''}Example output:Name: vm1ManagedDisk Id: /disk1/idName: vm2ManagedDisk Id: /disk2/idIf the 'ManagedDisk Id' field is empty the os disk for that vm is not managed.Audit from Azure PolicyIf 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: 06a78e20-9358-41c9-923c-fb736d382a4d - Name: 'Audit VMs that do not use managed disks'- Impact Statement
There are additional costs for managed disks based off of disk space allocated. When converting to managed disks, VMs will be powered off and back on.
- Assessment Status
Automated
- Rationale Statement
Managed disks are by default encrypted on the underlying hardware, so no additional encryption is required for basic protection. It is available if additional encryption is required.Managed disks are by design more resilient that storage accounts.For ARM-deployed Virtual Machines, Azure Adviser will at some point recommend moving VHDs to managed disks both from a security and cost management perspective.
- Remediation Procedure
Remediate from Azure Portal1. Using the search feature, go to
Virtual Machines2. Select the virtual machine you would like to convert3. SelectDisksin the menu for the VM4. At the top selectMigrate to managed disks5. You may follow the prompts to convert the disk and finish by selectingMigrateto start the processNOTE VMs will be stopped and restarted after migration is complete.Remediate from PowerShellStop-AzVM -ResourceGroupName $rgName -Name $vmName -ForceConvertTo-AzVMManagedDisk -ResourceGroupName $rgName -VMName $vmNameStart-AzVM -ResourceGroupName $rgName -Name $vmName
8.3Ensure that 'OS and Data' disks are encrypted with Customer Managed Key (CMK)1
Attributes
- Profile
Level 2
- Section
8 Virtual Machines
- Description
Ensure that OS disks (boot volumes) and data disks (non-boot volumes) are encrypted with CMK (Customer Managed Keys).Customer Managed keys can be either ADE or Server Side Encryption (SSE).
- Default Value
By default, Azure disks are encrypted using SSE with PMK.
- Audit Procedure
Audit from Azure Portal1. Go to
Virtual machines.2. For each virtual machine, go toSettings.3. Click onDisks.4. Ensure that theOS diskandData diskshave encryption set to CMK.Audit from PowerShell$ResourceGroupName='yourResourceGroupName'$DiskName='yourDiskName'$disk=Get-AzDisk -ResourceGroupName $ResourceGroupName -DiskName $DiskName$disk.Encryption.TypeAudit from Azure PolicyIf 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: 0961003e-5a0a-4549-abde-af6a37f2724d - Name: 'Virtual machines should encrypt temp disks, caches, and data flows between Compute and Storage resources'- Impact Statement
Using CMK/BYOK will entail additional management of keys.NOTE: You must have your key vault set up to utilize this.
- Assessment Status
Automated
- Rationale Statement
Encrypting the IaaS VM's OS disk (boot volume) and Data disks (non-boot volume) ensures that the entire content is fully unrecoverable without a key, thus protecting the volume from unwanted reads. PMK (Platform Managed Keys) are enabled by default in Azure-managed disks and allow encryption at rest. CMK is recommended because it gives the customer the option to control which specific keys are used for the encryption and decryption of the disk. The customer can then change keys and increase security by disabling them instead of relying on the PMK key that remains unchanging. There is also the option to increase security further by using automatically rotating keys so that access to disk is ensured to be limited. Organizations should evaluate what their security requirements are, however, for the data stored on the disk. For high-risk data using CMK is a must, as it provides extra steps of security. If the data is low risk, PMK is enabled by default and provides sufficient data security.
- Remediation Procedure
Remediate from Azure Portal Note: Disks must be detached from VMs to have encryption changed.1. Go to
Virtual machines2. For each virtual machine, go toSettings3. Click onDisks4. Click the ellipsis (...), then clickDetachto detach the disk from the VM5. Now search forDisksand locate the unattached disk6. Click the disk then selectEncryption7. Change your encryption type, then select your encryption set8. ClickSave9. Go back to the VM and re-attach the diskRemediate from PowerShell$KVRGname = 'MyKeyVaultResourceGroup'; $VMRGName = 'MyVirtualMachineResourceGroup'; $vmName = 'MySecureVM'; $KeyVaultName = 'MySecureVault'; $KeyVault = Get-AzKeyVault -VaultName $KeyVaultName -ResourceGroupName $KVRGname; $diskEncryptionKeyVaultUrl = $KeyVault.VaultUri; $KeyVaultResourceId = $KeyVault.ResourceId; Set-AzVMDiskEncryptionExtension -ResourceGroupName $VMRGname -VMName $vmName -DiskEncryptionKeyVaultUrl $diskEncryptionKeyVaultUrl -DiskEncryptionKeyVaultId $KeyVaultResourceId;**NOTE:**During encryption it is likely that a reboot will be required. It may take up to 15 minutes to complete the process.For Linux machines you may need to set the-skipVmBackupparameter.
8.4Ensure that 'Unattached disks' are encrypted with 'Customer Managed Key' (CMK)1
Attributes
- Profile
Level 2
- Section
8 Virtual Machines
- Description
Ensure that unattached disks in a subscription are encrypted with a Customer Managed Key (CMK).
- Default Value
By default, managed disks are encrypted with a Platform-managed key.
- Audit Procedure
Audit from Azure Portal1. Go to
Disks1. Click onAdd Filter1. In thefilterfield selectDisk state1. In theValuefield selectUnattached1. ClickApply1. for each disk listed ensure thatEncryption typein theencryptionblade isEncryption at-rest with a customer-managed key'**Audit from Azure CLI**Ensure command below does not return any output.```az disk list --query '[? diskstate ==Unattached`].{encryptionSettings: encryptionSettings, name: name}' -o jsonSample Output:[ { 'encryptionSettings': null, 'name': '<Disk1>' }, { 'encryptionSettings': null, 'name': '<Disk2>' }]```Audit from Azure PolicyIf 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: ca91455f-eace-4f96-be59-e6e2c35b4816 - Name: 'Managed disks should be double encrypted with both platform-managed and customer-managed keys'- Impact Statement
NOTE: You must have your key vault set up to utilize this.Encryption is available only on Standard tier VMs. This might cost you more.Utilizing and maintaining Customer-managed keys will require additional work to create, protect, and rotate keys.
- Assessment Status
Automated
- Rationale Statement
Managed disks are encrypted by default with Platform-managed keys. Using Customer-managed keys may provide an additional level of security or meet an organization's regulatory requirements. Encrypting managed disks ensures that its entire content is fully unrecoverable without a key and thus protects the volume from unwarranted reads. Even if the disk is not attached to any of the VMs, there is always a risk where a compromised user account with administrative access to VM service can mount/attach these data disks, which may lead to sensitive information disclosure and tampering.
- Remediation Procedure
If data stored in the disk is no longer useful, refer to Azure documentation to delete unattached data disks at:
-https://docs.microsoft.com/en-us/rest/api/compute/disks/delete-https://docs.microsoft.com/en-us/cli/azure/disk?view=azure-cli-latest#az-disk-deleteIf data stored in the disk is important, to encrypt the disk refer to azure documentation at:-https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-customer-managed-keys-portal-https://docs.microsoft.com/en-us/rest/api/compute/disks/update#encryptionsettings
8.5Ensure that 'Disk Network Access' is NOT set to 'Enable public access from all networks'0
Attributes
- Profile
Level 1
- Section
8 Virtual Machines
- Description
Virtual Machine Disks and snapshots can be configured to allow access from different network resources.
- Default Value
By default, Disk Network access is set to
Enable public access from all networks.- Audit Procedure
Audit from Azure PortalPart A. Select the Virtual Machine to Evaluate1. Using the search bar, search for and open the
Virtual Machinesservice.1. Click on the name of the Virtual Machine to be audited.Part B. Evaluate each Virtual Machine Disk individually1. From the selected Virtual Machine resource window, expand theSettingsmenu item and clickDisks.1. For each disk, click the name of the disk to open the disk resource window.1. From the selected Disk resource window, expand theSettingsmenu item, and clickNetworking.Ensure that Network access is NOT set toEnable public access from all networks.Repeat Part B for each Disk attached to a VM.Repeat Parts A and B to evaluate all Disks in all VMs.Audit from PowerShellFor each managed disk, run the following PowerShell command:Get-AzDisk -ResourceGroupName ‘<resource group name>’ -DiskName ‘<disk name>’Ensure thePublicNetworkAccesssetting isDisabledand theNetworkAccessPolicyis set toAllowPrivateorDenyAll.Audit from Azure CLIFor each managed disk, run the following command:az disk show --disk-name ‘<disk name>’ --resource-group ‘<resource group name>’Ensure thepublicNetworkAccesssetting is set toDisabledand thenetworkAccessPolicysetting is set toAllowPrivateorDenyAll.Audit from Azure PolicyIf 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: 8405fdab-1faf-48aa-b702-999c9c172094 - Name: 'Managed disks should disable public network access'- Impact Statement
The setting 'Disable public access and enable private access' will require configuring a private link (URL in references below). The setting 'Disable public and private access' is most secure and preferred where disk network access is not needed.
- Assessment Status
Automated
- Rationale Statement
The setting 'Enable public access from all networks' is, in many cases, an overly permissive setting on Virtual Machine Disks that presents atypical attack, data infiltration, and data exfiltration vectors. If a disk to network connection is required, the preferred setting is to 'Disable public access and enable private access.'
- Remediation Procedure
Remediate from Azure PortalPart A. Select the Virtual Machine to Remediate1. Using the search bar, search for and open the
Virtual Machinesservice.1. Click on the name of the Virtual Machine to be remediated.Part B. Remediate each Virtual Machine Disk individually1. From the selected Virtual Machine resource window, expand theSettingsmenu item and clickDisks.1. For each disk, click the name of the disk to open the disk resource window.1. From the selected Disk resource window, expand theSettingsmenu item, and clickNetworking.Under Network access, select the radio button for either:- Disable public access and enable private access- Disable public and private accessRepeat Part B for each Disk attached to a VM.Repeat Parts A and B to remediate all Disks in all VMs.Remediate from PowerShellTo disablePublicNetworkAccessand to set aDenyAllsetting for the disk'sNetworkAccessPolicyfor each managed disk, run the following command:$disk = Get-AzDisk -ResourceGroupName ‘<resource group name>’ -DiskName ‘<disk name>’$disk.NetworkAccessPolicy = 'DenyAll'$disk.PublicNetworkAccess = 'Disabled'Update-AzDisk -ResourceGroup '<resource group name> -DiskName $disk.Name -Disk $diskTo disablePublicNetworkAccessand to set anAllowPrivatesetting for the disk'sNetworkAccessPolicyfor each managed disk, run the following command:$disk = Get-AzDisk -ResourceGroupName ‘<resource group name>’ -DiskName ‘<disk name>’$disk.NetworkAccessPolicy = 'AllowPrivate'$disk.PublicNetworkAccess = 'Disabled'$disk.DiskAccessId = '/subscriptions/<subscription ID>/resourceGroups/<resource group name>/providers/Microsoft.Compute/diskAccesses/<private disk access name>Update-AzDisk -ResourceGroup '<resource group name> -DiskName $disk.Name -Disk $diskRemediate from Azure CLITo configure a disk to allow private access only, run the following command making sure you have theDisk Access IDfrom a private disk access end point.az disk update --name <managed disk name> --resource-group <resource group name> --network-access-policy AllowPrivate --disk-access <disk access ID>To completely disable public and private access for a disk, run the following command (still in preview) for each disk:az disk update --name <managed disk name> --resource-group <resource group name> --public-network-access Disabled --network-access-policy DenyAll
8.6Ensure that 'Enable Data Access Authentication Mode' is 'Checked'0
Attributes
- Profile
Level 1
- Section
8 Virtual Machines
- Description
Data Access Authentication Mode provides a method of uploading or exporting Virtual Machine Disks.
- Default Value
By default, Data Access Authentication Mode is
Disabled.- Audit Procedure
Audit from Azure PortalPart A. Select the Virtual Machine to Evaluate1. Using the search bar, search for and open the
Virtual Machinesservice.1. Click on the name of the Virtual Machine to be audited.Part B. Evaluate each Virtual Machine Disk individually1. From the selected Virtual Machine resource window, expand theSettingsmenu item and clickDisks.1. For each disk, click the name of the disk to open the disk resource window.1. From the selected Disk resource window, expand theSettingsmenu item, and clickDisk Export.Ensure thatEnable Data Access Authentication Modeischecked.Repeat Part B for each Disk attached to a VM.Repeat Parts A and B to evaluate all Disks in all VMs.Audit from PowerShellRun the following command for each disk:Get-AzDisk -ResourceGroupName '<resource_group_name>' -DiskName '<disk_name>'Ensure theDataAccessAuthModesetting displaysAzureActiveDirectorynext to it.Audit from Azure CLIRun the following command for each disk:az disk show --disk-name ‘<disk_name>’ --resource-group ‘<resource_group_name>’Ensure thedataAccessAuthModesetting is set toAzureActiveDirectory- Impact Statement
In order to apply this setting, the virtual machine to which the disk or disks are attached will need to be powered down and have their disk detached. Users without the
Data operator for managed diskrole within Entra ID will not be able to export VHD or VM Guest state using the secure download URL.- Assessment Status
Automated
- Rationale Statement
Enabling
data access authentication modeadds a layer of protection using an Entra ID role to further restrict users from creating and using Secure Access Signature (SAS) tokens for exporting a detached managed disk or virtual machine state. Users will need theData operator for managed diskrole within Entra ID in order to download a VHD or VM Guest state using a secure URL.- Remediation Procedure
Remediate from Azure PortalPart A. Select the Virtual Machine to Remediate1. Using the search bar, search for and open the
Virtual Machinesservice.1. Click on the name of the Virtual Machine to be remediated.Part B. Remediate each Virtual Machine Disk individually1. From the selected Virtual Machine resource window, expand theSettingsmenu item and clickDisks.1. For each disk, click the name of the disk to open the disk resource window.1. From the selected Disk resource window, expand theSettingsmenu item, and clickDisk Export.``checkthe checkbox next toEnable Data Access Authentication Mode.Repeat Part B for each Disk attached to a VM.Repeat Parts A and B to remediate all Disks in all VMs.Remediate from PowerShellEnsure that each disk is detached from its associatedVirtual Machinebefore proceeding. Once detached, run the following for each disk:$disk = Get-AzDisk -ResourceGroupName '<resource_group_name>' -DiskName '<disk_name>'$disk.DataAccessAuthMode = 'AzureActiveDirectory'Update-AzDisk -ResourceGroup '<resource_group_name>' -DiskName $disk.Name -Disk $diskRemediate from Azure CLIEnsure that each disk is detached from its associatedVirtual Machinebefore proceeding. Once detached, run the following for each disk:az disk update --name <disk_name> --resource-group <resource_group_name> --data-access-auth-mode AzureActiveDirectory
8.7Ensure that Only Approved Extensions Are Installed0
Attributes
- Profile
Level 1
- Section
8 Virtual Machines
- Description
For added security, only install organization-approved extensions on VMs.
- Default Value
By default, no extensions are added to the virtual machines.
- Audit Procedure
Audit from Azure Portal1. Go to
Virtual machines.2. For each virtual machine, click on the server name to select it. 3. In the new column menu, underSettingsClick onExtensions + applications.4. Ensure that all the listed extensions are approved by your organization for use.Audit from Azure CLIUse the below command to list the extensions attached to a VM, and ensure the listed extensions are approved for use.az vm extension list --vm-name <vmName> --resource-group <sourceGroupName> --query [*].nameAudit from PowerShellGet a list of VMs.Get-AzVMFor each VM run the following command.Get-AzVMExtension -ResourceGroupName <VM Resource Group> -VMName <VM Name>Review eachName,ExtensionType, andProvisioningStateto make sure no unauthorized extensions are installed on any virtual machines.Audit from Azure PolicyIf 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: c0e996f8-39cf-4af9-9f45-83fbde810432 - Name: 'Only approved VM extensions should be installed'- Impact Statement
Functionality by unsupported extensions will be disabled.
- Assessment Status
Manual
- Rationale Statement
Azure virtual machine extensions are small applications that provide post-deployment configuration and automation tasks on Azure virtual machines. These extensions run with administrative privileges and could potentially access anything on a virtual machine. The Azure Portal and community provide several such extensions. Each organization should carefully evaluate these extensions and ensure that only those that are approved for use are actually implemented.
- Remediation Procedure
Remediate from Azure Portal1. Go to
Virtual machines.2. For each virtual machine, go toSettings.3. Click onExtensions + applications.4. If there are unapproved extensions, uninstall them.Remediate from Azure CLIFrom the audit command identify the unapproved extensions, and use the below CLI command to remove an unapproved extension attached to VM.az vm extension delete --resource-group <resourceGroupName> --vm-name <vmName> --name <extensionName>Remediate from PowerShellFor each VM and each insecure extension from the Audit Procedure run the following command.Remove-AzVMExtension -ResourceGroupName <ResourceGroupName> -Name <ExtensionName> -VMName <VirtualMachineName>
8.8Ensure that Endpoint Protection for all Virtual Machines is installed1
Attributes
- Profile
Level 2
- Section
8 Virtual Machines
- Description
Install endpoint protection for all virtual machines.
- Default Value
By default Endpoint Protection is disabled.
- Audit Procedure
Audit from Azure Portal1. Go to
Security Center2. Click theRecommendationsblade3. Ensure that there are no recommendations forEndpoint Protection not installed on Azure VMsAudit from Azure CLIaz vm show -g <MyResourceGroup> -n <MyVm> -d --query 'resources[?type=='Microsoft.Compute/virtualMachines/extensions'].{ExtensionName:name}' -o tableIf extensions are installed, it will list the installed extensions.EndpointSecurity || TrendMicroDSA* || Antimalware || EndpointProtection || SCWPAgent || PortalProtectExtension* || FileSecurity*Alternatively, you can employ your own endpoint protection tool for your OS.Audit from Azure PolicyIf 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: 1f7c564c-0a90-4d44-b7e1-9d456cffaee8 - Name: 'Endpoint protection should be installed on your machines'- Impact Statement
Endpoint protection will incur an additional cost to you.
- Assessment Status
Manual
- Rationale Statement
Installing endpoint protection systems (like anti-malware for Azure) provides for real-time protection capability that helps identify and remove viruses, spyware, and other malicious software. These also offer configurable alerts when known-malicious or unwanted software attempts to install itself or run on Azure systems.
- Remediation Procedure
Follow Microsoft Azure documentation to install endpoint protection from the security center. Alternatively, you can employ your own endpoint protection tool for your OS.
8.9[Legacy] Ensure that VHDs are Encrypted0
Attributes
- Profile
Level 2
- Section
8 Virtual Machines
- References
CLI: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disk-encryption-cli-quickstart:Powershell: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disk-encryption-powershell-quickstart:https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-data-protection#dp-4-enable-data-at-rest-encryption-by-default:Convert VHD to Managed Disk: https://docs.microsoft.com/en-us/previous-versions/azure/virtual-machines/scripts/virtual-machines-powershell-sample-create-managed-disk-from-vhd
- Description
**NOTE: This is a legacy recommendation. Managed Disks are encrypted by default and recommended for all new VM implementations.**VHD (Virtual Hard Disks) are stored in blob storage and are the old-style disks that were attached to Virtual Machines. The blob VHD was then leased to the VM. By default, storage accounts are not encrypted, and Microsoft Defender will then recommend that the OS disks should be encrypted. Storage accounts can be encrypted as a whole using PMK or CMK. This should be turned on for storage accounts containing VHDs.
- Default Value
The default value for encryption is 'NO Encryption
- Audit Procedure
Audit from Azure CLIFor each virtual machine identify if the VM is using a legacy VHD by reviewing the VHD parameter in the output of the following command. The VHD parameter will contain the Storage Account name used for the VHD.
az vm show --name <MyVM> --resource-group <MyResourceGroup>Next, identify if the storage account from the VHD parameter is encrypted by reviewing the encryption --> services --> blob --> enabled within the output of the following command and make sure its value is True.az storage account show --name <storage account name> --resource-group <resource group>**Audit from PowerShell:**Determine whether the VM is using a VHD for the OS Disk and any Data disks.$virtualMachine = Get-AzVM --Name <vm name> --ResourceGroup <resource group name> |Select-Object -ExpandProperty StorageProfile$virtualMachine.OsDisk$virtualMachine.DataDisksNext, use the value from VHD to see if the storage blob holding the VHD is encrypted.$storageAccount = Get-AzStorageAccount -Name <storage account name from VHD setting> -ResourceGroupName <resource group name>$storageAccount.Encryption.Services.BlobAudit from Azure PolicyIf 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: 702dd420-7fcc-42c5-afe8-4026edd20fe0 - Name: 'OS and data disks should be encrypted with a customer-managed key'- Impact Statement
Depending on how the encryption is implemented will change the size of the impact. If provider-managed keys(PMK) are utilized, the impact is relatively low, but processes need to be put in place to regularly rotate the keys. If Customer-managed keys(CMK) are utilized, a key management process needs to be implemented to store and manage key rotation, thus the impact is medium to high depending on user maturity with key management.
- Assessment Status
Manual
- Rationale Statement
While it is recommended to use Managed Disks which are encrypted by default, 'legacy' VHDs may exist for a variety of reasons and may need to remain in VHD format. VHDs are not encrypted by default, so this recommendation intends to address the security of these disks. In these niche cases, VHDs should be encrypted using the procedures in this recommendation to encrypt and protect the data content. If a virtual machine is using a VHD and can be converted to a managed disk, instructions for this procedure can be found in the resources section of this recommendation under the title 'Convert VHD to Managed Disk.
- Remediation Procedure
Remediate from Azure Portal 1. Navigate to the
storage accountthat you wish to encrypt 2. Selectencryption3. Select theencryption typethat you wish to use If you wish to use a Microsoft-managed key (the default), you can save at this point and encryption will be applied to the account. If you selectCustomer-managed keys, it will ask for the location of the key (The default is an Azure Key Vault) and the key name. Once these are captured, save the configuration and the account will be encrypted using the provided key.**Remediate from Azure CLI:**Create the Key Vaultaz keyvault create --name <name> --resource-group <resourceGroup> --location <location> --enabled-for-disk-encryptionEncrypt the disk and store the key in Key Vaultaz vm encryption enable -g <resourceGroup> --name <name> --disk-encryption-keyvault myKVRemediate from PowerShellThis process uses a Key Vault to store the keysCreate the Key VaultNew-AzKeyvault -name <name> -ResourceGroupName <resourceGroup> -Location <location> -EnabledForDiskEncryptionEncrypt the disk and store the key in Key Vault$KeyVault = Get-AzKeyVault -VaultName <name> -ResourceGroupName <resourceGroup>``````Set-AzVMDiskEncryptionExtension -ResourceGroupName <resourceGroup> -VMName <name> -DiskEncryptionKeyVaultUrl $KeyVault.VaultUri -DiskEncryptionKeyVaultId $KeyVault.ResourceId
8.10Ensure only MFA enabled identities can access privileged Virtual Machine1
Attributes
- Profile
Level 2
- Section
8 Virtual Machines
- Description
Verify identities without MFA that can log in to a privileged virtual machine using separate login credentials. An adversary can leverage the access to move laterally and perform actions with the virtual machine's managed identity. Make sure the virtual machine only has necessary permissions, and revoke the admin-level permissions according to the least privileges principal
- Audit Procedure
Audit from Azure Portal1. Log in to the Azure portal.2. Select the
Subscription, then click onAccess control (IAM).3. SelectRole Assignmentsfrom the top menu and apply filters onAssignment typeasPrivileged administrator rolesandTypeasVirtual Machines.4. Verify the list of privileged managed identities attached to any virtual machine.5. If there are privileged managed identities from the above list, then check the list of users without MFA by navigating toEntra ID.6. In the left navigation pane selectUsersfromManage.7. Click onPer-User MFAfrom the top menu options and for each user withMULTI-FACTOR AUTH STATUSasDisabledfollow the below-mentioned steps: * Select theSubscription, then click onAccess control (IAM). * SelectCheck accessand click onUser, group, or service principal. * Enter the username or email and verify there are no role assignments on the user that provides access likeVirtual Machine Administrator LoginorVirtual Machine User Login. Make sure this follows the least privileges principal.- Impact Statement
This recommendation requires the Entra ID P2 license to implement.Ensure that identities that are provisioned to a virtual machine utilizes an RBAC/ABAC group and is allocated a role using Azure PIM, and 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 Portal1. 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. Navigate to
Entra IDfrom the left pane and selectUsersfrom theManagesection. 2. Click onPer-User MFAfrom the top menu options and select each user withMULTI-FACTOR AUTH STATUSasDisabledand can login to virtual machines: * Fromquick stepson the right side selectenable. * Click onenable multi-factor authand share the link with the user to setup MFA as required.- 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.
8.11Ensure Trusted Launch is enabled on Virtual Machines1
Attributes
- Profile
Level 1
- Section
8 Virtual Machines
- Description
When Secure Boot and vTPM are enabled together, they provide a strong foundation for protecting your VM from boot attacks. For example, if an attacker attempts to replace the bootloader with a malicious version, Secure Boot will prevent the VM from booting. If the attacker is able to bypass Secure Boot and install a malicious bootloader, vTPM can be used to detect the intrusion and alert you.
- Default Value
On Azure Generation 2 VMs, vTPM is enabled by default. Secure Boot is not enabled by default.
- Audit Procedure
Audit from Azure Portal1. Go to Virtual Machines1. For each VM, under Settings, click on Configuration on the left blade1. Under Security Type, make sure security type is not standard and if it is Trusted Launch Virtual Machines then make sure Enable Secure Boot & Enable vTPM are checkedAudit from Azure PolicyIf 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: 97566dd7-78ae-4997-8b36-1c7bfe0d8121 - Name: '[Preview]: Secure Boot should be enabled on supported Windows virtual machines'
- Impact Statement
Secure Boot and vTPM are not currently supported for Azure Generation 1 VMs. IMPORTANT: Before enabling Secure Boot and vTPM on a Generation 2 VM which does not already have both enabled, it is highly recommended to create a restore point of the VM prior to remediation.
- Assessment Status
Automated
- Rationale Statement
Secure Boot and vTPM work together to protect your VM from a variety of boot attacks, including bootkits, rootkits, and firmware rootkits. Not enabling Trusted Launch in Azure VM can lead to increased vulnerability to rootkits and boot-level malware, reduced ability to detect and prevent unauthorized changes to the boot process, and a potential compromise of system integrity and data security.
- Remediation Procedure
Remediate from Azure Portal1. Go to Virtual Machines.1. For each VM, under Settings, click on Configuration on the left blade.1. Under Security Type, select 'Trusted Launch Virtual Machines'.1. Make sure Enable Secure Boot & Enable vTPM are checked.1. Click on Apply.Note: Trusted launch on existing virtual machines (VMs) is currently not supported for Azure Generation 1 VMs
9 AppService129
9.1Ensure 'HTTPS Only' is set to `On`1
Attributes
- Profile
Level 1
- Section
9 AppService
- Description
Azure App Service allows apps to run under both HTTP and HTTPS by default. Apps can be accessed by anyone using non-secure HTTP links by default. Non-secure HTTP requests can be restricted and all HTTP requests redirected to the secure HTTPS port. It is recommended to enforce HTTPS-only traffic.
- Default Value
By default, HTTPS-only feature will be disabled when a new app is created using the command-line tool or Azure Portal console.
- Audit Procedure
Audit from Azure Portal1. Login to Azure Portal using https://portal.azure.com 2. Go to
App Services3. For each App Service4. UnderSettingsection, click onConfiguration5. Under theGeneral Settingstab, ensure thatHTTPS Onlyis set toOnunderPlatform SettingsAudit from Azure CLITo check HTTPS-only traffic value for an existing app, run the following command,az webapp show --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME> --query httpsOnlyThe output should returntrueif HTTPS-only traffic value is set toOn.Audit from PowerShellList all the web apps configured within the subscription.Get-AzWebApp | Select-Object ResourceGroup, Name, HttpsOnlyFor each web app review theHttpsOnlysetting and make sure it is set toTrue.Audit from Azure PolicyIf 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: a4af4a39-4135-47fb-b175-47fbdf85311d - Name: 'App Service apps should only be accessible over HTTPS'- Impact Statement
When it is enabled, every incoming HTTP request is redirected to the HTTPS port. This means an extra level of security will be added to the HTTP requests made to the app.
- Assessment Status
Automated
- Rationale Statement
Enabling HTTPS-only traffic will redirect all non-secure HTTP requests to HTTPS ports. HTTPS uses the TLS/SSL protocol to provide a secure connection which is both encrypted and authenticated. It is therefore important to support HTTPS for the security benefits.
- Remediation Procedure
Remediate from Azure Portal1. Login to Azure Portal using https://portal.azure.com 2. Go to
App Services3. For each App Service4. UnderSettingsection, click onConfiguration5. Under theGeneral Settingstab, setHTTPS OnlytoOnunderPlatform SettingsRemediate from Azure CLITo set HTTPS-only traffic value for an existing app, run the following command:az webapp update --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME> --set httpsOnly=trueRemediate from PowerShellSet-AzWebApp -ResourceGroupName <RESOURCE_GROUP_NAME> -Name <APP_NAME> -HttpsOnly $true
9.2Ensure App Service Authentication is set up for apps in Azure App Service1
Attributes
- Profile
Level 2
- Section
9 AppService
- Description
Azure App Service Authentication is a feature that can prevent anonymous HTTP requests from reaching a Web Application or authenticate those with tokens before they reach the app. If an anonymous request is received from a browser, App Service will redirect to a logon page. To handle the logon process, a choice from a set of identity providers can be made, or a custom authentication mechanism can be implemented.
- Default Value
By default, App Service Authentication is disabled when a new app is created using the command-line tool or Azure Portal console.
- Audit Procedure
Audit from Azure Portal1. Login to Azure Portal using https://portal.azure.com 2. Go to
App Services3. Click on each App4. UnderSettingssection, Click onAuthentication5. Ensure thatApp Service authenticationset toEnabled(Will only appear once an Identity provider is set up/selected)6. Navigate back to the application blade7. UnderSettings, click onConfiguration8. Click on the 'General Settings' tab9. UnderPlatform settings, ensureBasic Auth Publishing Credentialsis set toOffAudit from Azure CLITo check App Service Authentication status for an existing app, run the following command (using authV1 extension),az webapp auth show --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME> --query enabledThe output should returntrueif App Service authentication is set toOn.If using theauthV2extension for theaz webapp authCLI, run the following command,az webapp auth show --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME>Ensure that theenabledsetting underplatformis set totrue.To check whether theBasic Auth Publishing Credentialsare disabled, issue the following commands,az resource show --resource-group <RESOURCE GROUP NAME> --name scm --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/<APPLICATION NAME>az resource show --resource-group <RESOURCE GROUP NAME> --name ftp --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/<APPLICATION NAME>Ensureallowis set tofalseunderpropertieswithin the output of each of the above commands.Audit from Azure PolicyIf 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: c75248c1-ea1d-4a9c-8fc9-29a6aabd5da8 - Name: 'Function apps should have authentication enabled'- Policy ID: 95bccee9-a7f8-4bec-9ee9-62c3473701fc - Name: 'App Service apps should have authentication enabled'- Impact Statement
This is only required for App Services which require authentication. Enabling on site like a marketing or support website will prevent unauthenticated access which would be undesirable.Adding Authentication requirement will increase cost of App Service and require additional security components to facilitate the authentication.
- Assessment Status
Automated
- Rationale Statement
By Enabling App Service Authentication, every incoming HTTP request passes through it before being handled by the application code. It also handles authentication of users with the specified provider (Entra ID, Facebook, Google, Microsoft Account, and Twitter), validation, storing and refreshing of tokens, managing the authenticated sessions and injecting identity information into request headers. Disabling HTTP Basic Authentication functionality further ensures legacy authentication methods are disabled within the application.
- Remediation Procedure
Remediate from Azure Portal1. Login to Azure Portal using https://portal.azure.com 2. Go to
App Services3. Click on each App4. UnderSettingsection, click onAuthentication5. If no identity providers are set up, then clickAdd identity provider6. Choose other parameters as per your requirements and click onAddTo disable theBasic Auth Publishing Credentialssetting, perform the following steps:1. Login to Azure Portal using https://portal.azure.com 2. Go toApp Services3. Click on each App4. UnderSettings, click onConfiguration5. Click on the 'General Settings' tab6. UnderPlatform settings, ensureBasic Auth Publishing Credentialsis set toOffRemediate from Azure CLITo set App Service Authentication for an existing app, run the following command:az webapp auth update --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME> --enabled trueNoteIn order to accessApp Service authenticationsettings for Web app using Microsoft API requiresWebsite contributorpermission at subscription level. A custom role can be created in place ofWebsite contributorto provide more specific permission and maintain the principle of least privileged access.- Additional Information
You're not required to use App Service for authentication and authorization. Many web frameworks are bundled with security features, and you can use them if you like. If you need more flexibility than App Service provides, you can also write your own utilities. Secure authentication and authorization require deep understanding of security, including federation, encryption, JSON web tokens (JWT) management, grant types, and so on.
9.3Ensure 'FTP State' is set to 'FTPS Only' or 'Disabled'1
Attributes
- Profile
Level 1
- Section
9 AppService
- Description
By default, App Services can be deployed over FTP. If FTP is required for an essential deployment workflow, FTPS should be required for FTP login for all App Services.If FTPS is not expressly required for the App, the recommended setting is
Disabled.- Default Value
By default, FTP based deployment is
All allowed- Audit Procedure
Audit from Azure Portal1. Go to the Azure Portal2. Select
App Services3. Click on an app4. SelectSettingsand thenConfiguration5. UnderGeneral Settings, for thePlatform Settings, theFTP stateshould not be set toAll allowedAudit from Azure CLI List webapps to obtain the ids.az webapp listList the publish profiles to obtain the username, passwordand ftp server url.az webapp deployment list-publishing-profiles --ids <ids>{ 'publishUrl': <URL_FOR_WEB_APP>, 'userName': <USER_NAME>, 'userPWD': <USER_PASSWORD>,}Audit from PowerShellList all Web Apps:Get-AzWebAppFor each app:Get-AzWebApp -ResourceGroupName <resource group name> -Name <app name> | Select-Object -ExpandProperty SiteConfigIn the output, look for the value of FtpsState. If its value is AllAllowed the setting is out of compliance. Any other value is considered in compliance with this check.Audit from Azure PolicyIf 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: 399b2637-a50f-4f95-96f8-3a145476eb15 - Name: 'Function apps should require FTPS only'- Policy ID: 4d24b6d4-5e53-4a4f-a7f4-618fa573ee4b - Name: 'App Service apps should require FTPS only'- Impact Statement
Any deployment workflows that rely on FTP or FTPs rather than the WebDeploy or HTTPs endpoints may be affected.
- Assessment Status
Automated
- Rationale Statement
FTP is an unencrypted network protocol that will transmit data - including passwords - in clear-text. The use of this protocol can lead to both data and credential compromise, and can present opportunities for exfiltration, persistence, and lateral movement.
- Remediation Procedure
Remediate from Azure Portal1. Go to the Azure Portal2. Select
App Services3. Click on an app4. SelectSettingsand thenConfiguration5. UnderGeneral Settings, for thePlatform Settings, theFTP stateshould be set toDisabledorFTPS OnlyRemediate from Azure CLIFor each out of compliance application, run the following choosing either 'disabled' or 'FtpsOnly' as appropriate:az webapp config set --resource-group <resource group name> --name <app name> --ftps-state [disabled|FtpsOnly]Remediate from PowerShellFor each out of compliance application, run the following:Set-AzWebApp -ResourceGroupName <resource group name> -Name <app name> -FtpsState <Disabled or FtpsOnly>
9.4Ensure Web App is using the latest version of TLS encryption1
Attributes
- Profile
Level 1
- Section
9 AppService
- Description
The TLS (Transport Layer Security) protocol secures transmission of data over the internet using standard encryption technology. Encryption should be set with the latest version of TLS. App service allows TLS 1.2 by default, which is the recommended TLS level by industry standards such as PCI DSS.
- Default Value
By default, TLS Version feature will be set to 1.2 when a new app is created using the command-line tool or Azure Portal console.
- Audit Procedure
Audit from Azure Portal1. Login to Azure Portal using https://portal.azure.com 2. Go to
App Services3. Click on each App4. UnderSettingsection, Click onTLS/SSL settings5. Under theBindingspane, ensure thatMinimum TLS Versionset to1.2underProtocol SettingsAudit from Azure CLITo check TLS Version for an existing app, run the following command,az webapp config show --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME> --query minTlsVersionThe output should return1.2if TLS Version is set to1.2(Which is currently the latest version).Audit from PowerShellList all web apps.Get-AzWebAppFor each web app run the following command.Get-AzWebApp -ResourceGroupName <RESOURCE_GROUP_NAME> -Name <APP_NAME> |Select-Object -ExpandProperty SiteConfigMake sure theminTlsVersionis set to at least1.2.Audit from Azure PolicyIf 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: f9d614c5-c173-4d56-95a7-b4437057d193 - Name: 'Function apps should use the latest TLS version'- Policy ID: f0e6e85b-9b9f-4a4b-b67b-f730d42f1b0b - Name: 'App Service apps should use the latest TLS version'- Assessment Status
Automated
- Rationale Statement
App service currently allows the web app to set TLS versions 1.0, 1.1 and 1.2. It is highly recommended to use the latest TLS 1.2 version for web app secure connections.
- Remediation Procedure
Remediate from Azure Portal1. Login to Azure Portal using https://portal.azure.com 2. Go to
App Services3. Click on each App4. UnderSettingsection, Click onSSL settings5. Under theBindingspane, setMinimum TLS Versionto1.2underProtocol SettingssectionRemediate from Azure CLITo set TLS Version for an existing app, run the following command:az webapp config set --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME> --min-tls-version 1.2Remediate from PowerShellSet-AzWebApp -ResourceGroupName <RESOURCE_GROUP_NAME> -Name <APP_NAME> -MinTlsVersion 1.2
9.5Ensure that Register with Entra ID is enabled on App Service1
Attributes
- Profile
Level 1
- Section
9 AppService
- Description
Managed service identity in App Service provides more security by eliminating secrets from the app, such as credentials in the connection strings. When registering an App Service with Entra ID, the app will connect to other Azure services securely without the need for usernames and passwords.
- Default Value
By default, Managed service identity via Entra ID is disabled.
- Audit Procedure
Audit from Azure Portal1. From Azure Portal open the Portal Menu in the top left2. Go to
App Services3. Click on each App4. Under theSettingsection, Click onIdentity5. Under theSystem assignedpane, ensure thatStatusset toOnAudit from Azure CLITo check Register with Entra ID feature status for an existing app, run the following command,az webapp identity show --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME> --query principalIdThe output should return unique Principal ID. If no output for the above command then Register with Entra ID is not set.Audit from PowerShellList the web apps.Get-AzWebAppFor each web app run the following command.Get-AzWebapp -ResourceGroupName <app resource group> -Name <app name>Make sure theIdentitysetting contains a unique Principal IDAudit from Azure PolicyIf 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: 0da106f2-4ca3-48e8-bc85-c638fe6aea8f - Name: 'Function apps should use managed identity'- Policy ID: 2b9ad585-36bc-4615-b300-fd4435808332 - Name: 'App Service apps should use managed identity'- Assessment Status
Automated
- Rationale Statement
App Service provides a highly scalable, self-patching web hosting service in Azure. It also provides a managed identity for apps, which is a turn-key solution for securing access to Azure SQL Database and other Azure services.
- Remediation Procedure
Remediate from Azure Portal1. Login to Azure Portal using https://portal.azure.com 2. Go to
App Services3. Click on each App4. UnderSettingsection, Click onIdentity5. Under theSystem assignedpane, setStatustoOnRemediate from Azure CLITo register with Entra ID for an existing app, run the following command:az webapp identity assign --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME>Remediate from PowerShellTo register with Entra ID for an existing app, run the following command:Set-AzWebApp -AssignIdentity $True -ResourceGroupName <resource_Group_Name> -Name <App_Name>
9.6Ensure that 'Basic Authentication' is 'Disabled'0
Attributes
- Profile
Level 1
- Section
9 AppService
- References
- https://learn.microsoft.com/en-us/azure/app-service/configure-basic-auth-disable?tabs=portal
- Description
Basic Authentication provides the ability to create identities and authentication for an App Service without a centralized Identity Provider. For a more effective, capable, and secure solution for Identity, Authentication, Authorization, and Accountability, a centralized Identity Provider such as Entra ID is strongly advised.
- Default Value
Both parameters for Basic Authentication (SCM and FTP) are set to
Onby default.- Audit Procedure
Audit from Azure Portal1. Search for, and open
App Servicesfrom the search bar.1. For each App Service listed:1. Click on the App Service name.1. Under theSettingsmenu item, click onConfiguration1. Under theGeneral settingstab, scroll down to locate the two Basic Auth settings:-SCM Basic Auth Publishing Credentials-FTP Basic Auth Publishing CredentialsBoth radio buttons should indicate a status ofOff.Repeat this procedure for each App Service.Audit from Azure PolicyIf 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: 871b205b-57cf-4e1e-a234-492616998bf7 - Name: 'App Service apps should have local authentication methods disabled for FTP deployments'- Policy ID: aede300b-d67f-480a-ae26-4b3dfb1a1fdc - Name: 'App Service apps should have local authentication methods disabled for SCM site deployments'- Impact Statement
An Identity Provider that can be used by the App Service for authenticating users is required.
- Assessment Status
Manual
- Rationale Statement
Basic Authentication introduces an identity silo which can produce privileged access to a resource. This can be exploited in numerous ways and represents a significant vulnerability and attack vector.
- Remediation Procedure
Remediate from Azure Portal1. Search for, and open
App Servicesfrom the search bar.1. For each App Service listed:1. Click on the App Service name.1. Under theSettingsmenu item, click onConfiguration1. Under theGeneral settingstab, scroll down to locate the two Basic Auth settings:- Set theSCM Basic Auth Publishing Credentialsradio button toOff- Set theFTP Basic Auth Publishing Credentialsradio button toOffCAUTION: The new settings are not yet applied. Applying them may cause your App Service resource to restart - proceed with caution. Click theSavebutton, then clickContinueto apply the updated configuration.Repeat this procedure for each App Service.
9.7Ensure that 'PHP version' is currently supported (if in use)1
Attributes
- Profile
Level 1
- Section
9 AppService
- Description
Periodically, older versions of PHP may be deprecated and no longer supported. Using a supported version of PHP for app services is recommended to avoid potential unpatched vulnerabilities.
- Default Value
The version of PHP is whatever was selected upon App creation.
- Audit Procedure
Take note of the currently supported versions of PHP here: https://www.php.net/supported-versions.phpAudit from Azure Portal1. From Azure Home open the Portal Menu in the top left 2. Go to
App Services3. Click on each App4. UnderSettingssection, click onConfiguration5. Click on theGeneral settingspane, ensure that for aStackofPHPtheMajor VersionandMinor Versionreflect a currently supported release.NOTE: No action is required IfPHP versionis set toOffas PHP is not used by your web app.Audit from Azure CLITo check PHP version for an existing app, run the following command,az webapp config show --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME> --query '{LinuxFxVersion:linuxFxVersion,PHP_Version:phpVersion}'The output should return a currently supported version of PHP. Any other version of PHP would be considered a finding.NOTE: No action is required if the output is empty, as PHP is not used by your app.Audit from PowerShell$application = Get-AzWebApp -ResourceGroupName <RESOURCE_GROUP_NAME> -Name <APP_NAME>$application.SiteConfig | select-object LinuxFXVersion, phpVersionThe output should return a currently supported version of PHP. Any other version of PHP would be considered a finding.NOTE: No action is required if the output is empty, as PHP is not used by your app.Audit from Azure PolicyIf 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: f466b2a6-823d-470d-8ea5-b031e72d79ae - Name: 'App Service app slots that use PHP should use a specified 'PHP version''- Policy ID: 7261b898-8a84-4db8-9e04-18527132abb3 - Name: 'App Service apps that use PHP should use a specified 'PHP version''- Impact Statement
If your app is written using version-dependent features or libraries, they may not be available on more recent versions. If you wish to update, research the impact thoroughly.
- Assessment Status
Manual
- Rationale Statement
Deprecated and unsupported versions of programming and scripting languages can present vulnerabilities which may not be addressed or may not be addressable.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home open the Portal Menu in the top left 2. Go to
App Services3. Click on each App4. UnderSettingssection, click onConfiguration5. Click on theGeneral settingspane, ensure that for aStackofPHPtheMajor VersionandMinor Versionreflect a currently supported release.NOTE: No action is required IfPHP versionis set toOffor is set with an empty value as PHP is not used by your app. Remediate from Azure CLIList the available PHP runtimes:az webapp list-runtimesTo set a currently supported PHP version for an existing app, run the following command:az webapp config set --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME> [--linux-fx-version <PHP_RUNTIME_VERSION>][--php-version <PHP_VERSION>]Remediate from PowerShellTo set a currently supported PHP version for an existing app, run the following command:Set-AzWebApp -ResourceGroupName <RESOURCE_GROUP_NAME> -Name <APP_NAME> -phpVersion <PHP_VERSION>NOTE: Currently there is no way to update an existing web appLinux FX Versionsetting using PowerShell, nor is there a way to create a new web app using PowerShell that configures the PHP runtime in theLinux FX Versionsetting.- Additional Information
Currently supported versions can be confirmed here: https://www.php.net/supported-versions.php
9.8Ensure that 'Python version' is currently supported (if in use)1
Attributes
- Profile
Level 1
- Section
9 AppService
- Description
Periodically, older versions of Python may be deprecated and no longer supported. Using a supported version of Python for app services is recommended to avoid potential unpatched vulnerabilities.
- Default Value
The version of Python is whatever was selected upon App creation.
- Audit Procedure
Take note of the currently supported versions (given a status of 'security') of Python here: https://devguide.python.org/versions/Audit from Azure Portal1. From Azure Home open the Portal Menu in the top left 2. Go to
App Services3. Click on each App4. UnderSettingssection, click onConfiguration5. Click on the General settings pane and ensure that for a Stack of Python the Major version and Minor version reflect a currently supported release_NOTE:_ No action is required ifPython versionis set toOff, as Python is not used by your app. Audit from Azure CLITo check Python version for an existing app, run the following commandaz webapp config show --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME> --query '{LinuxFxVersion:linuxFxVersion,WindowsFxVersion:windowsFxVersion,PythonVersion:pythonVersion}'The output should return a currently supported version of Python.NOTE: No action is required if the output is empty, as Python is not used by your app.Audit from PowerShell$app = Get-AzWebApp -Name <APP_NAME> -ResourceGroup <RESOURCE_GROUP_NAME>$app.SiteConfig |Select-Object LinuxFXVersion, WindowsFxVersion, PythonVersionEnsure the output of the above command shows a currently supported of Python.NOTE: No action is required if the output is empty, as Python is not used by your app.Audit from Azure PolicyIf 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: 9c014953-ef68-4a98-82af-fd0f6b2306c8 - Name: 'App Service app slots that use Python should use a specified 'Python version''- Policy ID: 7008174a-fd10-4ef0-817e-fc820a951d73 - Name: 'App Service apps that use Python should use a specified 'Python version''- Impact Statement
If your app is written using version-dependent features or libraries, they may not be available on more recent versions. If you wish to update, research the impact thoroughly.
- Assessment Status
Manual
- Rationale Statement
Deprecated and unsupported versions of programming and scripting languages can present vulnerabilities which may not be addressed or may not be addressable.
- Remediation Procedure
Remediate from Azure Portal1. From Azure Home open the Portal Menu in the top left 2. Go to
App Services3. Click on each App4. UnderSettingssection, click onConfiguration5. Click on the General settings pane and ensure that the Major Version and the Minor Version is set to a currently supported release.NOTE: No action is required ifPython versionis set toOff, as Python is not used by your app. Remediate from Azure CLITo see the list of supported runtimes:az webapp list-runtimesTo set latest Python version for an existing app, run the following command:az webapp config set --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME> [--windows-fx-version 'PYTHON|<VERSION>'] [--linux-fx-version 'PYTHON|<VERSION>']Remediate from PowerShellAs of this writing, there is no way to update an existing application'sSiteConfigor set a new application'sSiteConfigsettings during creation via PowerShell.- Additional Information
Currently supported versions of Python can be confirmed by going to https://devguide.python.org/versions/. The currently supported versions are given the status of 'security.
9.9Ensure that 'Java version' is currently supported (if in use)1
Attributes
- Profile
Level 1
- Section
9 AppService
- Description
Periodically, older versions of Java may be deprecated and no longer supported. Using a supported version of Java for app services is recommended to avoid potential unpatched vulnerabilities.
- Default Value
The default setting is whichever setting was chosen in the creation of the webapp.
- Audit Procedure
Take note of currently supported version of Java here: https://www.oracle.com/java/technologies/java-se-support-roadmap.htmlAudit from Azure Portal1. Login to Azure Portal using https://portal.azure.com 2. Go to
App Services3. Click on each App4. UnderSettingssection, click onConfiguration5. Click on theGeneral settingspane and ensure that for aStackofJavatheMajor VersionandMinor Versionreflect a currently supported release, and that theJava web server versionis set to theauto-updateoption.NOTE: No action is required ifJava versionis set toOff, as Java is not used by your app. Audit from Azure CLITo check Java version for an existing app, run the following command,az webapp config show --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME> --query '{LinuxFxVersion:linuxFxVersion, WindowsFxVersion:windowsFxVersion, JavaVersion:javaVersion, JavaContainerVersion:javaContainerVersion, JavaContainer:javaContainer}'Ensure the Java version used within the application is a currently supported version (if java is being used for the app being audited).Audit from PowerShellFor each application, store the application information within an object, and then interrogate theSiteConfiginformation for that application object.$app = Get-AzWebApp -Name <APP_NAME> -ResourceGroup <RESOURCE_GROUP_NAME>$app.SiteConfig |Select-Object LinuxFXVersion, WindowsFxVersion, JavaVersion, JavaContainerVersion, JavaContainerEnsure the Java version used within the application is a currently supported version (if Java is being used for the app being audited).Audit from Azure PolicyIf 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: e1d1b522-02b0-4d18-a04f-5ab62d20445f - Name: 'Function app slots that use Java should use a specified 'Java version''- Policy ID: 9d0b6ea4-93e2-4578-bf2f-6bb17d22b4bc - Name: 'Function apps that use Java should use a specified 'Java version''- Impact Statement
If your app is written using version-dependent features or libraries, they may not be available on more recent versions. If you wish to update, research the impact thoroughly.
- Assessment Status
Manual
- Rationale Statement
Deprecated and unsupported versions of programming and scripting languages can present vulnerabilities which may not be addressed or may not be addressable.
- Remediation Procedure
Remediate from Azure Portal1. Login to Azure Portal using https://portal.azure.com 2. Go to
App Services3. Click on each App4. UnderSettingssection, click onConfiguration5. Click on theGeneral settingspane and ensure that for aStackofJavatheMajor VersionandMinor Versionreflect a currently supported release, and that theJava web server versionis set to theauto-updateoption.NOTE: No action is required ifJava versionis set toOff, as Java is not used by your app. Remediate from Azure CLITo see the list of supported runtimes:az webapp list-runtimesTo set a currently supported Java version for an existing app, run the following command:az webapp config set --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME> [--java-version <JAVA_VERSION> --java-container <JAVA_CONTAINER> --java-container-version <JAVA_CONTAINER_VERSION> [--windows-fx-version <JAVA_RUNTIME_VERSION>] [--linux-fx-version <JAVA_RUNTIME_VERSION>]If creating a new application to use a currently supported version of Java, run the following commands.To create an app service plan:az appservice plan create --resource-group <RESOURCE_GROUP_NAME> --name <PLAN_NAME> --location <LOCATION> [--is-linux --number-of-workers <INT> --sku <PRICING_TIER>] [--hyper-v --sku <PRICING_TIER>]Get the app service plan ID:az appservice plan list --query '[].{Name:name, ID:id, SKU:sku, Location:location}'To create a new Java web application using the retrieved app service ID:az webapp create --resource-group <RESOURCE_GROUP_NAME> --plan <APP_SERVICE_PLAN_ID> --name <app name> [--linux-fx-version <JAVA_RUNTIME_VERSION>] [--windows-fx-version <JAVA_RUNTIME_VERSION>]Remediate from PowerShellAs of this writing, there is no way to update an existing application'sSiteConfigor set a new application'sSiteConfigsettings during creation via PowerShell.- Additional Information
Take note of currently supported version of Java here: https://www.oracle.com/java/technologies/java-se-support-roadmap.html
9.10Ensure that 'HTTP20enabled' is set to 'true' (if in use)1
Attributes
- Profile
Level 1
- Section
9 AppService
- Description
Periodically, newer versions are released for HTTP either due to security flaws or to include additional functionality. Using the latest HTTP version for apps to take advantage of security fixes, if any, and/or new functionalities of the newer version.
- Audit Procedure
Audit from Azure Portal1. Login to Azure Portal using https://portal.azure.com 2. Go to
App Services3. Click on each App4. UnderSettingsection, Click onConfiguration5. Ensure thatHTTP Versionset to2.0version underGeneral settingsNOTE: Most modern browsers support HTTP 2.0 protocol over TLS only, while non-encrypted traffic continues to use HTTP 1.1. To ensure that client browsers connect to your app with HTTP/2, either buy an App Service Certificate for your app's custom domain or bind a third-party certificate.Audit from Azure CLITo check HTTP 2.0 version status for an existing app, run the following command,az webapp config show --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME> --query http20EnabledThe output should returntrueif HTTPS 2.0 traffic value is set toOn.Audit from PowerShellFor each application, run the following command:Get-AzWebApp -ResourceGroupName <app resource group> -Name <app name> |Select-Object -ExpandProperty SiteConfigIf the value of the Http20Enabled setting is true, the application is compliant. Otherwise if the value of the Http20Enabled setting is false, the application is non-compliant.Audit from Azure PolicyIf 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: e2c1c086-2d84-4019-bff3-c44ccd95113c - Name: 'Function apps should use latest 'HTTP Version''- Policy ID: 8c122334-9d20-4eb8-89ea-ac9a705b74ae - Name: 'App Service apps should use latest 'HTTP Version''- Impact Statement
Most modern browsers support HTTP 2.0 protocol over TLS only, while non-encrypted traffic continues to use HTTP 1.1. To ensure that client browsers connect to your app with HTTP/2, either buy an App Service Certificate for your app's custom domain or bind a third-party certificate.
- Assessment Status
Automated
- Rationale Statement
Newer versions may contain security enhancements and additional functionality. Using the latest version is recommended in order to take advantage of enhancements and new capabilities. With each software installation, organizations need to determine if a given update meets their requirements. They must also verify the compatibility and support provided for any additional software against the update revision that is selected.HTTP 2.0 has additional performance improvements on the head-of-line blocking problem of old HTTP version, header compression, and prioritization of requests. HTTP 2.0 no longer supports HTTP 1.1's chunked transfer encoding mechanism, as it provides its own, more efficient, mechanisms for data streaming.
- Remediation Procedure
Remediate from Azure Portal1. Login to Azure Portal using https://portal.azure.com 2. Go to
App Services3. Click on each App4. UnderSettingsection, Click onConfiguration5. SetHTTP versionto2.0underGeneral settingsNOTE: Most modern browsers support HTTP 2.0 protocol over TLS only, while non-encrypted traffic continues to use HTTP 1.1. To ensure that client browsers connect to your app with HTTP/2, either buy an App Service Certificate for your app's custom domain or bind a third-party certificate.Remediate from Azure CLITo set HTTP 2.0 version for an existing app, run the following command:az webapp config set --resource-group <RESOURCE_GROUP_NAME> --name <APP_NAME> --http20-enabled trueRemediate from PowerShellTo enable HTTP 2.0 version support, run the following command:Set-AzWebApp -ResourceGroupName <app resource group> -Name <app name> -Http20Enabled $true
9.11Ensure Azure Key Vaults are Used to Store Secrets0
Attributes
- Profile
Level 2
- Section
9 AppService
- Description
Azure Key Vault will store multiple types of sensitive information such as encryption keys, certificate thumbprints, and Managed Identity Credentials. Access to these 'Secrets' can be controlled through granular permissions.
- Default Value
By default, no Azure Key Vaults are created.
- Audit Procedure
Audit from Azure Portal1. Login to Azure Portal.2. In the expandable menu on the left go to
Key Vaults.3. View the Key Vaults listed.Audit from Azure CLITo list key vaults within a subscription run the following command:Get-AzKeyVaultTo list the secrets within these key vaults run the following command:Get-AzKeyVaultSecret [-VaultName] <vault name>Audit from PowerShellTo list key vaults within a subscription run the following command:Get-AzKeyVaultTo list all secrets in a key vault run the following command:Get-AzKeyVaultSecret -VaultName '<vaultName'- Impact Statement
Integrating references to secrets within the key vault are required to be specifically integrated within the application code. This will require additional configuration to be made during the writing of an application, or refactoring of an already written one. There are also additional costs that are charged per 10000 requests to the Key Vault.
- Assessment Status
Manual
- Rationale Statement
The credentials given to an application have permissions to create, delete, or modify data stored within the systems they access. If these credentials are stored within the application itself, anyone with access to the application or a copy of the code has access to them. Storing within Azure Key Vault as secrets increases security by controlling access. This also allows for updates of the credentials without redeploying the entire application.
- Remediation Procedure
Remediation has 2 steps1. Setup the Key Vault2. Setup the App Service to use the Key VaultStep 1: Set up the Key Vault****Remediate from Azure CLI
az keyvault create --name '<name>' --resource-group '<myResourceGroup>' --location myLocationRemediate from PowerShellNew-AzKeyvault -name <name> -ResourceGroupName <myResourceGroup> -Location <myLocation>Step 2: Set up the App Service to use the Key VaultSample JSON Template for App Service Configuration:{ //... 'resources': [ { 'type': 'Microsoft.Storage/storageAccounts', 'name': '[variables('storageAccountName')]', //... }, { 'type': 'Microsoft.Insights/components', 'name': '[variables('appInsightsName')]', //... }, { 'type': 'Microsoft.Web/sites', 'name': '[variables('functionAppName')]', 'identity': { 'type': 'SystemAssigned' }, //... 'resources': [ { 'type': 'config', 'name': 'appsettings', //... 'dependsOn': [ '[resourceId('Microsoft.Web/sites', variables('functionAppName'))]', '[resourceId('Microsoft.KeyVault/vaults/', variables('keyVaultName'))]', '[resourceId('Microsoft.KeyVault/vaults/secrets', variables('keyVaultName'), variables('storageConnectionStringName'))]', '[resourceId('Microsoft.KeyVault/vaults/secrets', variables('keyVaultName'), variables('appInsightsKeyName'))]' ], 'properties': { 'AzureWebJobsStorage': '[concat('@Microsoft.KeyVault(SecretUri=', reference(variables('storageConnectionStringResourceId')).secretUriWithVersion, ')')]', 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING': '[concat('@Microsoft.KeyVault(SecretUri=', reference(variables('storageConnectionStringResourceId')).secretUriWithVersion, ')')]', 'APPINSIGHTS_INSTRUMENTATIONKEY': '[concat('@Microsoft.KeyVault(SecretUri=', reference(variables('appInsightsKeyResourceId')).secretUriWithVersion, ')')]', 'WEBSITE_ENABLE_SYNC_UPDATE_SITE': 'true' //... } }, { 'type': 'sourcecontrols', 'name': 'web', //... 'dependsOn': [ '[resourceId('Microsoft.Web/sites', variables('functionAppName'))]', '[resourceId('Microsoft.Web/sites/config', variables('functionAppName'), 'appsettings')]' ], } ] }, { 'type': 'Microsoft.KeyVault/vaults', 'name': '[variables('keyVaultName')]', //... 'dependsOn': [ '[resourceId('Microsoft.Web/sites', variables('functionAppName'))]' ], 'properties': { //... 'accessPolicies': [ { 'tenantId': '[reference(concat('Microsoft.Web/sites/', variables('functionAppName'), '/providers/Microsoft.ManagedIdentity/Identities/default'), '2015-08-31-PREVIEW').tenantId]', 'objectId': '[reference(concat('Microsoft.Web/sites/', variables('functionAppName'), '/providers/Microsoft.ManagedIdentity/Identities/default'), '2015-08-31-PREVIEW').principalId]', 'permissions': { 'secrets': [ 'get' ] } } ] }, 'resources': [ { 'type': 'secrets', 'name': '[variables('storageConnectionStringName')]', //... 'dependsOn': [ '[resourceId('Microsoft.KeyVault/vaults/', variables('keyVaultName'))]', '[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]' ], 'properties': { 'value': '[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountResourceId'),'2015-05-01-preview').key1)]' } }, { 'type': 'secrets', 'name': '[variables('appInsightsKeyName')]', //... 'dependsOn': [ '[resourceId('Microsoft.KeyVault/vaults/', variables('keyVaultName'))]', '[resourceId('Microsoft.Insights/components', variables('appInsightsName'))]' ], 'properties': { 'value': '[reference(resourceId('microsoft.insights/components/', variables('appInsightsName')), '2015-05-01').InstrumentationKey]' } } ] } ]}
9.12Ensure that 'Remote debugging' is set to 'Off'0
Attributes
- Profile
Level 1
- Section
9 AppService
- Description
Remote Debugging allows Azure App Service to be debugged in real-time directly on the Azure environment. When remote debugging is enabled, it opens a communication channel that could potentially be exploited by unauthorized users if not properly secured.
- Default Value
By default, remote debugging is set to
off- Audit Procedure
Audit from Azure Portal1. Login to Azure Portal using https://portal.azure.com 2. Go to
App Services3. Click on each App4. UnderSettingsection, Click onConfiguration5. Under theGeneral settingstab, check theRemote debuggingoption. Ensure it is set toOff.Audit from Azure CLITo check remote debugging status for an existing app, run the following command,az webapp config show --resource-group <resource_group_name> --name <app_name> --query remoteDebuggingEnabledThe output should befalseif remote debugging is disabled.Audit from PowerShellTo check remote debugging status for an existing app, run the following command,Get-AzWebApp -ResourceGroupName <resource_group_name> -Name <app_name> |Select-Object -ExpandProperty SiteConfigThe output ofremoteDebuggingEnabledshould befalseif remote debugging is disabled.Audit from Azure PolicyIf 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: cb510bfd-1cba-4d9f-a230-cb0976f4bb71 - Name: 'App Service apps should have remote debugging turned off'- Policy ID: 25a5046c-c423-4805-9235-e844ae9ef49b - Name: 'Configure Function apps to turn off remote debugging'- Impact Statement
You will not be able to connect to your application from a remote location to diagnose and fix issues in real-time. You will not be able to step through code, set breakpoints, or inspect variables and the call stack while the application is running on the server. Remote debugging is particularly useful for diagnosing issues that only occur in the production environment. Without it, you will need to rely on logs and other diagnostic tools.
- Assessment Status
Automated
- Rationale Statement
Disabling remote debugging on Azure App Service is primarily about enhancing security. Remote debugging opens a communication channel that can be exploited by attackers. By disabling it, you reduce the number of potential entry points for unauthorized access.If remote debugging is enabled without proper access controls, it can allow unauthorized users to connect to your application, potentially leading to data breaches or malicious code execution.During a remote debugging session, sensitive information might be exposed. Disabling remote debugging helps ensure that such data remains secure. This minimizes the use of remote access tools to reduce risk.
- Remediation Procedure
Remediate from Azure Portal1. Login to Azure Portal using https://portal.azure.com 2. Go to
App Services3. Click on each App4. UnderSettingsection, Click onConfiguration5. Under theGeneral settingstab, set theRemote debuggingoption toOff.Remediate from Azure CLITo set remote debugging status to off, run the following commandaz webapp config set --resource-group <resource_group_name> --name <app_name> --remote-debugging-enabled falseRemediation from PowerShellTo set remote debugging status to off, run the following commandSet-AzWebApp -ResourceGroupName <resource_group_name> -Name <app_name> -RemoteDebuggingEnabled $false
10 Miscellaneous10
10.1Ensure that Resource Locks are set for Mission-Critical Azure Resources0
Attributes
- Profile
Level 2
- Section
10 Miscellaneous
- Description
Resource Manager Locks provide a way for administrators to lock down Azure resources to prevent deletion of, or modifications to, a resource. These locks sit outside of the Role Based Access Controls (RBAC) hierarchy and, when applied, will place restrictions on the resource for all users. These locks are very useful when there is an important resource in a subscription that users should not be able to delete or change. Locks can help prevent accidental and malicious changes or deletion.
- Default Value
By default, no locks are set.
- Audit Procedure
Audit from Azure Portal1. 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 CLIReview the list of all locks set currently:az lock list --resource-group <resourcegroupname> --resource-name <resourcename> --namespace <Namespace> --resource-type <type> --parent ''Audit from PowerShellRun 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 Portal1. 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 CLITo 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>