This repository contains the materials for the Linux Kernel Exploitation Lab. Thanks to @deathNet123 for this lab. It uses qemu with debian images to simulate a kernel environment.
./create-image.sh -d bookworm -f full
This script will automatically downlaod the specified kernel version and compile it with required debug symbols and configurations. For instance I have used 6.1.38 version of the kernel.
./build.sh 6.1.38 6.x
./startvm
To copy the files to the VM, you can use following command:
./copy2vm <file>
And this will copy the file to the /home/user directory of the VM.
By mounting the filesystem img file and then chroot into it.
Mount the filesystem
cd img && mkdir mountpt
sudo mount bookworm.img mountpt/
Chroot into the filesystem
cd mountpt
sudo chroot .
Install the dependencies, utilities or library
apt install <pkg-name>