Skip to content
Account takeover Write-up Advanced

SyncJacking: Hard Matching Vulnerability Enables Azure AD Account Takeover

An attacker with write access to an unsynchronised on-premises AD account and delete access to a synchronised account can abuse Entra Connect's hard matching to take over any synchronised Entra ID account, including Global Administrator. The attacker copies the target's UPN and mS-DS-ConsistencyGuid to the attacker-controlled account, deletes the target on-prem account, and waits for synchronisation to remap the cloud account.

Tomer Nahum Follow

Published on semperis.com

This post describes an abuse of hard matching synchronization in Entra Connect that can lead to Entra ID account takeover. These findings build on the research that Semperis published in August, which described abuse of soft matching (also known as SMTP matching).

Tomer Nahum, on semperis.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 hard matching process trusts the mS-DS-ConsistencyGuid attribute without verifying that the on-premises account is authorised to claim the corresponding cloud account, allowing an attacker to remap a cloud account to an attacker-controlled on-premises object.

Impact

An attacker could take over any synchronised Entra ID account, including Global Administrator, with only two permissions on on-premises accounts, leaving minimal trace in Entra ID logs and none in on-premises logs; enforcing MFA on all synced users is currently the only mitigation, though it is not a surefire way to stop the attack.

What the attacker needed

Write-All-Properties or GenericWrite on an unsynchronised…; Delete permission on a synchronised on-prem AD account; Password for the attacker-controlled on-prem AD account; Entra Connect with password hash synchronisation enabled

The fix

Microsoft has implemented platform-level security hardening in Entra Connect to block unauthorised account remapping, with enforcement expected to begin in March 2026 for supported versions.

How it was found

  1. Copy the target Entra ID account's UPN to the attacker-controlled on-premises account's userPrincipalName attribute.
  2. Copy the target on-premises account's mS-DS-ConsistencyGuid value to the attacker-controlled account's mS-DS-ConsistencyGuid attribute.
  3. Delete the target on-premises account.
  4. Wait for Entra Connect synchronisation to occur.

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.

Entra Connect is a tool that keeps user accounts in sync between an on-premises Active Directory and Microsoft's cloud identity service, Entra ID. Hard matching is how it links an on-premises account to a cloud account using a unique identifier. The flaw lets someone who can edit one on-premises account and delete another make the cloud service link the wrong on-premises account to a powerful cloud account, effectively taking it over.

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.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.