offensive-coding/heap-exploitation-dev/SKILL.md
Auth/lab dev: heap exploitability research; glibc/musl/Windows allocators, UAF/double-free/overflow models, heap shaping, mitigations.
npx skillsauth add aeondave/malskill heap-exploitation-devInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Goal: turn a heap bug into a repeatable primitive and then into the right endgame for that allocator/version, not the most nostalgic House name.
glibc/ptmalloc: determine version first; most House viability is version-gated.musl mallocng: assume group/slot shaping and application object corruption, not direct House portability.Windows: determine whether the bug is on NT heap, LFH, VS, or Segment Heap, and whether it is a private heap.Custom allocator: reverse metadata, pool headers, callback tables, and destructor paths before importing glibc assumptions.__malloc_hook, __free_hook)| Environment | Bias toward | Avoid or de-prioritize |
|---|---|---|
| glibc < 2.26 | Force, Orange, Roman, Storm, Rabbit, Lore, Spirit, unsafe unlink, unsorted/largebin classics | Tcache-first thinking |
| glibc 2.26-2.31 | tcache poisoning, Botcake, stashing unlink, fastbin reverse into tcache, Einherjar, early IO | Assuming hooks are gone or safe-linking exists |
| glibc 2.32-2.33 | safe-linking bypasses, House of IO, House of Water, Botcake, largebin-assisted tcache control | Blind fd poisoning without a heap leak or metadata route |
| glibc 2.34-2.41 | FSOP / House of Apple 2 or 3, stdout/stderr overlap, setcontext pivots, Water, Tangerine, tcache-relative write | __free_hook / __malloc_hook as default endgame |
| glibc 2.42+ | tcache metadata hijacking, Water, Tangerine, allocator-metadata overflow, FSOP | Assuming classic largebin or early-tcache metadata layouts still hold |
| musl mallocng | slot/group shaping, application-object overlap, type confusion, atexit / app-specific callback abuse | Direct porting of ptmalloc House techniques |
| Windows NT/LFH | same-size grooming, adjacent object corruption, private-heap determinism, CRT/FILE or return-address targets after AAR/AAW | Old "just corrupt FLink/BLink" folklore without build-specific proof |
| Windows Segment Heap / VS | application object corruption, pointer replacement, vtable/function-pointer chains, leak-first workflow | Assuming Segment Heap behaves like classic LFH or exposes easy freelist writes |
| Family | Good fit | Typical result | Reality check |
|---|---|---|---|
| House of Spirit | arbitrary free / fake chunk | near-arbitrary allocation | Still a useful fake-chunk pattern, not a complete endgame |
| House of Lore | smallbin corruption | near-arbitrary allocation | Good for fake-chunk thinking; often a helper, not the finale |
| House of Einherjar | off-by-one null / PREV_INUSE clear | overlap + consolidation | Excellent default when null-byte primitive exists |
| House of Force | old top chunk overflow | arbitrary allocation | Classic only; top-chunk integrity kills the stock form on modern glibc |
| House of Orange | no free() path on old glibc | unsorted-bin + FSOP | Historical; keep for < 2.26 and for reasoning about Tangerine |
| House of Roman | leakless relative overwrite on old glibc | hook-era RCE | Strong conceptually, weak as modern default |
| House of Storm | unsorted + largebin choreography | forged chunk / arbitrary allocation | High setup, mainly old glibc |
| House of Corrosion | WAF + old/post-Orange stderr path | leakless libc writes + FSOP | Real but niche, entropy-heavy, build-sensitive |
| House of Red | staged stderr corruption + allocator-failure trigger | failure-driven stderr / FILE dispatch | Treat as a situational trigger pattern adjacent to Corrosion/Crust, not a first-choice primitive |
| House of Botcake | tcache double-free bypass | arbitrary allocation/write | Great modern default when double-free is involved |
| House of IO | safe-linking era with tcache-struct control | tcache poisoning without classic fd leak | Version-windowed and precondition-heavy |
| House of Water | leakless tcache-metadata control | leakless tcache takeover | Strong modern option when metadata is reachable |
| House of Tangerine | no explicit free(), top-chunk abuse | arbitrary allocation through freed wilderness | Modern Orange replacement; excellent on newer glibc |
| House of Apple 2 | post-hook glibc | FSOP via system or setcontext | One of the best 2.34+ endgames |
| House of Apple 3 | post-hook glibc | FSOP via _codecvt | Advanced but worth knowing |
| House of Rust / Crust | safe-linking + TSU/largebin + FSOP | leakless or low-leak stdout/stderr overlap | Powerful, but too brittle to be your first plan |
| House of Muney | mmapped chunk overlap into libc mapping | symbol-table / mapping corruption | Expert-only, RELRO-sensitive, rare in real targets |
| House of Blindness | one-byte / LSB writes into mmap-relative space (link_map->l_addr, l_info[DT_*], _r_debug) | leakless escalation: byte write → mis-resolved _dl_fixup → arbitrary call via _dl_fini at exit() | Modern glibc (verified on 2.34, pepsipu Feb 2022); requires _dl_fixup reachable (partial RELRO) and exit() path; CTF-grade, invaluable when no leak / no IO |
Treat House names as indexed solution families, not trophies. Primitive + allocator + version wins over naming aesthetics.
__free_hook or __malloc_hook, it is probably outdated unless libc_malloc_debug.so.0 is explicitly involved._wide_data, _codecvt, or other in-section routes over fake arbitrary vtables.mmap()-backed groups change heap shaping completely; validate adjacency and slot reuse empirically.setcontext/ROP over system("/bin/sh").memset/rep stosq) and the program then immediately uses that region (prints through it, re-reads it), an in-place forge over a libc stream/struct self-destructs before you can finish. Model the write primitive's side effects explicitly; when blocked, route to a print-free / cross-stream write (see fsop-dev: input-buffer redirection) or a second-thread/free()-deposited write rather than fighting the ordering.free() uses the calling thread's tcache. A worker thread's free() of a main-arena chunk lands in the worker's tcache, not main's — so it does not create a same-bin double-free for the main thread. Confirm which thread/tcache a free targets before assuming overlap._IO_list_all, stdout/stderr corruption, or classic one-gadget chains may still fit._wide_data or _codecvt control, setcontext+61, or clean ORW. Once the allocator work is done and the hard part becomes libio dispatch/trigger selection, hand off to offensive-coding/fsop-dev.system("/bin/sh") can drop privilege; use setcontext or ROP to normalize credentials first.malloc or realloc is part of the exploit state machine, not an independent trigger.__free_hook on modern glibc by reflex.Load the reference files only after allocator, version, primitive, and intended endgame are clear; they hold the depth that does not belong in this routing file.
development
Auth/lab ref: Unicorn Engine CPU-only emulation for shellcode, decryptors, custom VM handlers, instruction tracing, memory hooks, and register-level experiments.
development
Auth/lab ref: Renode board and SoC simulation for MCU/RTOS firmware, UART/GPIO/peripheral modeling, GDB remote debugging, REPL platforms, and RESC scripts.
development
Auth/lab ref: Qiling OS-layer binary emulation for PE/ELF/Mach-O/UEFI/shellcode with rootfs, syscall/API hooks, filesystem mapping, and runtime patching.
databases
Auth/lab ref: QEMU user-mode and full-system emulation for cross-arch binaries, firmware, kernels, disks, serial consoles, networking, and GDB stubs.