Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatic installation #3

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

automatic installation #3

jnyrup opened this issue Sep 8, 2011 · 1 comment

Comments

@jnyrup
Copy link

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
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants