Skip to content
Skill

Coercion ntlm relay

Guides an agent through coercing machine-account auth and relaying it with ntlmrelayx

Coercion ntlm relay is an open-source agent skill for security. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
227
Last commit
License
MIT
Listing updated

Similar skills

About Coercion ntlm relay

This skill documents an Active Directory attack chain that pairs authentication coercion (PetitPotam, PrinterBug and DFSCoerce, run through Coercer or standalone scripts) with NTLM relay via impacket's ntlmrelayx. It lays out the conditions a relay target must meet, namely unenforced SMB or LDAP signing, missing LDAP channel binding, or an AD CS web enrollment endpoint without EPA, and it shows how to check those with netexec before starting.

The workflow is ordered: confirm an unprotected relay target, start the relay toward LDAP, AD CS (ESC8) or SMB, then coerce a privileged machine account to authenticate to the relay. Each relay outcome is followed to its next step, such as RBCD via S4U, a certificate turned into a TGT with PKINIT, or an SMB action. The skill also covers Windows event IDs to watch for and hardening steps defenders can apply.

The operator needs Coercer, impacket and netexec, plus network access to the target segment and explicit authorization to test it. The material is written for offensive security testing and red team work.

When your agent uses it

Authentication coercion (PetitPotam MS-EFSR, PrinterBug MS-RPRN, DFSCoerce MS-DFSNM) chained into NTLM relay (impacket ntlmrelayx) toward LDAP, AD CS web enrollment (ESC8), or SMB. Use when SMB signing is not enforced or LDAP channel binding is missing, and you want to force a privileged machine account to authenticate to your relay and turn that into RBCD, a DCSync-capable ACL grant, or a certificate. Includes the exact Coercer/ntlmrelayx commands, requirements, detection, and remediation.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (8 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

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

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

Or copy only this skill to ~/.claude/skills/coercion-ntlm-relay:

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

For one project only, put the folder in .claude/skills/coercion-ntlm-relay inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/coercion-ntlm-relay to use it in every repository:

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

For one repository only, put the folder in .agents/skills/coercion-ntlm-relay inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/coercion-ntlm-relay to use it in every project:

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

For one project only, put the folder in .cursor/skills/coercion-ntlm-relay inside it instead.

Cursor docs on skills

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

gemini skills install https://github.com/ADScanPro/Claude-AD.git --path skills/coercion-ntlm-relay

Or copy the folder to ~/.gemini/skills/coercion-ntlm-relay yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/coercion-ntlm-relay:

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

For one project only, put the folder in .github/skills/coercion-ntlm-relay inside it instead.

VS Code docs on skills

Get the folder:

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

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

The SKILL.md format

What it does

Coercion method reference
Covers PetitPotam (MS-EFSR), PrinterBug (MS-RPRN) and DFSCoerce (MS-DFSNM) with Coercer and standalone command lines.
Relay target validation
Shows how to list hosts without SMB signing and check LDAP signing and channel binding state before relaying.
ntlmrelayx attack modes
Describes relay options for LDAP delegation, AD CS certificate enrollment and SMB command or secrets extraction.
Chain follow-through
Links relay results to follow-on steps such as S4U, PKINIT and certificate authentication.
Detection event guidance
Lists Windows event IDs and Defender for Identity alerts relevant to machine-account NTLM logons and coercion calls.
Remediation checklist
Summarizes hardening measures such as enforced signing, EPA on AD CS, disabling Print Spooler and restricting NTLM.

Good for

  • Check which hosts on a subnet lack SMB signing before planning a relay test
  • Set up ntlmrelayx to delegate access on a domain controller over LDAPS
  • Relay a coerced domain controller machine account to AD CS web enrollment for a certificate
  • Write up detection and remediation steps for NTLM relay exposure in an AD assessment

Coercion ntlm relay FAQ

What needs to be true before this chain works?

The relay target must lack protection: SMB signing not enforced for SMB relay, LDAP signing not enforced and channel binding absent for LDAP relay, or AD CS web enrollment reachable without EPA for ESC8.

Which tools does the skill use?

It uses Coercer, the standalone PetitPotam, dementor and dfscoerce scripts, impacket's ntlmrelayx and netexec for signing checks.

Does the skill include scripts or bundled files?

No. The folder contains a single SKILL.md with commands and reference links, and no scripts.

What does the skill say about authorization?

It states that coercion and relay should only be run against systems the tester is explicitly authorized to test, because they generate real traffic and can disrupt services.

How do I install Coercion ntlm relay in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/coercion-ntlm-relay to use it in all your projects, or to .claude/skills/coercion-ntlm-relay 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 Coercion ntlm relay 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 Coercion ntlm relay?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Coercion ntlm relay?

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

Where this comes from

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

More from ADScanPro/Claude-AD

  1. Walks Active Directory ACL edges to escalate privileges, with bloodyAD and impacket

    • Open source
    • 227 GitHub stars
    • Security
  2. Active Directory hardening checks that stop auth and LDAP failures looking like bad

    • Open source
    • 227 GitHub stars
    • Security
  3. Sequences the phases of an Active Directory pentest, from setup through reporting

    • Open source
    • 227 GitHub stars
    • Security
  4. Maps the event logs and alerts each Active Directory attack technique leaves behind

    • Open source
    • 227 GitHub stars
    • Security
  5. Walks an agent through AD CS certificate escalation (ESC1-ESC17) using Certipy

    • Open source
    • 227 GitHub stars
    • Security
  6. Orients Active Directory attack findings to ENS, NIS2 and DORA control families

    • Open source
    • 227 GitHub stars
    • Security