Once SMEP and SMAP are on, you can no longer run or read your own pages from the kernel. Code reuse is the answer: chain gadgets from the kernel image itself. KPTI adds a second wrinkle: you must switch page tables back before returning to userland.
What you will learn
- Leaking the stack canary and the kernel base (KASLR) from info leaks
- Building kernel ROP chains with gadgets from vmlinux
- Returning to userland under KPTI (the
swapgs_restore_regs_and_return_to_usermodetrampoline, or signal-handler tricks) - Stack pivots when you control RIP but not the stack (pivot gadgets, predictable kernel data, pt_regs)
- Turning a non-stack primitive (OOB index, interpreter bug) into a ROP chain
Prerequisites
Module 01. Comfortable with userland ROP.
References
Challenges
30-Day Scoreboard:
This scoreboard reflects solves for challenges in this module after the module launched in this dojo.
| Rank | Hacker | Badges | Score |