heap-exploitation

Identify and exploit glibc heap vulnerabilities like UAF and double free.

120|8|Updated Jun 2, 2026
One-click install
npx skills add https://github.com/Prohao42/aimy-skill --skill heap-exploitation-prohao42
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: heap-exploitation
Source: https://github.com/Prohao42/aimy-skill/tree/main/ai-mian/hack-skills/skills/heap-exploitation
Command: npx skills add https://github.com/Prohao42/aimy-skill --skill heap-exploitation-prohao42

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill equips security professionals with a comprehensive playbook for identifying and exploiting heap vulnerabilities in glibc, ensuring secure penetration testing.

Core Features & Use Cases

  • ptmalloc2 Internals: Delve into the workings of ptmalloc2 for understanding bin structures and allocation strategies.
  • Leak Detection: Offers techniques for identifying and leveraging heap/libc leaks for code execution.
  • Attack Matrix: Provides a detailed matrix for selecting attack strategies based on glibc version.

Quick Start

Load the heap-exploitation skill and start your investigation with a specific vulnerability scenario, such as heap overflow or UAF, by analyzing the memory layout and identifying potential targets.

Frequently Asked Questions about heap-exploitation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I exploit a use-after-free vulnerability in glibc for penetration testing?

To exploit a use-after-free vulnerability in glibc, you analyze the ptmalloc2 memory layout, identify the specific bin structure holding the freed chunk, and manipulate allocation strategies to achieve code execution. This skill provides the attack matrix for selecting the precise technique based on your glibc version.

What is the best way to select a heap exploitation strategy across different glibc versions?

Selecting a heap exploitation strategy across glibc versions requires checking the attack matrix to match vulnerability types like double free or off-by-one errors with the specific bin management strategies and allocation constraints of that glibc release.

How does ptmalloc2 bin management affect heap overflow exploitation?

Ptmalloc2 bin management affects heap overflow exploitation by dictating how freed chunks are structured and consolidated within fastbins, unsorted bins, and large bins. Understanding these structures allows you to control chunk metadata and leverage overflows for arbitrary writes.

How to leverage heap and libc leaks for code execution during penetration testing?

To leverage heap and libc leaks for code execution, you first identify the leaked memory addresses using provided detection techniques, calculate the libc base address, and then overwrite specific function pointers or hooks to redirect control flow to your payload.

Can I apply glibc heap exploitation techniques to double free vulnerabilities?

Yes, you can apply glibc heap exploitation techniques to double free vulnerabilities. The skill details how to identify the double free condition, manipulate the resulting cyclic fastbin list, and achieve arbitrary memory allocation by corrupting the forward pointer.

When do I need to consider glibc version constraints during heap exploitation?

You need to consider glibc version constraints during heap exploitation when mitigations like tcache double-free checks or safe-linking are present. The skill provides strategies to navigate these version-specific bin management constraints and adjust your attack approach accordingly.