Rethink Security

Windows Hashes

security windows hash

Estimated reading time: 2 minutes

All the different types of Windows hashes can be confusing sometimes. So to clear thinks up a little bit, I wrote some Key points to help understand what most of the stuff like LM, NTLM and DCC is all about. An excellent writeup for NTLM relaying1 is from byt3bl33d3r. All the other sources2 3 4 can be found in the footnotes.

Hash types

LM Hashes5

  • Since OS/2 (ca. 1980) in use
    • Limited character set - everything is an CAPS and a 7 char character-limit
    • When hashing, the PW is padded to 14 characters with zeros and encrypted with DES
    • Very easily crackable - found only in exceptions in NTDS.dit or locally

NTLM Hashes6

  • Current mechanism
  • Uses MD4 over a UTF-16 LE(%Password%)
  • Crackable or usable for Pass the Hash (PTH)7


  • Not a hash algorithm but an authentication mechanism
  • Challange Response based
  • Uses LM or NTLM hash (both possible - depending on configuration)
  • Can also be cracked


  • Not a hash algorithm but an authentication mechanism
  • Challange Response based
  • Often uses the NT hash
  • Can be cracked - however complex

DCC Hashes

  • Use the username as SALT
  • Not usable for PTH
  • DCC Algorithm
    • NTLM-hashing of the password
    • Convert the (lowercase) username to Unicode
    • NLTMHash+Unicode rotate once through MD4
    • Result up to then DCCv1
    • Applying PBKDF28 with SHA1 as HMAC9 with 10240 iterations, the old DCC serves as PW and the Unicode Username serves as SALT
    • The result are 160bits - of which the first 128bits are used as DCCv2


  • DES - deactivated since Windows 7 (default)
  • RC4 - Default
  • AES128-CTS-HMAC-SHA1-96
  • AES256-CTS-HMAC-SHA1-96

Windows Creds

In the Windows registry everything is under HKLM

Hive SAM -> local SAM database10

  • Manages local users
  • Dump for users on the client

Hive System -> General System Settings

Hive Security -> Contains hashes and passwords of users

  • Contains hashes
  • By default even Administrators aren’t able to read it
  • Is also used for saving at the login process
  • Contains also the Hive cache - this one contains credentials for “offline” login - can be dumped with mimikatz11 (but only directly from the system)

  1. ↩︎

  2. ↩︎

  3. ↩︎

  4. ↩︎

  5. ↩︎

  6. ↩︎

  7. ↩︎

  8. ↩︎

  9. ↩︎

  10. ↩︎

  11. ↩︎