-
Notifications
You must be signed in to change notification settings - Fork 471
Open
Description
Hi, I tried to test this tool in wsl2 ubuntu 24.04.
I have build the kernel according to https://stackoverflow.com/questions/58546126/insmod-error-could-not-insert-module-helloworld-ko-operation-not-permitted.
Then I build and try to insmod, lsmod, rmmod.
liudonghua@LDH-DESKTOP:~/Diamorphine$ dmesg|grep diamor
liudonghua@LDH-DESKTOP:~/Diamorphine$
liudonghua@LDH-DESKTOP:~/Diamorphine$ modinfo diamorphine.ko
filename: /home/liudonghua/Diamorphine/diamorphine.ko
description: LKM rootkit
author: m0nad
license: Dual BSD/GPL
depends:
retpoline: Y
name: diamorphine
vermagic: 6.6.87.2-microsoft-standard-WSL2+ SMP preempt mod_unload modversions
liudonghua@LDH-DESKTOP:~/Diamorphine$ sudo insmod diamorphine.ko
liudonghua@LDH-DESKTOP:~/Diamorphine$ echo $?
0
liudonghua@LDH-DESKTOP:~/Diamorphine$ sudo lsmod
Module Size Used by
liudonghua@LDH-DESKTOP:~/Diamorphine$ dmesg|grep diamor
[ 55.252143] diamorphine: loading out-of-tree module taints kernel.
liudonghua@LDH-DESKTOP:~/Diamorphine$ touch 123 MAGIC_PREFIX_abc
liudonghua@LDH-DESKTOP:~/Diamorphine$ ls
123 MAGIC_PREFIX_abc Module.symvers diamorphine.c diamorphine.ko diamorphine.mod.c diamorphine.o
LICENSE.txt Makefile README.md diamorphine.h diamorphine.mod diamorphine.mod.o modules.order
liudonghua@LDH-DESKTOP:~/Diamorphine$ sudo kill -63 0
Real-time signal 29
liudonghua@LDH-DESKTOP:~/Diamorphine$ rmmod diamorphine
rmmod: ERROR: ../libkmod/libkmod-module.c:856 kmod_module_remove_module() could not remove 'diamorphine': Operation not permitted
rmmod: ERROR: could not remove module diamorphine: Operation not permitted
liudonghua@LDH-DESKTOP:~/Diamorphine$ dmesg|grep diamor
[ 55.252143] diamorphine: loading out-of-tree module taints kernel.
liudonghua@LDH-DESKTOP:~/Diamorphine$ sudo insmod diamorphine.ko
insmod: ERROR: could not insert module diamorphine.ko: Invalid parameters
liudonghua@LDH-DESKTOP:~/Diamorphine$ dmesg|grep diamor
[ 55.252143] diamorphine: loading out-of-tree module taints kernel.
[ 163.397297] sysfs: cannot create duplicate filename '/kernel/btf/diamorphine'
[ 163.397370] failed to register module [diamorphine] BTF in sysfs: -17
[ 163.397382] diamorphine: module is already loaded
liudonghua@LDH-DESKTOP:~/Diamorphine$
Metadata
Metadata
Assignees
Labels
No labels