User-to-User Authentication: Down the Rabbit Hole – Part 1
The post explains how Kerberos user-to-user (U2U) authentication works in Windows and how the same primitives enable the UnPAC-the-Hash attack, which recovers a user's NT hash from a service ticket obtained via PKINIT. An attacker who has a certificate and private key for a user can perform a PKINIT exchange, request a U2U service ticket, decrypt it with the TGT session key, and extract the NT hash for pass-the-hash or Kerberos ticket requests.
U2U authentication came into the spotlight after the Active Directory Certificate Services (ADCS), UnPAC-the-Hash, and Shadow Credentials attacks. While the attack technique is popular and common amongst red teamers, there’s limited information distilling how and why the technique works.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the design of PKINIT includes the user's NT hash in the PAC, and U2U service tickets are encrypted with a session key the attacker can derive, allowing the attacker to decrypt the ticket and extract the hash.
Impact
An attacker who obtains a user's certificate and private key could recover the user's NT hash and use it for pass-the-hash or to request Kerberos tickets if RC4 is enabled.
What the attacker needed
Certificate and private key for target user; ability to perform PKINIT exchange; RC4 enabled for Kerberos ticket requests
How it was found
- Obtain a certificate issued by the domain's CA and its private key for the target user.
- Initiate a PKINIT exchange against the KDC using the certificate and an ephemeral DH key pair.
- Derive the AS reply key from the AS-REP and obtain a TGT with its session key.
- Request a U2U service ticket for the user, which the KDC encrypts with the TGT session key.
- Decrypt the service ticket with the TGT session key to access the PAC.
- Decrypt PAC_CREDENTIAL_INFO with the AS reply key to retrieve the user's NT hash.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Kerberos is a login system that uses tickets instead of sending passwords. User-to-user (U2U) authentication lets a client get a ticket encrypted with a session key from the target service's own ticket, rather than the service's long-term password key. The post shows that if an attacker can get a user's certificate, they can use the same U2U steps to decrypt a ticket and steal the user's password hash, which can then be used to log in as that user.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.