Simples Rootkit als Linux Kernel Modul. Soll als Skeleton für Kernel Module dienen, sowie einige Techniken der Kernel Rootkits aufzeigen. Blogpost: https://leon-schmidt.dev/blog/wurzelbausatz
  • C 94.3%
  • Shell 3.2%
  • Makefile 2.5%
Find a file
2025-08-11 20:59:51 +02:00
ioctl-client Added IOCTL support: 2024-06-16 13:50:11 +02:00
src Removed default statement from IOCTL handler (collides with READ/WRITE syscalls) 2024-06-18 22:06:44 +02:00
.gitignore Creates standalone module structure and makefile, added more source files 2024-06-04 18:32:39 +02:00
ioctl.h Added IOCTL support: 2024-06-16 13:50:11 +02:00
Kconfig Initial commit 2024-05-19 16:21:17 +02:00
LICENSE Added LICENSE 2025-08-11 20:59:51 +02:00
make-install-nfs.sh Added blinking as kernel thread 2024-06-16 23:50:29 +02:00
Makefile Remove pragma warnings 2024-06-16 12:12:23 +02:00
Makefile.staging Creates standalone module structure and makefile, added more source files 2024-06-04 18:32:39 +02:00
README.md Creates standalone module structure and makefile, added more source files 2024-06-04 18:32:39 +02:00

Wurzelbausatz Kernel Modul

Simple Rootkit as Linux Kernel Module with German flavor, which allows normal users to become root. Just run echo "rk:get-root" > /dev/ttyWBS or echo 1 > /sys/kernel/wbs/get_root and your IDs are all set to 0. Run cat /sys/kernel/wbs/get_root to get the privesc count done with this module.

It also has some more features like controlling on-board LEDs. Get a german manual with: cat /dev/ttyWBS.

Source: https://0x00sec.org/t/kernel-rootkits-getting-your-hands-dirty/1485

Build with DKMS

Todo!

Build manually (examples)

Build for your running kernel:

  • Install your kernel sources (e.g. via package manager)
  • make
  • [INSTALL_MOD_PATH=<path-to-rootfs>] make install

Build with cross-compilation for ARM:

  • Download kernel sources to <path-to-kernel-sources>
  • Configure defconfig, etc. in <path-to-kernel-sources>
  • ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- KERNEL_DIR=<path-to-kernel-sources> make (adjust cross-compiler if required)
  • ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- KERNEL_DIR=<path-to-kernel-sources> INSTALL_MOD_PATH=<path-to-rootfs> make install

Build within kernel sources:

  • Download kernel sources to <path-to-kernel-sources>
  • Clone this repo into <path-to-kernel-sources>/drivers/staging/wurzelbausatz
  • Configure defconfig, etc. in <path-to-kernel-sources>
  • Activate the staging module in make menuconfig
  • ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make modules