A hands-on C security lab for learning how memory corruption vulnerabilities work from the ground up.
VulnerabilitiesLab is a progressive collection of small, intentionally vulnerable C programs designed to build a practical understanding of memory corruption, debugging, exploitation, and defense.
Each challenge builds on concepts introduced in previous challenges, progressing from understanding normal memory behavior to analyzing vulnerabilities, exploiting them in a controlled local environment, and applying mitigations.
Understand → Observe → Exploit → Defend → Verify
The focus is on understanding why a vulnerability works, not simply following an exploit recipe.
- C
- GCC or Clang
- GDB
- Make
- Linux / WSL
The lab is entirely local and does not require a network service or external target.
Introduces the fundamentals of stack memory, pointers, addresses, and stack frames.
Introduces the first memory corruption vulnerability and examines its effects.
Demonstrates how an out-of-bounds array access can corrupt another value stored on the stack.
Demonstrates how an out-of-bounds write can corrupt a function pointer and redirect program control flow.
Additional challenges will be added progressively.
From the repository root:
make
Executables are placed in:
bin/
For example:
./bin/challenge01
Each challenge has its own debug target:
make debug01
make debug02
make debug03
make debug04
Or directly:
gdb ./bin/challenge04
This repository contains intentionally vulnerable programs for educational purposes.
Run the challenges only in a controlled environment that you own or are authorized to use.