NTLM Enhanced Blocking
Blocage NTLM amélioré
Explanation
This policy setting allows the NTLM security package to block NTLM authentication requests based on the new, enhanced blocking policies at the Machine level.
These enhanced blocking policies allow you to block NTLM authentication based on new criteria, such as the type of the account, the role of the device, or the type of application.
If the overall policy is set to "Disabled" or "Not Configured", the subsettings below will not take effect. If the overall policy is set to "Enabled", the subpolicies below will take effect based on their configuration.
Unless configured, all policies are set to "Audit" mode. Policies that are set to "Audit" will log a warning about the NTLM request that could be blocked, but will not block it. Multiple policies that are marked as "Audit" can be enabled at the same time, and they will be logged in an unified event log.
If any policy is marked as "Enabled", the NTLM authentication request will be blocked if it matches the criteria of the policy. If multiple policies are marked as "Enabled", the NTLM authentication request will be blocked if it matches the criteria of any of the policies. An event log will be generated for the first policy that blocks the NTLM authentication.
In scenarios where there are both "Audit" and "Enabled" policies, the "Enabled" policy will take precedence.
All of the enhanced blocking policies outlined here share the same allow list, which specifies the accounts, devices, and applications that are allowed to use NTLM authentication. The allow list can contain a series of target names or SPNs to allow the authentication.
For more information, please visit aka.ms/ntlmlogandblock.
Ce paramètre de stratégie permet au package de sécurité NTLM de bloquer les demandes d’authentification NTLM en fonction des nouvelles stratégies de blocage améliorées au niveau de l’ordinateur.
Ces stratégies de blocage améliorées vous permettent de bloquer l’authentification NTLM en fonction de nouveaux critères, tels que le type du compte, le rôle de l’appareil ou le type d’application.
Si la stratégie globale est définie sur « Désactivé » ou « Non configuré », les sous-paramètres ci-dessous ne prendront pas effet. Si la stratégie globale est définie sur « Activé », les sous-stratégies ci-dessous prendront effet selon leur configuration.
Sauf configuration contraire, toutes les stratégies sont définies en mode « Audit ». Les stratégies définies sur « Audit » enregistrent un avertissement concernant la demande NTLM qui peut être bloquée, mais ne la bloquent pas. Plusieurs stratégies marquées comme « Audit » peuvent être activées simultanément et seront consignées dans un journal des événements unifié.
Si une stratégie est marquée comme « Activée », la demande d’authentification NTLM sera bloquée si elle correspond aux critères de cette stratégie. Si plusieurs stratégies sont marquées comme « Activées », la demande d’authentification NTLM sera bloquée si elle correspond aux critères de l’une d’elles. Un journal des événements sera généré pour la première stratégie qui bloque l’authentification NTLM.
Dans les cas où coexistent des stratégies « Audit » et « Activée », la stratégie « Activée » prévaut.
Toutes les stratégies de blocage améliorées décrites ici partagent la même liste verte, qui spécifie les comptes, appareils et applications autorisés à utiliser l’authentification NTLM. La liste verte peut contenir une série de noms de cibles ou de SPN pour autoriser l’authentification.
Pour plus d’informations, visitez aka.ms/ntlmlogandblock.
Use cases
Replaces the all-or-nothing legacy Restrict NTLM policies with targeted criteria: blocking NTLM single sign-on for domain accounts, NTLM authentication on domain controllers, NTLM when machine binding fails, or all NTLM. Each sub-setting can be Audit, Enabled or Disabled; until you configure them they stay in Audit mode, which logs the request without refusing it; exceptions go into one shared allow list (target names or SPNs).
Start with auditing: Microsoft’s Active Directory Hardening series advises measuring NTLM volume first and fixing dependencies (missing SPNs, applications that should move to Negotiate) before blocking. Once a sub-setting is Enabled it overrides Audit and any request matching one of them is refused.
Microsoft sources: Active Directory Hardening Series - Part 8 – Disabling NTLM · Overview of NTLM auditing enhancements in Windows 11, version 24H2, Windows Server 2019, and later versions
Registry
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\NTLM\Parameters- Value name
EnhancedNtlmBlocks
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: Ntlm/BlockNtlm
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\NTLM\Parameters'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnhancedNtlmBlocks' -Value 1 -Type DWord
# Block NTLM for Domain Accounts Single Sign-On
# Possible options:
# Audit = 1
# Enabled = 2
# Disabled = 0
Set-ItemProperty -Path $k -Name 'BlockDomainAccountSSO' -Value 1 -Type DWord
# Block NTLM for Domain Controllers
# Possible options:
# Audit = 1
# Enabled = 2
# Disabled = 0
Set-ItemProperty -Path $k -Name 'BlockDomainControllerAuth' -Value 1 -Type DWord
# Block NTLM when Machine binding fails
# Possible options:
# Audit = 1
# Enabled = 2
# Disabled = 0
Set-ItemProperty -Path $k -Name 'EnforceMachineBinding' -Value 1 -Type DWord
# Block all NTLM authentication
# Possible options:
# Audit = 1
# Enabled = 2
# Disabled = 0
Set-ItemProperty -Path $k -Name 'BlockAll' -Value 1 -Type DWord
# Specify the allow list for enhanced blocking policies
Set-ItemProperty -Path $k -Name 'EnhancedMachineBlockingAllowList' -Value @('<value1>', '<value2>') -Type MultiStringDisable
# Disable: Ntlm/BlockNtlm
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\NTLM\Parameters'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnhancedNtlmBlocks' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": Ntlm/BlockNtlm
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\NTLM\Parameters'
Remove-ItemProperty -Path $k -Name 'EnhancedNtlmBlocks' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'BlockDomainAccountSSO' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'BlockDomainControllerAuth' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'EnforceMachineBinding' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'BlockAll' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'EnhancedMachineBlockingAllowList' -ErrorAction SilentlyContinueOptions (5)
| Label | Control | Registry value | REG type | Constraints / details | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Block NTLM for Domain Accounts Single Sign-OnBloquer NTLM pour l’authentification unique des comptes de domaineDomainSingleSignOnDropDown | Drop-down listenum | BlockDomainAccountSSO | REG_DWORD | Default choice (UI): #0
| ||||||||
| Block NTLM for Domain ControllersBloquer NTLM pour les contrôleurs de domaineDomainControllerAuthDropDown | Drop-down listenum | BlockDomainControllerAuth | REG_DWORD | Default choice (UI): #0
| ||||||||
| Block NTLM when Machine binding failsBloquer NTLM lorsque la liaison de la machine échoueMachineBindingDropDown | Drop-down listenum | EnforceMachineBinding | REG_DWORD | Default choice (UI): #0
| ||||||||
| Block all NTLM authenticationBloquer toute l’authentification NTLMBlockAllDropDown | Drop-down listenum | BlockAll | REG_DWORD | Default choice (UI): #0
| ||||||||
| Specify the allow list for enhanced blocking policies:Spécifiez la liste verte pour les stratégies de blocage améliorées :EnhancedMachineBlockingWithAllowListBox | Multiline text boxmultiText | EnhancedMachineBlockingAllowList | REG_MULTI_SZ |