| name | analyzing-linux-kernel-rootkits |
| description | Detect kernel-level rootkits in Linux memory dumps using Volatility3 linux plugins (check_syscall, lsmod, hidden_modules), rkhunter system scanning, and /proc vs /sys discrepancy analysis to identify hooked syscalls, hidden kernel modules, and tampered system structures. |
| domain | cybersecurity |
| subdomain | digital-forensics |
| tags | ["rootkit","linux","kernel","volatility3","memory-forensics","malware-analysis","rkhunter","forensics"] |
| version | 1.0 |
| author | mahipal |
| license | Apache-2.0 |
| nist_csf | ["RS.AN-01","RS.AN-03","DE.AE-02","RS.MA-01"] |
Analyzing Linux Kernel Rootkits
Overview
Linux kernel rootkits operate at ring 0, modifying kernel data structures to hide processes, files, network connections, and kernel modules from userspace tools. Detection requires either memory forensics (analyzing physical memory dumps with Volatility3) or cross-view analysis (comparing /proc, /sys, and kernel data structures for inconsistencies). This skill covers using Volatility3 Linux plugins to detect syscall table hooks, hidden kernel modules, and modified function pointers, supplemented by live system scanning with rkhunter and chkrootkit.
When to Use
- When investigating security incidents that require analyzing linux kernel rootkits
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Detection Gaps & Validation
- Most-missed artifacts: beyond
linux.check_syscall/lsmod, run linux.hidden_modules, linux.check_afinfo/tty_check, linux.kmsg, and linux.malfind, and look for ftrace/kprobes hooks and modified /sys/kernel/. Modern LKM rootkits (Diamorphine, Reptile) hook via ftrace or function-pointer overwrite rather than the syscall table, so a clean syscall table is not a clean kernel.
- Cross-view is the core validation: never trust one source. Compare module lists from
/proc/modules, lsmod, /sys/module/, and the kernel kobject list; compare processes from the task_struct list vs /proc vs pid_hash. A delta between any two views is the rootkit's hiding signature - corroborate each hidden PID/connection across memory, ss, and /proc/net/tcp.
- Anti-forensics that defeats this analysis: rootkits hook
read/getdents64, so live rkhunter/chkrootkit/ls lie. Always work from a memory image acquired with LiME/AVML, and verify modified ps/netstat/ss binaries by SHA-256 against the distro package - do not run the suspect binaries.
- Profile/ISF must match exactly: a Volatility3 symbol table for the wrong kernel build silently yields empty or bogus output that looks like "no rootkit." Confirm the /banner from the dump matches the ISF before trusting any plugin.