Command Palette

Search for a command to run...

Назад к скиллам
скилл № 65010

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от 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 fd pointer of a freed tcache chunk allows the attacker to trick malloc() into returning an arbitrary memory address (like the __free_hook or 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 linked libc library. Using __libc_csu_init gadgets to control specific registers.
  • Sigreturn Oriented Programming (SROP): Exploiting the sigreturn system call to pop an entire hardware context (all registers) directly from the stack, requiring only a single syscall gadget.
  • Jump Oriented Programming (JOP): Bypassing shadow stacks (CET) by chaining gadgets that end in jmp reg or call reg instead of ret.

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.
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

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), без исполняемых скриптов.

Похожие скиллы

Сравнить advanced-binary-exploitation с