ad-postexploitation

ad-postexploitation is a skill for Claude Code from DouglasRao/Claude-Pentest-Skills. It costs 137 tokens per session (5,324 once invoked), scanned C, original, MIT.

A Claude Code skill for work after gaining authorised access to a Windows Active Directory domain. Active Directory is Microsoft’s system for managing users, computers, and permissions across a network.

In plain words
What is it for?
It covers network movement, privilege escalation, credential harvesting, persistence, and situational checks after initial access, using established Windows sessions and security-testing tools.
Why use it?
It provides a structured way to understand the compromised environment and assess how access could spread or become more privileged during a security test.

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 It covers network movement, privilege escalation, credential harvesting, persistence, and situational checks after initial access, using established Windows sessions and security-testing tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/douglasrao/claude-pentest-skills/ad-postexploitation
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-postexploitation
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-postexploitation

README.md
[![agentmods](https://agentmods.dev/badge/skills/douglasrao/claude-pentest-skills/ad-postexploitation/github.svg)](https://agentmods.dev/skills/douglasrao/claude-pentest-skills/ad-postexploitation)
Your own site
<a href="https://agentmods.dev/skills/douglasrao/claude-pentest-skills/ad-postexploitation"><img src="https://agentmods.dev/badge/skills/douglasrao/claude-pentest-skills/ad-postexploitation/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-postexploitation

Your own site · 80×15
<a href="https://agentmods.dev/skills/douglasrao/claude-pentest-skills/ad-postexploitation"><img src="https://agentmods.dev/badge/skills/douglasrao/claude-pentest-skills/ad-postexploitation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 137 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,324 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 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.00137 $0.05324
Opus 5 $0.00068 $0.02662
Sonnet 5 $0.00027 $0.01065
Haiku 4.5 $0.00014 $0.00532

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

Security

Grade C, and why

ad-postexploitation scanned grade C 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 11d 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.

Harvests environment variableshighData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

escalate to Domain Admin, harvest credentials from memory or disk, establish domain persistence,
skills/ad-postexploitation/SKILL.md · 573 lines

How it starts

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

AD Post-Exploitation — Lateral Movement, Escalation & Persistence

Architecture

This skill is largely knowledge-driven. Most commands run on Windows targets via an established shell (evil-winrm, psexec, WMI, RDP). The attack machine (Linux/macOS) handles tooling orchestration with impacket and tunneling utilities.

Context required:
  SHELL_TYPE   = evil-winrm / psexec / wmiexec / RDP / meterpreter
  TARGET_IP    = IP of the compromised host
  DC_IP        = Domain Controller IP
  DOMAIN       = domain FQDN
  USERNAME     = compromised account
  PASSWORD / NTLM_HASH = credentials
  PRIVILEGE    = current privilege level (standard user / local admin / DA)

Initial Setup — Situational Awareness

Run immediately after gaining access:

# Identity
whoami /all

# Domain context
net user %username% /domain
net group "Domain Admins" /domain
net group "Enterprise Admins" /domain

# Network
ipconfig /all
route print
netstat -ano | findstr ESTABLISHED

# AV / EDR
sc query windefend
tasklist | findstr -i "defender\|carbon\|crowdstrike\|sentinel\|cylance\|cbdefense"

# PowerShell execution policy
Get-ExecutionPolicy -List

Create progress tasks with TaskCreate:

"STAGE 1 — Situational Awareness (identity, network, AV)"
"STAGE 2 — Credential Harvesting (LSASS, SAM, LSA secrets)"
"STAGE 3 — Lateral Movement (PTH, PTT, WinRM, PSExec)"
"STAGE 4 — Domain Privilege Escalation"
"STAGE 5 — Domain Persistence"
"STAGE 6 — Data Exfiltration"
"STAGE 7 — Cleanup Checklist"

Evidence Capture — Required at Every Stage

Before every major action, capture a screenshot:

# macOS (attack machine — terminal screenshot)
screencapture -x "$OUT/evidence/stage_$(date +%H%M%S)_$DESCRIPTION.png"

# Linux
scrot "$OUT/evidence/stage_$(date +%H%M%S)_$DESCRIPTION.png"

# BloodHound attack path export
# In BloodHound GUI: right-click path → Export → save as $OUT/evidence/bloodhound_path_to_DA.png

Capture terminal output to file alongside every command:

# Example: wrap evil-winrm session output
script -q -c "evil-winrm -i $TARGET_IP -u $USERNAME -p $PASSWORD" \
  "$OUT/evidence/shell_${TARGET_IP}_$(date +%Y%m%d_%H%M%S).log"

Read the full file on GitHub · 573 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. 11d ago First seen · 573 lines · 137 tokens per session scan C 8a93ceb22f12

Subscribe to this mod's changes

ad-postexploitation is a skill published in the GitHub repository DouglasRao/Claude-Pentest-Skills (11 stars, last pushed 5mo ago), licensed MIT. It adds 137 tokens to every session and 5,324 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it C with 1 finding (harvests environment variables). 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

abusing-dpapi-for-credential-access

Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket's dpapi.py, including domain-wide decryption via the DPAPI backup key. Use during authorized red-team…

mukul975/Anthropic-Cybersecurity-Skills · 97 tokens

conducting-domain-persistence-with-dcsync

Perform DCSync attacks to replicate Active Directory credentials and establish domain persistence by extracting KRBTGT, Domain Admin, and service account hashes for Golden Ticket creation.

26zl/cybersec-toolkit · 42 tokens

conducting-internal-network-penetration-test

Execute an internal network penetration test simulating an insider threat or post-breach attacker to identify lateral movement paths, privilege escalation vectors, and sensitive data exposure within the corporate network.

26zl/cybersec-toolkit · 45 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

abusing-dpapi-for-credential-access

Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket's dpapi.py, including domain-wide decryption via the DPAPI backup key. Use during authorized red-team…

leecyno1/boutique-skills · 97 tokens