# Adcs attacks

> Adcs attacks is an open-source agent skill for security. Walks an agent through AD CS certificate escalation (ESC1-ESC17) using Certipy. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/ADScanPro/Claude-AD/tree/main/skills/adcs-attacks
- **Repository:** https://github.com/adscanpro/claude-ad
- **GitHub stars:** 227
- **License:** MIT
- **Skill name:** adcs-attacks
- **Collection:** https://github.com/ADScanPro/Claude-AD
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-12-02

## About

This skill is a hand-driven reference for attacking Active Directory Certificate Services. It centers on an enumeration pass with Certipy's find command using the vulnerable flag, then points the agent to the ESC class that matches each finding. Each class entry explains what the misconfiguration checks for, gives the Certipy or ntlmrelayx commands used to exploit it, and lists remediation steps.

The material also covers the generic pattern of requesting a certificate and authenticating with it to recover a TGT or NT hash, along with the Windows Event IDs that help defenders detect this activity, such as 4886, 4887, 4768 and 5136. A closing section collects baseline hardening advice for CAs, web enrollment and certificate mapping.

The skill assumes a working Certipy installation and access to a domain user account, and it relies on impacket's ntlmrelayx and a coercion tool for the relay cases. It is written for authorized assessments and includes a reminder to test only CAs the user is permitted to assess.

## When your agent uses it

> Active Directory Certificate Services (AD CS) escalation techniques ESC1 through ESC17, driven by hand with Certipy (ly4k). Use when the target runs a Certificate Authority and you want to find vulnerable certificate templates or CA misconfigurations, request a certificate that impersonates a privileged user, and know the exact certipy command, what each ESC actually checks, the Windows Event IDs that fire, and the remediation. ESC1 and ESC8 are the two you hit most in the field.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ADScanPro/Claude-AD/tree/HEAD/skills/adcs-attacks)
- [License: MIT](https://github.com/ADScanPro/Claude-AD/tree/HEAD/skills/adcs-attacks)

## Features

- **Vulnerable template discovery:** Uses Certipy's find command with the vulnerable flag to surface flawed certificate templates and CA settings.
- **ESC class reference:** Covers ESC1 through ESC17 with a check description for each misconfiguration class.
- **Certificate impersonation commands:** Provides certipy req and auth commands for requesting a certificate as a privileged user and recovering a TGT.
- **NTLM relay to CA:** Shows how to set up ntlmrelayx against web enrollment or the RPC interface to obtain a certificate.
- **Detection and remediation notes:** Lists relevant Windows Event IDs and hardening steps for each class of AD CS weakness.

## Good for

- Find vulnerable certificate templates on a domain's Certificate Authority
- Check whether web enrollment on a CA is open to NTLM relay
- Request a certificate that authenticates as a domain administrator in a lab
- Look up the remediation steps for a specific ESC finding
- Identify Windows Event IDs to monitor for certificate abuse

## Install

### Claude Code

This skill ships in the `claude-ad` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ADScanPro/Claude-AD
/plugin install claude-ad@claude-ad
```

Or copy only this skill to `~/.claude/skills/adcs-attacks`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ADScanPro/Claude-AD.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/adcs-attacks &&
cp -R "$tmp/skills/adcs-attacks" ~/.claude/skills/adcs-attacks &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/adcs-attacks` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/adcs-attacks` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ADScanPro/Claude-AD.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/adcs-attacks &&
cp -R "$tmp/skills/adcs-attacks" ~/.agents/skills/adcs-attacks &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/adcs-attacks` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/adcs-attacks` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ADScanPro/Claude-AD.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/adcs-attacks &&
cp -R "$tmp/skills/adcs-attacks" ~/.cursor/skills/adcs-attacks &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/adcs-attacks` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ADScanPro/Claude-AD.git --path skills/adcs-attacks
```

Or copy the folder to `~/.gemini/skills/adcs-attacks` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/adcs-attacks`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ADScanPro/Claude-AD.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/adcs-attacks &&
cp -R "$tmp/skills/adcs-attacks" ~/.copilot/skills/adcs-attacks &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/adcs-attacks` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ADScanPro/Claude-AD.git
```

Then copy `Claude-AD/skills/adcs-attacks` into your agent's skills folder as `adcs-attacks`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

It assumes Certipy is installed and that you have a domain user account and the DC's IP address. Relay scenarios also use impacket's ntlmrelayx and a coercion tool such as PetitPotam or Coercer.

### Which ESC classes are most common?

The skill names ESC1 (enrollee-supplied SAN) and ESC8 (NTLM relay to web enrollment) as the two most frequently hit in the field.

### Does Adcs attacks change anything on the CA or domain?

The skill describes commands that modify templates, CA settings and user UPNs during exploitation, and some steps restore the original values afterward. It also documents remediation commands for administrators.

### Does Adcs attacks cover cloud certificate flows?

ESC17 is included as a brief entry covering hybrid AD CS-to-cloud issuance, with Certipy's find reporting it when present.

### How do I install Adcs attacks in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/adcs-attacks to use it in all your projects, or to .claude/skills/adcs-attacks in one project. Or install the claude-ad plugin, which includes it: /plugin marketplace add ADScanPro/Claude-AD, then /plugin install claude-ad@claude-ad.

### Does Adcs attacks run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Adcs attacks?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Adcs attacks?

The closest alternatives to Adcs attacks are System, Ad environment constraints, Acl abuse, Coercion ntlm relay and Kerberos attacks.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [System](https://ai-powered.com/skills/system): System is an open-source agent skill for security.
- [Ad environment constraints](https://ai-powered.com/skills/ad-environment-constraints): Ad environment constraints is an open-source agent skill for security.
- [Acl abuse](https://ai-powered.com/skills/acl-abuse): Acl abuse is an open-source agent skill for security.
- [Coercion ntlm relay](https://ai-powered.com/skills/coercion-ntlm-relay): Coercion ntlm relay is an open-source agent skill for security.
- [Kerberos attacks](https://ai-powered.com/skills/kerberos-attacks): Kerberos attacks is an open-source agent skill for security.
- [Ad opsec telemetry](https://ai-powered.com/skills/ad-opsec-telemetry): Ad opsec telemetry is an open-source agent skill for security.
- [Compliance mapping](https://ai-powered.com/skills/compliance-mapping): Compliance mapping is an open-source agent skill for security.
- [Ad methodology](https://ai-powered.com/skills/ad-methodology): Ad methodology is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/adcs-attacks
