pwn

pwn is a command for Claude Code from allsmog/pwn-claude-plugin. It costs 16 tokens per session (892 once invoked), scanned A, original, MIT.

A command that guides an agent through a five-phase binary exploitation process: setting up tools, examining a program, analyzing it statically and dynamically, and developing an exploit. Binary exploitation means finding and using security flaws in compiled programs.

In plain words
What is it for?
Analyzing an executable, using GDB to investigate crashes and offsets, choosing an exploitation technique, and building a payload, optionally for a remote target.
Why use it?
It organizes a complex security investigation into stages with confirmations between them and checks that required tools are available.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the pwn-htb plugin — 7 skills, 16 commands, 3 agents, 2 hooks shipped together

Good fit Analyzing an executable, using GDB to investigate crashes and offsets, choosing an exploitation technique, and building a payload, optionally for a remote target.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/allsmog/pwn-claude-plugin/pwn
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.

Clone the repo
git clone --depth 1 https://github.com/allsmog/pwn-claude-plugin

Made for: Claude Code.

Or install pwn-htb, the plugin that ships this one along with the rest of its 7 skills, 16 commands, 3 agents, 2 hooks.

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 pwn

README.md
[![agentmods](https://agentmods.dev/badge/commands/allsmog/pwn-claude-plugin/pwn.svg)](https://agentmods.dev/commands/allsmog/pwn-claude-plugin/pwn)
Your own site
<a href="https://agentmods.dev/commands/allsmog/pwn-claude-plugin/pwn"><img src="https://agentmods.dev/badge/commands/allsmog/pwn-claude-plugin/pwn.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 892 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00016 $0.00892
Opus 5 $0.00008 $0.00446
Sonnet 5 $0.00003 $0.00178
Haiku 4.5 $0.00002 $0.00089

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

Security

Grade A, and why

pwn scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

pwn-htb/commands/pwn.md · 147 lines

How it starts

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

PWN - Full Exploitation Methodology

Execute the complete binary exploitation workflow on a target binary. This command runs through all 5 phases sequentially with confirmation between each phase.

Workflow Phases

  1. Environment Setup - Verify tools and create workspace
  2. Reconnaissance - Binary analysis, protections, strings, symbols
  3. Static Analysis - Disassembly, vulnerable functions, buffer sizes
  4. Dynamic Analysis - GDB debugging, offset calculation, crash analysis
  5. Exploit Development - Technique selection, payload construction

Execution Steps

Step 1: Parse Arguments

Extract binary path and optional arguments:

  • <binary> - Required: Path to target binary
  • --remote host:port - Optional: Remote target for final exploit
  • --libc path - Optional: Path to libc file

If no binary specified, ask user to provide one.

Step 2: Environment Verification

Before starting analysis:

  1. Check binary exists and is executable:

    file <binary>
    
  2. Verify essential tools are available:

    which gdb checksec python3
    python3 -c "from pwn import *"
    
  3. Create workspace if needed:

    mkdir -p pwn_workspace
    

Step 3: Execute Phases Sequentially

For each phase, use the corresponding skill and produce output in this format:

## [Phase Name]

### Findings
- Key observations as bullet points

### Commands Run
- Actual commands executed with relevant output

### Implications
- What findings mean for exploitation

### Next Steps
- Recommended actions

After each phase, ask user: "Phase complete. Continue to [next phase]?"

Step 4: Phase-Specific Instructions

Phase 1: Environment Setup
  • Load environment-setup skill
  • Verify tools, report missing ones
  • Auto-install missing pip packages if user approves
Phase 2: Reconnaissance
  • Load reconnaissance skill
  • Run: file, checksec, strings, nm
  • Document architecture and protections
Phase 3: Static Analysis
  • Load static-analysis skill
  • Disassemble main and vulnerable functions
  • Identify dangerous function calls
  • Calculate buffer sizes from disassembly

Read the full file on GitHub · 147 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 · 147 lines · 16 tokens per session scan A b72868d502a3

Subscribe to this mod's changes

pwn is a command published in the GitHub repository allsmog/pwn-claude-plugin (2 stars, last pushed 6mo ago), licensed MIT. It adds 16 tokens to every session and 892 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.