Man-in-the-Middle, Pass-the-Hash and Kerberos Attacks
Attackers often bypass cryptography by intercepting sessions or stealing and reusing credentials. This lesson covers man-in-the-middle attacks, pass the hash and attacks on Kerberos.
Learning outcomes
After completing this lesson, you will be able to:
- Explain man-in-the-middle, pass-the-hash and Kerberos attacks.
- Choose defences against credential theft and reuse.
Man-in-the-middle
In a man-in-the-middle (MITM, also called adversary-in-the-middle) attack, the attacker secretly sits between two parties, relaying and possibly altering their communication. Techniques include ARP spoofing on local networks, DNS spoofing, rogue Wi-Fi access points, fraudulent or mis-issued certificates, and SSL stripping that downgrades HTTPS to HTTP. An unauthenticated Diffie-Hellman exchange is vulnerable because the attacker can negotiate separate keys with each side.
Defences include mutual authentication, strict certificate validation (and pinning for specific applications), HTTP Strict Transport Security, DNSSEC, network protections such as dynamic ARP inspection and 802.1X, and phishing-resistant authentication such as FIDO2, which binds credentials to the genuine site.
ARP spoofing shows how an attacker gets into the middle on a local network. Devices use the Address Resolution Protocol to find the hardware address that belongs to an IP address, and they accept ARP replies without authentication. The attacker sends forged replies telling the victim that the gateway's IP address belongs to the attacker's hardware address, and telling the gateway the same about the victim. Traffic between the two now flows through the attacker's machine, which forwards it so that nothing appears broken. Dynamic ARP inspection on switches stops this by checking ARP messages against a trusted table of address assignments.
Getting into the path is only half of the attack; the attacker must also defeat the encryption. That is why certificate validation is the decisive defence. If a user's browser validates the server certificate properly, the attacker cannot present a convincing certificate for the real site and the connection fails with a warning. Modern adversary-in-the-middle phishing kits avoid this by luring the user to a look-alike domain for which the attacker has a valid certificate, then relaying the login, including one-time codes, to the real site and stealing the resulting session cookie. FIDO2 authenticators defeat that technique because they sign the real site's domain into the authentication response, so a response produced for the look-alike domain is useless at the genuine site.
Getting in the middle
Pass the hash
In Windows environments using NTLM, the password hash itself serves as the credential. In a pass-the-hash attack, an attacker who has extracted hashes from a compromised computer's memory or credential store authenticates to other systems as that user without knowing the password, moving laterally across the network.
The attack usually follows a chain, in which each compromised machine yields credentials for the next, as the worked example below shows.
Tiered administration breaks the chain by ensuring that highly privileged credentials are never exposed on lower-trust machines. Domain administrators log on only to domain controllers and dedicated administrative workstations; server administrators only to servers; and workstation support uses accounts that have rights only on workstations. Unique local administrator passwords on each machine stop one stolen local hash from opening every other machine.
Defences include preventing privileged accounts from logging on to lower-trust systems (tiered administration), unique local administrator passwords on every machine, credential isolation features, restricting or disabling NTLM, privileged access workstations and monitoring for unusual authentication patterns.
The following diagram shows pass the hash spreading to a domain administrator.

Breaking the lateral movement chain
Lateral movement with pass the hash
An attacker phishes an employee and gains local administrator rights on their workstation. Last week, a help desk technician with administrator rights on every workstation logged on to that machine to fix a problem. How can the attacker reach a domain administrator account?
On the compromised workstation, the attacker extracts the hashes cached in memory, which include those of anyone who has logged on recently. Because the technician logged on there, the attacker now holds the technician's hash and can use it to log on to every other workstation, collecting more hashes as they go, until they find one belonging to a domain administrator.
Each step reuses a credential rather than cracking it, which is why changing password complexity rules does nothing to stop the attack.
Kerberos exploitation
The Kerberos attacks make sense once the ticket flow is clear; the protocol itself is explained in the lesson on authentication systems and protocols. A user authenticates to the key distribution centre (KDC) and receives a ticket-granting ticket (TGT), which is encrypted with the key of a special account called KRBTGT. To use a service, the user presents the TGT and receives a service ticket encrypted with the service account's key. The service decrypts the ticket and trusts what it says about the user. Every attack below either steals one of these keys or tickets, or obtains an encrypted ticket and cracks it.
Kerberoasting exploits the fact that any authenticated user may request a service ticket for any service. Because the ticket is encrypted with a key derived from the service account's password, the attacker takes it offline and tries passwords until one decrypts it. Service accounts often have old, weak passwords that never expire, so the attack frequently succeeds and yields an account with broad rights. AS-REP roasting applies the same idea to user accounts configured not to require pre-authentication.
Forged tickets are more serious. With the KRBTGT key, the attacker can create a golden ticket: a TGT for any user, with any group memberships and a long lifetime, which the KDC accepts because it is encrypted with the correct key. With a service account's key, the attacker can create a silver ticket for that one service, which never touches the KDC and is therefore harder to detect. Pass the ticket is simpler: the attacker copies a valid ticket from a compromised machine's memory and uses it elsewhere until it expires. The following key terms summarise these attacks.
- Kerberoasting
- Requesting service tickets encrypted with a service account's password-derived key and cracking them offline; succeeds against weak service account passwords.
- Golden ticket
- A forged ticket-granting ticket created with the stolen KRBTGT account key, granting access to any resource in the domain.
- Silver ticket
- A forged service ticket created with a service account's key, granting access to that one service.
- Pass the ticket
- Stealing an existing ticket from memory and reusing it on another system.
- AS-REP roasting
- Requesting authentication data for accounts that do not require pre-authentication and cracking it offline.
Defences include long, random service account passwords or managed service accounts, AES encryption instead of RC4, requiring pre-authentication, protecting domain controllers as the most critical assets, resetting the KRBTGT password twice after a suspected compromise, and monitoring for anomalous ticket requests.
Kerberos attacks
Domain compromise
Investigators find that an attacker obtained the KRBTGT account's key and has been creating tickets that grant administrator access for months. The administrators reset every user's password. Is the domain safe?
No. Forged golden tickets are signed with the KRBTGT key, not user passwords, so resetting user passwords does not invalidate them. The KRBTGT password must be reset twice (with time between resets for replication), because the domain accepts tickets signed with the current and previous keys. The attacker's access path to the domain controller must also be found and closed.
Which account's key must an attacker steal to forge golden tickets?
Show answer
The KRBTGT account's key.
Exam Tips
Remember for the exam
- Mutual authentication and certificate validation defeat MITM.
- Pass the hash enables lateral movement; tiered administration limits it.
- Reset the KRBTGT password twice after a golden ticket compromise.