Exploiting a heap buffer overflow in linux
Thilan Dissanayaka Exploit Development Apr 12, 2026

Exploiting a heap buffer overflow in linux

In the previous article, we dissected glibc's malloc — chunks, bins, tcache, coalescing, and the metadata that holds it all together. Now we break it.

Heap exploitation is fundamentally different from stack exploitation. On the stack, the goal is clear: overwrite the return address, control EIP. On the heap, there's no return address to overwrite. Instead, we corrupt the allocator's metadata to trick malloc() into returning a pointer to memory we want to control — a function pointer, a GOT entry, a vtable, or any other target.

ALSO READ
DSA 0x106 - HashMap Data structure
Aug 30 DSA

A deep dive into hash tables, hash functions, collision resolution with chaining and open addressing, load factor, rehashing, Java's HashMap internals, and solving classic problems like Two Sum and finding duplicates.

Bypassing DEP with Return-to-libc
Apr 05 Exploit Development

DEP makes the stack non-executable — our shellcode can't run. The simplest bypass? Don't inject code at all. Instead, call functions that already exist in libc. In this post, we exploit a stack overflow to call system('/bin/sh') without writing a single byte of shellcode.

Exploiting a Stack Buffer Overflow on Windows
Apr 12 Exploit Development

In a previous tutorial we discusses how we can exploit a buffer overflow vulnerability on a Linux machine. I wen through all theories in depth and explained each step. Now today we are going to jump...

Common Web Application Attacks
Feb 05 Application Security

Web applications are one of the most targeted surfaces by attackers. This is primarily because they are accessible over the internet, making them exposed and potentially vulnerable. Since these...

DSA 0x202 - Sorting Algorithms
Sep 01 DSA

Hmm.., It is going to be a lengthy article. Sorting is an important topic in Data structures and Algorithms. ## Why Sorting Matters **It unlocks binary search.** Finding a value in an unsorted...

Exploiting a format string vulnerebility on Linux
Apr 12 Exploit Development

A misused printf can leak stack contents, read arbitrary memory, and write to arbitrary addresses. Format string vulnerabilities are one of the most powerful bug classes in C and they're the key to defeating ASLR. In this post, we exploit printf from leak to shell.