1/104
Understanding Password Hashes
To verify login passwords without storing the plaintext password.
The system computes and stores a hash of the password.
Hash the supplied password and compare it with the stored hash.
The password is accepted and the user is authenticated.
The hash calculated from the password entered at login.
LANMAN and NT.
DES, MD5, SHA-256, SHA-512, and Yescrypt.
A weak legacy Windows password hashing mechanism.
Legacy compatibility retained during repeated upgrades.
All password letters are converted to uppercase.
14 bytes, using NULL bytes when needed.
Into two separate 7-byte chunks.
DES.
KGS!@#$%
Concatenate the two DES-encrypted 8-byte results.
Uppercase conversion and independent 7-byte chunks reduce the search space.
No. The course considers it obsolete and insecure.
The NT hash.
Yes. NT hashes are case-sensitive.
Convert the password to Unicode if necessary.
MD4.
16 bytes (128 bits).
In the Security Accounts Manager (SAM).
No LANMAN hash is stored; only the NT hash.
No.
Stronger than LANMAN, but still weak by modern standards.
No. NTLM is an authentication protocol; NT is the hash type.
NT and NTLM are often used interchangeably in tool terminology.
Two users chose the same password.
The same password always produces the same stored hash.
A randomly chosen value combined with a password before hashing.
No. It is stored alongside the hash.
No. The operating system handles it automatically.
Their identical passwords produce different hashes.
To recompute the correct hash when verifying a login.
Entropy, or randomness, to the hash input.
NTDS.dit.
SYSTEM.
It is in use exclusively by the OS and its contents are encrypted.
ntdsutil.exe.
activate instance ntds
ifm
create full c:\ntds (inside ifm mode).
T1003, OS Credential Dumping.
secretsdump.py.
The saved SYSTEM registry hive path.
The saved NTDS.dit database file path.
Use local saved database and hive files.
secretsdump.py -system registry/SYSTEM -ntds Active\Directory/ntds.dit LOCAL
hashdump
Yes, using Windows RPC services over SMB.
username:password@IP-address
Mimikatz.
privilege::debug
sekurlsa::logonpasswords
Select-String -Pattern 'Username|NTLM'
reg save hklm\sam sam.hiv
reg save hklm\system system.hiv
lsadump::sam /sam:sam.hiv /system:system.hiv
To avoid running Mimikatz on the compromised endpoint.
Administrator access.
Endpoint Detection and Response (EDR).
username:userid:LANMAN:NTHASH
aad3b435b51404eeaad3b435b51404ee
31d6cfe0d16ae931b73c59d7e0c089c0
A legacy LANMAN hash remains for the account.
LANMAN storage is disabled; the account still has an NT hash.
An inactive/disabled account or a failed hash extraction.
Am All Day Baffled By Difficult Choices For Encrypted Data.
/etc/passwd
/etc/shadow
/etc/passwd
root
DES, MD5, SHA-256, SHA-512, then Yescrypt.
The second field.
The dollar sign ($).
1
5
6
y
No dollar-sign hash-type prefix.
Hash type, salt, then crypt-encoded password hash.
No. It uses a modified Base64-like character set.
Repeatedly applying the hash computation to increase work per guess.
They add a comparatively small delay.
They slow every password guess.
1,000.
5,000.
5,000.
One.
Single-round MD4 without a salt.
Graphics Processing Units (GPUs).
Hashcat.
PBKDF2.
Password-Based Key Derivation Function 2.
Configurable repeated HMAC calculations.
WPA and WPA2.
4,096.
scrypt and Argon2.
Argon2.