National Cyber Warfare Foundation (NCWF)login

offensive-claude for structured kill-chain engagement workflows in Claude Code


0 user ratings
2026-11-04 09:29:05
milo
Red Team (CNA)
"offensive-claude

A spec-driven configuration and skill framework that turns Claude Code into a disciplined offensive-security assistant, enforcing scope, evidence and OPSEC rules for authorized assessments.








Toolhypnguyen1209/offensive-claude — a spec-driven offensive security skill framework and safety layer for Claude Code engagements
CategoryAI-assisted security workflow / prompt-and-skill framework (Python)
Primary UseRunning structured, quality-gated penetration tests and exploitability research inside Claude Code via /engage.* commands and kill-chain presets
Safe UseIntended exclusively for authorized assessments, in-scope labs, and vulnerability research; TERMS.md and scope_guard.py make authorization an executable precondition, not prose
Telemetry NoteLeaves append-only engagement traces, scope.json artifacts, filled templates and [EVD-XXX] evidence kits; redact_headers.py masks Authorization/Cookie/JWT material, and its discipline skills demand detection/cleanup documentation, so use is highly auditable

Most attempts to bend an LLM coding agent toward offensive security collapse into either vague prompt collections or unstructured chat that produces confident, unevidenced claims. hypnguyen1209/offensive-claude takes a different architectural bet: it is a spec-driven framework for Claude Code, built around the Cyber Kill Chain, that encodes engagement discipline as executable code rather than system-prompt prose. The repository, MIT-licensed and written mostly in Python, ships 32 kill-chain skills, a discipline layer with a SessionStart dispatcher and six process skills, 8 collaborative sub-agents, and a shared 47-file vulnerability reference library. Its lineage is visible in the credits — it borrows spec-driven structure from GitHub's spec-kit, agent orchestration ideas from obra/superpowers, and the crash-to-exploitability and OSS-repo-forensics concepts from gadievron/raptor.


What immediately distinguishes the design is the dispatcher pattern. Installed as a Claude Code plugin, a SessionStart hook injects the using-offensive-claude dispatcher into every conversation, so the skill-invocation discipline — scope, then finding, then OPSEC — is active from the first message rather than depending on the operator remembering to load it. This matters in practice: agent-assisted pentesting fails most often not because the model lacks knowledge but because there is no consistent gate between the model's enthusiasm and the rules of engagement. The dispatcher plus the process skills (scope-discipline, threat-model-discipline, finding-discipline, opsec-discipline, engagement-flow) are the framework's attempt to make that gate structural.


The engagement model is a nine-phase pipeline mapped onto the classic kill chain: SCOPE, RECON, WEAPONIZE, DELIVERY, EXPLOIT, INSTALLATION, C2, ACTIONS ON OBJECTIVES, and REPORT. Each phase is driven by slash commands — /engage.scope defines targets, ROE and authorization; /engage.recon covers subdomain enumeration, port scanning and tech fingerprinting; /engage.exploit executes and documents findings; /engage.report produces both a technical report and an executive summary. Supporting commands like /engage.status, /engage.gate and /engage.pickup expose pipeline state, phase validation, and resumption from an engine trace. Notably, phase 0 is scoping itself — authorization is a first-class pipeline artifact, not a checkbox buried in a template.


Seven workflow presets tune the phase set to the engagement type: web-app for OWASP-focused assessments, network for internal penetration tests, red-team for full adversary simulation, cloud for AWS/Azure/GCP audits, mobile, ad-domain, and bug-bounty. The preset selects which kill-chain phases are active, which is a sensible compression — a bug bounty workflow (phases 0, 1, 4, 8) skips delivery, persistence and C2 entirely, matching how bounty work actually proceeds. This preset system also gives defenders a useful mental model: the framework's own authors implicitly acknowledge that different engagement classes carry very different operational footprints.


The safety layer is where the README spends most of its energy, and rightly so, because the claim is that controls are executable and test-covered rather than aspirational. scope_guard.py parses and enforces the machine-readable scope.json ROE — including HTTP-client-compatible host parsing with userinfo, IPv6 and IDN handling — and fails closed. action_guard.py implements a three-state gate (allow / require_approval / block) with out-of-scope actions hard-blocked, a safe-method policy, and a per-host circuit breaker. safe_subprocess.py hardens execution of untrusted inputs and repositories: shell=False, clean environment, bounded and fail-closed decoding, and a git_safe() mode that disables hooks, prompt and host-config mechanisms that a hostile repo could weaponize.


Evidence discipline is treated with the same rigor. validate_findings.py runs an evidence-grounding and per-class false-positive harness with structured proof signals, and a native bug cannot be marked [CONFIRMED] without a coverage_proof or trace_proof. evidence_kit.py emits typed, re-verifiable [EVD-XXX] citations, and a finding-checker agent — an artifact-only, blind adversarial checker — drives a bounded generator-versus-checker rebuttal loop via engine/rebuttal.py, defaulting to skeptic so that EXHAUSTED or STALLED states never count as acceptance. The engine/model_scorecard.py component calibrates trust in model verdicts using a Wilson 95% upper-bound on miss rate and is fail-closed, only short-circuiting re-validation when a proven track record exists. For professionals tired of LLMs hallucinating findings, this adversarial-checker-plus-scorecard design is the most interesting idea in the repo.


The crash-to-exploitability pipeline deserves its own paragraph because it addresses a chronic gap in fuzzing and triage work: the distance between "it crashes" and "this is exploitable." /engage.crash runs a staged-proof sequence inside a .devcontainer/ toolchain with rr, gdb, gcov and afl++. First, rr deterministic record/replay reverse-steps to the corrupting write, emitting a trace_proof. Second, gcov line-hit or function traces prove the vulnerable line actually executed. Third, the crash witness is rebuilt under permissive, distro, hardened and ASan profiles (feasibility_profile.py), and exploit_context.py then forbids exploitation techniques the empirical mitigation map marks as blocked. Finally, path_conditions.py evaluates branch guards to a tri-state SAT/UNSAT verdict — with tool limitations surfaced as null/manual rather than a false "infeasible."


Supporting tooling around the pipeline includes variant_hunt.py, which clusters sibling findings by root cause so one confirmed bug expands to all its variants, and /engage.cvediff, which discovers a CVE's canonical fix commits across sources and produces a scope-gated diff for root-cause analysis. There is also an incident-response repo-compromise forensics kit and /engage.threatmodel, which materializes, lints and drift-checks the engagement threat model — modeling assets, entry points, boundaries and ATT&CK mappings before exploitation begins. /engage.memory persists confirmed findings as impact-ranked patterns and recalls prior techniques at recon and weaponize time, giving the framework cross-engagement learning.


The autonomy story is deliberately conservative. The engine/ directory contains a bounded, resumable autopilot runner — engine.py is a phase runner, not an LLM — with hard step and time budgets, loop detection, an append-only trace and --resume support. Critically, offensive actions remain operator-gated even in autopilot mode, which aligns with how a responsible senior operator would want agent assistance to behave. The whole safety-critical surface is covered by a pytest suite, and GitHub Actions CI runs the tests plus byte-compilation of skills/ and engine/ and shellcheck on every push. The README states the safety code is adversarially red-teamed and regression-tested, and TERMS.md codifies the authorization requirement — every request the toolkit sends is the operator's responsibility.


Installation is straightforward for a Claude Code user, with the plugin route preferred because it auto-loads the dispatcher: /plugin marketplace add hypnguyen1209/offensive-claude followed by /plugin install offensive-claude@offensive-claude-marketplace. A manual path is also documented: git clone https://github.com/hypnguyen1209/offensive-claude.git ~/offensive-claude and then copying skills/, agents/, templates/, workflows/, commands/ and presets/ into ~/.claude/. The one-liner install.sh exists too, though piping a remote script to bash is a habit worth reconsidering when the alternative manual copy is five commands. Note that CLAUDE.md is copied as the system prompt and behavior config, so operators should review it as they would any agent configuration.


For defenders, this framework is worth studying for two reasons. First, its redaction boundary — redact_headers.py masks Authorization, Cookie, API-key and JWT values, fail-closed, before traffic reaches the model — is a pattern more tooling should adopt when LLM agents handle credential-bearing intercepts. Second, the skill files themselves document technique theory alongside detection and OPSEC notes, meaning the repository doubles as a structured map of what an agent-assisted engagement looks like from the blue side: append-only traces, filled phase templates, [EVD-XXX] artifacts and a scope.json ROE are all artifacts an authorized engagement should be able to produce on demand. In short, offensive-claude reads less like a weapon and more like an attempt to give Claude Code the process maturity — scoping, evidence gates, adversarial validation — that serious offensive work has always demanded of human teams.



Official project repository for hypnguyen1209/offensive-claude.

Download Tool

Educational analysis for authorized security professionals. Use only in controlled, authorized environments.






Source: OffensiveSec
Source Link: https://www.offsecblog.com/2026/11/offensive-claude-for-structured-kill.html


Comments
new comment
Nobody has commented yet. Will you be the first?
 
Forum
Red Team (CNA)



Copyright 2012 through 2026 - National Cyber Warfare Foundation - All rights reserved worldwide.