← All Threat Hunting ReportsThreat Hunting Exercise

Threat Hunting Exercise: Analyzing Linux Loadable Kernel Module (LKM) Rootkit Dataset

This hunt uses a simulated Linux kernel/auditd dataset (linux_lkm_rootkit_2022-08-18T060000.json) capturing T1014: Rootkit, where an attacker loads a malicious Loadable Kernel Module to hide processes, files, and network connections from userspace tools (ps, ls, netstat), while maintaining a hidden backdoor.

Step 1: Hypothesis Formation

Hypothesis: An unsigned or unlisted kernel module is inserted via insmod/modprobe, after which standard userspace enumeration tools stop reporting a process/connection that is independently visible via a kernel-level or out-of-band data source (e.g., /proc raw inspection, network flow logs) - the classic signature of rootkit-based hiding. Indicators:

Null Hypothesis: A legitimate, unsigned in-house or vendor-specific kernel module (e.g., a custom hardware driver, monitoring agent) was loaded through a documented change. Invalidate by checking the change-management record and confirming the module's provenance/build source.

Rationale: Kernel-level rootkits defeat nearly all userspace-only detection tooling, since the compromised kernel itself controls what ps, ls, and netstat are allowed to see; this hunt validates cross-referencing an out-of-band data source (network flow logs, hypervisor-level introspection) against userspace tool output as the only reliable way to catch a kernel-level hider.

Step 2: Data Sources and Scope

Step 3: Key Findings

Parsed events (5 shown) confirm a kernel module was loaded and immediately hidden from lsmod, after which a backdoor process and its network connection became invisible to local ps/netstat but remained visible via NetFlow and hypervisor introspection.

Timestamp (UTC)HostEventDetailIOC/Why Suspicious?
2022-08-18 06:00:11lnx-web-node12auditd SYSCALLinit_module for /tmp/.hid/nf_hook_helper.ko, loaded by rootStaging IOC: module loaded from /tmp, a non-standard driver path, with a name mimicking a legitimate netfilter helper.
2022-08-18 06:00:15lnx-web-node12(lsmod check)nf_hook_helper does not appear in lsmod output moments after loadingSelf-Hiding IOC: a legitimately-loaded module always appears in lsmod; its absence confirms the module is actively concealing itself from the kernel module list.
2022-08-18 06:01:30lnx-web-node12Firewall/NetFlowOutbound connection from 10.230.5.9:51422 to 91.203.145.7:4444 (reverse shell pattern)Ground-Truth IOC: network-layer flow logs, external to the compromised host, see the connection the rootkit is hiding.
2022-08-18 06:01:31lnx-web-node12(local netstat/ps check)No corresponding entry for port 51422 in netstat -tnp or any process in ps aux matching the connection's PIDConcealment Confirmed: mismatch between external ground truth (NetFlow) and local userspace tool output is definitive rootkit evidence.
2022-08-18 06:01:35lnx-web-node12Hypervisor introspectionKVM-level process list shows PID 8841 ([kworker/u8:2] - spoofed kernel-thread name) actively holding the socket to 91.203.145.7Masquerade IOC: the hidden process disguises itself with a name mimicking a legitimate kernel worker thread, confirming deliberate process-hiding rather than a monitoring gap.

Validation:

Step 4: Recommendations & Next Steps

Hypothesis confirmed - an attacker loaded a self-hiding kernel module rootkit that concealed a reverse-shell process and its network connection from local ps/netstat, detected only via external NetFlow and hypervisor-level introspection!