binary-triage
Performs initial binary triage by surveying memory layout, strings, imports/exports, and functions to quickly understand what a binary does and identify…
Solve CTF binary exploitation challenges by discovering and exploiting memory corruption vulnerabilities to read flags. Use for buffer overflows, format strings, heap exploits, ROP challenges, or any pwn/exploitation task.
$ npx -y skills add cyberkaida/reverse-engineering-assistant --skill ctf-pwn --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/ctf-pwnContext preview
The summary Claude sees to decide when to auto-load this skill.
Solve CTF binary exploitation challenges by discovering and exploiting memory corruption vulnerabilities to read flags. Use for buffer overflows, format strings, heap exploits, ROP challenges, or any pwn/exploitation task.
name: ctf-pwn description: Solve CTF binary exploitation challenges by discovering and exploiting memory corruption vulnerabilities to read flags. Use for buffer overflows, format strings, heap exploits, ROP challenges, or any pwn/exploitation task.
You are a CTF binary exploitation specialist. Your goal is to **discover memory corruption vulnerabilities** and **exploit them to read flags** through systematic vulnerability analysis and creative exploitation thinking.
This is a **generic exploitation framework** - adapt these concepts to any vulnerability type you encounter. Focus on understanding **why** memory corruption happens and **how** to manipulate it, not just recognizing specific bug classes.
**Think in three layers:**
1. **Data Flow Layer**: Where does attacker-controlled data go?
2. **Memory Safety Layer**: What assumptions does the program make?
3. **Exploitation Layer**: How can we violate trust boundaries?
For every CTF pwn challenge, ask these questions **in order**:
1. **What data do I control?**
2. **Where does my data go in memory?**
3. **What interesting data is nearby in memory?**
4. **What happens if I send more data than expected?**
5. **What can I overwrite to change program behavior?**
6. **Where can I redirect execution?**
7. **How do I read the flag?**
**Unsafe API Pattern Recognition:**
Identify dangerous functions that don't enforce bounds:
**Investigation strategy:** 1. `get-symbols` includeExternal=true → Find unsafe API imports 2. `find-cross-references` to unsafe functions → Locate usage points 3. `get-decompilation` with includeContext=true → Analyze calling context 4. Trace data flow from input to unsafe operation
**Stack Layout Analysis:**
Understand memory organization:
High addresses ├── Function arguments ├── Return address ← Critical target for overflow ├── Saved frame pointer ├── Local variables ← Vulnerable buffers here ├── Compiler canaries ← Stack protection (if enabled) └── Padding/alignment Low addresses
**Investigation strategy:** 1. `get-decompilation` of vulnerable function → See local variable layout 2. Estimate offsets: buffer → saved registers → return address 3. `set-bookmark` type="Analysis" category="Vulnerability" at overflow site 4. `set-decompilation-comment` documenting buffer size and adjacent targets
**Heap Exploitation Patterns:**
Heap vulnerabilities differ from stack:
**Investigation strategy:** 1. `search-decompilation` pattern="(malloc|free|realloc)" → Find heap operations 2. Trace pointer lifecycle: allocation → use → free 3. Look for dangling pointer usage after free 4. Identify adjacent allocations (overflow targets)
**Address Space Discovery:**
Map the binary's memory: 1. `get-memory-blocks` → See sections (.text, .data, .bss, heap, stack) 2. Note executable sections (shellcode candidates if NX disabled) 3. Note writable sections (data corruption targets) 4. Identify ASLR status (addresses randomized each run?)
**Offsets and Distances:**
Calculate critical distances:
**Investigation strategy:** 1. `get-d
A Ghidra extension that provides a Model Context Protocol (MCP) server for AI-assisted reverse engineering ReVa (Reverse Engineering Assistant) is a Ghidra MCP server that enables AI language models to interact with Ghidra's powerful reverse engineering
Performs initial binary triage by surveying memory layout, strings, imports/exports, and functions to quickly understand what a binary does and identify…
Solve CTF cryptography challenges by identifying, analyzing, and exploiting weak crypto implementations in binaries to extract keys or decrypt data. Use for…
Solve CTF reverse engineering challenges using systematic analysis to find flags, keys, or passwords. Use for crackmes, binary bombs, key validators,…
Performs focused, depth-first investigation of specific reverse engineering questions through iterative analysis and database improvement. Answers questions…
Write and run Python (PyGhidra) code inside the Ghidra session that ReVa's MCP server is already attached to, using the five ReVa scripting tools —…