kernelroll
kernelroll copied to clipboard
automatic installation
For Ubuntu 11.04 (should work on others too) I created this small script for automatic installation. I don't know if it works on kernels >= 3, but in case it don't it is pretty simple to modify. it takes one argument which is the path to the rickroll file.
!/bin/bash
a=$(sudo grep "R sys_call_table" /boot/System.map-$(uname -r)) b=${a:0:16} sed -i -e s/ffffffff81400300/$b/ kernelroll.c make sudo insmod kernelroll.ko rollfile=$1
Yes this works also works on kernels 3.X, as long as the system have the System map file, which is not the case of some distros.
However, here are some improvements:
This only works on x64 systems, its better to parse file like:
systabledir=`grep sys_call_table /boot/System.map-$(uname -r) | awk '{ print $1; }'`
Also, there is no need to change kernelroll file, the module also accepts the param sys_call_table.
The cool thing would be the module be able to found dynamically the sys_call_table direction, but that seems pretty hard on recent kernels.