This repository contains educational examples of stack-based buffer overflow vulnerabilities in C programs.
The goal is to illustrate how improper bounds checking can lead to control-flow hijacking, and how basic memory protection mechanisms affect exploitation techniques.
A buffer overflow occurs when a program writes more data into a memory buffer than it was designed to hold. In low-level languages such as C, this can overwrite adjacent memory and potentially alter the program’s control flow.
This project presents three progressive scenarios:
- A basic stack-based buffer overflow allowing execution to be redirected to another function.
- A buffer overflow allowing execution of injected shellcode when no memory protections are enabled.
- A buffer overflow in the presence of a non-executable stack, illustrating how modern protections constrain exploitation.
The focus is on understanding the vulnerability and its security implications rather than providing weaponized exploits.
Academic project – Master 1 Cybersecurity – Université libre de Bruxelles (ULB).