Uninstalling the rootkit
You can uninstall the rootkit from the machine using the installation script.
To uninstall, run the following command in the module-creation folder:
sudo ./install.sh remove
What the removal does
The uninstall script performs the following steps:
- Unloads the kernel module using
rmmod. If the module is currently hiding itself, it first writestoggleto/proc/epirootkitto make it removable. - Deletes the driver directory at
/lib/modules/<kernel-version>/kernel/drivers/rk_file_epirootkit/. - Cleans
/etc/modulesto prevent the module from loading on reboot. - Runs
depmodto update the module dependency database. - Cleans build artifacts via
make clean.
Manual removal
If the install script is unavailable, you can remove the module manually:
sudo rmmod epirootkit
sudo rm -rf /lib/modules/$(uname -r)/kernel/drivers/rk_file_epirootkit/
sudo depmod