DCSync and Domain Takeover
DCSync abuses Active Directory replication rights to pull password hashes for any domain account directly from a domain controller — without logging on to the DC or running code on it. With the krbtgt hash you can forge Golden Tickets. With the Administrator hash you have persistent access regardless of password changes. This is the end goal of most AD engagements.
Prerequisites
DCSync requires one of the following on the domain object:
Membership in Domain Admins, Enterprise Admins, or Domain Controllers groups
DS-Replication-Get-Changes and DS-Replication-Get-Changes-All rights explicitly granted
WriteDACL on the domain object to grant yourself these rights — see ACL Abuse Privilege Escalation
Grant DCSync rights with BloodyAD
If you have WriteDACL on the domain object, use BloodyAD to grant replication rights to your controlled account before running secretsdump.
[+] User jsmith now has DS-Replication-Get-Changes-All on the domain
Perform DCSync
Administrator:500:aad3b435b51404eeaad3b435b51404ee:fc525c9683e8fe067095ba2ddc971889::: krbtgt:502:aad3b435b51404eeaad3b435b51404ee:7b5b518b1c33d1b22c3d0b70e76a6f90::: svc-backup:1103:aad3b435b51404eeaad3b435b51404ee:2b576acbe6bcfda7294d6bd18041b8fe:::
Using the dumped hashes
The four most important hashes from a DCSync are Administrator, krbtgt, and any service accounts with high privileges. Each enables a different follow-on technique.
Get domain SID
The domain SID is needed for Golden Ticket creation. Pull it from the DCSync output or query it directly.
Domain SID: S-1-5-21-3623811015-3361044348-30300820
Cleanup — remove DCSync rights
Always remove granted replication rights after the engagement. Leaving them in place creates a persistent backdoor that is detectable by defenders and out of scope for most engagements.
With domain hashes in hand the next steps are lateral movement and persistence. For using hashes across the network see Pass-the-Hash and Pass-the-Ticket. For maintaining access beyond the engagement see Golden and Silver Ticket Persistence.
References
-
BloodyAD — GitHubgithub.com/CravateRouge/bloodyAD (opens in new tab)
add dcsync, remove dcsync reference
-
Impacket secretsdump and ticketer — GitHubgithub.com/fortra/impacket (opens in new tab)
DCSync execution and Golden Ticket creation
Was this helpful?
Your feedback helps improve this page.