Skip to content
Threat Feed
medium advisory

Detection of Malicious Linux Kernel Module Loading via Insmod

The execution of the insmod utility on Linux systems is a high-risk indicator often associated with the deployment of rootkits for persistence and privilege escalation.

The 'insmod' utility is a standard Linux command used to insert a module into the kernel. While this is a legitimate administrative function for hardware drivers or file system support, it is a primary technique used by threat actors to install malicious Loadable Kernel Modules (LKMs) or rootkits. Once a malicious module is loaded, the attacker gains the ability to intercept system calls, hide processes or files, and maintain long-term persistence with the highest level of system privileges. This activity is critical for detection engineering teams because kernel-level malware operates beneath the visibility of traditional user-mode security agents, often rendering standard defensive controls ineffective if not detected at the point of initial insertion.

Impact

Successful exploitation allows an attacker to operate within the kernel space, leading to full system compromise, persistent unauthorized access, and the potential to bypass or disable security software on the compromised host.

Recommendation

Deploy detection logic to monitor process execution for the usage of the insmod utility, especially when executed by non-administrative users or atypical parent processes.

  • Enable Sysmon for Linux Event ID 1 logging to capture process creation telemetry.
  • Implement the provided Sigma rule to alert on unauthorized kernel module insertion.
  • Establish a baseline of known-good kernel module loading events to reduce noise from administrative activity.

Immediate actions

Deploy Sigma detection rule to monitor for insmod execution by non-root users.

Detection Engineering 48h

Threat Hunt

Search logs for unusual kernel module insertions occurring outside of defined maintenance windows.

T1547.006 medium medium confidence hunt now

Data: Process creation logs including command line arguments.

Mitigations

Implement Linux kernel module signing to restrict loading to trusted, cryptographically signed modules.

medium IT Operations

T1547.006

Detection coverage 1

Detect Linux Kernel Module Insertion via Insmod

medium

Detects the use of the insmod utility to load a kernel module, which may indicate the installation of a rootkit.

sigma tactics: persistence, privilege-escalation techniques: T1547.006 sources: process_creation, linux

Detection queries are available on the platform. Get full rules →