Pass-the-Hash
Pass the Hash (PtH) enables lateral movement by allowing authentication using NTLM password hashes instead of plaintext passwords.
It only works with NTLM-based authentication, i.e., it is not applicable to Kerberos-authenticated services.
It requires SMB access.
It needs administrative privileges.
Tools like Impacket (
wmiexec
,psexec
, etc.), Metasploit’s PsExec, and others leverage this method for remote code execution.
Here is how it works:
Tools perform authentication over SMB using the provided NTLM hash.
If remote code execution is desired, these tools:
Start a Windows service (e.g.,
cmd.exe
orpowershell.exe
)Communicate through Named Pipes using the Service Control Manager API
For non-execution tasks (e.g., reading a file share), no service needs to be created.
For this to work, four conditions must be met:
SMB port (445) must be accessible through the firewall.
File and Printer Sharing must be enabled.
ADMIN$
share must be available.Supplied credentials must have local administrative privileges.
Important: PtH does not exploit NTLM, but abuses the availability of stolen password hashes—usually obtained through prior compromise.
This method works for both AD domain accounts and the built-in local administrator account. However, due to the 2014 Microsoft update, this technique cannot be used to authenticate as other local admin accounts (due to unique local account SIDs).
Last updated
Was this helpful?