DCSync
Last updated
Was this helpful?
Last updated
Was this helpful?
AD environments often use multiple DCs for redundancy. These DCs synchronize using Directory Replication Service Remote Protocol (DRSR). DCSync is a late-phase attack that allows an attacker to impersonate a DC and then dump ntds.dit
.
DCs do not verify the source of a replication request. They only check that the Security Identifier (SID) used has appropriate privileges.
To perform this attack, we must have control over an account that has the rights to perform domain replication, aka DCSync rights:
Replicating Directory Changes
Replicating Directory Changes All
Replication-Get-Changes-In-Filtered-Set
(sometimes)
These rights are granted by default to Domain Admins
, Enterprise Admins
, and Administrators
.
If we have
WriteDacl
rights over an account, we can assign DCSync rights to it. For instance, theWindows Exchange Permissions
group has DCSync rights. For an example of a DCSync attack using theWriteDacl
permission see .
We can enumerate permissions using an elevated CMD or PS session.
We can assign DCSync rights manually or automatically using or DCSync.py
.
The manual way is explained .
Once the rights have been assigned, we can perform the attack with .
Finally, we can crack the hash using on our attacking machine.
We can also perform the attack with or 's secretsdump
script.
For an example of a DCSync attack using DCSync.py
and secretsdump.py
see . For an example of a DCSync attack using NetExec see .
Finally, we can crack the hash using on our attacking machine.