Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

ctf-pwn

FreeNo executable scriptsNot checked

Provides binary exploitation techniques for CTF challenges. Use when you already have a vulnerable native target or service and need to turn memory corruption…

ljagielloby ljagiello★ 3,828 GitHub stars18 installs in other catalogs

About this skill

CTF Binary Exploitation (Pwn)

Quick reference for binary exploitation (pwn) CTF challenges. Each technique has a one-liner here; see supporting files for full details.

Prerequisites

Python packages (all platforms):

pip install "pwntools==4.15.0" "ROPgadget==7.7" "ropper==1.13.13"
# or via script: bash scripts/install_ctf_tools.sh python

uv alternative:

uv venv && uv pip install "pwntools==4.15.0" "ROPgadget==7.7" "ropper==1.13.13"

Linux (apt):

apt install gdb binutils strace ltrace qemu-system-x86

Optional cross-arch (ARM/MIPS — Debian/Ubuntu):

apt install qemu-user qemu-user-static gdb-multiarch binutils-multiarch libc6-armhf-cross libc6-arm64-cross libc6-mips-cross

macOS (Homebrew):

brew install gdb binutils qemu

Ruby gems (all platforms):

gem install one_gadget seccomp-tools

Manual install:

  • pwndbg — Linux: GitHub, macOS: brew install pwndbg/tap/pwndbg-gdb
  • checksec — included with pwntools (checksec --file=binary)

MCP servers (optional): WinDbg MCP (svnscha/mcp-windbg) for Windows crash dumps, live breakpoint-driven exploitation, and kernel/driver debugging; IDA Pro MCP / Ghidra MCP for decompiling the vulnerable function — see tools-mcp.md.

Additional Resources

  • overflow-basics.md - Stack/global buffer overflow, ret2win, canary bypass, canary byte-by-byte brute force on forking servers, struct pointer overwrite, signed integer bypass, hidden gadgets, stride-based OOB read leak, parser stack overflow via unchecked memcpy length with callee-saved register restoration
  • rop-and-shellcode.md - Core ROP chains (ret2libc, syscall ROP, rdx control, shell interaction), ret2csu, bad character XOR bypass, exotic x86 gadgets (BEXTR/XLAT/STOSB/PEXT), stack pivot via xchg rax,esp, sprintf() gadget chaining for bad character bypass, canary XOR epilogue as RDX zeroing gadget, stub_execveat syscall as execve alternative via read() return value
  • rop-advanced.md - Advanced ROP techniques: double stack pivot to BSS via leave;ret, SROP (Sigreturn-Oriented Programming) with UTF-8 constraints, seccomp bypass, RETF architecture switch (x64→x32) for seccomp bypass, shellcode with input reversal, .fini_array hijack, ret2vdso, pwntools template, x32 ABI syscall aliasing for seccomp bypass, time-based blind shellcode exfiltration
  • format-string.md - Format string exploitation (leaks, GOT overwrite, blind pwn, filter bypass, canary leak, __free_hook, .rela.plt patching, saved EBP overwrite for .bss pivot, argv[0] overwrite for stack smash info leak, .fini_array loop for multi-stage exploitation, __printf_chk bypass with sequential %p, single-call leak + GOT overwrite, ROT13-encoded format string exploit through input transformation)
  • advanced.md - Seccomp advanced techniques, UAF, JIT, esoteric GOT, heap overlap via base conversion, tree data structure stack underallocation, ret2dlresolve, kernel exploitation (basic)
  • heap-techniques.md - House of Apple 2 (+ setcontext SUID variant), House of Einherjar, House of Orange/Spirit/Lore/Force, heap grooming, custom allocators (nginx, talloc), classic unlink, musl libc heap (meta pointer + atexit hijack), tcache stashing unlink attack, unsafe unlink + top chunk consolidation
  • heap-techniques-2.md - CTF-writeup heap variants: UAF vtable pointer encoding shell argument, uninitialized chunk residue pointer leak, tcache strcpy null-byte overflow + backward consolidation, adjacent-struct fn-pointer overflow for libc leak + GOT overwrite, hidden-menu tcache poisoning, tcache double-free + fake _IO_FILE vtable stdout hijack, tcache-to-fastbin promotion cross-bin attack, 6-bit index OOB + written_bytes accumulator, IS_MMAPED bit-flip for unsorted bin leak on calloc'd chunk, filename-regex-constrained fastbin via LSB-only heap pointer overwrite, custom allocator unsafe unlink to GOT
  • heap-fsop.md - FILE-structure (_IO_FILE) exploitation: fastbin stdout vtable two-stage hijack for PIE + Full RELRO, _IO_buf_base null-byte stdin hijack, glibc 2.24+ _IO_FILE vtable validation bypass, unsorted-bin attack on stdin IO_buf_end, unsorted-bin corruption via mp structure, realloc(ptr, 0) as free() UAF, single-byte reference counter wraparound UAF
  • advanced-exploits.md - Advanced exploit techniques (part 1): VM signed comparison, BF JIT shellcode, type confusion, off-by-one index corruption, DNS overflow, ASAN shadow memory, format string with encoding constraints, custom canary preservation, signed integer bypass, canary-aware partial overflow, CSV injection, MD5 preimage gadgets, VM GC UAF slab reuse, path traversal sanitizer bypass, FSOP + seccomp bypass via openat/mmap/write
  • [advanced-explo
Full SKILL.md on GitHub

Install ctf-pwn in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

Bash
Read
Write
Edit
Glob
Grep
Task
WebFetch
WebSearch

Bundled files

advanced-exploits-2.mdadvanced-exploits-3.mdadvanced-exploits-4.mdadvanced-exploits-5.mdadvanced-exploits.mdadvanced.mdattack-playbook.mdfield-notes.mdformat-string.mdheap-fsop.mdheap-techniques-2.mdheap-techniques.mdkernel-bypass.mdkernel-techniques.mdkernel.mdoverflow-basics.mdpwnable-tw/3x17.mdpwnable-tw/README.mdpwnable-tw/alive_note.mdpwnable-tw/applestore.mdpwnable-tw/babyallocator.mdpwnable-tw/babystack.mdpwnable-tw/bash.mdpwnable-tw/bash_revenge.mdpwnable-tw/bookwriter.mdpwnable-tw/bounty_program_a.mdpwnable-tw/bounty_program_b.mdpwnable-tw/break_out.mdpwnable-tw/calc.mdpwnable-tw/caov.mdpwnable-tw/criticalheap.mdpwnable-tw/criticalheap_pp.mdpwnable-tw/de_aslr.mdpwnable-tw/death_note.mdpwnable-tw/digimon.mdpwnable-tw/dubblesort.mdpwnable-tw/food_store.mdpwnable-tw/ghost_party.mdpwnable-tw/hacknote.mdpwnable-tw/heap_paradise.md

FAQ

What does the ctf-pwn skill do?

Provides binary exploitation techniques for CTF challenges. Use when you already have a vulnerable native target or service and need to turn memory corruption or low-level primitives into code execution or privilege escalation, such as buffer overflows, format strings, heap bugs, ROP, ret2libc, shellcode, kernel exploitation, seccomp bypass, sandbox escape, or Windows/Linux exploit chains. Do not use it when the main blocker is understanding what the binary does; use reverse engineering first. Do not use it for pure web bugs, disk or packet forensics, or standalone crypto/math challenges.

How do I install the ctf-pwn skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the ctf-pwn skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare ctf-pwn with