Linux LKM rootkit
PUMAKIT LKM Rootkit: Traces and Offline Checks
PUMAKIT pairs an ftrace-hooking kernel module with a preload library and a fileless dropper. Its log lines, hidden files, live and offline checks, and recovery.
- Kind
- Linux LKM rootkit · Kernel layer
- Platforms
- Linux
- First seen
- 2024-09
- Status
- In the wild
- Checked by
- Linux kernel
Overview
PUMAKIT is a Linux rootkit kit that Elastic Security Labs analysed in December 2024. The dropper was first uploaded to VirusTotal on 4 September 2024, with no detections at the time. Elastic does not describe victims and does not attribute the kit. Its write-up rests on the samples, so what follows is what those samples do, not a campaign history.
The kit has four stages:
| Stage | Elastic's name | Role |
|---|---|---|
| Dropper | cron | Runs its payloads from memory (memfd) |
| Cover | /memfd:tgt (deleted) | A benign cron binary, run so the process looks normal |
| Loader | /memfd:wpn (deleted) | Poses as /usr/sbin/sshd, checks the environment and loads the kernel module |
| Kernel rootkit | PUMA (puma.ko) | Hooks syscalls through ftrace; carries a .puma-config section |
| Userland rootkit | Kitsune (/lib64/libs.so) | Shared object loaded through LD_PRELOAD |
Elastic describes the module as built for older kernels, likely before 5.7. It relies on kallsyms_lookup_name(), which later kernels stopped exporting.
How it loads and hides
Loading. The dropper embeds every component as ELF data and executes them from anonymous memory files. On a live host, their /proc/<pid>/exe links point to /memfd:… (deleted).
Before loading PUMA, the loader checks the system:
- whether Secure Boot is on, by reading
dmesg; - the kernel symbol tables, from a kernel image it unpacks out of
/boot/vmlinuz-*into/tmp/vmlinuxwith a helper/tmp/script.sh. Both files are deleted afterwards.
The module's .modinfo carries a fake license=GPL so that it can reach GPL-only functions. Elastic reports the kernel's signature warning when it loads: module verification failed: signature and/or required key missing - tainting kernel.
Elastic does not describe how PUMAKIT survives a reboot. It says Kitsune plays a part in persistence and stealth. Kitsune is referenced as LD_PRELOAD=/lib64/libs.so, an environment setting, not /etc/ld.so.preload.
Hooking. PUMA registers ftrace callbacks on 18 syscalls and several kernel functions. Elastic's taxonomy article adds that it also patches the syscall table directly. The hooks Elastic details are:
getdentsandgetdents64: files and directories whose names start withzov_disappear from listings but stay reachable by full path;rmdir: a control channel. Calls on names starting withzaryacarry commands (show the configuration, test that the module is loaded, hide a PID, report the version). One of them gives the caller root credentials throughprepare_credsandcommit_creds.
PUMA also starts user-mode commands through kernel threads. Elastic saw kthreadd spawn commands such as truncate -s 0 /usr/share/zov_f/zov_latest. Its detection article flags that pattern, since user commands rarely have kthreadd as their parent.
Traces on disk
| Location | What | Source |
|---|---|---|
/usr/share/zov_f/, /usr/share/zov_f/zov_latest | Working folder, hidden by the zov_ prefix; the file is truncated repeatedly | Elastic |
Any file or folder named zov_* | Hidden by the module | Elastic |
/lib64/libs.so | Kitsune, the userland rootkit | Elastic |
/tmp/script.sh, /tmp/vmlinux | Temporary helper and unpacked kernel, deleted after use: look in the file system's free space and journal | Elastic |
The cron dropper wherever it was stored | Not named in Elastic's text; it runs the rest from memory | Elastic |
/var/log/kern.log, /var/log/messages, the journal | module verification failed naming the module, an executable stack warning, and segfault lines | Elastic |
| Process start records (auditd, EDR) | Commands whose parent is kthreadd; a process named sshd whose binary is a deleted memfd | Elastic |
Strings from Elastic's YARA rule Linux_Trojan_Pumakit are useful for a byte search of an image or memory:
PUMA %s,Kitsune PID %ld,.puma-config;/usr/share/zov_f,zarya;ping_interval_s,session_timeout_s,c2_timeout_s,kit_so_len;LD_PRELOAD=/lib64/libs.so.
The rule matches on any four. Elastic also lists hashes and the C2 domains under opsecurity1[.]art. Take them from the report.
How to check a host
Live, with caution. PUMA hooks syscalls, so ls, ps and even static tools see the filtered view.
ls -l /proc/[0-9]*/exe 2>/dev/null | grep memfd # programs running from deleted memory files
ps -eo pid,ppid,comm,args | awk '$2 == 2' # user commands whose parent is kthreadd (PID 2)
cat /proc/sys/kernel/tainted
dmesg | grep -iE 'taint|module verification|executable stack'
grep -l 'LD_PRELOAD' /proc/[0-9]*/environ 2>/dev/null
stat /usr/share/zov_f/zov_latest # hidden from listings, but reachable by name
cat /sys/kernel/tracing/enabled_functions # functions with ftrace callbacks (root, tracefs mounted)
- The kernel's ftrace documentation describes
enabled_functionsas a list of every function with a callback attached. Hooks on syscalls orfilldir-type functions from an unknown module deserve a look. Live patching and some security agents also use ftrace. - A rootkit can filter this file too, so a clean result is not proof.
- Kernel threads are children of
kthreadd, so thepsfilter also prints them; look for ordinary programs such ascatortruncatein its output. - Elastic recommends auditd rules on
init_module,finit_moduleanddelete_module. - Capture memory next: the module, the loader and Kitsune may exist only there.
Offline, from an image.
R=/mnt/evidence
ls -la "$R"/usr/share/zov_f "$R"/lib64/libs.so 2>/dev/null
find "$R" -xdev -name 'zov_*' 2>/dev/null
zgrep -hE 'module verification|executable stack|segfault' "$R"/var/log/kern.log* "$R"/var/log/syslog* 2>/dev/null
journalctl -D "$R"/var/log/journal _TRANSPORT=kernel -o short-iso | grep -iE 'taint|module verification'
grep -rn 'LD_PRELOAD' "$R"/etc "$R"/root "$R"/home/*/.[a-z]* 2>/dev/null
dpkg --root="$R" -S /lib64/libs.so 2>&1 # or: rpm --root "$R" -qf /lib64/libs.so
On a clean analysis machine the zov_ names are visible. A /lib64/libs.so that no package owns, exporting libc functions, is the Kitsune lead to follow. Search the whole image, including unallocated space, for the YARA strings above. The deleted /tmp files may survive there.
What the checker looks for
The linuxkernel module can see:
- The kernel log line
module verification failednaming the module, as "Kernel log: unsigned module loaded", whenkern.logormessageswas collected; and, from the collect script's_live/outputs, "Kernel tainted by an out-of-tree or unsigned module". - A module file, if PUMA was ever written under
lib/modules/: "Unsigned module among signed modules", "Module unknown to the kernel build and to every package", "Resolves unexported kernel symbols" for thekallsyms_lookup_nameimport or kprobe lookup, and "Redirects kernel functions with ftrace" for theregister_ftrace_functionandftrace_set_filter_ipimports. Elastic does not say whether the module is ever stored as a file. - Kitsune's library,
/lib64/libs.so, when it is in the collection: "Library replaces libc directory and file functions" if it exports libc's directory-listing or file functions. Elastic reportsLD_PRELOAD, which lives in environments and unit files the checker does not read; if/etc/ld.so.preloadnamed the library, "Library preloaded into every program" would follow.
The checker cannot see:
- the memfd processes,
kthreadd-spawned commands and ftrace callbacks: they exist only on the running system or in memory; - the
zov_folders, which it does not search for; - the journal, which it does not read.
Removal and recovery
- Capture memory, then image the disk. The dropper runs its stages from memory, so a reboot loses the loader and possibly the only copy of the module. Volatility 3's
linux.malware.hidden_modules,linux.tracing.ftraceandlinux.malware.check_syscallcover the hiding PUMA does. See memory forensics on Linux Forensics. - Find the dropper and its trigger. The name
cronsuggests it hides among scheduled jobs. Check crontabs, units and shell startup files for what launched it. Also check what setLD_PRELOADfor Kitsune. - Rebuild the host. Kernel code with a root-granting control channel ran on it. Removing
/lib64/libs.soand thezov_folders is not enough to trust it again. - Rotate credentials and review access from the host. Block and hunt for the reported C2 infrastructure in proxy and DNS logs.
- Prevent reloading.
- Enforce module signatures (Secure Boot with lockdown, or
module.sig_enforce=1). They refuse an unsigned module such as the one Elastic analysed. - Keep kernels current.
- Alert on
kthreadd-parented user commands and on memfd executables.
- Enforce module signatures (Secure Boot with lockdown, or
See also KoviD, another ftrace-based module, and Symbiote for a preload rootkit on its own.
Sources
Primary public reports, newest first.
- 2026-04-02Hooked on Linux: Rootkit Detection EngineeringElastic Security Labs
- 2026-03-05Hooked on Linux: Rootkit Taxonomy, Hooking Techniques and TradecraftElastic Security Labs
- 2024-12-12Declawing PUMAKITElastic Security Labs
See also
Related families
- DiamorphineLinux LKM rootkit
- KoviDLinux LKM rootkit
- SymbioteLinux user-land rootkit
- ReptileLinux LKM rootkit