Skip to content

Course

Binary Exploitation Fundamentals

From /proc/self/maps to tcache poisoning: the memory layouts, the smash, the mitigations, and the modern exploit shape — with the gdb+pwntools practice loop that makes it real.

14 lessons

Course Q&A

Keep reading

Related articles from the SudoSecurity blog.

Reviews

Enrolled members can rate this course.

No reviews yet.

How Memory Actually Works

The virtual address space, stack frames and the calling convention, and glibc's heap allocator — the three layouts every exploit is built on.

  1. 01The Address Space: Reading /proc/self/mapsHow execve maps an ELF into virtual memory — r-xp code, rw-p data, the stack — and why page-table permissions, not conventions, decide what you can run.10mOpen
  2. 02Stack Frames and the System V ABIWhat call, push rbp, and ret actually do: where the saved return address sits relative to your buffers, and why ret doesn't care who wrote it.12mOpen
  3. 03The Heap: malloc, Chunks, and Freelist MetadataWhat malloc and free really do in glibc — chunk headers, bins, the tcache — and why allocator metadata living inside attacker memory is the whole heap game.13mOpen

Smashing the Stack

Buffer overflows as a layout problem: finding the offset, controlling the saved return address, and what shellcode really is.

  1. 01Anatomy of a Buffer OverflowWhat gets() does to a 64-byte buf: a linear overwrite through saved rbp into saved rip, and why the compiler never stood between your input and control flow.12mOpen
  2. 02Controlling the Return AddressFinding the overwrite offset with cyclic patterns, landing a chosen address in saved rip, and why the overwrite is sloppy — everything between buf and rip is yours.13mPremium
  3. 03Shellcode and the syscall ABIWhat injected code actually is — syscall numbers in rax, args in rdi/rsi/rdx — and when injected bytes can even run on a modern kernel.14mPremium

The Mitigations

NX, stack canaries, ASLR/PIE, RELRO, and format-string bugs — what each defense actually does and the bypass each one invites.

  1. 01NX: Data Pages That Refuse to ExecuteThe page-table bit that killed classic stack shellcode in 2004, and how its existence created code-reuse exploitation — ret2libc and everything after.11mPremium
  2. 02Stack Canaries: The Tripwire Before retHow the fs:0x28 cookie guards the saved return address, why it's per-process not per-function, and the three ways real exploits get past it.12mPremium
  3. 03ASLR and PIE: When Every Address MovesWhat randomization actually randomizes — region bases, not offsets — and why every modern exploit opens with a leak.13mPremium
  4. 04RELRO, the GOT, and the PLTLazy binding's writable jump table, ret2plt as a leak primitive, and what Full RELRO actually closes.12mPremium
  5. 05Format String Bugs: printf as an Interpreterprintf(user_input) hands the attacker a stack-walking parser — %x leaks, %n writes — and why it still turns up wherever attacker strings get logged.13mPremium

The Modern Exploit

ROP and ret2libc chains, heap exploitation primitives, and how to practice it all safely and legally.

  1. 01ROP and ret2libc: Programming the StackChaining pop rdi; ret gadgets through your overwrite, the movaps alignment crash that isn't your fault, and the leak-then-chain shape of real exploits.15mPremium
  2. 02Heap Exploitation: tcache Poisoning, UAF, Double FreeCorrupting freelist pointers stored in attacker memory, safe-linking since glibc 2.32, and the grooming discipline behind Baron Samedit and Looney Tunables.16mPremium
  3. 03Practicing Binary Exploitation SafelyWhere this material is legal to run, the gdb+pwntools+checksec lab build, and the graded path from pwn.college to real writeups.10mPremium