Skip to content

automatic installation #3

Open
jnyrup opened this Issue Sep 8, 2011 · 1 comment

2 participants

@jnyrup
jnyrup commented Sep 8, 2011

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

@dpaneda
dpaneda commented Sep 9, 2011

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.