Free lesson 1 of 11 from C for Hackers — Pointers, the stack, and your first buffer overflow — smash the stack and win, hands-on in gdb.. No account, no card.
C has no seatbelts: you manage memory by hand, and the CPU trusts you completely. That's why the fastest software and the deepest vulnerabilities live in C. Learn how C lays out memory and you learn how exploits are born.
By the end of this course you'll take a vulnerable C program and overwrite its return address to hijack execution — the classic "ret2win" — entirely in your lab with gcc and gdb.
ls -la ~/cexploit/ cat ~/cexploit/README.txt cat ~/cexploit/vuln.c # read the source — the bug is in here
vuln.c, and run ./vuln once. What does it ask for, and does it ever call win() on its own?cat ~/cexploit/vuln.c echo hi | ~/cexploit/vuln # prints "returned normally (no win)"
win() exists but is never called by main. Your whole job is to reach it anyway — by corrupting the stack.
⚖️ Exploit only the lab binary or software you own. Memory-corruption attacks on others' systems are illegal.
11 lessons · knowledge checks · final exam · verifiable certificate · in-browser Live-Lab
Unlock all courses · CHF 9/month Buy only this course · CHF 19