/ctf-security:pwn-stack-exploitationfrom ctf-security
Exploit stack-based buffer overflows, return address hijacking, ROP chain exploitation, ret2libc attacks, and stack canary bypasses in CTF binary challenges. Use when analyzing stack vulnerabilities, crafting buffer overflow exploits, building ROP chains with gadgets, bypassing stack protections (ASLR, PIE, canaries), or exploiting return address overwrite vulnerabilities. Includes pwntools templates, ROP gadget finding techniques, offset calculation methods, and complete CTF writeups. Covers x86 and x64 architectures for pwn challenges.
Ships in ctf-security. 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.
This skill provides comprehensive knowledge for exploiting stack-based vulnerabilities in CTF pwn challenges, including buffer overflows, return address hijacking, and ROP (Return-Oriented Programming) chain exploitation.
Core capabilities:
For a complete ROP chain exploitation example, see the Binary-4 writeup in references/WRITEUPS.md.
For a simple buffer overflow with pointer corruption, see the Software-3 writeup in references/WRITEUPS.md.
checksec to identify protections (NX, ASLR, PIE, canaries)strings to find interesting strings in the binary# Using pwntools pattern generation
from pwn import *
pattern = cyclic(200)
# Send pattern, find crash offset
offset = cyclic_find(0x61616162) # Example crash value
For automated offset finding, see scripts/offset_finder.py.
ret2win: Overwrite return address to jump to a win function
payload = b'A' * offset + p64(win_addr)
ret2libc: Call system("/bin/sh") from libc
payload = b'A' * offset + p64(pop_rdi) + p64(binsh_addr) + p64(system_addr)
ROP chain: Chain multiple gadgets for complex exploits
rop = ROP(exe)
rop.call(exe.sym.system, [next(exe.search(b"/bin/sh"))])
payload = b'A' * offset + rop.chain()
ASLR/PIE: Leak addresses to calculate base addresses See references/TECHNIQUES.md for detailed techniques.
Stack Canaries: Leak canary value or use stack pivot See references/TECHNIQUES.md for bypass methods.
For in-depth theory on stack layout, calling conventions, and buffer overflow mechanics, see references/THEORY.md.
For step-by-step methodologies including:
Essential tools for stack exploitation:
For complete tool usage guides, see references/TOOLS.md.
Complete solutions with working exploits:
Vulnerable programs demonstrating concepts:
examples/auth_overflow.c: Authentication bypass via buffer overflowexamples/guess.c: Return address hijacking demonstrationexamples/retaddr.c: Return address modification exampleAutomation tools:
scripts/rop_exploit_template.py: Pwntools ROP chain templatescripts/offset_finder.py: Buffer offset calculation helperFor frequently-used patterns including:
examples/auth_overflow.c (opens in a new tab)examples/guess.c (opens in a new tab)examples/retaddr.c (opens in a new tab)references/PATTERNS.md (opens in a new tab)references/TECHNIQUES.md (opens in a new tab)references/THEORY.md (opens in a new tab)references/TOOLS.md (opens in a new tab)references/WRITEUPS.md (opens in a new tab)scripts/offset_finder.py (opens in a new tab)scripts/rop_exploit_template.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub giofornari/skills --plugin ctf-security7 skills in this plugin
/crypto-classical-ciphersSolve classical cipher CTF challenges including Caesar cipher, ROT-N, Vigenère cipher with Autokey variant, substitution ciphers (monoalphabetic and polyalphabetic), transposition ciphers (rail-fence, columnar), Playfair cipher, and other historical encryption methods. Use when analyzing text-only ciphertext, challenges mentioning historical or classical ciphers, frequency analysis opportunities, or when ciphertext contains only letters without numbers. Includes automated solvers for Caesar/ROT-N with all 26 shifts, Vigenère key recovery using Kasiski examination and index of coincidence, frequency analysis for substitution ciphers, dcode.fr and CyberChef integration, complete statistical analysis tools, and English/Italian language frequency tables for OliCyber.IT challenges. Beginner-friendly entry point to CTF cryptography./crypto-general-methodologyComprehensive methodology for solving CTF cryptography challenges including workflow guidance, cipher identification, reconnaissance techniques, tool selection strategy, and challenge categorization. Use when approaching any crypto CTF challenge, need to identify unknown ciphers or encodings, select appropriate tools (dcode.fr, factordb, CyberChef, SageMath, RsaCtfTool), develop attack strategies, or understand crypto challenge patterns. Covers classical ciphers, RSA, AES, block ciphers, PRNG, hash functions, zero-knowledge proofs, encoding detection, and cross-category exploitation techniques. Includes decision trees, cheatsheets for SageMath and PyCryptodome, and systematic approaches for reconnaissance and cryptanalysis./crypto-rsa-attacksExploit RSA vulnerabilities in CTF challenges including factorization attacks (factordb lookup, Fermat factorization, Pollard rho), Wiener's attack on small private exponents, small public exponent attacks (low e, Hastad broadcast), common modulus attacks, padding oracle attacks, multi-prime RSA, Franklin-Reiter related message attacks, and Coppersmith methods. Use when analyzing RSA encryption challenges, working with public keys (n, e, d, p, q, c parameters), attacking weak RSA implementations, recovering plaintexts from RSA ciphertexts, exploiting mathematical relationships in RSA systems, or factoring composite numbers. Includes RsaCtfTool automation, factordb integration, SageMath implementations for Wiener and lattice attacks, complete working Python scripts for all major RSA attack categories, and practical CTF examples from ASIS, CSAW, PlaidCTF, Google CTF, and other major competitions./pwn-general-methodologyGeneral CTF binary exploitation workflow, reconnaissance methodology, tool selection guide, and systematic problem-solving approach for pwn challenges. Use when starting a new CTF binary challenge, unsure which exploitation technique to use, need a systematic approach to binary analysis, or want guidance on tool selection (gdb vs ltrace vs strings). Includes complete workflow from initial recon to exploitation, common CTF patterns, and troubleshooting guides./pwn-memory-exploitationExploit memory leak vulnerabilities, information disclosure, ASLR bypass, PIE breakage, arbitrary read/write primitives in CTF binary challenges. Use when defeating address space randomization, leaking stack/heap/code pointers, exploiting format string vulnerabilities, or using memory disclosure to calculate base addresses. Includes techniques for partial overwrites, pointer arithmetic, and multi-stage exploitation with leaked addresses. Covers ASLR/PIE bypass methods./rot-cipherDecifratura e cifratura ROT-N (Cifrario di Cesare). Usa questa skill quando l'utente chiede di decifrare, cifrare, o analizzare testo con crittografia ROT, Caesar cipher, o shift cipher. La skill supporta sia decodifica con shift noto (ROT-1 fino a ROT-25) che ricerca automatica dello shift corretto tramite brute force e analisi di frequenza. Usa anche quando l'utente vuole implementazioni in linguaggi specifici (Python, JavaScript, Java, C++, C#, Go, Rust, Ruby, PHP, Bash, Kotlin, Swift).