r/linux • u/Beneficial-Sock-5130 • 9d ago
Kernel Locking down unnecessary kernel mods
how do admins deal with the flood of ai-malware now thats loading custom mods?
I tried a tool called modulejail, it basically generates a blacklist of mods that arent actively used by running OS
https://modulejail.com/#install
its helpful, but any attacker can still bypass this by running modprobe -i
ie here, I ran mdulejail, it created blacklist txt file, running lsmod <mod> doesnt load it now, but running lsmod -i <mod> still loads
there is no concrete way to ban a module from loading short of running kernel.modules_disabled=1 , which doesnt survive a reboot
is there a way to block a mod from loading regardless of context? This is a huge attck vector now, and I wanted to audit our servers and lock down anything unecessary , like the copyfail exploit few months ago using alg mod

View all comments
6
u/SurreptitiousSophist 9d ago
If you'd like to disable kennel module loading at every boot, just put modules_disabled=1 into your grub config file. Or am I missing something?