pwn
Skill12 starsChanged 9 months agoMITView on GitHub
Solve CTF binary exploitation (pwn) challenges: buffer overflows, format strings, ROP chains, heap exploitation, and shellcoding. Use when given ELF/PE binaries with a remote service to exploit. Triggers: "buffer overflow", "format string", "ROP", "shellcode", "checksec", "NX", "canary", "PIE", "GOT overwrite", "ret2libc", pwntools scripts, .elf files, nc/netcat connection targets. Tools: checksec, ROPgadget, pwntools, gdb, one_gadget. NOT for static reverse engineering (use reverse).
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Shad0wMazt3r/The-Scaffoldingtheir own version, first seen Apr 24, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Shad0wMazt3r/The-Scaffolding★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Use this command for challenges involving:
- Distinctive: line 89
Run binary, understand behavior
- Distinctive: line 94
Test locally, then remote
- Very specific: line 123
When using /ctf-kit:team-solve with a pwn challenge, the lead spawns 3 specialists.
- Distinctive: line 125
Exploit-dev requires plan approval: before connecting to remote targets.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CTF Pwn
Analyze and exploit binary exploitation challenges.
When to Use
Use this command for challenges involving:
- ELF binaries
- Buffer overflows
- Format string vulnerabilities
- ROP chains
- Heap exploitation
Bundled Scripts
- check-tools.sh — Verify required pwn tools are installed
- run-checksec.sh — Check binary protections (CANARY, NX, PIE, RELRO). Outputs JSON with protection status, attack vectors, and suggested exploitation strategy.
- pwn-docker.sh — Run a command in the
ctf-pwnlinux/amd64 container with the current directory mounted at/chal(gdb/pwndbg, pwntools, one_gadget, patchelf, qemu-user). Use on macOS / Apple Silicon.
Instructions
- First check tool availability:
bash scripts/check-tools.sh Start with checksec to understand binary protections:
bash scripts/run-checksec.sh $ARGUMENTSThe JSON output includes:
protections: status of each protection (enabled/disabled/partial)attack_vectors: viable exploitation approachessuggestions[0]: recommended exploitation STRATEGY based on protections
Example: if
stack_canary=disabledandnx=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):
- Leak address via format string or partial overwrite
- Calculate base address
- Build ROP chain with calculated addresses
Find offset to return address:
from pwn import * print(cyclic(200)) # After crash: cyclic_find(0x61616161)
Exploitation Checklist
- Run binary, understand behavior
run-checksec.sh→ read JSONattack_vectors- Find vulnerability (overflow, format string)
- Find offset to control
- Build exploit (shellcode or ROP)
- Test locally, then remote
macOS / Apple Silicon
Linux 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
vmmapdoes not):qemu-x86_64 -g 1234 ./binary & pwndbg -ex 'target remote :1234' ./binaryFrom 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.
Team Roles
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 |
Workflow coordination
The pwn team has a natural dependency chain:
- Static analyst runs first → identifies protections and vulnerability type
- Dynamic analyst runs in parallel → finds offsets and leaks
- Exploit developer waits for both → builds the final exploit
When to broadcast
- Static: "Binary has no canary + no PIE, vuln in read() at offset 0x40" — exploit dev starts building
- Dynamic: "Crash at offset 72, libc leak via puts@GOT" — exploit dev uses these values
- Exploit dev: "Exploit works locally, switching to remote" — lead reviews plan before remote connection
- Any: "Got shell / found flag" — immediate broadcast, all stop
Example Usage
/ctf-kit:pwn ./challenge
/ctf-kit:pwn ./binaryDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

