Join our Newsletter — 33% off our NHI Course
Home› Glossary› Architecture & Implementation› Loadable Kernel Module (LKM)
Architecture & Implementation

Loadable Kernel Module (LKM)

← Back to Glossary
By NHI Mgmt Group Updated October 17, 2026 Domain: Architecture & Implementation

A Loadable Kernel Module (LKM) is code that can be added to an operating system kernel while it is running. It extends kernel functionality without rebooting. Because LKMs execute with kernel privileges, defenders should restrict who can load them and monitor for unauthorised modules, rootkits and persistence.

What a Loadable Kernel Module changes in the trust model

A loadable kernel module extends the operating system at runtime, so it changes the kernel’s behaviour without a reboot. That makes it operationally useful, but it also means the module inherits the kernel’s trust boundary and can affect core security decisions, memory handling, and system integrity.

Because the kernel is the most privileged code on the host, a module is not “just another process extension”. If the module is malicious or altered, it can hide activity, intercept system calls, weaken enforcement, or create durable persistence. Defensive monitoring should treat module insertion as a high-value event, especially on systems that should not normally load third-party code.

How LKMs are used for legitimate functionality

Vendors and administrators use LKMs to add device support, filesystems, network features, and other kernel capabilities after boot. This flexibility is useful in environments where reboot windows are limited or hardware and drivers change frequently. It also explains why module handling is a normal operational task, not automatically a sign of compromise.

The security question is not whether modules exist, but whether loading is controlled. A legitimate module still needs provenance, change control, and compatibility testing, because a bad module can destabilise the host just as easily as a malicious one can subvert it.

Why LKMs are attractive to attackers

Attackers value kernel modules because they run where endpoint visibility is weakest and privilege is highest. A hostile module can implement rootkit behaviour, suppress logging, tamper with security tooling, or maintain persistence in a way that is harder to remove than user-space malware. The Persistence Techniques Guide is a useful companion for understanding how modules fit into broader persistence tradecraft.

Module abuse is especially dangerous when defenders assume “signed” or “installed by an admin” automatically means safe. Attackers often aim to reach module-loading capability indirectly through stolen privileged access, misconfiguration, or a compromised build and deployment path.

Detection and verification for kernel module activity

Defenders should track which modules are present, when they were loaded, and whether the load pattern matches approved change activity. Sudden module insertion, unusual module names, unexpected hashes, or modules that appear after an intrusion are all worth investigation. The MITRE D3FEND Guide is helpful here because it maps defensive techniques to module-load monitoring, kernel artefact analysis, and integrity checking.

Post-incident review should include the module itself, the loader process, related kernel messages, and any signs that detection products were bypassed. If a module was malicious, the host may need a deeper compromise review than a normal uninstall, because the kernel may have been modified at the point where visibility mattered most.

Risk and Threat Considerations

LKMs create a high-impact attack surface because kernel execution can override ordinary operating-system controls. If an attacker can load a malicious module, they may gain persistence, concealment, or a path to disable security controls while appearing to operate normally.

Failure mechanism: Compromise of privileged access, module-loading policy, or module provenance lets hostile code enter the kernel and operate beneath user-space monitoring.

Impact: The host can lose integrity, visibility, and trustworthy enforcement, which may force full incident containment, reimaging, and credential or trust review.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
MITRE ATT&CKT1547.006 — Boot or Logon Autostart Execution: Kernel Modules and ExtensionsDirectly covers kernel module persistence and extension abuse.
Recommendation — Detect and restrict unauthorized kernel module loading as a persistence path.
NIST SP 800-53 Rev 5SI-7 — Software, Firmware, and Information IntegrityApplies because module integrity and trusted loading are central to host integrity.
Recommendation — Verify kernel module integrity before load and flag unauthorized changes.
CIS Controls v8CIS-4 — Secure Configuration of Enterprise Assets and SoftwareSupports controlling kernel-module loading through hardened system configuration.
Recommendation — Harden systems to limit module loading to approved and necessary code.
OWASP Non-Human Identity Top 10NHI-05 — Overprivileged NHIMaps to excessive privilege when service or automation contexts can load modules.
NHI-10 — Human Use of NHIApplies where humans directly operate privileged non-human runtime access paths.
Recommendation — Reduce privileged paths that allow non-human processes to load kernel modules. Separate human administration from privileged module-loading paths and audit each use.

Practitioner Guidance

Why practitioners should care: Treat module loading as a privileged security control, not just a systems-administration detail. The permission to insert code into the kernel is equivalent to a major trust decision, so it should be limited to tightly governed administrative paths and expected maintenance workflows.

What to watch for: Watch for module loads outside approved change windows, unexpected third-party drivers, and any module activity that appears after a suspected intrusion. In Linux environments, module events should be correlated with host integrity signals, system logs, and known-good baselines.

Practitioner takeaway: The safest assumption is that every unexpected module load deserves investigation until provenance, purpose, and change authority are verified.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 17, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org