Guide · Agent skill
How to use the DCSync Domain Persistence agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
This guide explains the DCSync Domain Persistence agent skill, a playbook that lets an AI agent walk through a DCSync attack against Active Directory, from finding accounts with replication rights to forging Golden Tickets. It is written for authorized penetration testers, red teams, blue teams validating detections, and students. After reading it you will know how to install the skill, how to ask for it in plain language, what it needs to run, and which safety limits apply.
Quick start
- 1Download and unzip. Download the skill ZIP from this page and unzip it into ~/.claude/skills/ for personal use or into .claude/skills/ in a project folder.
- 2Or upload in the Claude apps. In the Claude apps, open Settings, go to Capabilities and upload the skill under Skills.
- 3Install Python requirements. Make sure Python 3.8 or later is installed, then run pip install ldap3. Install the Impacket tools you plan to use.
- 4Confirm authorization and scope. Confirm you have written permission for the target domain and that the work is in a lab or contracted scope with a rollback plan.
- 5Ask in plain language. Describe the goal, such as enumerating replication rights or validating detections, and include your domain and DC details.
- 6Review results and clean up. Check the output against the report template and remove any backdoor accounts or ACL changes made during testing.
What the skill makes the agent do
DCSync abuses the Microsoft Directory Replication Service Remote Protocol (MS-DRSR) to impersonate a Domain Controller and request password data from the target DC. Any principal with the DS-Replication-Get-Changes and DS-Replication-Get-Changes-All rights can replicate hashes for accounts in the domain, including KRBTGT. The skill tells the agent how to perform this in four phases: identify accounts with replication rights, extract credentials, create Golden Tickets, and set up persistence by granting DCSync rights to a controlled account.
- Enumerate principals with replication rights using PowerView, a BloodHound Cypher query, or Impacket's findDelegation.py
- Extract hashes with Mimikatz (Windows) or Impacket's secretsdump.py (Linux)
- Create Golden Tickets with Mimikatz or Impacket's ticketer.py
- Grant DCSync rights to a backdoor account using PowerView or ntlmrelayx.py
- Document results with a report template covering extracted credentials, persistence mechanisms and remediation
How to install the skill
Download the skill ZIP from this page and unzip it. To use it with Claude Code for all your projects, unzip it into ~/.claude/skills/. To limit it to one project, unzip it into that project's .claude/skills/ folder.
To use it in the Claude apps instead, open Settings, go to Capabilities, and upload the skill under Skills.
- Personal install: ~/.claude/skills/
- Project install: .claude/skills/ inside your project folder
- Claude apps: Settings → Capabilities → Skills
How to trigger the skill with natural requests
You do not need to type the skill name. The skill is meant to be used in authorized engagements after you have found principals with replication rights, when you want to establish long-term domain persistence, or when you need to validate detections for replication abuse. Say what you are trying to do, and state that the work is authorized and in a lab or contracted scope.
Requests that match the skill's purpose include the following. Adjust the wording to your engagement.
- In our authorized lab, list which accounts have DS-Replication-Get-Changes-All rights on the domain.
- We have written approval for this test. Walk me through a DCSync extraction of the krbtgt hash and the Golden Ticket steps.
- Help me build a checklist to validate our detections for DRSUAPI replication traffic from non-DC hosts.
- Parse this dumped hash file and summarise the accounts and hash types it contains.
Example: the phases the agent follows
The skill's workflow starts with enumeration. The agent runs PowerView's Get-DomainObjectAcl filtered to replication rights, or a BloodHound query, and checks the default groups that hold DCSync rights: Domain Admins, Enterprise Admins, the Domain Controllers group and SYSTEM on Domain Controllers.
The skill also includes a detection section. It lists Event 4662 with the replication GUIDs, Event 5136 for directory service object changes, DRSUAPI traffic from unusual IPs, and ACL changes on the domain root. Blue teams can use these to test whether their monitoring catches replication abuse.
findDelegation.py domain.local/user:'Password123' -dc-ip 10.10.10.1What you need before running it
The skill lists its requirements in its source. You need Python 3.8 or later and the ldap3 library, installed with pip install ldap3. Impacket tools such as secretsdump.py, ticketer.py, findDelegation.py and ntlmrelayx.py are used. On Windows, Mimikatz and PowerView are needed. BloodHound is used for relationship queries. You also need domain credentials, or a compromised account with replication rights for the target domain.
The package includes scripts/agent.py and scripts/process.py. The source describes these as Python scripts that audit which accounts hold replication rights and parse dumped hash files. Review them before running.
- Python 3.8+
- ldap3 (pip install ldap3)
- Impacket tools: secretsdump.py, ticketer.py, findDelegation.py, ntlmrelayx.py
- Mimikatz and PowerView (Windows)
- BloodHound
- Domain credentials or a compromised account with replication rights
pip install ldap3Safety notes: scripts and network access
This skill runs scripts and uses the network. The steps dump real domain credentials, forge tickets and can create persistent backdoors. Granting replication rights or forging tickets can leave lasting changes to the domain. Use it only against systems you own or have written permission to test, and only in a lab or contracted engagement with a rollback plan.
The source's remediation guidance includes a double KRBTGT password reset with a 10-hour gap, auditing accounts with replication rights, enabling Event 4662 logging for replication GUIDs, and deploying DRSUAPI traffic monitoring.
- Get written authorization before any test
- Run only in a lab or contracted scope with a rollback plan
- Review scripts/agent.py and scripts/process.py before execution
- Record every credential extracted and every rights change made
- Clean up backdoor accounts and ACL changes after the engagement
Tips for getting better results
Start with enumeration before any extraction. Knowing exactly which accounts hold replication rights tells you what is possible and what to report. Give the agent your domain name, DC address and the account you are testing from, so it uses the right commands.
Use the included report template to organise findings. It has tables for the domain, extracted credentials, persistence mechanisms and remediation actions.
- Name the domain and DC in your request so commands are filled in correctly
- Ask for detection checks alongside each attack step to validate your monitoring
- Use the template in assets/template.md to record results
What people use it for
- Enumerate which accounts hold replication rights in a lab domain during a red team engagement
- Walk through a DCSync extraction and Golden Ticket test in a contracted penetration test
- Build detection tests that check whether Event 4662 and DRSUAPI traffic monitoring fire as expected
- Parse a previously dumped hash file to summarise accounts and hash types for a report
Frequently asked questions
Is the DCSync Domain Persistence skill free to use?
The skill is published under the Apache-2.0 licence, as listed on this page. Check the licence file in the download for the full terms before you use or redistribute it.
How do I install an agent skill like this one?
Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project. In the Claude apps, you can instead upload it under Settings → Capabilities → Skills.
What do I need to run the DCSync skill?
You need Python 3.8 or later, the ldap3 library, Impacket tools such as secretsdump.py and ticketer.py, Mimikatz and PowerView on Windows, and BloodHound for relationship queries. You also need domain credentials or a compromised account with replication rights in the target domain.
Can I use this skill without authorization?
No. The skill dumps real domain credentials and can create persistent backdoors. The source states that unauthorized use against systems you do not own or have permission to test is illegal.
Is there an alternative for defenders who only want to check for DCSync risk?
Yes. The skill's own remediation list includes auditing accounts with replication rights and enabling Event 4662 logging for the replication GUIDs. The skill itself focuses on attack execution rather than defence, so those checks are better handled with a dedicated hardening or detection approach.
Why does the agent fail or produce incomplete commands?
The commands contain placeholders such as domain.local, DC01 and the Domain SID. Give the agent your real domain name, DC hostname, IP address and SID, and confirm your tools are installed. Missing Impacket or Mimikatz installs are a common cause of failure.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits authorized penetration testers, red teams and blue teams validating detections for replication abuse, as well as students learning how AD replication rights can be abused. It is not suitable for anyone without written authorization, for general Active Directory hardening, or for production domains without a rollback plan.
Download the skill