A comprehensive collection of binary exploitation challenges for learning and practicing various vulnerability classes and exploitation techniques. Each challenge includes both vulnerable source code and working exploit scripts.
src/ - Vulnerable C programs (challenges)
solves/ - Python exploit scripts using pwntools
explaination/ - Detailed explanations for each challenge
bin/ - Compiled binaries (generated by make)
- 1_stack.c - Simple ret2win buffer overflow
- 2_stack.c - Basic shellcode injection
- 11_stack.c - Advanced buffer overflow techniques
- 12_stack.c - Complex stack manipulation
- 13_stack.py - Stack-based challenges (Python)
- 14_stack.c - Advanced ROP without gadgets
- 3_stack.c - Format string information disclosure
- 10_stack.c - Format string GOT overwrite for arbitrary code execution
- 4_stack.c - ROP chain construction without memory leaks
- 5_stack.c - Stack canary bypass with format string leak
- 7_stack.c - ret2libc with ROP chains
- 9_stack.c - ret2plt exploitation technique
- 6_stack.c - PIE (Position Independent Executable) bypass
- 8_stack.c - ASLR (Address Space Layout Randomization) bypass
- 11_stack-TODO.py - ret2csu technique
- 12_stack-TODO.py - ret2dlresolve exploitation
- 13_stack-TODO.py - SROP (Sigreturn-Oriented Programming)
- 14_stack-TODO.py - One gadget exploitation
makemake clean./bin/{challenge_name}python3 solves/{challenge_name}.pypython3 solves/{challenge_name}.py GDBMost challenges are compiled with security mitigations disabled for educational purposes:
- No Stack Protection (
-fno-stack-protector) - Disables stack canaries - Executable Stack (
-z execstack) - Allows shellcode execution - No PIE (
-no-pie) - Fixed memory layout - No RELRO (
-Wl,-z,norelro) - Writable GOT/PLT
Advanced challenges may enable specific mitigations to demonstrate bypass techniques.
- Start with
1_stack.c- Basic buffer overflow - Progress to
2_stack.c- Shellcode injection - Learn format strings with
3_stack.c
- Master ROP with
4_stack.c - Practice canary bypass with
5_stack.c - Understand PIE bypass with
6_stack.c
- ret2libc exploitation with given leak
7_stack.c - ASLR bypass techniques with
8_stack.c&9_stack.c - Advanced format string attacks with
10_stack.c
Each challenge includes detailed explanations in the explaination/ directory covering:
- Vulnerability analysis
- Exploitation techniques
- Key learning objectives
- Step-by-step exploit development