Lateral movement and on-prem NT hash dumping with Microsoft Entra Temporary Access Passes
Temporary Access Passes (TAPs) in Microsoft Entra ID, when combined with Cloud Kerberos Trust, allow an attacker with sufficient privileges to obtain a Kerberos TGT and then recover the on-premises NT hash of the victim account. This enables lateral movement and potential password recovery without disrupting the legitimate user.
Published on dirkjanm.io
Temporary Access Passes are a method for Microsoft Entra ID (formerly Azure AD) administrators to configure a temporary password for user accounts, which will also satisfy Multi Factor Authentication controls. They can be a useful tool in setting up passwordless authentication methods such as FIDO keys and Windows…
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 Cloud Kerberos Trust allows a temporary authentication method (TAP) to obtain a long-lived Kerberos TGT and NT hash, which should not be possible with a temporary credential.
Impact
An attacker with sufficient privileges could obtain NT hashes for any user they can provision a TAP for, enabling lateral movement and potential password recovery, though this requires Cloud Kerberos Trust and line-of-sight to an on-premises domain controller.
What the attacker needed
TAPs enabled in the tenant; Sufficient access to provision TAPs; Cloud Kerberos trust enabled; Line of sight to on-premises AD
The fix
Microsoft did not fix this, considering it a valid finding but not of immediate concern due to high privilege requirements; recommended mitigations include avoiding syncing privileged accounts to Entra ID, scoping TAP to regular users, and monitoring TAP assignments and sign-ins.
How it was found
- Configure a Temporary Access Pass for the victim account using the Azure portal or Graph API.
- Authenticate with the TAP using the roadtx prtenrich command to obtain a refresh token.
- Register a device and obtain a Primary Refresh Token (PRT) using the refresh token.
- Use the PRT to request a partial TGT for the on-premises Active Directory.
- Exchange the partial TGT for a full TGT using the partialtofulltgt.py script.
- Recover the NT hash of the victim account from the TGT.
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.
A Temporary Access Pass is a short-lived password that administrators can give users to set up new login methods like fingerprint or face recognition. The report shows that if an attacker can create such a pass for someone, they can use it to get a special ticket that lets them access the company's internal network and even steal a password hash (a scrambled version of the password) that can be cracked offline.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.