Prerequisites
- Target system, dependencies and environment configured.
Usage
Purpose
Once an attacker has enough rights, they stop guessing passwords and start stealing them wholesale. DCSync pulls password hashes straight from a domain controller by pretending to be one; LSASS dumping pulls credentials out of memory on any host. Either yields hashes an attacker can crack or pass. This skill covers the techniques (from the tester's side), and — the important half — how to prevent and detect them.
When to use it
Late-stage internal engagements, after you've obtained the necessary rights (via BloodHound-identified paths, relay, or local admin). It demonstrates the impact of a compromise and validates whether the org can detect credential theft.
Authorised engagements only, and handle any recovered hashes as sensitive data under the rules of engagement.
Procedure
- DCSync — pull hashes from the DC. It requires replication rights (
GetChanges/GetChangesAll), which BloodHound flags. With them, request the directory's secrets remotely, no code on the DC:secretsdump.py domain/user:pass@dc-ip
# or targeted, from a Windows foothold:
mimikatz # lsadump::dcsync /domain:corp.local /user:krbtgt
Pulling the krbtgt hash is the worst case — it enables Golden Tickets (domain persistence).
- LSASS dumping — credentials from host memory. On a host where you're admin, LSASS holds credentials of logged-on users. Dump and parse it offline to avoid touching it live with known tools:
# acquire the dump (many methods); then parse offline:
mimikatz # sekurlsa::minidump lsass.dmp
mimikatz # sekurlsa::logonpasswords
- Cached and stored secrets. Pull local SAM, cached domain credentials, and LSA secrets from a host:
secretsdump.py -sam sam.hive -system system.hive LOCAL
- Assess reach. Which accounts did you recover, and what do they unlock? A dumped Domain Admin or krbtgt is domain-wide; a local admin hash may enable lateral movement via pass-the-hash.
- Report the exact accounts, method, and what each enables — that drives the remediation priority (rotate krbtgt twice, reset exposed accounts, close the rights that allowed DCSync).
Cheatsheet
secretsdump.py corp.local/user:pass@10.0.0.1 # remote, all hashes
mimikatz: lsadump::dcsync /user:krbtgt # targeted
mimikatz: sekurlsa::minidump lsass.dmp; sekurlsa::logonpasswords
secretsdump.py -sam sam -system system LOCAL
reg save HKLM\SAM sam & reg save HKLM\SYSTEM system
BloodHound query: "Find Principals with DCSync Rights"
Reading the output
- krbtgt hash recovered = worst case; it enables Golden Tickets and long-term domain persistence. Rotate it (twice) as top priority.
- Domain Admin / privileged hashes = domain-wide compromise; every recovered privileged account is a full reset.
- Local admin hash reused across hosts = pass-the-hash lateral movement; a shared local admin password turns one host into many.
- DCSync succeeding at all = some non-DC principal holds replication rights it shouldn't — that misconfiguration is the root cause to fix.
- Cleartext creds in LSASS (older/misconfigured hosts, WDigest) = immediate password exposure; a sign protections aren't in place.
The fix
- Restrict replication rights (
GetChanges/GetChangesAll) to actual domain controllers — removing them from stray accounts kills the DCSync path.
- Protect LSASS: enable Credential Guard and LSA Protection (RunAsPPL), disable WDigest (no cleartext in memory), and keep local admin off the box where possible.
- Unique local admin passwords via LAPS so one dumped hash doesn't unlock the fleet; this breaks pass-the-hash lateral movement.
- Tier administration so privileged credentials never sit in memory on low-trust hosts (the credential-theft chain BloodHound visualises).
- Detect it: alert on DCSync-like replication requests from non-DC IPs (directory replication events), on LSASS access by unusual processes, and on krbtgt usage anomalies. Feed these to detection engineering.
- After any suspected compromise, rotate krbtgt twice and reset exposed accounts.
Pitfalls
- Parsing LSASS live with a flagged tool. EDR catches known credential-dumpers touching LSASS; acquire the dump and parse offline where the engagement allows, and expect detection to fire (which is the point on a defensive test).
- Forgetting DCSync leaves a trace. It generates replication events from a non-DC source — a strong detection opportunity often left unmonitored.
- Fixing dumped accounts but not the rights. Reset the exposed passwords and remove the replication rights that allowed DCSync, or it recurs.
- Ignoring krbtgt. Reset exposed users but leave krbtgt, and Golden Ticket persistence survives the cleanup.
References
- MITRE ATT&CK — T1003 (OS Credential Dumping), T1003.006 (DCSync)
- Microsoft — Credential Guard, LSA Protection, LAPS documentation
- Impacket secretsdump and mimikatz documentation
Inputs
- Relevant source code, logs, network traces, or system specifications.
Outputs
- Analysis findings, security audit report, or generated code artifacts.
1---2name: dcsync-and-credential-dumping3description: Use when demonstrating how domain and host credentials get harvested — DCSync, LSASS dumping, and cached secrets — and the controls and detections that stop it.4---5678## Prerequisites9- Target system, dependencies and environment configured.1011## Usage12### Purpose1314Once an attacker has enough rights, they stop guessing passwords and start stealing them wholesale. DCSync pulls password hashes straight from a domain controller by pretending to be one; LSASS dumping pulls credentials out of memory on any host. Either yields hashes an attacker can crack or pass. This skill covers the techniques (from the tester's side), and — the important half — how to prevent and detect them.1516### When to use it1718Late-stage internal engagements, after you've obtained the necessary rights (via BloodHound-identified paths, relay, or local admin). It demonstrates the impact of a compromise and validates whether the org can detect credential theft.1920Authorised engagements only, and handle any recovered hashes as sensitive data under the rules of engagement.2122### Procedure23241. **DCSync — pull hashes from the DC.** It requires replication rights (`GetChanges`/`GetChangesAll`), which BloodHound flags. With them, request the directory's secrets remotely, no code on the DC:25 ```26 secretsdump.py domain/user:pass@dc-ip27 # or targeted, from a Windows foothold:28 mimikatz # lsadump::dcsync /domain:corp.local /user:krbtgt29 ```30 Pulling the **krbtgt** hash is the worst case — it enables Golden Tickets (domain persistence).312. **LSASS dumping — credentials from host memory.** On a host where you're admin, LSASS holds credentials of logged-on users. Dump and parse it offline to avoid touching it live with known tools:32 ```33 # acquire the dump (many methods); then parse offline:34 mimikatz # sekurlsa::minidump lsass.dmp35 mimikatz # sekurlsa::logonpasswords36 ```373. **Cached and stored secrets.** Pull local SAM, cached domain credentials, and LSA secrets from a host:38 ```39 secretsdump.py -sam sam.hive -system system.hive LOCAL40 ```414. **Assess reach.** Which accounts did you recover, and what do they unlock? A dumped Domain Admin or krbtgt is domain-wide; a local admin hash may enable lateral movement via pass-the-hash.425. Report the exact accounts, method, and what each enables — that drives the remediation priority (rotate krbtgt twice, reset exposed accounts, close the rights that allowed DCSync).4344### Cheatsheet4546```bash47secretsdump.py corp.local/user:pass@10.0.0.1 # remote, all hashes48mimikatz: lsadump::dcsync /user:krbtgt # targeted4950mimikatz: sekurlsa::minidump lsass.dmp; sekurlsa::logonpasswords5152secretsdump.py -sam sam -system system LOCAL53reg save HKLM\SAM sam & reg save HKLM\SYSTEM system5455BloodHound query: "Find Principals with DCSync Rights"56```5758### Reading the output5960- **krbtgt hash recovered** = worst case; it enables Golden Tickets and long-term domain persistence. Rotate it (twice) as top priority.61- **Domain Admin / privileged hashes** = domain-wide compromise; every recovered privileged account is a full reset.62- **Local admin hash reused across hosts** = pass-the-hash lateral movement; a shared local admin password turns one host into many.63- **DCSync succeeding at all** = some non-DC principal holds replication rights it shouldn't — that misconfiguration is the root cause to fix.64- **Cleartext creds in LSASS** (older/misconfigured hosts, WDigest) = immediate password exposure; a sign protections aren't in place.6566### The fix6768- **Restrict replication rights** (`GetChanges`/`GetChangesAll`) to actual domain controllers — removing them from stray accounts kills the DCSync path.69- **Protect LSASS**: enable **Credential Guard** and **LSA Protection (RunAsPPL)**, disable **WDigest** (no cleartext in memory), and keep local admin off the box where possible.70- **Unique local admin passwords** via LAPS so one dumped hash doesn't unlock the fleet; this breaks pass-the-hash lateral movement.71- **Tier administration** so privileged credentials never sit in memory on low-trust hosts (the credential-theft chain BloodHound visualises).72- **Detect it**: alert on DCSync-like replication requests from non-DC IPs (directory replication events), on LSASS access by unusual processes, and on krbtgt usage anomalies. Feed these to detection engineering.73- After any suspected compromise, **rotate krbtgt twice** and reset exposed accounts.7475### Pitfalls7677- **Parsing LSASS live with a flagged tool.** EDR catches known credential-dumpers touching LSASS; acquire the dump and parse offline where the engagement allows, and expect detection to fire (which is the point on a defensive test).78- **Forgetting DCSync leaves a trace.** It generates replication events from a non-DC source — a strong detection opportunity often left unmonitored.79- **Fixing dumped accounts but not the rights.** Reset the exposed passwords *and* remove the replication rights that allowed DCSync, or it recurs.80- **Ignoring krbtgt.** Reset exposed users but leave krbtgt, and Golden Ticket persistence survives the cleanup.8182### References8384- MITRE ATT&CK — T1003 (OS Credential Dumping), T1003.006 (DCSync)85- Microsoft — Credential Guard, LSA Protection, LAPS documentation86- Impacket secretsdump and mimikatz documentation8788## Inputs89- Relevant source code, logs, network traces, or system specifications.9091## Outputs92- Analysis findings, security audit report, or generated code artifacts.