Turning a memory-corruption bug in a compiled program into control of what it executes. The pwn category of CTFs, the foundation of vulnerability research, and the practical reason “rewrite it in a memory-safe language” is a security argument.
Every note assumes the authorization in rules of engagement. This is lab, CTF, and authorised-testing material — the techniques are identical to a crime, and the authorisation is the whole difference.
The one idea: an exploit is a chain — a bug gives you a small primitive (a read, a write, one controlled register), and exploitation is composing primitives into control of RIP. Modern defences didn’t fix the bugs; they made the chaining harder, so the era shifted from injecting code to reusing the target’s own code.
Why this exists
The vault covered offensive security (ethical-hacking) but treated binary exploitation as a single bullet. It’s what OSCP-adjacent work and most CTF pwn demands, and it’s the natural application of C, computer architecture and OS — so it earns a section.
Reading order
01–02 are the base case; 04–05 are the modern reality. Read in order — each note is a defence added on top of the last, and its bypass.
- process-memory-and-why-it-breaks — [Intermediate] — the memory map, the register set, the bug taxonomy, and why memory-unsafe languages made this a discipline
- the-stack-and-buffer-overflows — [Intermediate] — the classic exploit mechanically: overwrite the return address, find the offset with a cyclic pattern,
ret2win - shellcode — [Intermediate] — the payload, its three strange constraints (no nulls, position-independent, tiny), and why it’s decreasingly injected as raw bytes
- modern-mitigations — [Intermediate] — NX, canaries, ASLR, PIE, RELRO — what each stops, what each doesn’t, and reading
checksecas a recipe - bypassing-mitigations — [Advanced] — ret2libc, the info-leak that defeats ASLR, and ROP: writing a program in the target’s own gadgets
- format-strings-and-the-heap — [Advanced] — the bug that gives a read and a write for free, and use-after-free, which runs the modern real-world scene
- the-toolkit-and-practice — [Intermediate] — pwntools, pwndbg, ROPgadget, and the ladder of places to practise legally
If you only take three things
checksecfirst. The mitigations enabled are the spec of which technique you need (04).- Modern exploitation reuses code, it doesn’t inject it — NX forced ROP, ASLR forced the leak-first pattern (05).
- Develop every exploit locally against
process(), so hitting the real target is one line (07).
Related
- cybersecurity curriculum map · active-directory — the other big offensive gap
- the threat taxonomy — where buffer overflows were named but not taught
- C · computer architecture · OS
- build your own allocator — write the bugs, then attack them
- build your own debugger —
ptrace,0xCC, ELF and DWARF. Build the tooling these techniques defeat, andgdbstops being a black box halfway through every exploit
Software engineering
Infrastructure & security
Computer science
Hardware & engineering