Detection of Tainted Kernel Module Loading on Linux
The loading of tainted Linux kernel modules may indicate the presence of rootkits or malicious persistence mechanisms used to bypass security controls and intercept system calls.
Tainted kernel modules are code objects that are unsupported, modified, or compiled outside of the official kernel source tree. On Linux systems, these modules are flagged by the kernel to indicate potential instability or lack of vendor verification. From a security perspective, the loading of a tainted module is a high-interest event, as it is a common technique for adversaries to deploy rootkits. Rootkits operate at the kernel level, allowing them to hook system calls, hide backdoor processes, mask malicious network connections, and persist across system reboots. Defenders should monitor for these events to identify unauthorized kernel modifications, which are often indicative of a compromise by an attacker who has already achieved root-level access.
Impact
Successful deployment of a malicious tainted kernel module results in total system compromise, where the attacker gains the ability to intercept all kernel-level operations, render security tools ineffective, and maintain stealthy persistence that survives standard user-space remediation.
Recommendation
- Deploy the Sigma rule provided in this brief to detect the loading of modules with taint flags set.
- Establish a baseline of approved kernel modules for all Linux hosts and alert on any deviation from this baseline.
- Enforce Secure Boot and kernel module signing policies to prevent the execution of unsigned or unauthorized code in the kernel space.
- Investigate alerts by verifying the module's file path, hash, and build metadata against legitimate system update logs and change requests.
Immediate actions
Deploy kernel module load monitoring rules to identify tainted modules
Mitigations
Enable Secure Boot and kernel module signing policies
T1547.006
Detection coverage 1
Detect Kernel Module Loaded with Tainting Flags
mediumDetects the loading of a tainted kernel module on Linux systems, which may indicate rootkit installation or unauthorized kernel-level persistence.
Detection queries are available on the platform. Get full rules →