CSE 598 - Spring 2025

Dynamic Allocator Exploitation

The glibc heap consists of many components distinct parts that balance performance and security. Beyond tcache exists a memory management system consisting of many interrelated bins and components. This module explores these components and interactions between them. By applying advanced heap exploits that "shape" the internal state of the heap, exploitation primitives can be created. Heap exploits are complex and ephemeral, frequently changing with libc versions. For this reason, success in the module relies on parsing heap exploit proof of concepts to craft an exploit.

17 challenges

Dynamic Allocator II - Beyond tcache

Dynamic Allocator II - The Bins

Dynamic Allocator II - Exploitation

shellphish/how2heap & Tips

  • The challenges in this module are using glibc 2.35.
  • Remember, there is a lot of heap exploitation information online that is outdated.
  • An "advanced heap exploit" refers to techniques shown in how2heap.
    • These exploits take advantage of the normal functionality of specific heap actions.
    • The proof of exploit code is compilable! Build it, run it, change it, gdb it. This is your opportunity to reason about how it works!
  • Break down the challenges and heap exploits into primitives.
    • List the vulnerabilities/primitives in the challenge.
    • Identify the primitive(s) needed to obtain the flag in the challenge. Is an arbitrary read needed? An arbitrary write? Does the challenge have reading/writing functionality and setting a pointer value is sufficient to obtain the flag?
    • Explore the how2heap exploit repository. Distill the heap exploits to requirements and resulting primitives.
    • Filter the exploitation techniques to only those that can work given the challenge specifics.
CHALLENGE 01

level1.0

— solves

Leverage consolidation to obtain the flag.

CHALLENGE 02

level1.1

— solves

Leverage consolidation to obtain the flag.

CHALLENGE 03

level2.0

— solves

Leverage consolidation to obtain the flag.

CHALLENGE 04

level2.1

— solves

Leverage consolidation to obtain the flag.

CHALLENGE 05

level3.0

— solves

Leverage consolidation to obtain the flag.

CHALLENGE 06

level3.1

— solves

Leverage consolidation to obtain the flag.

CHALLENGE 07

level4.0

— solves

Perform an advanced heap exploit to obtain the flag

CHALLENGE 08

level4.1

— solves

Perform an advanced heap exploit to obtain the flag

CHALLENGE 09

level5.0

— solves

Perform an advanced heap exploit to obtain the flag

CHALLENGE 10

level5.1

— solves

Perform an advanced heap exploit to obtain the flag

CHALLENGE 11

level6.0

— solves

Perform an advanced heap exploit to obtain the flag

CHALLENGE 12

level6.1

— solves

Perform an advanced heap exploit to obtain the flag

CHALLENGE 13

level7.0

— solves

Perform an advanced heap exploit to obtain the flag

CHALLENGE 14

level7.1

— solves

Perform an advanced heap exploit to obtain the flag

CHALLENGE 15

level8.0

— solves

Perform an advanced heap exploit to obtain the flag

CHALLENGE 16

level8.1

— solves

Perform an advanced heap exploit to obtain the flag

CHALLENGE 17

level9

— solves

Perform an advanced heap exploit to obtain the flag