Your first kernel bugs, on kernels with SMEP, SMAP and usually KASLR turned off. When the kernel jumps to an address you control, it can simply run code that lives in your own process, with full kernel privileges. That is ret2usr: the easiest way to see what "running in ring 0" means.
What you will learn
- How a loadable kernel module exposes a device (open/read/write/ioctl) and how to talk to it from C
- How to debug a guest kernel (
-s, gdb,/proc/kallsyms,vmlinux-to-elf/extract-vmlinux) - Getting root from kernel context:
commit_creds(prepare_kernel_cred(0))(or&init_credon newer kernels) - Getting back to userland cleanly (
swapgs; iretq) with a saved user context - Why SMEP/SMAP and KASLR exist, by exploiting kernels that lack them
Prerequisites
Userland pwn basics (stack overflows, calling conventions, writing small static C programs). No kernel background needed.
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 |