Configure validation of ROCA-vulnerable WHfB keys during authentication: registry value SamNGCKeyROCAValidationComputerHKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\SAM

Policy ID
SamNGCKeyROCAValidation
Scope
Computer Configuration
Supported on
At least Windows Vista
Source
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
Category
System › Security Account Manager

Registry

SamNGCKeyROCAValidation

REG_DWORDComputer
Enabled value
Depends on the option value
Element
Options for handling ROCA-vulnerable WHfB keys:
Options
ItemStored value
Ignore ROCA-vulnerable WHfB keys0
Audit ROCA-vulnerable WHfB keys on use1
Block ROCA-vulnerable WHfB keys on use2
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\SAM]

; Options (use only one)
; Ignore ROCA-vulnerable WHfB keys
"SamNGCKeyROCAValidation"=dword:00000000
; Audit ROCA-vulnerable WHfB keys on use
"SamNGCKeyROCAValidation"=dword:00000001
; Block ROCA-vulnerable WHfB keys on use
"SamNGCKeyROCAValidation"=dword:00000002
CMD
:: Options (use only one)

:: Ignore ROCA-vulnerable WHfB keys
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\SAM" /v "SamNGCKeyROCAValidation" /t REG_DWORD /d 0 /f
:: Audit ROCA-vulnerable WHfB keys on use
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\SAM" /v "SamNGCKeyROCAValidation" /t REG_DWORD /d 1 /f
:: Block ROCA-vulnerable WHfB keys on use
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\SAM" /v "SamNGCKeyROCAValidation" /t REG_DWORD /d 2 /f
PowerShell
# Common: create the key
New-Item -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\SAM' -Force | Out-Null

# Options (use only one)
# Ignore ROCA-vulnerable WHfB keys
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\SAM' -Name 'SamNGCKeyROCAValidation' -PropertyType DWord -Value 0 -Force | Out-Null
# Audit ROCA-vulnerable WHfB keys on use
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\SAM' -Name 'SamNGCKeyROCAValidation' -PropertyType DWord -Value 1 -Force | Out-Null
# Block ROCA-vulnerable WHfB keys on use
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\SAM' -Name 'SamNGCKeyROCAValidation' -PropertyType DWord -Value 2 -Force | Out-Null