Harden an Azure Active Directory Domain Services managed domain

By default, Azure Active Directory Domain Services (Azure AD DS) enables the use of ciphers such as NTLM v1 and TLS v1. These ciphers may be required for some legacy applications, but are considered weak and can be disabled if you don't need them. If you have on-premises hybrid connectivity using Azure AD Connect, you can also disable the synchronization of NTLM password hashes.

This article shows you how to harden a managed domain by using setting setting such as:

  • Disable NTLM v1 and TLS v1 ciphers
  • Disable NTLM password hash synchronization
  • Disable the ability to change passwords with RC4 encryption
  • Enable Kerberos armoring

Prerequisites

To complete this article, you need the following resources:

Use Security settings to harden your domain

  1. Sign in to the Azure portal.

  2. Search for and select Azure AD Domain Services.

  3. Choose your managed domain, such as aaddscontoso.com.

  4. On the left-hand side, select Security settings.

  5. Click Enable or Disable for the following settings:

    • TLS 1.2 only mode
    • NTLM authentication
    • Password synchronization from on-premises
    • NTLM password synchronization from on-premises
    • RC4 encryption
    • Kerberos armoring

    Screenshot of Security settings to disable weak ciphers and NTLM password hash sync

Assign Azure Policy compliance for TLS 1.2 usage

In addition to Security settings, Microsoft Azure Policy has a Compliance setting to enforce TLS 1.2 usage. The policy has no impact until it is assigned. When the policy is assigned, it appears in Compliance:

  • If the assignment is Audit, the compliance will report if the Azure AD DS instance is compliant.
  • If the assignment is Deny, the compliance will prevent an Azure AD DS instance from being created if TLS 1.2 is not required and prevent any update to an Azure AD DS instance until TLS 1.2 is required.

Screenshot of Compliance settings

Audit NTLM failures

While disabling NTLM password synchronization will improve security, many applications and services are not designed to work without it. For example, connecting to any resource by its IP address, such as DNS Server management or RDP, will fail with Access Denied. If you disable NTLM password synchronization and your application or service isn’t working as expected, you can check for NTLM authentication failures by enabling security auditing for the Logon/Logoff > Audit Logon event category, where NTLM is specified as the Authentication Package in the event details. For more information, see Enable security audits for Azure Active Directory Domain Services.

Use PowerShell to harden your domain

If needed, install and configure Azure PowerShell. Make sure that you sign in to your Azure subscription using the Connect-AzAccount cmdlet.

Also if needed, install and configure Azure AD PowerShell. Make sure that you sign in to your Azure AD tenant using the Connect-AzureAD cmdlet.

To disable weak cipher suites and NTLM credential hash synchronization, sign in to your Azure account, then get the Azure AD DS resource using the Get-AzResource cmdlet:

Tip

If you receive an error using the Get-AzResource command that the Microsoft.AAD/DomainServices resource doesn't exist, elevate your access to manage all Azure subscriptions and management groups.

Login-AzAccount

$DomainServicesResource = Get-AzResource -ResourceType "Microsoft.AAD/DomainServices"

Next, define DomainSecuritySettings to configure the following security options:

  1. Disable NTLM v1 support.
  2. Disable the synchronization of NTLM password hashes from your on-premises AD.
  3. Disable TLS v1.

Important

Users and service accounts can't perform LDAP simple binds if you disable NTLM password hash synchronization in the Azure AD DS managed domain. If you need to perform LDAP simple binds, don't set the "SyncNtlmPasswords"="Disabled"; security configuration option in the following command.

$securitySettings = @{"DomainSecuritySettings"=@{"NtlmV1"="Disabled";"SyncNtlmPasswords"="Disabled";"TlsV1"="Disabled";"KerberosRc4Encryption"="Disabled";"KerberosArmoring"="Disabled"}}

Finally, apply the defined security settings to the managed domain using the Set-AzResource cmdlet. Specify the Azure AD DS resource from the first step, and the security settings from the previous step.

Set-AzResource -Id $DomainServicesResource.ResourceId -Properties $securitySettings -ApiVersion “2021-03-01” -Verbose -Force

It takes a few moments for the security settings to be applied to the managed domain.

Important

After you disable NTLM, perform a full password hash synchronization in Azure AD Connect to remove all the password hashes from the managed domain. If you disable NTLM but don't force a password hash sync, NTLM password hashes for a user account are only removed on the next password change. This behavior could allow a user to continue to sign in if they have cached credentials on a system where NTLM is used as the authentication method.

Once the NTLM password hash is different from the Kerberos password hash, fallback to NTLM won't work. Cached credentials also no longer work if the VM has connectivity to the managed domain controller.

Next steps

To learn more about the synchronization process, see How objects and credentials are synchronized in a managed domain.