Linux Rootkits: Evolution, Hooking Techniques and Tradecraft

· Original article ↗

Summary

Elastic Security Labs examines Linux rootkit evolution and techniques for hiding activity, including user-space hooks, LKMs, eBPF, io_uring and kernel hooking methods, with their limitations and detection considerations.

Key points

  • Linux rootkits pursue stealth and persistence through user-space methods such as LD_PRELOAD and kernel-space mechanisms including LKMs and eBPF.
  • The article traces rootkit techniques from shared-object hooks and LKMs to eBPF and emerging io_uring abuse.
  • It describes FlipSwitch as a way to patch a syscall call site in x64_sys_call, bypassing the effect of Linux 6.9’s changed syscall dispatch on syscall-table hooks.
  • Other techniques covered include syscall-table and inline patching, VFS hooks, ftrace callbacks and kprobes, with discussion of their constraints and risks.
  • Loaders may use droppers, in-memory injection or custom kernel loading; the article also discusses privilege escalation and persistence through systemd, cron or udev.
  • The article says io_uring can batch operations and reduce per-operation syscall visibility, but does not itself install global hooks.
  • Suggested detection approaches include memory forensics, kernel integrity checks, auditing modules and hooks, and monitoring eBPF, kprobes and io_uring activity.

Article Details

Attack Vectors
  • Malicious shared objects use LD_PRELOAD or other dynamic-linker mechanisms to intercept library calls and conceal artifacts.
  • Kernel rootkits redirect execution through syscall-table changes, inline patches, VFS hooks, ftrace callbacks, or kprobes.
  • eBPF programs attach to kernel events without loading a conventional kernel module; experimental io_uring techniques reduce per-operation syscall visibility.
  • Rootkit loaders may download or unpack payloads, elevate privileges, clear evidence, and establish persistence.
Defensive Notes
  • Inspect kernel memory and integrity, including function prologues, syscall dispatch code, VFS pointers, and unexpected modules.
  • Audit active ftrace callbacks, kprobes, and eBPF programs.
  • Check for suspicious LD_PRELOAD or LD_AUDIT settings, unexpected mapped shared objects, and altered GOT entries.
  • Monitor io_uring activity for unusual batching, registered resources, and metadata operations.

MITRE ATT&CK

CVE

Malware

adore-ngClassic examples of this era include Adore-ng (2004+), a syscall-hooking LKM capable of hiding itself; Diamorphine (2016), a popular hooker that remains functional on many distributions; and Reptile (2020), a modernAzazelProminent examples include the Jynx rootkit (2009), which hooked libc functions to hide files and connections, and Azazel (2013), which combined shared object injection with optional kernel-mode features.Diamorphine[Tool / technique names ] named rootkits and POCs observed – Reptile, Diamorphine (and TripleCross, Boopkit, FlipSwitch, RingReaper)JynxProminent examples include the Jynx rootkit (2009), which hooked libc functions to hide files and connections, and Azazel (2013), which combined shared object injection with optional kernel-mode features.JynxKitNotable examples include JynxKit (2012) and Azazel (2014), user-mode rootkits that hook dozens of libc functions to hide processes, files, network ports, and even enable backdoors.KnarkNotable examples of rootkits that used this technique include Diamorphine, Knark, and Reveng_rtkit.KoviDRecent rootkits such as KoviD, Singularity, and Umbra have utilized ftrace-based hooks.PUMAKITillustrating each method with examples and real-world rootkit samples (such as Reptile, Diamorphine, PUMAKIT, and, more recently, FlipSwitch) to understand how they work and how kernel evolution has challenged them.Reptile#FlipSwitch #ReptileReveng_rtkitNotable examples of rootkits that used this technique include Diamorphine, Knark, and Reveng_rtkit.SingularityRecent rootkits such as KoviD, Singularity, and Umbra have utilized ftrace-based hooks.SuckITIDT hooking is used by educational and older rootkits such as SuckIT.suterusuAnother example is Suterusu, which also applied inline patching for some of its hooks.UmbraRecent rootkits such as KoviD, Singularity, and Umbra have utilized ftrace-based hooks.

Products

Tools

Industries

Related Articles