SAM(LM_Hash:NT_Hash) Hash
Technical details, regex signatures, and cracking commands for the SAM(LM_Hash:NT_Hash) algorithm.
What is SAM(LM_Hash:NT_Hash)?
The **SAM(LM_Hash:NT_Hash)** format is a legacy cryptographic construct originating from Microsoft’s Security Accounts Manager (SAM) database, introduced in early Windows NT (pre-4.0) and later standardized in Windows 2000. It encodes user credentials using two distinct hash algorithms: the **LM_Hash** (a truncated MD4-derived scheme) and the **NT_Hash** (a SHA-1-based hash of the user’s Unicode password). The LM_Hash operates on a 14-character ASCII password (padded to 14 bytes with nulls if shorter) by splitting it into two 7-byte halves, applying a custom DES-like key derivation (iterated 10,000 times), and concatenating the results into a 24-byte hash. The NT_Hash, in contrast, directly applies SHA-1 to the Unicode password (with a null terminator) and stores the resulting 160-bit digest. This dual-format design was intended to maintain backward compatibility with older systems while adopting stronger cryptography for NT passwords, though it remains vulnerable to offline attacks due to its design flaws. The SAM database stores these hashes in a binary format where the LM_Hash precedes the NT_Hash, separated by a colon in plaintext representations (e.g., `LM_Hash:NT_Hash`), enabling legacy authentication protocols like NTLM.
The **SAM(LM_Hash:NT_Hash)** format is highly susceptible to cracking due to its inherent cryptographic weaknesses and computational optimizations. The LM_Hash is particularly vulnerable because it relies on a fixed-length ASCII password (defaulting to null-padded 14 bytes), making it trivial to brute-force via rainbow tables or GPU-accelerated attacks (e.g., using tools like Hashcat with the `nt` or `lm` rules). The absence of salting or iterative hashing (despite the 10,000 iterations) allows attackers to precompute hashes offline, while the truncated MD4-like structure enables rapid collision generation. The NT_Hash, though stronger, is still vulnerable to GPU-optimized SHA-1 cracking (e.g., via `hashcat --attack-mask`) due to its lack of key stretching or peppering. Additionally, the format’s reliance on legacy DES and SHA-1 (both deprecated for security) renders it unsuitable for modern security standards, as both algorithms are susceptible to quantum computing threats and have known collision/resistance weaknesses. The combination of these flaws—fixed-length inputs, no salting, and GPU-friendly hashing—makes offline dictionary and brute-force attacks highly efficient, rendering the format obsolete for secure authentication.
Identifying SAM(LM_Hash:NT_Hash) Hashes
Identifying a hash blindly is often difficult because multiple algorithms can output strings of the exact same length. For example, a standard 32-character hexadecimal string could be MD5, NTLM, MD4, or LM. To definitively identify SAM(LM_Hash:NT_Hash), security researchers analyze the hash against a strict regular expression (regex) signature (shown above) to find structural matches.
How to Crack SAM(LM_Hash:NT_Hash)
If you need to recover the plaintext password for a SAM(LM_Hash:NT_Hash) hash during a penetration test or forensics investigation, you must supply the correct module ID to your cracking software. Use the exact commands provided at the top of this page to target the hash successfully.