Techniques
Sample rules
Kernel Module Removal
- source: elastic
- technicques:
- T1547
- T1562
Description
Kernel modules are pieces of code that can be loaded and unloaded into the kernel upon demand. They extend the functionality of the kernel without the need to reboot the system. This rule identifies attempts to remove a kernel module.
Detection logic
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event") and (
process.name == "rmmod" or
(process.name == "modprobe" and process.args in ("--remove", "-r"))
) and process.parent.name in ("sudo", "bash", "dash", "ash", "sh", "tcsh", "csh", "zsh", "ksh", "fish")