kvm_probing is a toolkit for probing, analyzing, and experimenting with KVM (Kernel-based Virtual Machine) environments. It includes utilities for kernel module probing, host escape testing, and automated exploitation workflows. The project is intended for research, security analysis, and educational purposes related to virtualization and kernel security.
- Kernel module probing and analysis
- Host escape testing scripts
- Automated exploit runner
- Python utilities for probing and automation
kvm_probe.c: C source for probing KVM kernel modules.kvm_probe_drv.c: C source for a kernel driver used in probing.host_escape.py: Python script for testing host escape scenarios.prober.py: Python utility for probing and automation.exploit_runner.sh: Shell script to automate exploit execution and testing.README.md: Project documentation.
- Linux system with KVM support
- GCC (for building C sources)
- Linux kernel headers (for building kernel modules)
- Python 3.x
- Root privileges (for kernel module operations)
-
Clone the repository:
git clone https://github.com/nickharrison2002000/kvm_probing.git cd kvm_probing -
Install required packages:
sudo apt update sudo apt install -y make xxd gdb build-essential binutils linux-compiler-gcc-12-x86 linux-kbuild-6.1 wget wget -q https://debian.sipwise.com/debian-security/pool/main/l/linux/linux-headers-6.1.0-21-common_6.1.90-1_all.deb wget -q https://debian.sipwise.com/debian-security/pool/main/l/linux/linux-headers-6.1.0-21-amd64_6.1.90-1_amd64.deb sudo dpkg -i linux-headers-6.1.0-21-common_6.1.90-1_all.deb sudo dpkg -i linux-headers-6.1.0-21-amd64_6.1.90-1_amd64.deb
-
Build the C sources:
gcc -o kvm_probe kvm_probe.c gcc -o kvm_probe_drv kvm_probe_drv.c
-
Move files and build kernel module:
mkdir -p ~/build/kvm_probe mv kvm_prober.c ~/build/kvm_probe mv kvm_probe_drv.c ~/build/kvm_probe mv Makefile ~/build/kvm_probe cd ~/build/kvm_probe make sudo insmod *.ko sudo cp kvm_prober /usr/bin
Run the kernel probe utility:
sudo ./kvm_probeRun the host escape script:
sudo python3 host_escape.pyUse the shell script to automate exploit tests:
sudo bash exploit_runner.shRun the prober script for custom probing:
python3 prober.pyTo probe the KVM kernel module and test for vulnerabilities:
sudo ./kvm_probe
sudo python3 host_escape.pyNicholas Harrison
For more details, see comments in each source file and script.