166 terms · 75/46/45
Threat № 023 · class: identity

Pass-the-Hash

So that it does not keep the password in readable form, Windows remembers its cryptographic fingerprint — the hash. With older Windows authentication (NTLM), the password is not required to prove identity; the hash is enough. Pass-the-hash abuses exactly that: if the attacker obtains a user's hash, they can log in with it without ever learning the real password.

Term

description · examples · notes

So that it does not keep the password in readable form, Windows remembers its cryptographic fingerprint — the hash. With older Windows authentication (NTLM), the password is not required to prove identity; the hash is enough. Pass-the-hash abuses exactly that: if the attacker obtains a user's hash, they can log in with it without ever learning the real password.

Description

To get the hash the attacker needs administrator or SYSTEM rights and a tool such as Mimikatz. Once they have it, they can try logging in to the other machines on the network. Wherever the same account exists, Windows accepts the login as legitimate. That way an attacker can compromise a whole network if the same account sits everywhere — and that is not a rare case.

The defense has one aim: that one hash does not unlock every door. Unique administrator passwords per machine (LAPS), so a stolen hash works on one computer only; least privilege, so high-level accounts are not used to log in everywhere; protection of the memory the hash lives in (Credential Guard); network segmentation; a move from NTLM to Kerberos. The main recommendation is that privileged accounts are not used across the whole network.

Examples

  • Mimikatz pulls the hash of a local administrator account out of the memory of an infected workstation, and it is then passed to the other machines on the network where that account exists.
  • A help-desk administrator account used on a large number of machines: if the attacker gets the hash on one computer, every other one is at high risk of compromise.
  • CrackMapExec is a tool that automates lateral movement and the passing of collected hashes towards the domain controller.

Notes

  • The attacker does not need a readable password, only its hash. A strong, long password does not help against this one.
  • It differs from cracking: nothing is broken offline, the hash is used as it is. The cure is not a stronger password but not recycling administrator passwords. Every machine needs its own local administrator, not a shared one.
Composite
Wikipedia

Techniques

carried out with 3

Techniques used to carry it out. Select one to open its page.

Defenses

countered by 4