NTLM, pass-the-hash, and Kerberoasting
A compromised finance workstation at Cedar Inc. leaves two unusual patterns in the directory's records. This lesson tells them apart: a reused password hash, an NTLM authentication relayed to another server, and service tickets collected for offline guessing, and contains each one with the repair that fits it.
Different ways stolen material becomes access
On Tuesday afternoon, a finance workstation at Cedar Inc., FIN-WS-22, opened a malicious attachment. Riley was signed in to it at the time. By the evening Quinn, on Cedar's security team, has the directory's sign-in records for the afternoon, and they show two unusual patterns. One is a desktop support administrator's account signing in to servers it never manages. The other is Riley's account asking the KDC for an unusual number of service tickets.
Both patterns started at the same workstation, but they are different problems with different signs and different repairs. To tell them apart, Quinn needs to know how each kind of stolen material turns into access, starting with the older of the two protocols involved.
NTLM is a family of challenge-response protocols that Windows systems used before KerberosA ticket-based authentication protocol, used by Active Directory, in which a key distribution center issues time-limited tickets. A user presents a ticket to each service instead of sending a password. and still fall back to when Kerberos cannot be used, for example when a server is reached by IP address instead of by name, or an older application only supports NTLM. The server sends a random challenge. The client computes a response from that challenge and a hash of the user's password, called the NT hash. The server, or a domain controller acting for it, computes the same response from its own copy of the hash and compares the two. The password itself never crosses the network.
A password is not the only reusable secret
Look closely at what the client needs to produce a correct NTLM response: the challenge and the NT hash. Not the password. Anyone who holds the hash can answer the challenge as well as the owner can. Using stolen hash material this way is called pass-the-hash, technique T1550.002 in the MITRE ATT&CK catalogue of attack techniques, and it is why a password hash on a Windows machine is a credential in its own right, as reusable as the password it came from.
Hashes end up on machines through ordinary work. When someone signs in interactively to a workstation, the operating system keeps credential material in memory so that it can authenticate to network services for them. At 13:58 on Tuesday, a desktop support administrator signed in to FIN-WS-22 with the account adm-desk2 to fix a printer driver. The administrator signed out at 14:10, but credential material from that sign-in could still be read from memory by malware with full control of the machine.
That is the first pattern in Quinn's records. From 14:41, adm-desk2 made NTLM network sign-ins from FIN-WS-22 to three servers it never manages, while the administrator it belongs to was in a meeting with their own laptop closed. There was no interactive sign-in and no Kerberos ticket request for that account from that workstation, just NTLM responses that only someone holding the hash could have produced.
The defenses follow from how the hash got there. Privileged accounts should not sign in to lower-trust machines at all: support staff use separate accounts whose rights are limited to workstations, and the most powerful accounts sign in only from dedicated administrative machines, as Protecting privileged access describes. Local administrator passwords should differ on every machine, so one stolen hash does not open them all. Phishing-resistantA property of an authentication method that binds sign-in to the real service, so evidence entered on a look-alike site cannot be passed on and used. Passkeys have it; passwords and one-time codes do not. sign-in at the web portal does not help here, because this hash is used by a different protocolAn agreed set of rules for the messages two systems exchange and what each message means. HTTP, OAuth 2.0, OpenID Connect and SAML are all protocols. entirely. Cedar can also restrict NTLM, but only after auditing where it is still used. Switching it off without that list breaks the older applications that depend on it, and the first outage tends to bring it back for everyone.
A response can be relayed, not just replayed
Pass-the-hash needs the hash. There is a second way to use NTLM without ever learning a password or a hash, and it is the more common one in practice. Recall how NTLM works: the server sends a challenge, the client answers with a response computed from the challenge and its NT hash, and the server checks it. Nothing in that exchange ties the response to the connection it arrived on. So an attacker who can get a victim to start authenticating to a machine the attacker controls can forward, or relay, the challenge and response straight on to a third server, and authenticate there as the victim. This is NTLM relay, ATT&CK T1557, and the attacker never sees the hash: they borrow a live authentication as it happens.
The attacker rarely waits politely for a victim to connect. They provoke it, by answering a mistyped name on the local network, by a document that fetches an image from a server they name, or by prompting a privileged service to connect back. Wherever the relayed authentication lands decides the damage. Relayed to a file server over SMB, the Windows file-sharing protocol, it reads or writes files as the victim. Relayed to a domain controller over LDAP, the protocol for reading and changing directory entries, it can change directory objects as the victim, which is how a relayed computer or administrator account becomes a foothold. Relayed to the web enrollment page of the domain's certificateA signed statement that a public key belongs to a name, such as a website's hostname, for stated purposes and a limited period. A certificate authority signs it, so software that trusts the authority can connect the key to the name. service, which issues certificates to people and machines, it can request a certificate in the victim's name and then sign in with that.
The defenses close the gap the protocol leaves, that a response is not bound to its connection:
- Require signing. With SMB signing required, every SMB message carries a signatureA value made with a private key that lets anyone holding the matching public key check that a message came from the key's holder and has not been changed. It proves origin and integrity; it does not hide the message. keyed to the sessionThe ongoing connection between later requests and an earlier sign-in, so you are not asked for your password on every click. It is often tracked with a cookie holding an unpredictable session identifier., so a relayed session that the attacker cannot sign is useless. LDAP signing does the same for directory traffic. Requiring it, not merely allowing it, is what matters: an optional setting lets a relayed client negotiate it away.
- Bind the authentication to the TLS channel. Extended Protection for Authentication (EPA) adds a channel binding tokenA piece of data issued by a trusted service that a client presents as a credential, for example to call an API or to report a sign-in. Some tokens carry readable claims; others are random strings that only the issuer can interpret. that ties the NTLM exchange to the specific TLS connection it travelled on. A response captured on one connection then fails on the attacker's. LDAP channel binding is EPA for secure LDAP, and web services such as certificate enrollment support it too.
- Remove the trigger and the fallback. Turning off the older name-resolution protocols that let any machine on the local network answer for a mistyped name removes the easy provocation. And because relay is an NTLM technique, the broader answer is to stop using NTLM where Kerberos can do the job.
That last point has momentum behind it now. Microsoft has deprecated NTLM and stated its intent to retire it in favor of Kerberos, NTLMv1 has been removed from recent Windows releases, and new work lets Kerberos reach cases that used to fall back to NTLM. The technique does not disappear while any application still depends on NTLM, so an organization audits where NTLM is actually used before switching it off, exactly as Cedar must for pass-the-hash. Relay did not appear in Quinn's two patterns on Tuesday, but it is the NTLM attack Cedar is most likely to meet, and the signing and channel-binding settings are the standing defense whether or not an incident is under way.
A service ticket can expose an offline guessing target
The second pattern involves Kerberos. As How Kerberos tickets work showed, the KDC issues a service ticket to any authenticated user who asks for one, and leaves the access decision to the service. The ticket is encrypted with the service account's key. For computer accounts that key comes from a long random password the machine changes on its own. Some services, though, run as ordinary user accounts that a person set up with a password a person chose.
Cedar's reporting application is one of them. It runs as svc-reports, with the SPN http/reports.cedar.example, and its password was set by hand in 2019. Anyone signed in to Cedar's domain can request a ticket for that SPN, take it away, and try password guesses against it offline: derive a key from each guess and see whether it decrypts the ticket. This is Kerberoasting, ATT&CK T1558.003. No guess touches a domain controller, so there are no failed sign-ins to notice. The risk is worst when the ticket is encrypted with RC4, whose key is simply the NT hash and is fast to compute, rather than AES, whose key derivation is deliberately slow. Accounts that support only AES, with long random passwords, leave nothing practical to guess.
A close relative does not even need a signed-in account first. Recall from How Kerberos tickets work that pre-authentication is the encrypted timestamp that proves a requester knows the password before the KDC answers. A few accounts have pre-authentication switched off, usually for an old application that could not supply it. For such an account, the KDC will send an AS-REP to anyone who asks, and part of that reply is encrypted with the account's key. An attacker who names those accounts collects the replies and guesses against them offline, the same way as with a service ticket. This is AS-REP roasting, ATT&CK T1558.004. Its one extra sign, besides the offline guessing it shares with Kerberoasting, is the request itself: an AS-REQ with pre-authentication absent, for an account that should require it. The repair is to turn pre-authentication back on wherever it was disabled and to find out why it ever was, and, as with Kerberoasting, to give these accounts long random passwords and AES so a captured reply yields nothing.
Quinn now lays the afternoon out as a timeline, keeping each observation apart from what it suggests.
| Time | Observation | What it suggests | What it does not show |
|---|---|---|---|
| 13:58 | adm-desk2 signs in interactively to FIN-WS-22 | Administrator credential material was on the workstation | That anything was taken |
| 14:20 | The attachment runs on FIN-WS-22 | The workstation is compromised | Which credentials were read |
| 14:41 | NTLM sign-ins as adm-desk2 from FIN-WS-22 to three unfamiliar servers, with no matching interactive sign-in | Hash reuse: pass-the-hash | The administrator's password itself |
| 14:52 | Riley's account requests 46 service tickets in two minutes, 41 of them for SPNs of user-backed service accounts, all asking for RC4. Riley normally requests about a dozen a day, all AES | Ticket collection for offline guessing: Kerberoasting | That any password was recovered |
| After 15:00 | No sign-in as svc-reports from anywhere unusual | Nothing yet | That the password is safe: guessing happens offline |
The two signs look different for a reason. Hash reuse shows up as sign-ins: a real account authenticating where and when it should not. Kerberoasting shows up only as requests, and a single ticket request is completely normal. What stands out is the volume, the targets and the old encryptionTransforming data so that only someone holding the right key can read it. It protects confidentiality and, unlike hashing, is designed to be reversed by the key holder. type, compared with Riley's usual day. Even then, the requests show that tickets were collected, not that a password fell. Quinn records the account, the target SPNs, the times and the source workstation, and keeps no ticket or hash in the investigation notes.
Containment needs more than one checkbox
Each pattern needs its own repair, and neither repair covers the other.
For the hash reuse, Cedar changes the adm-desk2 password. A new password produces a new NT hash, so the stolen one stops working, and Cedar then ends that account's sessions and reviews what it did on the three servers. FIN-WS-22 is taken off the network and rebuilt. Riley's password changes too, since Riley was signed in to the compromised machine. Support staff stop signing in to finance workstations with accounts that have rights on servers.
For the ticket collection, Cedar assumes the worst about every user-backed account whose ticket was taken: its password may be guessed at leisure, so it is replaced. Before touching svc-reports, the team lists everything that uses it, the reporting application on two servers and a nightly export, because changing a service password without that list causes an outage that tempts people to undo the fix. The account moves to a managed service account whose long random password the directory rotates automatically, is restricted to AES, and loses its administrator rights on the finance database server, which the application never needed. That is the dependency check from Rotating credentials and keys after exposure, applied to one service account.
Blocking everything is not containment either. Disabling every service account would stop both attack paths and also the reporting application, and cutting off all administrative accounts would leave nobody to finish the response. Cedar keeps a separate emergency administrator account that never signs in to ordinary machines, so recovery does not depend on anything that touched FIN-WS-22.
When the work is done, Quinn checks each path. adm-desk2 has a new password, and a test sign-in with it to a finance workstation is refused. A ticket for svc-reports now comes back AES-only, for an account with a password nobody chose. The reporting application still produces Wednesday's figures, and the emergency account can still sign in. A dashboard showing the right policies, or one refused attempt on its own, would not have shown all four.
Check your understanding
Try these questions before moving on. If an answer isn't right, use the feedback and try again.
Try it in the Lab
- Read roastable hashes and tell the weak targets apartInspect captured Kerberoast and AS-REP roast hashes with text tools, read each one's encryption type and account, and separate the weak offline-guessing targets from the ones that leave nothing to guess. No cracking.