1. Resources
  2. Identity Threats
  3. Active Directory

Pass-the-Hash

Also known as: PtH, Pass the hash, NTLM hash reuse, RDP Restricted Admin pass-the-hash

An attacker who holds an account's NT hash authenticates over NTLM as that account, without knowing the password, and moves to every host where the account has rights.

Platform
Active Directory
Impact
High
Last updated
Attack difficulty
Low
Detection difficulty
Medium
Privileges required: Specific rights or roles
The NT hash of an account with rights on the target, usually dumped with local administrator access on another host, and a target that accepts NTLM.
What the attacker gains
A network logon as the account on any host that accepts NTLM: file access, remote execution, and with Restricted Admin an interactive RDP session.
Threat groups
APT1APT28APT32APT41Aquatic PandaChimeraEmber BearFIN13GALLIUMKimsukyWizard SpiderGroups that MITRE ATT&CK records using T1550.002.

How it works

NTLM is a challenge-response protocol. The server sends an 8-byte challenge; the client computes a response from the challenge and the NT hash of the user's password; the server, or a domain controller on its behalf, repeats the computation and compares. The password itself is never used after it has been hashed.

The NT hash is the MD4 of the UTF-16LE password, with no salt. Two consequences follow:

  • The hash is password-equivalent for NTLM. A client that holds it can answer any challenge. This is Pass-the-Hash.
  • The same password gives the same hash on every machine. A local administrator password shared across a fleet means one dumped hash opens every host.

NTLMv2 mixes the user name, domain and a client challenge into the response, but the secret input is still the NT hash, so it changes nothing here.

Who validates the response depends on the account. For a domain account the target forwards the exchange to a domain controller. For a local account the target checks its own SAM, and no domain controller is involved at all.

Authentication is not authorization. After a successful logon the target builds a token and checks its ACLs:

  • A domain account that is a local administrator on the target gets a full token: administrative shares, service control, remote execution.
  • A local account in the Administrators group gets a filtered, non-administrative token over the network because of remote UAC restrictions. The built-in Administrator (RID 500) is exempt by default, and LocalAccountTokenFilterPolicy=1 removes the filter for all local administrators.
  • An account without rights on the target authenticates and is then denied.

RDP Restricted Admin is the interactive variant. Normally RDP sends the user's credentials to the remote host. In Restricted Admin mode the client keeps them and performs a network logon instead, which means an NT hash is sufficient. The mode protects administrators' credentials on a compromised server, and at the same time makes RDP reachable with a stolen hash wherever the target accepts it.

A pure Pass-the-Hash session involves no Kerberos: no TGT request and no service ticket. Using the same hash as a Kerberos RC4 key instead is Overpass-the-Hash.

Prerequisites

  • A usable NT hash. Sources: LSASS credential dumping on a host where the account signed in, the local SAM database for local accounts, DCSync or a copy of NTDS.dit for every domain account.
  • A target that accepts NTLM for that account. NTLM is allowed by default.
  • Rights on the target. For remote execution, membership in the local Administrators group with an unfiltered token.
  • Network access to the target: TCP 445 for SMB, 135 and dynamic ports for WMI, 5985 for WinRM, 3389 for RDP.
  • For the RDP variant: the target accepts Restricted Admin (DisableRestrictedAdmin set to 0 under HKLM\SYSTEM\CurrentControlSet\Control\Lsa) and the account is an administrator there.

Conditions that make the attack spread: local administrator passwords reused between hosts, privileged domain accounts signing in to ordinary workstations, administrative shares reachable from user networks, and Credential Guard not running.

Attack steps

For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.

1. Find where the hash is valid

NetExec tests one hash against a range and marks hosts where the account is an administrator with (Pwn3d!):

# Domain account
nxc smb 192.0.2.0/24 -u alice -H <nt_hash>

# Local account, for example a shared built-in Administrator password
nxc smb 192.0.2.0/24 -u Administrator -H <nt_hash> --local-auth

2. Get execution on a target

Impacket takes the hash in LMHASH:NTHASH form; the LM part can be left empty:

psexec.py -hashes :<nt_hash> corp.example.com/alice@192.0.2.20

psexec.py uploads a service binary to a writable share and creates a service. The other Impacket execution tools (wmiexec.py, smbexec.py, atexec.py) accept the same -hashes argument and differ in the mechanism they use on the target; see PsExec and remote service execution.

Over WinRM:

evil-winrm -i 192.0.2.20 -u alice -H <nt_hash>

3. From Windows: a process that carries the hash

Mimikatz starts a process in a new logon session and replaces that session's credentials with the supplied hash. Every network connection from the process then authenticates as the target user. It requires elevation on the attacker's host:

mimikatz # privilege::debug
mimikatz # sekurlsa::pth /user:alice /domain:corp.example.com /ntlm:<nt_hash>

For a local account, pass the computer name as the domain. From the new window, use ordinary tools:

dir \\192.0.2.20\C$

4. RDP with Restricted Admin

From Windows, start the Remote Desktop client inside the injected session:

mimikatz # sekurlsa::pth /user:alice /domain:corp.example.com /ntlm:<nt_hash> /run:"mstsc.exe /restrictedadmin"

From Linux, FreeRDP takes the hash directly:

xfreerdp /v:SRV01.corp.example.com /u:alice /d:corp.example.com /pth:<nt_hash>

If the target does not accept the mode and the attacker already has administrative execution there, one registry value turns it on:

reg add HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v DisableRestrictedAdmin /t REG_DWORD /d 0 /f

Impact

Pass-the-Hash is the classic lateral movement technique in Windows networks. Each host the attacker controls yields the hashes of the accounts that signed in there; each hash opens the hosts where that account is an administrator; those hosts yield more hashes. The chain ends when it reaches an account with domain-wide rights.

The attacker never needs to crack anything, so password length and complexity do not help. A password change does stop the old hash, but a shared local administrator password has to be changed on every host that uses it, and sessions that are already open stay open.

OPSEC and artifacts

  • Choice of execution method. Operators pick the method with the fewest traces for the environment. What remains differs by method: psexec.py leaves a service with a random name and an executable in a writable share (System event 7045, and 4697 where audited); smbexec.py leaves a service and a batch file; wmiexec.py leaves no service but writes its output to a file on ADMIN$; atexec.py leaves a scheduled task (event 4698 where audited).
  • IP address instead of host name. Connecting to an IP address keeps the client on NTLM. What remains: the target's event 4624 shows AuthenticationPackageName NTLM, which is unusual for an administrator in a domain where Kerberos is the norm.
  • The type 9 logon. Mimikatz sekurlsa::pth creates a new-credentials logon on the attacker's host: event 4624 with logon type 9 and logon process seclogo. runas /netonly produces the same event, so it is a lead, not proof.
  • On the target. A network logon (4624 type 3, NTLM) for the account, 4672 if it is an administrator, 5140 for the share connection and 5145 for access to ADMIN$, C$ or IPC$.
  • On the authority. Event 4776 on a domain controller for a domain account, or on the target itself for a local account. The event names the source workstation, a value the client supplies, and does not name the destination.
  • No Kerberos. No 4768 and no 4769 for the session. That absence only supports the conclusion; other Kerberos activity for the same account can exist.
  • Restricted Admin. The session's onward network connections use the remote computer's identity instead of the user's. The logon record on the target does not show whether the client held a password or a hash. Enabling the mode leaves the DisableRestrictedAdmin registry change.
  • Hashes in the open. Command lines, shell history and transcripts on the attacker's side contain the hash; on a compromised host these appear in process creation logs.

Detection

  • NTLM network logon for a privileged account. Event 4624 with LogonType 3 and AuthenticationPackageName NTLM, for an administrative account, from a workstation, especially when one source reaches several targets in a short time.
SecurityEvent
| where EventID == 4624 and LogonType == 3 and AuthenticationPackageName == "NTLM"
| where TargetUserName !endswith "$" and TargetUserName != "ANONYMOUS LOGON"
| where isnotempty(IpAddress) and IpAddress != "-"
| summarize Targets = dcount(Computer), TargetList = make_set(Computer, 20)
    by TargetDomainName, TargetUserName, IpAddress, bin(TimeGenerated, 15m)
| where Targets >= 3
| order by Targets desc
  • Type 9 logon on the source. A new-credentials logon with the seclogo logon process, followed by an NTLM network logon on a server for the outbound account. The Pass-the-Hash detection rules implement the source and target sides.
  • Credential validation outside the normal path. Event 4776 on a domain controller for an administrative account from an unexpected workstation name. With NTLM auditing enabled, NTLM event 8004 on the domain controller adds the server the authentication was for.
  • The local Administrator account over the network. RID 500 logging on remotely with NTLM to several hosts points to a shared local password in use.
  • Administrative access after the logon. Event 4672 with the same logon ID, then 5140 or 5145 for ADMIN$ or C$, then a new service (System event 7045) with an image path in ADMIN$, a temporary directory or %SYSTEMROOT%.
  • Restricted Admin enabled. A change to DisableRestrictedAdmin, and remote interactive logons from sources that are not administrative workstations.
  • Old NTLM versions. The NTLMv1 detection rules show where the weakest form is still in use, which is where to start an NTLM reduction.

No event states whether the client held a password or a hash; a legitimate administrator connecting by IP address produces the same NTLM logon. Detection is about who, from where, to how many hosts, and what happened next.

Mitigation

  • Give every host a unique local administrator password. Deploy Windows LAPS and confirm rotation, so that one dumped local hash opens one host. The Windows LAPS guide covers the rollout.
  • Keep privileged hashes off lower-tier hosts. Do not use Domain Admin or other Tier 0 accounts on member servers and workstations. Use separate administrative identities and dedicated administrative workstations.
  • Protect hashes in memory. Enable Credential Guard and LSA protection; see the LSA protection and Credential Guard guide. Credential Guard does not protect local accounts and does not invalidate a hash taken elsewhere.
  • Put privileged users in Protected Users. Members cannot authenticate with NTLM, so their hashes cannot be passed. See the Protected Users guide. Do not add service or computer accounts.
  • Reduce NTLM. Audit incoming NTLM with the "Network security: Restrict NTLM" policies and the NTLM operational log, then deny it for accounts and servers that do not need it. Disabling NTLM is what removes the technique; moving from NTLMv1 to NTLMv2 does not.
  • Keep remote UAC filtering on. Do not set LocalAccountTokenFilterPolicy to 1, and deny network logon to local accounts through the "Deny access to this computer from the network" user right.
  • Restrict reachability. Allow SMB, WMI, WinRM and RDP to servers and workstations only from management networks. Workstations rarely need to accept SMB from other workstations.
  • Decide on Restricted Admin deliberately. Where it is enabled, limit who may use RDP to the host. Remote Credential Guard also keeps credentials off the remote host, and redirects Kerberos requests back to the client device instead of relying on a network logon.
  • After an exposure, reset the password at the right authority: the domain for a domain account, every host for a shared local account. Then review active sessions.

SMB signing is worth requiring for relay protection. It is not a control against Pass-the-Hash.

Detection rules for this attack

Log events to collect

FAQ

Why does Pass-the-Hash work?

NTLM never sends the password. The client proves its identity by computing a response from the server's challenge and the NT hash of the password. The hash is therefore all the client needs, and Windows stores it unsalted, so a hash copied from one machine works everywhere the same account and password are valid.

Does NTLMv2 prevent Pass-the-Hash?

No. NTLMv2 changes how the response is computed, but the input is still the NT hash. Pass-the-Hash works against NTLMv1 and NTLMv2 alike. Restricting or disabling NTLM, protecting the hashes at their source and removing shared passwords are the controls that matter.

Does SMB signing stop Pass-the-Hash?

No. Signing protects a session from tampering and relay by a third party. A client that holds the hash derives the same session key as a client that knows the password and signs its own session correctly.

Can you pass the hash over RDP?

Only when the target accepts Restricted Admin mode. In that mode the client does not send credentials to the remote host and authenticates with a network logon, so an NT hash is enough. The account must be an administrator on the target. Without Restricted Admin, RDP needs the password.

References

Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.

Does this attack work in your environment?

Forestall maps every identity and the attack paths between them across Active Directory, Entra ID and cloud, read-only and agentless.