Root-kits & loadable kernel modules: exploiting the Linux kernel for fun and (educational) profit

This paper discusses how Loadable Kernel Modules (LKM) can be used in Operating Systems (OS) Laboratories to pedagogically enhance an undergraduate student's hands-on experience. We draw inspiration from this technology as it has been applied in the computer security field as a means to compromise running kernels after successfully breaking into an unsecured host. We propose and discuss in detail a new pedagogical approach to introduce students to Linux kernel programming techniques which are relevant to the contents of classic undergraduate operating systems course concepts. This new approach breaks down the complexity and initial overwhelming feeling experienced by students when first confronted to the intimidating source code base of a modern OS. Students are led to develop loadable kernel modules meant to "hack" into a running kernel so that critical system calls and data structures can be unveiled progressively by the instructor. This approach allows for well-delimited forays into "kernel land" that can be tailored to fit any lecture style and students' capabilities specifics.