The process of loading a kernel module into the operating system kernel. Kernel modules are object files that extend the kernel’s functionality, such as adding support for device drivers, new filesystems, or additional system calls. This action can be legitimate (e.g., loading a driver) or malicious (e.g., adding a rootkit).
Data Collection Measures:
-a always,exit -F arch=b64 -S init_module,delete_module
./var/log/syslog
or /var/log/messages
for entries related to kernel module loads.journalctl
to query logs for module loading events: journalctl -k | grep "Loading kernel module"
log
command to query kernel module events: log show --predicate 'eventMessage contains "kextload"' --info
ES_EVENT_TYPE_AUTH_KEXTLOAD
(kernel extension loading events).lsmod
to list loaded kernel modules in real-time.sudo python /path/to/bcc/tools/kprobe -v do_init_module
The process of loading a kernel module into the operating system kernel. Kernel modules are object files that extend the kernel’s functionality, such as adding support for device drivers, new filesystems, or additional system calls. This action can be legitimate (e.g., loading a driver) or malicious (e.g., adding a rootkit).
Data Collection Measures:
-a always,exit -F arch=b64 -S init_module,delete_module
./var/log/syslog
or /var/log/messages
for entries related to kernel module loads.journalctl
to query logs for module loading events: journalctl -k | grep "Loading kernel module"
log
command to query kernel module events: log show --predicate 'eventMessage contains "kextload"' --info
ES_EVENT_TYPE_AUTH_KEXTLOAD
(kernel extension loading events).lsmod
to list loaded kernel modules in real-time.sudo python /path/to/bcc/tools/kprobe -v do_init_module
Domain | ID | Name | Detects | |
---|---|---|---|---|
Enterprise | T1547 | Boot or Logon Autostart Execution |
Monitor for unusual kernel driver installation activity that may configure system settings to automatically execute a program during system boot or logon to maintain persistence or gain higher-level privileges on compromised systems. |
|
.006 | Kernel Modules and Extensions |
LKMs are typically loaded into |
||
Enterprise | T1611 | Escape to Host |
Monitor for the installation of kernel modules that could be abused to escape containers on a host. |