Back to rankings

m0nad/Diamorphine

C

LKM rootkit for Linux Kernels 2.6.x/3.x/4.x/5.x/6.x (x86/x86_64 and ARM64)

rootkitlkm-rootkitckernelkernel-modulesecurity-toolslinuxlinux-kernelhackinghacking-toolbackdoormalware
Star Growth
Stars
2.4k
Forks
482
Weekly Growth
Issues
10
1k2k
Oct 2014Sep 2018Aug 2022Jul 2026
README

Diamorphine

Diamorphine is a LKM rootkit for Linux Kernels 2.6.x/3.x/4.x/5.x/6.x (x86/x86_64 and ARM64)

Features

  • When loaded, the module starts invisible;

  • Hide/unhide any process by sending a signal 31;

  • Sending a signal 63(to any pid) makes the module become (in)visible;

  • Sending a signal 64(to any pid) makes the given user become root;

  • Files or directories starting with the MAGIC_PREFIX become invisible;

  • Source: https://github.com/m0nad/Diamorphine

Install

Verify if the kernel is 2.6.x/3.x/4.x/5.x/6.x

uname -r

Clone the repository

git clone https://github.com/m0nad/Diamorphine

Enter the folder

cd Diamorphine

Compile

make

Load the module(as root)

insmod diamorphine.ko

Uninstall

The module starts invisible, to remove you need to make it visible

kill -63 0

Then remove the module(as root)

rmmod diamorphine

References

Wikipedia Rootkit https://en.wikipedia.org/wiki/Rootkit

Linux Device Drivers http://lwn.net/Kernel/LDD3/

LKM HACKING https://web.archive.org/web/20140701183221/https://www.thc.org/papers/LKM_HACKING.html

Memset's blog http://memset.wordpress.com/

Linux on-the-fly kernel patching without LKM http://phrack.org/issues/58/7.html

WRITING A SIMPLE ROOTKIT FOR LINUX https://web.archive.org/web/20160620231623/http://big-daddy.fr/repository/Documentation/Hacking/Security/Malware/Rootkits/writing-rootkit.txt

Linux Cross Reference http://lxr.free-electrons.com/

zizzu0 LinuxKernelModules https://github.com/zizzu0/LinuxKernelModules/

Linux Rootkits: New Methods for Kernel 5.7+ https://xcellerator.github.io/posts/linux_rootkits_11/

FlipSwitch: a Novel Syscall Hooking Technique https://www.elastic.co/security-labs/flipswitch-linux-rootkit

Related repositories
mrexodia/TitanHide

Hiding kernel-driver for x86/x64.

CMIT Licenseanti-debuggingdriver
2.8k486
Idov31/Nidhogg

Windows rootkit for Intel x64 with 25+ features, demonstrating rootkit techniques compatible with all Windows 10 and Windows 11 versions.

C++GNU General Public License v3.0cppcybersecurity
idov31.github.io/posts/lord-of-the-ring0-p1
2.4k358
bytecode77/r77-rootkit

Fileless ring 3 rootkit with installer and persistence that hides processes, files, network connections, etc.

CMIT Licenserootkitfileless
bytecode77.com/r77-rootkit
2.2k461
milabs/awesome-linux-rootkits

awesome-linux-rootkits

Creative Commons Zero v1.0 Universalawesomeawesome-list
2.1k267
ExpLife0011/awesome-windows-kernel-security-development

windows kernel security development

rootkitbootkit
2.1k537
JKornev/hidden

🇺🇦 Windows driver with usermode interface which can hide processes, file-system and registry objects, protect processes and etc

Cwindowssecurity
2k503
xl7dev/WebShell

Webshell && Backdoor Collection

PHPPackagistGNU General Public License v2.0webshellshell
blog.safebuff.com/WebShell/
2k1k
h3xduck/TripleCross

A Linux eBPF rootkit with a backdoor, C2, library injection, execution hijacking, persistence and stealth capabilities.

CGNU General Public License v3.0backdoorebpf
2k244
MatheuZSecurity/Singularity

Stealthy Linux Kernel Rootkit for modern kernels (6x)

CMIT Licenseftracehooking
1.7k189
jm33-m0/emp3r0r

Self‑healing Gossip Mesh C2 with Assisted Peer Discovery, Cross-Platform BOF Execution, and Scriptable Agents.

GoGo ModulesMIT Licensepost-exploitationstealth
infosec.exchange/@jm33
1.7k278
skyw4tch3r/RootKits-List-Download

This is the list of all rootkits found so far on github and other sites.

GNU General Public License v3.0rootkitsredteam
1.5k392
ZeroMemoryEx/Chaos-Rootkit

Now You See Me, Now You Don't

C++driverkernel
hackandhide.com/chaos-rootkit-internals-explained/
1.1k162