All Projects → nurupo → Rootkit

nurupo / Rootkit

Licence: gpl-2.0
Linux rootkit for Ubuntu 16.04 and 10.04 (Linux Kernels 4.4.0 and 2.6.32), both i386 and amd64

Programming Languages

c
50402 projects - #5 most used programming language

Labels

Projects that are alternatives of or similar to Rootkit

first-steps-and-hardening-in-ubuntu-server-and-docker
First Steps in Ubuntu (Server) / Hardening and Config With Docker
Stars: ✭ 28 (-95.34%)
Mutual labels:  rootkit
rkorova
ld_preload userland rootkit
Stars: ✭ 34 (-94.34%)
Mutual labels:  rootkit
Hideprocess
A basic Direct Kernel Object Manipulation rootkit that removes a process from the EPROCESS list, hiding it from the Task Manager
Stars: ✭ 329 (-45.26%)
Mutual labels:  rootkit
satan
🔓 x86 Linux Kernel rootkit for Debian 9 (4.9.0-11-686-pae)
Stars: ✭ 31 (-94.84%)
Mutual labels:  rootkit
SMM-Rootkit
SMM rootkit similar to LoJax or MosaicRegressor
Stars: ✭ 44 (-92.68%)
Mutual labels:  rootkit
lsrootkit
Rootkit Detector for UNIX
Stars: ✭ 53 (-91.18%)
Mutual labels:  rootkit
ebpfkit-monitor
ebpfkit-monitor is a tool that detects and protects against eBPF powered rootkits
Stars: ✭ 80 (-86.69%)
Mutual labels:  rootkit
Vegile
This tool will setting up your backdoor/rootkits when backdoor already setup it will be hidden your spesisifc process,unlimited your session in metasploit and transparent. Even when it killed, it will re-run again. There always be a procces which while run another process,So we can assume that this procces is unstopable like a Ghost in The Shell
Stars: ✭ 478 (-20.47%)
Mutual labels:  rootkit
raisin
Reverse shell and rootkit
Stars: ✭ 18 (-97%)
Mutual labels:  rootkit
S6 pcie microblaze
PCI Express DIY hacking toolkit for Xilinx SP605
Stars: ✭ 301 (-49.92%)
Mutual labels:  rootkit
tor-rootkit
A Python 3 standalone Windows 10 / Linux Rootkit using Tor.
Stars: ✭ 142 (-76.37%)
Mutual labels:  rootkit
NtSymbol
Resolve DOS MZ executable symbols at runtime
Stars: ✭ 78 (-87.02%)
Mutual labels:  rootkit
Father
LD_PRELOAD rootkit
Stars: ✭ 59 (-90.18%)
Mutual labels:  rootkit
Vegile
This tool will setting up your backdoor/rootkits when backdoor already setup it will be hidden your spesisifc process,unlimited your session in metasploit and transparent. Even when it killed, it will re-run again. There always be a procces which while run another process,So we can assume that this procces is unstopable like a Ghost in The Shell
Stars: ✭ 601 (+0%)
Mutual labels:  rootkit
Emp3r0r
linux post-exploitation framework made by linux user
Stars: ✭ 419 (-30.28%)
Mutual labels:  rootkit
HideProcessHookMDL
A simple rootkit to hide a process
Stars: ✭ 43 (-92.85%)
Mutual labels:  rootkit
superhide
Example of hooking a linux systemcall
Stars: ✭ 48 (-92.01%)
Mutual labels:  rootkit
Awesome Linux Rootkits
awesome-linux-rootkits
Stars: ✭ 583 (-3%)
Mutual labels:  rootkit
Hvmi
Hypervisor Memory Introspection Core Library
Stars: ✭ 438 (-27.12%)
Mutual labels:  rootkit
linux-rootkits-red-blue-teams
Linux Rootkits (4.x Kernel)
Stars: ✭ 56 (-90.68%)
Mutual labels:  rootkit

Linux Rootkit

A simple Linux kernel rootkit written for fun, not evil.

Functionality

The rootkit can do the following:

  • Grant root privileges to a userland process
  • Hide process by PID
  • Unhide a previously hidden process by PID
  • Hide files or directories by their name
  • Unhide previously hidden files or directories
  • Hide itself
  • Unhide itself
  • Protect against being unloaded by the user
  • Disable the unload protection

Supported Platforms

The rootkit was tested to work on Linux kernels 2.6.32-38 and 4.4.0-22 as provided by Ubuntu in Ubuntu 10.04.4 LTS and Ubuntu 16.04 LTS respectively, but it should be very easy to port to kernels in-between, as well as newer ones.

There is some architecture-specific code in the rootkit which is implemented only for x86 and x86-64 architectures. That's the code for finding the system call table, disabling write-protected memory and one of the two function hooking methods. It should be very easy to port to a new architecture, and some of this code is not strictly necessary for the rootkit to function, e.g. the non-portable hooking method could be stripped away, though you must be a very boring person if you are willing to miss on the fun of function hooking that overwrites machine code of the target kernel function such that it calls our hook function instead.

The rootkit was tested only with 1 CPU core, so it may or may not function correctly on a multi-core system. It likely won't run very well on a multi-core system as the rootkit was written expecting there to be only 1 thread executing anything at any given time, so it lacks atomic writes/reads and mutexes around list data structures.

Build

Setting Up Environment

Warm up your VM of choice.

Grab and install the desired Ubuntu image:

Kernel / arch x86 x86-64
2.6.32 Ubuntu 10.04.4 i386 (694M) [torrent] [iso] Ubuntu 10.04.4 amd64 (681M) [torrent] [iso]
4.4.0 Ubuntu 16.04 i386 (647M) [torrent] [iso] Ubuntu 16.04 amd64 (655M) [torrent] [iso]

For Ubuntu 10.04, patch the package repository address:

sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

Install a compiler, Linux headers and all other things required for us to build the rootkit:

apt-get update
apt-get install build-essential

Make sure not to call apt-get upgrade, as it would update the kernel, when the rootkit was tested only on the pre-installed kernel version.

Actual Building

make

Use

Load rootkit:

insmod rootkit.ko

Use rootkit:

$ ./client --help
Usage: ./client [OPTION]...

Options:
  --root-shell            Grants you root shell access.
  --hide-pid=PID          Hides the specified PID.
  --unhide-pid=PID        Unhides the specified PID.
  --hide-file=FILENAME    Hides the specified FILENAME globally.
                          Must be a filename without any path.
  --unhide-file=FILENAME  Unhides the specified FILENAME.
  --hide                  Hides the rootkit LKM.
  --unhide                Unhides the rootkit LKM.
  --help                  Print this help message.
  --protect               Protects the rootkit from rmmod.
  --unprotect             Disables the rmmod protection.

Unload rootkit:

./client --unhide
./client --unprotect
rmmod rootkit.ko

YOU ARE OUT OF YOUR MIND TO PUBLICY RELEASE SUCH MALICIOUS CODE ONLINE, YOU ARE LITERALLY ARMING SCRIPT KIDDIES WITH NUKES!!!1

Not really, there are many articles online on how to write a Linux rootkit with the full source code provided, not to mention the countless GitHub repositories.

References

The following materials were used in writing this rootkit:

License

This project is licensed under GPLv2.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].