Day 22/100 of #cybertechdave100daysofcyberchallenge - Windows Password Hashes
Today we learned a little bit about Windows Password Hashes. Let's jump right in.
Which hash types are used in Windows system?
Till Windows Server 2003 -> LM and NTLM
LM (LanMan) Hash:
Hashing process can be broken down into:
From Windows Vista on: NTLM, and LM are disabled
NTLM (NTHash) Hash:
Improves upon LM in the following ways:
Where are these password hashes stored on Windows?
This Database file is responsible for managing user accounts and passwords
Attacks typically utilize in-memory techniques and tools to dump SAM hashes from the LSASS process (elevated privileges are required to access and interact with the LSASS process)
Now let's look how we can dump hashes with mimikatz?
Mimikatz is a Windows post-exploitation tool that allows the extraction of clear-text passwords, hashes and kerberos tickets from memory
Again, we can use a metasploit module after obtaining a metepreter shell. Importantly, we need elevated privileges. Therefore it is important to be proficient in privilege escalation.?
领英推荐
First of all, migrate your meterpreter session to the lsass process. Mainly due to compatibility:
Now the process to dump the hashes:
The manual process without metasploit goes as follows:
Check appropriate privileges:
Dump hashes:
We now have two options to proceed. Either we try to crack the hashes with corresponding wordlists. The other possibility is the so-called pass-the-hash attack. Because we don't always need the password in plain text to be able to log on to another system.?
What do we mean by pass-the-hash attacks?
Some of the tools to perform the attack:
Attack with metasploit psexec module:
Attack with crackmapexec:
That's it for today. :)