acl-abuse
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner, ForceChangePassword, targeted…
Post-engagement lessons-learned retrospective. Reads the engagement directory, analyzes skill routing decisions, identifies knowledge gaps and missing skills, and produces an actionable improvement report.
$ npx -y skills add blacklanternsecurity/red-run --skill retrospective --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/retrospectiveContext preview
The summary Claude sees to decide when to auto-load this skill.
Post-engagement lessons-learned retrospective. Reads the engagement directory, analyzes skill routing decisions, identifies knowledge gaps and missing skills, and produces an actionable improvement report.
name: retrospective description: > Post-engagement lessons-learned retrospective. Reads the engagement directory, analyzes skill routing decisions, identifies knowledge gaps and missing skills, and produces an actionable improvement report. keywords: - what went wrong - what worked - review the engagement - skill coverage audit - how did the skills perform tools: - search_skills (MCP skill-router) - list_skills (MCP skill-router) opsec: low
You are conducting a post-engagement retrospective for a penetration tester. Your job is to analyze what happened during the engagement, evaluate how the skill library performed, identify gaps, and produce actionable improvement items. All analysis is local — you never touch the target.
mid-engagement review
If `engagement/state.db` is missing, tell the user:
> Cannot run retrospective — engagement/state.db is required. This database is > created by the orchestrator during an engagement.
Check for `./engagement/` directory. If absent, proceed without logging.
When an engagement directory exists:
descriptive filenames (e.g., `sqli-users-dump.txt`, `ssrf-aws-creds.json`).
Read all engagement files:
1. `engagement/scope.md` — targets, objectives, rules of engagement 2. `engagement/state.db` — final engagement state (call `get_state_summary()`) 3. `poll_events(since_id=0)` — full timeline of state changes 4. `get_vulns()` — confirmed vulnerabilities with details
If any file is missing (other than the required two), note it but continue with what's available.
Check for `engagement/evidence/logs/*.jsonl`. These are raw JSONL transcripts captured from subagent executions by the SubagentStop hook. They contain every tool call, tool result, assistant reasoning step, MCP call, and error — ground truth that state_events summaries cannot provide.
If JSONL logs are found, spawn a **general-purpose Task subagent** to parse them:
Task(
subagent_type="general-purpose",
prompt="Parse the subagent JSONL logs in engagement/evidence/logs/. For each
.jsonl file, read it and extract a structured timeline:
- Tool calls: tool name + input (truncate large inputs to 200 chars)
- Tool results: status + truncated output (first 200 chars)
- Assistant reasoning: key decision points and rationale
- MCP calls: server + method + key params
- Errors: any failures, retries, or exceptions
- Target artifacts: flag commands that may have created artifacts on the
target (file writes, user creation, registry changes, scheduled tasks,
services installed, firewall rules modified)
Also extract token-relevant metrics per agent:
- Total number of assistant turns (messages with role 'assistant')
- Number of tool calls and tool results
- Largest tool results by character count (top 3, with tool name + size)
- Number of retries or repeated tool calls (same tool + similar input)
- Whether get_skill() was called (and which skill was loaded)
Return a markdown summary with one section per log file. Section header
format: '## {filename} ({agent-type})'. Include a 'Target Artifacts' subsection
listing any commands that may need cleanup, and a 'Token Metrics' subsection
with the metrics above.",
description="Parse subagent JSONL logs"
)Incorporate the parsed log data into subsequent analysis steps. The logs provide:
called, inline vs routed execution
workarounds visible in the command sequence
decisions, artifact creation on target
If no JSONL logs are found, continue with engagement files only and note that subagent execution traces are unavailable.
Summarize the engagement for the user:
Ask the user if this summary is accurate and whether there's context not captured in the engagement files (e.g., decisions made verbally, time pressure, scope changes mid-engagement).
First, load the full skill inventory: call `list_skills()` to get every available skill with its category and description. This is your reference for what the library covers.
Read the state_events timeline and JSONL logs, then compare each activity against the inventory.
For each activity entry, determine: 1. **Was a skill loaded?** Check for skill name references in activity entries. 2. **Was it the right skill?** Read the skill's SKILL.md at `skills/<category>/<skill-name>/SKILL.md` to check its actual scope and compare against what was done. 3. **Were any skills skipped?** Look for technique execution that should have been routed through a skill (e.g., running sqlmap directly instead of loading sql-injection-union). 4. **Was anything done inline that a skill covers?** Identify commands or techniques executed without loading the corresponding skill.
Build a routing ledger:
| Activity | Skill Used | Correct? | Notes | |----------|-----------|----------|-------| | Web recon | web-discovery | Yes | — | | SQL injection | (inline) | No | Should have routed to sql-injection-union |
Present this ledger to the us
Security assessment toolkit for Claude Code. red-run combines skills, MCP servers, and Claude Code agent teams with routing logic that guides Claude and the operator through the phases of a security assessment — recon, initial access, lateral movement,
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner, ForceChangePassword, targeted…
Enumerates Active Directory domains and maps attack surface for penetration testing.
Establishes persistent access in Active Directory environments after domain compromise. Covers DCShadow (rogue DC attribute modification), Skeleton Key (LSASS…
Exploits ADCS through ACL abuse on templates/CA objects and NTLM relay to enrollment endpoints. Covers ESC4 (template ACL → modify to ESC1), ESC5 (PKI object…
Establishes persistence and exploits weak certificate mapping in AD CS. Covers ESC9 (no security extension), ESC10 (weak certificate mapping), ESC12-15…
Exploits misconfigured AD CS certificate templates to impersonate any domain user via SAN manipulation or enrollment agent abuse. Covers ESC1 (enrollee…