LM Password Hashes Stored

Passwords are stored as LAN Manager (LM) hashes in Active Directory or local SAM databases, a format that can be cracked quickly to reveal the password.

SeverityMedium
CVSS 3.14.9 CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N Open in the calculator
CVSS 4.06.9 CVSS:4.0/AV:N/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-916: Use of Password Hash With Insufficient Computational Effort
OWASP Top 10A04:2025 Cryptographic Failures
MITRE ATT&CKT1110.002 Password Cracking
CategoryCryptographic Failures

Description

The LAN Manager (LM) hash is a legacy password format kept for compatibility with very old clients. It converts the password to upper case, limits it to 14 characters, splits it into two independent seven-character halves and uses each half as a DES key to encrypt a fixed string, with no salt. Each half can therefore be cracked separately, and the whole space of seven-character upper-case strings can be searched in a short time or looked up in precomputed tables. A password of 15 or more characters cannot be stored as an LM hash.

An attacker who obtains the password hashes, for example by compromising a domain controller, a backup of the directory database or a computer's SAM database, can recover the passwords of accounts with LM hashes almost immediately, in upper case, and then use the NT hash to find the correct letter case. Obtaining the hashes needs high privileges, which limits the rating, and the NT hash alone is already enough for pass-the-hash within the domain, so the additional risk is disclosure of the plain-text password, which users often reuse on other systems, on cloud services and in later passwords.

Windows stops creating LM hashes when the policy Network security: Do not store LAN Manager hash value on next password change is enabled (the NoLMHash registry value), which has been the default since Windows Vista and Windows Server 2008. The setting takes effect only when each password is next changed, so LM hashes persist for accounts whose passwords have not changed since it was enabled, and are created again wherever the policy has been disabled.

The issue is identified when password hashes are extracted, from the directory database during an authorised password audit or after domain compromise, or from a computer's SAM database, and accounts have an LM hash other than the empty value aad3b435b51404eeaad3b435b51404ee. It can also be found by reviewing the policy setting.

Remediation

  • Enable Network security: Do not store LAN Manager hash value on next password change in a policy that applies to domain controllers and to all computers (Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > Security Options), and remove any policy that disables it.
  • Require a password change for every account that still has an LM hash, since the setting takes effect only at the next change. Include service and administrative accounts, whose passwords change least often, and local accounts on computers.
  • Encourage long passphrases: a password of 15 or more characters never produces an LM hash.
  • Identify and replace any remaining system that needs LM authentication, rather than keeping LM hashes for it.

The equivalent registry setting is:

HKLM\SYSTEM\CurrentControlSet\Control\Lsa NoLMHash (REG_DWORD) = 1

Confirm the fix at the next authorised password audit: no account should have an LM hash other than the empty value.

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