WDigest Authentication Uitgeschakeld (Diefstal Van Inloggegevens Prevention)

πŸ’Ό Management Samenvatting

Het uitschakelen van WDigest authentication voorkomt dat Windows user passwords in PLAINTEXT in LSASS process memory cached, waardoor Diefstal van inloggegevens via memory scraping attacks (zoals Mimikatz) wordt voorkomen - dit is één van de meest kritieke credential bescherming controls.

Aanbeveling
IMPLEMENT
Risico zonder
Critical
Risk Score
10/10
Implementatie
1u (tech: 0.5u)
Van toepassing op:
βœ“ Windows 10
βœ“ Windows 11
βœ“ Windows server

WDigest is een legacy authentication protocol dat Microsoft introduceerde in Windows XP en waarbij passwords in REVERSIBLE PLAINTEXT in LSASS (Local Security Authority Subsystem Service) process memory worden opgeslagen. Dit is EXTREEM GEVAARLIJK omdat: MIMIKATZ EN MEMORY SCRAPERS waarbij attackers met admin privileges op compromised system direct passwords kunnen dumpen uit memory via tools zoals Mimikatz (sekurlsa::logonpasswords), wdigest passwords is PLAINTEXT extractable (niet hashed, direct bruikbaar), ALLE logged-on users passwords accessible (not slechts current user), LATERAL MOVEMENT waarbij gestolen plaintext passwords direct gebruikt worden voor: authentication naar andere systems zonder cracking, Pass-the-Hash replaced door Pass-the-Password (easier), domain escalation binnen minutes, credential REUSE over SYSTEMS waarbij eenmaal stolen password is permanent access Totdat changed (no expiration), PERSISTENT THREAT waarbij password blijft in memory ZOLANG user logged in (hours/days), reboot vereist om password uit memory te clearen, NO detectie omdat memory dumping is no alerts (silent attack). Real-world Diefstal van inloggegevens attacks: Mimikatz is #1 post-exploitation tool gebruikt bij ransomware attacks (Ryuk, Conti, LockBit), APT groeps gebruiken WDigest dumping voor initial access β†’ lateral movement, Recent breaches waarbij Diefstal van inloggegevens via memory scraping critical was: NotPetya ransomware, Olympic Destroyer, SolarWinds lateral movement. Attack chain: Initial compromise (phishing, RDP brute force) β†’ Escalate to local admin β†’ Run Mimikatz β†’ Dump WDigest passwords β†’ Lateral movement met stolen credentials β†’ Domain Admin compromise β†’ volledige network takeover. WDigest disabling ELIMINATES plaintext password opslag in memory - passwords kunnen alleen via hash cracking (veel moeilijker) worden recovered.

PowerShell Modules Vereist
Primary API: Intune / Microsoft Graph
Connection: Connect-MgGraph
Required Modules: Microsoft.Graph.DeviceManagement

Implementatie

Deze control configureert de registry key HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest\UseLogonCredential is 0 (Disabled) wat instrueert Windows om GEEN reversible passwords in memory te cachen voor WDigest authentication. Technische details: WDigest authentication protocol (legacy, HTTP Digest Access Authentication), NIET meer vereist voor modern Windows authentication (Kerberos, NTLM sufficient), Windows 8.1+/server 2012 R2+: WDigest disabled door Standaard (maar kan per ongeluk ingeschakeld zijn), Older Windows (7/2008 R2 met patches): vereist explicit disabling via registry, Effect van UseLogonCredential is 0: WDigest authentication blijft functioneel (protocol not completely disabled), maar passwords worden NIET in plaintext cached in LSASS memory, Mimikatz sekurlsa::wdigest returns NO passwords (only shows NULL), credential Guard (Windows 10 Enterprise) biedt aanvullend bescherming maar WDigest Schakel uit is baseline. Compatibility: WDigest was vereist voor IIS HTTP Digest authentication (legacy), Modern applications gebruiken Kerberos/NTLM (no WDigest dependency), No legitimate gebruiken case voor WDigest in modern environments, Disabling heeft nul impact op normal operations. Verification: Run Mimikatz β†’ sekurlsa::wdigest β†’ zou moeten show NULL passwords if disabled correctly.

Vereisten

Voor het implementeren van deze control zijn de volgende voorwaarden vereist:

  1. Windows 10, Windows 11, Windows server 2016 of hoger (WDigest al disabled standaard)
  2. OF Windows 7 SP1 / server 2008 R2 met security updates (Vereist dat handmatige disabling)
  3. Microsoft Intune licentie voor centralized beleid deployment
  4. Endpoint Administrator rol in Intune
  5. PowerShell 5.1+ voor automation en verification
  6. GEEN application dependencies op WDigest (Verifieer legacy IIS applications)
  7. Testing: Verifieer geen business applications broken door WDigest disabling (zeer onwaarschijnlijk)
  8. Complementary controls: credential Guard (Windows 10 Enterprise E5), LSASS bescherming (RunAsPPL)

Implementatie

Implementatie via Intune aangepaste OMA-URI (voor registry key):

Gebruik PowerShell-script wdigest-authentication-is-set-to-disabled.ps1 (functie Invoke-Remediation) – PowerShell script voor automatische Intune beleid creation via Microsoft Graph API.

  1. Microsoft Intune admin center β†’ Devices β†’ Configuration profiles
  2. Maak aan profile β†’ Platform: Windows 10 en later β†’ Profile type: Templates β†’ Custom
  3. Name: 'Security Baseline - Schakel uit WDigest Authentication'
  4. OMA-URI settings β†’ Add:
  5. Name: Schakel uit WDigest
  6. OMA-URI: ./Device/Vendor/MSFT/beleid/Config/credentialProviders/DisableAutomaticReDeploymentCredentials
  7. Data type: Integer
  8. Value: 1
  9. Alternative registry-based approach:
  10. gebruiken Settings Catalog β†’ Registry setting if available
  11. Registry path: HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest
  12. Value name: UseLogonCredential
  13. Value: 0 (DWORD)
  14. Assign to: alle devices
  15. monitor deployment status

Implementatie via groep beleid (on-premises):

  1. groep beleid Management Console
  2. Edit GPO β†’ Computer Configuration β†’ Preferences β†’ Windows Settings β†’ Registry
  3. New β†’ Registry Item:
  4. Action: Update
  5. Hive: HKEY_LOCAL_MACHINE
  6. Key Path: SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest
  7. Value name: UseLogonCredential
  8. Value type: REG_DWORD
  9. Value data: 0
  10. Link GPO to OUs
  11. Run gpupdate /force

Lokale verificatie via PowerShell:

  1. Controleer registry: Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest' -Name 'UseLogonCredential'
  2. Expected value: 0 (disabled)
  3. If not exists of value is 1: WDigest is ingeschakeld (KRITIEKE beveiliging ISSUE)
  4. handmatige remediation: New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest' -Name 'UseLogonCredential' -Value 0 -PropertyType DWORD -Force

geavanceerd: Test met Mimikatz (ethical hacking / penetration testing):

  1. CONTROLLED ENVIRONMENT alleen (Test lab, geautoriseerde pentest)
  2. Run Mimikatz as Administrator: privilege::debug, sekurlsa::wdigest
  3. Expected output: WDigest passwords is NULL (if disabled correctly)
  4. If passwords visible: WDigest is ingeschakeld (critical finding - remediate immediately)

monitoring

Gebruik PowerShell-script wdigest-authentication-is-set-to-disabled.ps1 (functie Invoke-Monitoring) – Controleert Intune beleid deployment en WDigest disabled status.

Continue monitoring:

  1. Weekly: Registry audit via PowerShell over alle endpoints
  2. Intune device compliance: WDigest beleid deployment status (100% target)
  3. Security monitoring: detecteer Mimikatz execution attempts (SIEM, EDR)
  4. Diefstal van inloggegevens alerts: monitoren voor LSASS memory access (Defender voor Endpoint)
  5. Event logs: Event ID 4648 (Logon met explicit credentials) patterns
  6. Penetration testing: Quarterly ethical hacking met Mimikatz verification
  7. compliance rapportage: Document WDigest disabled status voor audits

Remediatie

Gebruik PowerShell-script wdigest-authentication-is-set-to-disabled.ps1 (functie Invoke-Remediation) – Herstellen.

Als WDigest ingeschakeld wordt gedetecteerd (CRITICAL beveiligingsincident):

  1. CRITICAL FINDING: WDigest ingeschakeld is passwords in plaintext in memory is extreme Diefstal van inloggegevens risk
  2. IMMEDIATE: Schakel uit WDigest via registry (Set UseLogonCredential is 0)
  3. INVESTIGATE: HOE werd WDigest ingeschakeld? (zou moeten zijn disabled door Standaard in Windows 10+)
  4. - handmatige registry change? (insider threat?)
  5. - Legacy application requirement? (Verifieer legitimacy)
  6. - Malware waardoor WDigest? (APT technique - volledige incidentrespons)
  7. Beveiligings beoordeling: Assume credentials COMPROMISED if WDigest was ingeschakeld
  8. - Rotate alle passwords voor users logged into affected systems
  9. - Controleer voor lateral movement (compromised credentials usage)
  10. - Review authentication logt voor suspicious activity
  11. - Escalate to security team / SOC
  12. FORENSICS: Determine hoe long WDigest was ingeschakeld (credential exposure window)
  13. ROOT CAUSE ANALYSIS: Fix vulnerability die allowed WDigest enabling
  14. beleid ENFORCEMENT: implementeren monitoring to Voorkom re-enabling

Prevention van WDigest re-enabling:

  1. Intune beleid enforcement: Continuous deployment of WDigest disabled setting
  2. File integrity monitoring: Alert op registry wijzigingen aan WDigest key
  3. Privilege escalation monitoring: detecteer attempts to modify beveiligingsinstellings
  4. Application whitelisting: Blokkeer ungeautoriseerde registry editors
  5. Tamper bescherming: Windows Defender tamper bescherming voorkomt beveiligingsinstelling changes

Compliance en Auditing

WDigest disabling is kritiek voor credential bescherming compliance:

  1. CIS Microsoft Windows Benchmark - control 18.3.6 (Zorg ervoor dat 'WDigest Authentication' is set to 'Disabled')
  2. BIO 09.04.01 - Gebruik van wachtwoorden - credential bescherming in memory
  3. BIO 11.02.05 - Toegangsbeveiliging - bescherming tegen Diefstal van inloggegevens
  4. ISO 27001:2022 A.9.4.3 - wachtwoordbeheer system - veilige credential opslag
  5. ISO 27001:2022 A.5.17 - Authentication information - bescherming van authentication credentials
  6. NIS2 Artikel 21 - Cybersecurity risicobeheer - Diefstal van inloggegevens prevention
  7. NIST SP 800-53 IA-5 - Authenticator Management - Protecting stored authenticators
  8. PCI-DSS Requirement 8.2.1 - Render alle authentication credentials unreadable tijdens opslag

WDigest disabling is BASELINE requirement voor alle moderne Windows hardening guides.

Compliance & Frameworks

Automation

Gebruik het onderstaande PowerShell script om deze security control te monitoren en te implementeren. Het script bevat functies voor zowel monitoring (-Monitoring) als remediation (-Remediation).

PowerShell
<# .SYNOPSIS Disable WDigest Authentication .DESCRIPTION Registry: HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest\UseLogonCredential = 0 .NOTES Filename: wdigest-authentication-is-set-to-disabled.ps1 Author: Nederlandse Baseline voor Veilige Cloud CIS: 18.3.6 #> #Requires -Version 5.1 #Requires -Modules Microsoft.Graph.DeviceManagement [CmdletBinding()] param([Parameter(Mandatory = $true, ParameterSetName = 'Monitoring')][switch]$Monitoring, [Parameter(Mandatory = $true, ParameterSetName = 'Remediation')][switch]$Remediation, [Parameter(Mandatory = $true, ParameterSetName = 'Revert')][switch]$Revert, [switch]$WhatIf) $ErrorActionPreference = 'Stop' function Invoke-Monitoring { Connect-MgGraph -Scopes 'DeviceManagementConfiguration.Read.All' -NoWelcome; $uri = "https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations"; $configs = (Invoke-MgGraphRequest -Method GET -Uri $uri).value | Where-Object { $_.displayName -match 'WDigest' }; return @{ isCompliant = ($configs.Count -gt 0) } } function Invoke-Remediation { Connect-MgGraph -Scopes 'DeviceManagementConfiguration.ReadWrite.All' -NoWelcome; $policyBody = @{ '@odata.type' = '#microsoft.graph.windows10CustomConfiguration'; displayName = "Baseline: Disable WDigest Authentication"; omaSettings = @(@{ '@odata.type' = '#microsoft.graph.omaSettingInteger'; displayName = 'Disable WDigest'; omaUri = './Device/Vendor/MSFT/Policy/Config/CredentialProviders/DisableAutomaticReDeploymentCredentials'; value = 1 }) }; Invoke-MgGraphRequest -Method POST -Uri "https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations" -Body ($policyBody | ConvertTo-Json -Depth 10) | Out-Null; Write-Host "[OK] Created" -ForegroundColor Green } function Invoke-Revert { Connect-MgGraph -Scopes 'DeviceManagementConfiguration.ReadWrite.All' -NoWelcome; $uri = "https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations"; (Invoke-MgGraphRequest -Method GET -Uri $uri).value | Where-Object { $_.displayName -match 'Baseline.*WDigest' } | ForEach-Object { Invoke-MgGraphRequest -Method DELETE -Uri "$uri/$($_.id)" } } try { switch ($PSCmdlet.ParameterSetName) { 'Monitoring' { $r = Invoke-Monitoring; exit $(if ($r.isCompliant) { 0 } else { 1 }) } 'Remediation' { Invoke-Remediation } 'Revert' { Invoke-Revert } } } catch { Write-Error $_; exit 2 }

Risico zonder implementatie

Risico zonder implementatie
Critical: KRITIEK Diefstal van inloggegevens RISICO: WDigest ingeschakeld is user passwords in PLAINTEXT in LSASS memory. Mimikatz (used in 90%+ of ransomware attacks) dumpt passwords binnen SECONDS. Attack scenario: Initial compromise (phishing, RDP brute force) β†’ Escalate to local admin β†’ Run Mimikatz β†’ Dump alle logged-on user passwords in plaintext β†’ Lateral movement met stolen credentials β†’ Domain Admin compromise binnen hours β†’ volledige network takeover + ransomware deployment. WDigest is #1 Diefstal van inloggegevens vector. Recent ransomware families (Ryuk, Conti, LockBit) alle gebruiken Mimikatz WDigest dumping. Cost: complete network compromise, ransomware versleuteling (€500K - €5M recovery), data exfiltration.

Management Samenvatting

Schakel uit WDigest authentication om plaintext password caching in memory te voorkomen. Blokkeert Mimikatz credential dumping (primary ransomware technique). Registry: HKLM\...\WDigest\UseLogonCredential is 0. Voldoet aan CIS 18.3.6 (L1), BIO 09.04/11.02, ISO 27001 A.5.17, NIS2. Implementatie: 30 minuten. nul compatibility impact. KRITIEKE PRIORITEIT - moet be disabled op alle Windows systems. Windows 10+ heeft WDigest disabled door Standaard - Verifieer not re-ingeschakeld.