Virtual Table Security: Basic Exploitation and Protection with CTF Example
summary
Walks through a CTF where a use-after-free plus allocator reuse gives two primitives: reclaim a freed object’s chunk and then overwrite its first eight bytes (the vptr). A concrete exploit adds 8 to the vptr so an introduce call resolves to give_shell, yielding remote code execution on the demo server. Shows GDB for vtable discovery, uses fsanitize/CFI to make the program crash, and explains how ASLR and CFI prevent this primitive chain.
AI-written summary · about
chapters (10)
- 0:00Introduction and speaker background
- 1:08Virtual tables and polymorphism basics
- 4:21CTF challenge overview
- 5:46Memory allocator reuse explained
- 9:23First primitive: use-after-free
- 10:28Second primitive: virtual pointer hijack
- 12:54Defenses: ASLR and CFI
- 17:11CFI enforcement details
- 19:59Recap and takeaways
- 21:01Q&A session
