WDigest Authentication Enabled

WDigest is configured to keep users' passwords in LSASS memory in a recoverable form, so anyone with administrative access to the host can read them in clear text.

SeverityMedium
CVSS 3.14.4 CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N Open in the calculator
CVSS 4.06.7 CVSS:4.0/AV:L/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N Open in the calculator
CWECWE-257: Storing Passwords in a Recoverable Format
MITRE ATT&CKT1003.001 LSASS Memory
CategoryCryptographic Failures

Description

WDigest is the Windows security support provider for HTTP Digest and SASL Digest authentication. Because these protocols compute each response from the user's password, WDigest keeps, in the memory of the Local Security Authority Subsystem Service (LSASS), the password of every user who signs in, encrypted with keys that LSASS also holds, so it can be recovered in clear text.

Windows 8.1, Windows Server 2012 R2 and later versions do not keep these credentials by default. The update for Microsoft security advisory 2871997 brought the UseLogonCredential registry value, under HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest, to earlier versions so that the behaviour could be turned off there. The finding arises when UseLogonCredential is set to 1, which turns caching back on in any version and is a known step attackers take to collect passwords at later sign-ins, or when older systems such as Windows Server 2008 R2 do not have it set to 0.

An attacker who already has administrative access to an affected system can then read the clear-text passwords of users who have signed in to it while caching was enabled, interactively or over Remote Desktop, including administrators; only accounts that sign in to the host are exposed. Clear-text passwords can be used with services that do not accept password hashes, such as VPNs, webmail and cloud services that share the directory password, remain valid until changed, and reveal how users construct their passwords.

The setting is identified from the registry or Group Policy, or on a test by extracting credentials from LSASS with tools such as Mimikatz (sekurlsa::wdigest), which show clear-text passwords for users who signed in while caching was enabled.

Remediation

  • Set UseLogonCredential to 0 (REG_DWORD) under HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest on every system, through Group Policy Preferences or configuration management. The WDigest Authentication setting in the MS Security Guide administrative template from Microsoft's security baselines manages the same value.
  • Where the value is found set to 1 without a documented reason, treat it as a possible sign of compromise: find out how it was set, and reset the passwords of accounts that signed in while it was in place.
  • Monitor the value for changes with endpoint detection tools or registry auditing.
  • Replace systems running Windows versions that are out of support.
reg add HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest /v UseLogonCredential /t REG_DWORD /d 0 /f

Passwords already cached remain in memory until the user signs out or the system restarts. Confirm the fix by reading the value and, where permitted, checking that a credential dump taken after new sign-ins shows no clear-text WDigest passwords.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Active Directory Findings

Every Active Directory finding