advanced-binary-exploitation
Use this skill when the user says 'heap exploitation', 'use-after-free', 'tcache', 'ROP chain', 'CFG bypass', 'PAC', 'CET', 'memory corruption mitigation'…
от j4flmao★ 47 звёзд на GitHub
Установить advanced-binary-exploitation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Advanced Binary Exploitation
Purpose
Explain the deep mechanics of memory corruption (heap metadata, ROP/JOP, modern mitigation internals) for the purpose of building defenses: hardened allocators, compiler mitigations, and memory-safe design. This is reference material for defenders and secure-code authors, not an exploit generator.
Agent Protocol
Trigger
User phrases: "heap use after free", "tcache poisoning", "bypass CFG", "SROP", "glibc malloc internals", "PAC/CET hardening".
Input Context
- Target platform/architecture (x86-64, ARM64) and toolchain.
- Which mitigation the user wants to understand or strengthen.
Output Artifact
Explanatory analysis plus hardening recommendations. No weaponized code.
Response Format
Mechanism: {what corruption class}
Why it works: {root cause}
Defense: {compiler flag / allocator hardening / code change}
[!WARNING] DISCLAIMER: EDUCATIONAL & DEFENSIVE PURPOSES ONLY Explains the deep mechanics of memory corruption specifically for developing compiler-level mitigations, writing secure code, and understanding exploit theory. Do not generate weaponized exploits.
1. Skill Context
Focus: Heap exploitation, advanced ROP (ret2libc, SROP, JOP), modern mitigation bypasses (CFG, PAC, CET). Triggers: heap use after free, tcache poisoning, bypass cfg, srop, glibc malloc exploit
2. Deep Memory Corruption Mechanics
Moving beyond basic stack overflows into modern, highly mitigated environments.
The Glibc Heap (ptmalloc) Exploitation
- Heap Chunks: Understanding the metadata of a malloc chunk (
prev_size,size,fd,bk). - Use-After-Free (UAF): A pointer is freed but not set to NULL. The attacker allocates a new object of the same size, overwriting the old object's data. If the program re-uses the dangling pointer, the attacker controls the execution flow (e.g., overwriting a function pointer inside a C++ object).
- Tcache Poisoning: In modern glibc, the thread-local caching mechanism (tcache) lacks robust security checks. Overwriting the
fdpointer of a freed tcache chunk allows the attacker to trickmalloc()into returning an arbitrary memory address (like the__free_hookor GOT entry), leading to write-what-where primitives.
Advanced ROP & JOP
- ret2libc / ret2csu: Bypassing NX by calling system APIs (
system("/bin/sh")) directly from the dynamically linkedlibclibrary. Using__libc_csu_initgadgets to control specific registers. - Sigreturn Oriented Programming (SROP): Exploiting the
sigreturnsystem call to pop an entire hardware context (all registers) directly from the stack, requiring only a singlesyscallgadget. - Jump Oriented Programming (JOP): Bypassing shadow stacks (CET) by chaining gadgets that end in
jmp regorcall reginstead ofret.
Modern Mitigation Bypasses
- Control Flow Guard (CFG): Bypassing Windows CFG by targeting un-guarded function pointers, modifying the return address on the stack (which CFG doesn't protect), or targeting the PEB.
- Pointer Authentication Codes (PAC - ARM64): Bypassing iOS/macOS PAC by finding memory disclosure vulnerabilities to forge valid signatures or exploiting race conditions.
3. Output Format
- Diagram the heap metadata corruption step-by-step (e.g., visual layout of chunks before and after corruption).
- Detail the exact mathematical offsets and memory alignments required.
- Focus heavily on how memory allocators (like jemalloc, ptmalloc) can be hardened.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл advanced-binary-exploitation?
Use this skill when the user says 'heap exploitation', 'use-after-free', 'tcache', 'ROP chain', 'CFG bypass', 'PAC', 'CET', 'memory corruption mitigation'. Explains modern memory-corruption mechanics so engineers can write memory-safe code and design compiler/allocator hardening. Defensive and educational only. Do NOT use for: generating working exploits, or for general secure-coding reviews (use security/sast-dast) or detection logic (use security/detection-engineering).
Как установить скилл advanced-binary-exploitation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл advanced-binary-exploitation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…