rbertin / basic-rootkit

just a basic rootkit for learning how to playing sys_call_table

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

basic-rootkit

I posted this very basic rootkit (and old) on github only for educational purpose and is no longer usable on modern linux system.

In the first part the rootkit just sets parameter for creating a characters driver.

In the second part (most interesting) the rootkit is reading the System.map-* file for getting memory address of the sys_call_table symbol. When found, a hook is set on the syscall __NR_open (after disabled the cr0 bit).

Then, if a userland process call the "open" function with the adequate parameter (in my case it's /tmp/pwn), so the process gain root privileges.

About

just a basic rootkit for learning how to playing sys_call_table


Languages

Language:C 94.4%Language:Shell 3.6%Language:Makefile 2.0%