PWN Environment Setup

PWN Environment Setup is a skill for Claude Code from allsmog/pwn-claude-plugin. It costs 71 tokens per session (1,253 once invoked), scanned A, original, MIT.

A guide for setting up tools used in binary exploitation, where a program is analyzed for security weaknesses. It covers tools such as pwntools, GDB, pwndbg, and gadget-finding utilities.

In plain words
What is it for?
Use it to create or verify an exploit-development workspace, install missing tools, and check binary-analysis utilities.
Why use it?
It helps check whether the needed exploitation and debugging tools are installed and working together.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

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

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add allsmog/pwn-claude-plugin
Claude Code
/plugin install pwn-htb

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 Environment Setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/allsmog/pwn-claude-plugin/environment-setup.svg)](https://agentmods.dev/skills/allsmog/pwn-claude-plugin/environment-setup)
Your own site
<a href="https://agentmods.dev/skills/allsmog/pwn-claude-plugin/environment-setup"><img src="https://agentmods.dev/badge/skills/allsmog/pwn-claude-plugin/environment-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,253 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00071 $0.01253
Opus 5 $0.00036 $0.00626
Sonnet 5 $0.00014 $0.00251
Haiku 4.5 $0.00007 $0.00125

Measured 6d ago against content hash 0fe569557306, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

PWN Environment Setup 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 6d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/check-tools.sh, scripts/setup-workspace.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/skills/environment-setup/SKILL.md · 207 lines

How it starts

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

PWN Environment Setup

Overview

This skill provides methodology for setting up a complete binary exploitation environment, including tool detection, automatic installation of missing dependencies, and workspace organization for exploit development.

Required Tools

Core Tools (Must Have)

Tool Purpose Installation
pwntools Exploit development framework pip install pwntools
gdb Debugger System package manager
pwndbg GDB enhancement git clone https://github.com/pwndbg/pwndbg
checksec Binary protection checker Via pwntools or apt install checksec

Recommended Tools

Tool Purpose Installation
ROPgadget ROP gadget finder pip install ROPgadget
ropper Alternative gadget finder pip install ropper
one_gadget Libc one-shot gadgets gem install one_gadget
seccomp-tools Seccomp filter analyzer gem install seccomp-tools
radare2 Disassembler/debugger System package manager

Environment Verification Process

Step 1: Check Python Environment

Verify Python 3.8+ is available:

python3 --version

Check if pwntools is installed and functional:

python3 -c "from pwn import *; print(f'pwntools {pwnlib.version.__version__}')"

Step 2: Check GDB and Extensions

Verify GDB is installed:

gdb --version

Check for pwndbg by looking for its initialization:

gdb -q -ex "show configuration" -ex "quit" 2>&1 | grep -i pwndbg || echo "pwndbg not detected"

Step 3: Check Binary Analysis Tools

Run the tool verification script at ${CLAUDE_PLUGIN_ROOT}/skills/environment-setup/scripts/check-tools.sh to verify all tools.

Step 4: Auto-Install Missing Python Packages

For missing Python packages, install via pip:

pip install pwntools ROPgadget ropper

For Ruby gems (one_gadget, seccomp-tools):

gem install one_gadget seccomp-tools

Read the full file on GitHub · 207 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago First seen · 207 lines · 71 tokens per session scan A 0fe569557306

Subscribe to this mod's changes

PWN Environment Setup is a skill published in the GitHub repository allsmog/pwn-claude-plugin (2 stars, last pushed 6mo ago), licensed MIT. It adds 71 tokens to every session and 1,253 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

exploiting-linux-kernel-vulnerabilities

Methodology for discovering and exploiting Linux kernel memory-corruption vulnerabilities (UAF, OOB read/write, race/TOCTOU, type confusion) during authorized engagements, covering reachability analysis, building stable read/write primitives from a single bug, defeating KASLR/SMEP/SMAP/KPTI, slab/buddy heap grooming…

xalgorix/xalgorix · 96 tokens

bypassing-binary-exploitation-mitigations

Methodology for identifying and defeating common binary hardening mitigations during authorized exploitation — ASLR, PIE, stack canaries, NX/DEP, and RELRO — by leaking addresses, brute-forcing entropy, abusing forked-process behavior, and selecting the right code-reuse primitive for the protections in place.

xalgorix/xalgorix · 73 tokens

exploiting-arbitrary-write-to-execution

Methodology for converting an arbitrary-write (write-what-where) or write-anything-anywhere primitive into code execution during authorized engagements, covering target selection among GOT/PLT entries, .finiarray/.dtors, mallochook/freehook, the atexit/exitfuncs handler list, and printfarginfotable, plus how…

xalgorix/xalgorix · 108 tokens

exploiting-format-string-vulnerabilities

Methodology for exploiting format string bugs where attacker-controlled data reaches the format argument of printf-family functions, enabling stack/memory disclosure (info leaks for ASLR/PIE/canary defeat) and arbitrary write primitives (%n) to hijack control flow via GOT/.finiarray overwrites.

xalgorix/xalgorix · 69 tokens

exploiting-glibc-heap-vulnerabilities

Methodology for exploiting glibc ptmalloc2 heap vulnerabilities during authorized engagements — use-after-free, double-free, heap overflow, and bin-based attacks (tcache poisoning, fast-bin dup, unsorted/large-bin) — including modern mitigations (tcache key, safe-linking, hook removal) and how to obtain leaks and…

xalgorix/xalgorix · 84 tokens

exploiting-stack-buffer-overflows

Methodology for discovering and exploiting stack-based buffer overflows in native binaries during authorized engagements, covering crash triage, offset discovery with De Bruijn patterns, control of the saved return address, and escalation paths (ret2win, stack shellcode, ROP) depending on which mitigations are present.

xalgorix/xalgorix · 69 tokens