Any account that holds both directory replication rights on the domain can ask a domain controller for every password hash in Active Directory, so finding and removing those rights from everything that is not a domain controller is one of the highest-value audits an identity team can run. This guide shows how to list the principals that hold replication rights, how to tell legitimate holders such as the Microsoft Entra Connect connector account from leftovers, how to remove what should not be there without breaking synchronisation, and how to watch for the rights coming back.
It is a discovery and clean-up guide. The mechanics of the technique itself, ticket forgery and incident lessons are covered in the Golden Ticket, Silver Ticket and DCSync Guide, which this page does not repeat.
Key takeaways
- DCSync rights are two control access rights on the domain naming context: Replicating Directory Changes and Replicating Directory Changes All. Microsoft describes the second as allowing the replication of secret domain data.
- The holders that should normally exist are domain controllers and the built-in administrative groups, plus any explicitly approved synchronisation account.
- Microsoft Entra Connect needs both rights on its AD DS Connector account when password hash sync is enabled, so that account is Tier 0 and must be protected like a domain controller.
- Common findings are replication rights left behind by old directory sync tools, SharePoint profile synchronisation, migration projects and test labs, and rights granted to broad groups.
- Check the right on the domain object itself, check nested group membership behind each trustee, and check the object owner, because anyone who can change the domain ACL can grant the rights.
- Audit with event 4662 on the domain object and, if deployed, Microsoft Defender for Identity alert 2006, which fires when replication is requested from a computer that is not a domain controller.
What counts as DCSync rights
Active Directory uses extended rights, also called control access rights, to authorise replication. Two are central:
| Right | Rights GUID | Microsoft description |
|---|---|---|
| Replicating Directory Changes (DS-Replication-Get-Changes) | 1131f6aa-9c07-11d1-f79f-00c04fc2dcd2 | Extended right needed to replicate changes from a given naming context. |
| Replicating Directory Changes All (DS-Replication-Get-Changes-All) | 1131f6ad-9c07-11d1-f79f-00c04fc2dcd2 | Control access right that allows the replication of secret domain data. |
Microsoft's schema documentation lists both as applying to the Domain-DNS, Configuration and DMD (schema) classes. For DCSync exposure the object that matters most is the domain root, the Domain-DNS object such as DC=corp,DC=example,DC=com, because that is where domain secrets live. A principal holding both rights there can request password data in the same way a domain controller does. That is why MITRE ATT&CK lists it as T1003.006 DCSync, a sub-technique of OS credential dumping.
Holding only Replicating Directory Changes is less severe, because it does not include secret data, but it still allows broad directory reads and is often granted alongside the second right. Treat any non-default holder of either right as a finding to explain.
Rights can also arrive indirectly. GenericAll (full control) on the domain object includes every extended right. WriteDACL or ownership of the domain object lets a principal grant itself the replication rights at any time. A complete audit therefore covers four things: the two named rights, full control, WriteDACL and ownership.
Who should legitimately hold replication rights
Before you can find the anomalies you need a list of expected holders. In a typical domain these include:
- Domain controllers and built-in administrative groups. The default entries on the domain object. Confirm exactly which groups your domain grants by default by comparing with a freshly built lab domain at the same functional level, rather than relying on a remembered list.
- Directory synchronisation accounts. Most commonly the Microsoft Entra Connect AD DS Connector account when password hash sync is used.
- Specific approved products. Some identity, backup or security products need directory replication. Each should have a named owner, a documented reason and a vendor document stating the requirement.
Anything else is a finding. Write the expected list down, including SIDs, before running the audit, so the review compares results against a baseline rather than intuition.
The Entra Connect connector account
Microsoft's Entra Connect accounts and permissions reference states that the AD DS Connector account needs Replicate Directory Changes and Replicate Directory Changes All for the password hash sync feature. In express settings the wizard creates the account in the Users container of the forest root domain with a name prefixed MSOL_, and also grants it read and write on all properties of users, iNetOrgPerson, groups and contacts, plus reset password in preparation for password writeback.
Other points from the same page that matter for this audit:
- With custom settings you create the account yourself. If you do not enable optional features, the default Domain User permissions are sufficient, which means replication rights should only be present if password hash sync is in use.
- The wizard does not verify permissions in custom installations, so over-granting is easy and goes unnoticed.
- The connector account receives a long, complex password that does not expire.
- Since build 1.4, an Enterprise Admin or Domain Admin account cannot be used as the AD DS Connector account.
- Microsoft's ADSyncConfig PowerShell module, introduced in build 1.1.880.0, can help configure the permissions precisely.
The conclusion is that the connector account is a legitimate DCSync holder, and so is the Entra Connect server that stores its credential. Both are Tier 0. Common findings include multiple MSOL_ accounts left from earlier installations, connector accounts that still hold replication rights after password hash sync was turned off, and connector accounts with rights in domains that are no longer synchronised. For a full review of the account see How to audit the Entra Connect sync account, and for server hardening see the Microsoft Entra Connect and Cloud Sync Hardening Guide.
How to list accounts with DCSync rights
The audit is read-only. Run it from a privileged access workstation with an account that can read the domain object security descriptor; standard users can usually read it, but use your normal administrative path so the activity is attributable.
Step 1: read the domain object ACL
Read the access control list on the domain root and filter for entries that grant either rights GUID, full control, WriteDACL or ownership. The following PowerShell is illustrative and uses only the ActiveDirectory module and the AD drive:
Import-Module ActiveDirectory
$domainDN = (Get-ADDomain).DistinguishedName
$acl = Get-Acl -Path "AD:\$domainDN"
$repl = @('1131f6aa-9c07-11d1-f79f-00c04fc2dcd2','1131f6ad-9c07-11d1-f79f-00c04fc2dcd2')
$acl.Access | Where-Object { $_.AccessControlType -eq 'Allow' -and ( ($repl -contains $_.ObjectType.Guid) -or ($_.ActiveDirectoryRights -match 'GenericAll|WriteDacl') ) } | Select-Object IdentityReference, ActiveDirectoryRights, ObjectType, IsInherited
$acl.Owner
The output lists each trustee, the rights it holds, the GUID of the right and whether the entry is inherited. Record the owner too.
Step 2: pair the rights per trustee
Group results by trustee and mark which hold Get-Changes, which hold Get-Changes-All and which hold both. Trustees with both, or with full control or WriteDACL, are the highest priority.
Step 3: expand groups
A trustee is often a group. Resolve each group recursively, for example with Get-ADGroupMember -Recursive, and record every user, computer and service account that inherits the right. A small help desk or legacy tools group with replication rights effectively makes every member a DCSync holder.
Step 4: repeat for other naming contexts and domains
Run the same check on the configuration and schema naming contexts, which Microsoft lists as applying to these rights, and on every domain in every forest you manage. Child domains and resource forests are often forgotten.
Step 5: cross-check with graph tooling
Attack path tools can show indirect routes, such as a user who can reset the password of a member of a group with replication rights. The BloodHound and Active Directory Attack Path Guide explains how to use that analysis defensively. Microsoft's own Defender for Identity guidance also points to AD ACL Scanner or a PowerShell script as ways to determine who holds these permissions.
Triage: deciding what each finding is
For each non-default holder, answer four questions and record the answers:
- What is it? Identify the account type, its description, creation date, last logon and password last set.
- Who owns it? Find a named human owner. If there is none, that is itself a finding.
- Why does it have the right? Look for a vendor requirement document or change record. A product that needed replication years ago may no longer be installed.
- Is it still needed? Confirm with the owner and, where possible, the product documentation.
Typical outcomes fall into a few buckets:
| Finding | Typical cause | Usual action |
|---|---|---|
Old MSOL_ accounts | Previous Entra Connect installations or staging servers | Confirm which account the live server uses, then remove the rest |
| Connector account with rights but no password hash sync | Feature disabled after setup | Remove replication rights after confirming the sync configuration |
| SharePoint or profile sync accounts | Legacy profile synchronisation | Remove if the farm or feature is retired |
| Migration or consultant accounts | Domain migration and assessment projects | Remove and disable the account |
| Broad groups | Convenience grants to admin or tools groups | Replace with a dedicated, monitored service identity or remove |
| Unknown SID | Deleted account or group | Remove the orphaned entry |
| Unexpected user recently added | Possible persistence by an intruder | Escalate to incident response before changing anything |
The last row matters. Granting replication rights to an account is a known persistence method, and an unexplained recent grant should be handled as a possible compromise. Capture evidence first, then follow the Active Directory Domain Compromise Response Playbook.
Removing rights safely
Removing a replication right is quick. Removing the right one without breaking synchronisation or a product is the hard part.
- Export the current ACL. Save the full security descriptor of the domain object, for example as SDDL, so any change can be reversed exactly.
- Raise a change. Domain object ACL changes are Tier 0 changes. Name the operator, the owner of each affected account and the rollback step.
- Remove one trustee at a time. Remove the access control entries for a single trustee, wait for replication, and check that dependent services still work.
- Prefer removal of the entry over the account. If the account is still needed for other purposes, remove only the replication entries. If it is not needed, disable it, then delete it after a holding period.
- Handle Entra Connect carefully. Before removing rights from any
MSOL_or connector account, confirm in the Entra Connect configuration which account is in use for each forest and whether password hash sync is enabled. Removing rights from the live connector account while password hash sync is on will stop password hash synchronisation. - Rotate credentials where exposure is suspected. If a removed account could have been misused, treat domain secrets as exposed and plan a credential reset, which may include the krbtgt account, under incident response.
- Re-run the audit. Confirm that only expected holders remain and update the baseline.
Also fix the owner of the domain object if it is anything other than a built-in administrative group, and remove WriteDACL from any non-Tier 0 trustee. Leaving those in place means replication rights can simply be granted again. The Active Directory ACL and Delegation Hygiene Guide covers safe ACL change practice in more depth.
Protecting the holders that remain
Every account that legitimately keeps replication rights is as sensitive as a domain controller. For each one:
- Place it, and any server that stores its credential, in Tier 0 and manage it only from Tier 0 administrative paths.
- Use a long, unique, randomly generated password and store it in a controlled vault if a human ever needs it.
- Restrict where it can log on, so it cannot be used interactively from ordinary servers or workstations.
- Record an owner, a purpose and a review date in your service account inventory. The How to build a service account inventory from Active Directory guide shows how.
- Monitor its use, so replication from an unexpected host stands out.
Detecting replication requests and new grants
Event 4662 on the domain object
Microsoft documents event 4662, An operation was performed on an object, under the Audit Directory Service Access subcategory. It is only generated when an appropriate SACL is set on the object and the operation matches it. The fields to use are the Subject Security ID and Account Name, Object Type (for example domainDNS), Object Name, Access Mask and Properties, which carries GUIDs of the rights or properties involved. An access mask of 0x100 indicates Control Access. Microsoft recommends monitoring the Properties field for specific GUIDs and also monitoring failures.
An illustrative detection, not a production rule: alert on 4662 where Object Type is the domain object class, Properties contains either replication rights GUID, and the subject is not a domain controller computer account or an approved synchronisation account from your baseline. Tune it against your domain controllers first, because their own replication generates matching events.
Event 5136 for ACL changes
Audit changes to the security descriptor of the domain object so that a new grant of replication rights is caught when it happens, not at the next quarterly review. The Active Directory Security Monitoring and Event IDs Guide explains how to configure directory change auditing.
Microsoft Defender for Identity
Where deployed, Defender for Identity raises the Suspected DCSync attack (replication of directory services) alert, external ID 2006, severity High. Microsoft states it triggers when a replication request is initiated from a computer that is not a domain controller, and its prevention advice is to validate who holds Replicate directory changes and Replicate directory changes all.
Framework mapping
- MITRE ATT&CK T1003.006 DCSync: the technique these rights enable.
- MITRE ATT&CK T1098 Account Manipulation: granting replication rights as persistence.
- MITRE ATT&CK M1026 Privileged Account Management and M1047 Audit.
- NIST SP 800-53 Rev. 5 AC-6 Least Privilege and AC-2 Account Management.
Common failure patterns
- Checking only Domain Admins. Replication rights are often held by accounts outside every privileged group, so group-based reviews miss them.
- Checking one right. Reviews look for Replicating Directory Changes All but ignore GenericAll, WriteDACL and ownership on the domain object.
- Not expanding groups. A group with replication rights hides dozens of effective holders.
- Treating Entra Connect as an application. The connector account and server are managed by an application team rather than as Tier 0.
- Old connector accounts left behind. Every reinstall or staging server adds another
MSOL_account with the same rights. - Removing before investigating. A recent unexplained grant is removed without evidence capture, losing the trail of a possible intrusion.
- One-off audits. Rights are cleaned once and quietly return because ACL changes on the domain object are not monitored.
Practitioner checklist
- Write down the expected holders of replication rights for each domain, with SIDs.
- Read the domain object ACL for both replication rights GUIDs, GenericAll, WriteDACL and the owner.
- Repeat for configuration and schema naming contexts and for every domain in every forest.
- Expand each group trustee recursively and record effective holders.
- Identify the live Entra Connect connector account per forest and confirm whether password hash sync is enabled.
- Remove rights from stale connector, migration, profile sync and orphaned trustees through a Tier 0 change.
- Escalate any recent unexplained grant to incident response before changing it.
- Place remaining holders and their servers in Tier 0 with logon restrictions and monitoring.
- Configure a SACL for event 4662 on the domain object and alert on replication from non-DC subjects.
- Audit domain object ACL changes and rerun the discovery at least quarterly.
Standards and references
- Microsoft Learn: Replicating Directory Changes All extended right
- Microsoft Learn: Replicating Directory Changes extended right
- Microsoft Learn: Microsoft Entra Connect accounts and permissions
- Microsoft Learn: Event 4662, An operation was performed on an object
- Microsoft Learn: Defender for Identity security alerts
- CISA and partners: Detecting and Mitigating Active Directory Compromises
- MITRE ATT&CK: DCSync
- NIST: SP 800-53 Rev. 5
Related NHI Mgmt Group resources: Golden Ticket, Silver Ticket and DCSync Guide · How to audit the Entra Connect sync account · Active Directory ACL and Delegation Hygiene Guide · Active Directory Security Monitoring and Event IDs Guide