hunt-ad

hunt-ad is a skill for Claude Code, Codex from Encod3d-Sec/TORCH. It costs 54 tokens per session (4,149 once invoked), scanned A, original, MIT.

A guided workflow for finding attack paths in Microsoft Active Directory, the system many Windows organisations use to manage users, computers, and access. It covers checks from initial discovery through gaining broader domain control.

In plain words
What is it for?
Use it to review LDAP, SMB, Kerberos, certificate services, delegation, permissions, and movement between Windows systems during an authorised security assessment.
Why use it?
It gives security testers a structured way to investigate Active Directory while reducing accidental account lockouts and keeping findings consistent. It also points to reference material and a standard format for recording results.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to review LDAP, SMB, Kerberos, certificate services, delegation, permissions, and movement between Windows systems during an authorised security assessment.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/encod3d-sec/torch/hunt-ad
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 Encod3d-Sec/TORCH --skill hunt-ad
Clone the repo
git clone --depth 1 https://github.com/Encod3d-Sec/TORCH

Made for: Claude Code, Codex.

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 hunt-ad

README.md
[![agentmods](https://agentmods.dev/badge/skills/encod3d-sec/torch/hunt-ad.svg)](https://agentmods.dev/skills/encod3d-sec/torch/hunt-ad)
Your own site
<a href="https://agentmods.dev/skills/encod3d-sec/torch/hunt-ad"><img src="https://agentmods.dev/badge/skills/encod3d-sec/torch/hunt-ad.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,149 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high YARA Match · line 13
    YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
    Fix: Remove offensive tool references and exploit code. Legitimate agent skills should not contain penetration testing tools, exploit frameworks, or reconnaissance utilities.
  • medium YARA Match · line 52
    YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
    Fix: Remove offensive tool references and exploit code. Legitimate agent skills should not contain penetration testing tools, exploit frameworks, or reconnaissance utilities.
How audits are shown
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.00054 $0.04149
Opus 5 $0.00027 $0.02074
Sonnet 5 $0.00011 $0.00830
Haiku 4.5 $0.00005 $0.00415

Measured 8d ago against content hash 40599419443b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

hunt-ad scanned grade A 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 8d ago.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

for p in $(curl -s http://<t>/ | grep -oiE 'href="[^"]+\.html?"' | cut -d'"' -f2 | sort -u); do
skills/hunt/hunt-ad/SKILL.md · 142 lines

How it starts

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

Hunt: Active Directory

Assumes hunt-core for the scope gate, two-account rule, confirmation gate, enumeration limits, stop conditions, wiki protocol, FIND output, and Deadends. Do not re-derive any of that here.

Wiki

qmd_query "Active Directory kerberoast AS-REP ADCS ESC delegation DCSync lateral movement BloodHound" via wiki-search MCP

Hub: [[active-directory-moc]] (live index). Primary page: [[active-directory]]. Anchors: [[adcs]] (ESC1-16 matrix, the highest-value escalation edge), [[kerberos-attacks]] (AS-REP/Kerberoast plus the delegation paths). Tool anchor: [[netexec]] (the full nxc map: every protocol, flag, and module, with the spray/lockout, Kerberos, exec-method, and dumping gotchas). Read the LDAP + SMB sections before hand-rolling any AD enumeration; most steps below are one nxc flag.

Attack surface signals

Ports: SMB 445, LDAP 389/636, Kerberos 88, ADWS 9389, WinRM 5985/5986, RPC 135, MSSQL 1433, ADCS web enroll 80/443 (/certsrv). Footholds: null/guest SMB, anonymous LDAP bind, AS-REP-roastable users (no preauth), SMB signing OFF (relay), ms-DS-MachineAccountQuota > 0, pre-Win2000 computers, LAPS readable.

Spray-safe + AD safety gate (READ FIRST)

  • Spray-safe lockout gate - the AD analog of the hunt-core enumeration limits. Read the domain lockout policy BEFORE any spray: nxc smb <dc> -u <user> -p <pass> --pass-pol. Spray at most 1 attempt per account per observation window, and never exceed (lockoutThreshold - 1) attempts per account per window. RoE no_bruteforce / passive_only -> enumerate only, NO spray. Locking real accounts is a client-impacting incident, not a finding.
  • Reuse captured creds first (from loot.md) before researching new ones; default/known creds before any spray (see [[default-credentials]]).
  • Clock skew: sync to DC (ntpdate <dc> or faketime) or Kerberos TGT requests fail with KRB_AP_ERR_SKEW.
  • Stale /etc/hosts realm entry silently breaks Kerberos. A prior box's <realm> -> <old-ip> line makes impacket resolve the KDC to a dead host and hang with [Errno 110] Connection timed out (REALM:88), even though certipy (which forces -dc-ip) worked seconds earlier. When you add the DC to /etc/hosts, REMOVE any existing line for the same realm, and ALWAYS pass -dc-ip <dc> (and -target-ip <dc>) on impacket Kerberos ops so KDC/target resolution never depends on DNS/hosts. Same fix if certipy req throws The NETBIOS connection ... timed out: add -target-ip <dc>.
  • Hash recovered but the account blocks NTLM? ESC1/UnPAC/PKINIT hands you BOTH an NT hash AND a TGT ccache. If PtH returns STATUS_ACCOUNT_RESTRICTION (the account is in Protected Users / NTLM-hardened, common for Administrator), the hash is a red herring - use the ccache: export KRB5CCNAME=<user>.ccache; impacket-smbclient/secretsdump -k -no-pass -dc-ip <dc> <dc-fqdn> reads flags / DCSyncs over Kerberos. See [[adcs]].
  • Never pivot through 192.168.1.x hosts (Ligolo tunnel only for lateral movement).

Read the full file on GitHub · 142 lines

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. 8d ago First seen · 142 lines · 54 tokens per session scan A 40599419443b

Subscribe to this mod's changes

hunt-ad is a skill published in the GitHub repository Encod3d-Sec/TORCH (314 stars, last pushed 6d ago), licensed MIT. It adds 54 tokens to every session and 4,149 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens