ad-recon

ad-recon is a skill for Claude Code from DouglasRao/Claude-Pentest-Skills. It costs 100 tokens per session (3,114 once invoked), scanned B, original, MIT.

A set of scripts for inspecting an Active Directory environment, Microsoft's system for managing users, computers, groups, and permissions on a network. It discovers hosts and enumerates directory information such as users, shares, trusts, and service accounts.

In plain words
What is it for?
Use it to discover domain controllers, list directory objects, inspect network shares and trusts, find service accounts, and collect BloodHound data when the required details and tools are available.
Why use it?
It helps security testers understand the structure and exposed information of a Windows domain before attempting further testing. Checkpoints allow completed phases to be skipped when the work is rerun.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-pentest-skills plugin — 8 skills shipped together

Good fit Use it to discover domain controllers, list directory objects, inspect network shares and trusts, find service accounts, and collect BloodHound data when the required details and tools are available.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/douglasrao/claude-pentest-skills/ad-recon
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add DouglasRao/Claude-Pentest-Skills --skill ad-recon
Clone the repo
git clone --depth 1 https://github.com/DouglasRao/Claude-Pentest-Skills

Made for: Claude Code.

Or install claude-pentest-skills, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ad-recon

README.md
[![agentmods](https://agentmods.dev/badge/skills/douglasrao/claude-pentest-skills/ad-recon/github.svg)](https://agentmods.dev/skills/douglasrao/claude-pentest-skills/ad-recon)
Your own site
<a href="https://agentmods.dev/skills/douglasrao/claude-pentest-skills/ad-recon"><img src="https://agentmods.dev/badge/skills/douglasrao/claude-pentest-skills/ad-recon/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ad-recon

Your own site · 80×15
<a href="https://agentmods.dev/skills/douglasrao/claude-pentest-skills/ad-recon"><img src="https://agentmods.dev/badge/skills/douglasrao/claude-pentest-skills/ad-recon.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,114 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00100 $0.03114
Opus 5 $0.00050 $0.01557
Sonnet 5 $0.00020 $0.00623
Haiku 4.5 $0.00010 $0.00311

Measured 12d ago against content hash 0f4aeac7f9a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

ad-recon scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/ad_enum.sh, scripts/common_ad.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- **Kerberos time skew**: if Kerberos errors occur, sync clock with `sudo ntpdate $DC_IP`
skills/ad-recon/SKILL.md · 310 lines

How it starts

The opening of the file, as written. The whole thing — 310 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AD Recon — Host Discovery & Enumeration Kill Chain

Architecture

scripts/
├── common_ad.sh    # Shared functions (logging, has_tool, phase_done, emit_summary)
└── ad_enum.sh      # PHASES 1-2: host discovery + unauthenticated + authenticated enumeration

Each script:

  • Accepts <DC_IP> <DOMAIN> <OUT> [USERNAME] [PASSWORD_OR_HASH] [--phase=N] as args
  • Uses checkpoints (.phase_X.done) — re-run safely without repeating completed phases
  • Emits a JSON summary via ---AD_SUMMARY_JSON--- markers for Claude to parse
  • Handles missing tools gracefully — skips with warning, never crashes

Initial Setup — Gather Required Information

Before running anything, ensure you have:

DC_IP    = IP of the Domain Controller (e.g., 192.168.1.10)
DOMAIN   = FQDN of the domain (e.g., corp.local)
USERNAME = domain user (optional — Phases 1 and 2 work unauthenticated)
PASSWORD = plaintext password (optional)
NTLM_HASH = LM:NT hash (optional, alternative to password)

If any of these are unknown, ask the user before proceeding.

DC_IP="10.10.10.100"
DOMAIN="corp.local"
USERNAME=""        # leave empty for unauthenticated phases
PASSWORD=""        # leave empty if using hash
NTLM_HASH=""       # format: LM:NT or just :NT

PROJECT=$(echo "$DOMAIN" | sed 's/\./-/g' | tr '[:upper:]' '[:lower:]')
OUT="$(pwd)/$PROJECT"
SCRIPTS="$HOME/.claude/skills/ad-recon/scripts"

mkdir -p "$OUT"/{enum,hashes,bloodhound}

Create progress tasks with TaskCreate:

"PHASE 1 — Host Discovery & Service Scan"
"PHASE 2 — Unauthenticated Enumeration (null sessions, LDAP, kerbrute)"
"PHASE 2auth — Authenticated Enumeration (ldapdomaindump, BloodHound, SPN/AS-REP lists)"
"PHASE 3 — Report & Attack Surface Summary"

Mark each task in_progress when starting, completed when done.


Tool Priority

1. CLI — always first

nmap / rustscan          — host and port discovery
enum4linux-ng            — SMB/LDAP null session enumeration (preferred over enum4linux)
rpcclient                — null session: user/group enumeration
smbclient                — null session: share listing
ldapsearch               — anonymous LDAP bind, base DN discovery
kerbrute                 — user enumeration via Kerberos pre-auth (no account needed)
crackmapexec / netexec   — credential validation, SMB/LDAP/WinRM enumeration
ldapdomaindump           — full LDAP dump (requires valid creds)
bloodhound-python        — AD graph data collection (requires valid creds)
impacket-GetNPUsers      — identify AS-REP roastable accounts
impacket-GetUserSPNs     — identify Kerberoastable SPNs

Read the full file on GitHub · 310 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 310 lines · 100 tokens per session scan B 0f4aeac7f9a5

Subscribe to this mod's changes

ad-recon is a skill published in the GitHub repository DouglasRao/Claude-Pentest-Skills (11 stars, last pushed 5mo ago), licensed MIT. It adds 100 tokens to every session and 3,114 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

deploying-active-directory-honeytokens

Deploys deception-based honeytokens in Active Directory including fake privileged accounts with AdminCount=1, fake SPNs for Kerberoasting detection (honeyroasting), decoy GPOs with cpassword traps, and fake BloodHound paths. Monitors Windows Security Event IDs 4769, 4625, 4662, 5136 for honeytoken interaction. Use…

xalgorix/xalgorix · 101 tokens

deploying-active-directory-honeytokens

Deploys deception-based honeytokens in Active Directory including fake privileged accounts with AdminCount=1, fake SPNs for Kerberoasting detection (honeyroasting), decoy GPOs with cpassword traps, and fake BloodHound paths. Monitors Windows Security Event IDs 4769, 4625, 4662, 5136 for honeytoken interaction. Use…

26zl/cybersec-toolkit · 101 tokens

conducting-internal-reconnaissance-with-bloodhound-ce

Conduct internal Active Directory reconnaissance using BloodHound Community Edition to map attack paths, identify privilege escalation chains, and discover misconfigurations in domain environments.

26zl/cybersec-toolkit · 44 tokens

analyzing-active-directory-acl-abuse

Detect dangerous ACL misconfigurations in Active Directory using ldap3 to identify GenericAll, WriteDACL, and WriteOwner abuse paths.

26zl/cybersec-toolkit · 36 tokens

analyzing-active-directory-acl-abuse

Detect dangerous ACL misconfigurations in Active Directory using ldap3 to identify GenericAll, WriteDACL, and WriteOwner abuse paths.

mukul975/Anthropic-Cybersecurity-Skills · 36 tokens

detecting-api-enumeration-attacks

Detect and prevent API enumeration attacks including BOLA and IDOR exploitation by monitoring sequential identifier access patterns and authorization failures.

xalgorix/xalgorix · 32 tokens