Home  /  Education  /  Interactive Lab
Active Directory Advanced Interactive Lab

Interactive Lab: Perform a DCSync Attack

This is a hands-on lab. You have compromised credentials for svc-replication — an account that, through a misconfiguration, holds domain replication rights. Your goal: extract the domain's password hashes, including the all-important krbtgt account. Type the commands in the terminal below. The lab guides you step by step.

⚠ This is a fully simulated environment running in your browser. No real systems are involved. The commands and output mirror a real engagement against an authorised lab domain. Using these techniques on systems you do not own or have written permission to test is illegal.

kali@attacker: ~/engagement
┌──(kali㉿attacker)-[~/engagement]
└─$

Mission Progress

0 of 5 steps complete

Attack Steps

1
Enumerate accounts with replication rights
2
Verify your foothold account's privileges
3
DCSync a single target (Administrator)
4
Extract the krbtgt hash
5
Dump the full domain

Need a hand?

✓ Lab complete — you performed a full DCSync

You extracted every credential in the domain, including the krbtgt hash — which is enough to forge a Golden Ticket and own the domain indefinitely. This is why DCSync is treated as a full-domain-compromise event.

Now read how defenders catch exactly what you just did: DCSync: Detection & Defense →

What just happened

DCSync abuses the MS-DRSR (Directory Replication Service Remote) protocol — the same mechanism Domain Controllers use to replicate directory data to each other. Instead of attacking a DC directly, the attack impersonates a DC and asks a real one to replicate account secrets. Because it uses a legitimate protocol and runs no code on the DC, it is far stealthier than dumping the NTDS.dit database directly.

Why it worked here

The svc-replication account should never have held the DS-Replication-Get-Changes and DS-Replication-Get-Changes-All extended rights. Those rights are meant only for Domain Controllers and Domain/Enterprise Admins. A delegation misconfiguration gave an ordinary service account a direct path to every credential in the domain.

Detection & Defense

Understanding the attack is how you stop it:

  • Detect it: A DCSync generates Windows Event ID 4662 on the DC with the replication GUIDs requested. Alert whenever the requesting account is not a Domain Controller — that is almost always malicious.
  • Audit rights: Regularly enumerate every principal holding DS-Replication-Get-Changes-All. Remove it from anything that isn't a DC or a tiered admin.
  • Tier your admins: DCSync needs privileged rights first. A clean tiering model denies attackers the foothold.
  • If compromised: Rotate the krbtgt password twice to invalidate any forged Golden Tickets.

Mapped to MITRE ATT&CK: T1003.006 — OS Credential Dumping: DCSync.

← Back to Education