Skip to content
Access control Write-up Advanced

Double Agent: Exploiting Pass-through Authentication Credential Validation in Azure AD

A vulnerability in Azure AD pass-through authentication (PTA) allows an attacker with local admin on a PTA agent server to bypass credential validation by hooking the ValidateCredentials function to always return true, enabling login as any synced AD user without knowing their password. This could lead to privilege escalation and lateral movement if high-privilege accounts are synced.

Ilan Kalendarov Follow

Published on cymulate.com

By: Cymulate Research Lab

Ilan Kalendarov (@IKalendarov), Elad Beber, on cymulate.com

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 PTA agent's credential validation function can be hooked at runtime by an attacker with local admin access, allowing the return value to be forced to true regardless of the actual password check.

Impact

An attacker with local admin on a PTA agent server could log in as any synced AD user, including global administrators, leading to privilege escalation and lateral movement; however, enabling 2FA for all synced users would block this attack.

What the attacker needed

Local admin on PTA agent server; multiple synced AD domains

The fix

Microsoft plans to fix the code but has no ETA; additionally, enabling 2FA for all synced users would effectively block the attack.

How it was found

  1. Gain local admin access on the server hosting the PTA agent.
  2. Inject an unmanaged DLL into the PTA agent process.
  3. Use the DLL to load a managed DLL that hooks the ValidateCredentials function.
  4. Set the hook to always return true, bypassing password validation.
  5. Log in as any synced AD user without knowing their password.

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.

Pass-through authentication lets users sign in to cloud services like Microsoft 365 using their on-premises Active Directory password. The cloud sends the password to a small agent program running on a server inside the company, which checks it against the local Active Directory. The flaw is that if an attacker can run code on that agent server, they can modify the agent so it always says 'yes' to any password, letting them log in as any synced user.

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.

More from Microsoft (Entra ID / Azure AD)

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.