Skip to content

An environment and set of utilities aimed at making kernel hacking simple and accessible

License

Notifications You must be signed in to change notification settings

solebox/kernel-hacking

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KernelTLV Linux Hacking Environment

Purpose

This project includes an environment for building a Linux kernel and kernel modules and running them. The environment is created in a virtual machine using a Debian-based Linux distribution.

Requirements

  1. Vagrant
  2. VirtualBox
  3. The vagrant-vbguest plugin (vagrant plugin install vagrant-vbguest).
  4. ~15GB of free space.

Usage

Run vagrant up where you cloned the repo (where Vagrantfile is) to create a shiny new VM with everything you need in it.

This will take a while, but at the end your home directory inside the VM will have the following:

  • linux-source: Linux kernel sources ready to be compiled with the configuration of the running Debian kernel.
  • boot-backup: A backup of /boot, just in case.
  • khack: Source code for the khack utility.
  • module: Scaffold code for a kernel module.

khack and module are set up to be shared with the host operating system, so you can use your favorite editor to edit files. Everything else can be done the traditional way (compile and install the kernel, etc) or using khack for convenience.

khack

khack is a utility meant to simplify and ease the burden of hacking on the kernel. Its source is available under khack and it can be used as simply khack within the VM as it is symlinked into the right place (see setup_vm.sh).

For example:

  • khack kernel make will build the kernel in ~\linux-source.
  • khack kernel install will install the built kernel so that it will run when the VM is restarted.
  • khack kernel running? will report of the latest compiled kernel is actually running.

Experiment and have fun,

KernelTLV Team

About

An environment and set of utilities aimed at making kernel hacking simple and accessible

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 48.5%
  • Shell 28.9%
  • C 21.7%
  • Makefile 0.9%