| .. | |||
| Makefile | 5 years ago | ||
| README.md | 5 years ago | ||
| ftrace_helper.h | 5 years ago | ||
| rootkit.c | 5 years ago | ||
Updated to use ftrace instead of directly modifying kernel memory
Similar to Section 3.2, we can abuse hooking sys_kill to trigger a function that gives root to any process that sends a 64 signal to a process (as before, signal 64 is normally unused).
According to credentials.rst, we can only modify the cred struct of our own process, and not that of any other process. This means that we can't give an already running process root privileges unless we send the 64 signal from that process! Quite a clever security feature!
All we have to do is send signal 64 to any process (as before, the signal isn't actually sent anywhere!) and we end up being root!
To use:
makeinsmod rootkit.kowhoami64 to any pid, e.g. kill -64 1
whoami again, and observe that you are now root!rmmod rootkit