Skip to content

Guide · Agent skill

How to use the Abusing Shadow Credentials for Privesc agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

This is an agent skill, a folder of instructions and helper files that an AI coding agent loads when a request matches its description. The abusing-shadow-credentials-for-privesc skill teaches an agent the Shadow Credentials attack against Active Directory accounts, which is useful for authorized penetration testers, red-team operators and students in a lab. After this guide you will know how to install the skill, how to phrase requests that trigger it, what it needs, and where its limits and safety constraints are.

Abusing Shadow Credentials for Privescmukul975/Anthropic-Cybersecurity-Skills · Apache-2.0

Quick start

  1. 1Download and unzip the skill. Download the ZIP from the directory page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills in the Claude apps.
  2. 2Install the tooling. Install Python 3.8 or later, certipy-ad with pipx, and clone pyWhisker and PKINITtools. Add NetExec if you need pass-the-hash.
  3. 3Confirm your scope. Check that you have written authorization and that your controlled account has write access to the target's msDS-KeyCredentialLink.
  4. 4Ask in plain language. Describe the BloodHound finding, the target, and your authorization in a request that matches the skill's description.
  5. 5Review the workflow. Let the agent confirm the write primitive and list existing Key Credentials before adding anything.
  6. 6Recover and use the hash. Obtain the TGT via PKINIT, recover the NT hash, and use it within the engagement scope.
  7. 7Clean up. Remove the injected Key Credential by device ID or with certipy shadow clear, then document the ACL path.

What the skill makes the agent do

The skill covers the Shadow Credentials technique. It writes an attacker-controlled public key into the msDS-KeyCredentialLink attribute of a target user or computer object, which requires write permission over that object such as GenericWrite, GenericAll or AddKeyCredentialLink as shown in BloodHound. The agent then requests a TGT for the target via PKINIT with the matching key and recovers the target's NT hash without resetting the password.

The skill's workflow has eight steps: confirm the write primitive, add a Shadow Credential with pyWhisker, request a TGT via PKINIT, recover the NT hash, use Certipy's shadow auto as a one-shot alternative, use the recovered credential with NetExec, optionally chain a computer takeover into RBCD, and clean up the injected key. It also includes a Python wrapper script, scripts/agent.py, that runs Certipy and parses its output.

Install the skill

Download the ZIP for this skill from the directory page and unzip it. For a personal install, place the folder in ~/.claude/skills/. For a single project, place it in that project's .claude/skills/ folder. In the Claude apps, you can instead upload the ZIP under Settings → Capabilities → Skills.

The skill folder should contain SKILL.md, scripts/agent.py, and references/api-reference.md and references/standards.md. Keep the folder structure intact so the agent can find the reference files.

Install the attack tooling the skill expects

The skill's setup section lists the tools it relies on. Install them on a Linux attack host with Python 3.8 or later. The source gives these commands for pyWhisker, Certipy and PKINITtools:

  • pyWhisker is cloned from ShutdownRepo and installed with pip from its folder
  • Certipy is installed with pipx as certipy-ad
  • PKINITtools is cloned from dirkjanm
  • NetExec (nxc) is needed for the pass-the-hash steps
pipx install certipy-ad

How to trigger the skill with natural requests

You do not need to type the skill name. Describe the situation in plain terms that match the skill's description. Useful triggers include BloodHound showing GenericWrite, GenericAll or AddKeyCredentialLink over a target, a wish to take over an account without a password reset, or a request to recover an NT hash through PKINIT during an authorized engagement.

Include the scope and what you already have, such as the domain, a controlled account, and the target name. The skill is written for an authorized engagement, so say so in the request.

  • Example: "BloodHound shows my controlled user has GenericWrite over svc-backup. We have written authorization. Walk me through a Shadow Credentials takeover."
  • Example: "Check whether I can write msDS-KeyCredentialLink on WS01$ and, if so, recover its NT hash with Certipy."
  • Example: "Use the abusing-shadow-credentials-for-privesc skill to clean up the Key Credential I added to the victim account."

What you need before you start

The source lists these requirements. You need Python 3.8 or later, pipx with certipy-ad, pyWhisker, PKINITtools, and NetExec. The domain needs a Domain Controller running Windows Server 2016 or later with PKINIT support. You also need valid credentials for an account that has write access to the target's msDS-KeyCredentialLink, and network reach to LDAP (389 or 636) and Kerberos (88) on a DC.

Safety notes: scripts and network access

The skill runs scripts and uses the network. scripts/agent.py runs Certipy and parses its output, and the workflow sends LDAP and Kerberos traffic to a domain controller. Read the script before running it, and run it only against systems in your written scope.

The skill itself says that Shadow Credentials grant full takeover of the targeted account and that unauthorized access is a crime. The skill is an offensive playbook, not a defensive guide, so it does not give hardening or detection steps. Its cleanup step removes the key you added, which reduces footprint but does not replace reporting.

Tips for better results

Give the agent BloodHound findings first, since the skill is triggered by the ACL path and confirms write access in step one. Ask for the Key Credential list before the add step so you can confirm the primitive. Record the device ID printed during the add, because the remove step needs it. For computer accounts, Certipy's shadow auto takes the sAMAccountName with a trailing $.

What people use it for

  • Confirming whether a controlled account can write msDS-KeyCredentialLink on a target during a red-team engagement
  • Taking over a computer account with Certipy's shadow auto for a scoped test
  • Recovering an NT hash for pass-the-hash testing with NetExec in an authorized lab
  • Generating msDS-KeyCredentialLink modification telemetry for a purple-team exercise
  • Learning how PKINIT and key trust mapping work in an Active Directory lab

Frequently asked questions

Is the abusing-shadow-credentials-for-privesc skill free?

The skill is published under the Apache-2.0 licence, as listed on its page. Check the licence file in the skill folder for the full terms. The tools it uses, such as pyWhisker, Certipy and PKINITtools, are separate projects with their own sources linked from the skill.

What do I need to run this skill?

You need Python 3.8 or later, certipy-ad installed with pipx, pyWhisker, PKINITtools, and NetExec for pass-the-hash steps. The domain needs a Domain Controller running Windows Server 2016 or later with PKINIT support, plus valid credentials for an account with write access to the target's msDS-KeyCredentialLink.

How do I install the skill in Claude?

Download the ZIP from the directory page and unzip it into ~/.claude/skills/ for personal use or a project's .claude/skills/ folder for one project. In the Claude apps, upload the ZIP under Settings → Capabilities → Skills.

What is the difference between pyWhisker and Certipy here?

pyWhisker manipulates msDS-KeyCredentialLink over LDAP and lets you run each step yourself, including the PKINIT request with PKINITtools. Certipy's shadow auto runs add, PKINIT, hash dump and cleanup in one command, which the skill describes as ideal for computer-account takeover.

Can I use this skill to defend my Active Directory?

No. The skill is an offensive security playbook and focuses on exploitation rather than hardening or detection. For remediation, use the ACL path it helps you document and review permissions on the affected objects with your own security process.

Does the skill run commands on my machine?

Yes. The skill includes scripts/agent.py, which runs Certipy and parses its output, and it uses the network to reach LDAP, Kerberos and the domain controller. Review the script before use and only target systems covered by your written authorization.

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-team operators, purple-team staff generating detection telemetry, and students working in a lab who already know BloodHound, Kerberos and NT hashes. It is a poor fit for defenders seeking remediation, for anyone without written authorization, and for beginners without Active Directory and Linux attack tooling experience.

Download the skill