# heap-exploitation

heap-exploitation is a Claude Code skill for corruptions across glibc, Windows heap, and jemalloc. It activates on heap buffer overflows, double-free bugs, and use-after-free states.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 73 repo stars
- Author: W4L33Dx
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/W4L33Dx/Cyber-Monster/tree/HEAD/red-team/binary-and-exploit-development/heap-exploitation/SKILL.md
- Updated: 2026-11-15
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/w4l33dx-heap-exploitation

## What it does

Maps heap corruption primitives to arbitrary write targets across different memory allocators. It categorizes the vulnerability against glibc ptmalloc, the Windows segment heap, or jemalloc, determining the exploitation path from the specific allocator build.

Allocator layout dictates which metadata can be reached. Windows LFH subsegments drop per-block headers entirely, so an overflow hits neighboring object bodies directly instead of allocator metadata. Under glibc 2.42, changes in tcache initialization place `tcache_perthread_struct` behind large allocations, while safe-linking continues to scramble pointer fields with address-based XOR operations.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add W4L33Dx/Cyber-Monster --skill heap-exploitation -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/heap-exploitation/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/heap-exploitation/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add W4L33Dx/Cyber-Monster --skill heap-exploitation -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/heap-exploitation/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add W4L33Dx/Cyber-Monster --skill heap-exploitation -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/heap-exploitation/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install W4L33Dx/Cyber-Monster red-team/binary-and-exploit-development/heap-exploitation
```

2. **Manually: put the files in place**
- File: `.github/skills/heap-exploitation/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add W4L33Dx/Cyber-Monster --skill heap-exploitation -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/W4L33Dx/Cyber-Monster --path red-team/binary-and-exploit-development/heap-exploitation
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/heap-exploitation/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/W4L33Dx/Cyber-Monster/tree/HEAD/red-team/binary-and-exploit-development/heap-exploitation/SKILL.md

## When to use it
- determine corruption primitives for heap overflows
- bypass safe-linking pointer protections in glibc
- target Windows LFH subsegments lacking per-chunk headers
- plan use-after-free exploitation across matching size classes

## Example prompts
- Analyze this heap buffer overflow under glibc 2.42
- How do I defeat safe-linking on this tcache poisoning primitive?
- Check exploitability for an LFH chunk overflow on Windows

## Similar
- [arbitrary-write-to-rce](https://affpapa.org/en/nevibecode/skills/arbitrary-write-to-rce.md) — skill · 3900 installs
- [analyzing-heap-spray-exploitation](https://affpapa.org/en/nevibecode/skills/analyzing-heap-spray-exploitation.md) — skill · 379 installs
- [format-string-exploitation](https://affpapa.org/en/nevibecode/skills/format-string-exploitation.md) — skill · 4000 installs
- [ctf-writeup](https://affpapa.org/en/nevibecode/skills/ctf-writeup.md) — skill · 8700 installs
- [post-patch-validation](https://affpapa.org/en/nevibecode/skills/post-patch-validation.md) — skill · 1400 installs
- [pentest-agents-bug-bounty-framework](https://affpapa.org/en/nevibecode/skills/pentest-agents-bug-bounty-framework.md) — skill · 1300 installs

## Other versions with the same name
- [heap-exploitation · yaklang](https://affpapa.org/en/nevibecode/skills/heap-exploitation.md) — 4100 installs

From the same set: [w4l33dx/cyber-monster](https://affpapa.org/en/nevibecode/by/w4l33dx/cyber-monster.md) — 61 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
