Hiding
eBPF Rootkits on Linux: Traces, Checks and Defences
How eBPF programs hide files, processes and traffic without a kernel module, how classic BPF differs, and how to find them live, in memory and on disk.
- Goal
- Hiding
- Layer
- Kernel
- Platforms
- Linux
- ATT&CK
- T1014
- Also known as
- eBPF rootkit
- Used by
- TripleCross
- Checked by
- None: no module reads its traces
Overview
eBPF lets verified bytecode run inside the Linux kernel, attached to events: system call tracepoints, kprobes, network hooks such as XDP and traffic control (TC), and more. It powers observability and security tools. It also gives an intruder with root a rootkit that needs no kernel module: no .ko file, no module list entry, no taint line from a module load.
Elastic's taxonomy places eBPF rootkits in the late 2010s, after module rootkits, and names TripleCross and boopkit. Most public examples are research tools. LinkPro, which Synacktiv found in a compromised AWS environment in 2025, is one documented in an intrusion (Synacktiv).
eBPF programs cannot change kernel code. They change what a program receives, rewrite or drop packets, and keep state in maps. They also disappear at reboot, so every eBPF rootkit needs something on disk to load it again.
How it works
| Attach point | What a rootkit does there | Example |
|---|---|---|
System call tracepoints (sys_enter_*, sys_exit_*) | After getdents64 or read returns, overwrites the program's buffer with the bpf_probe_write_user() helper | TripleCross hides files and edits what sudo reads |
| kprobes and kretprobes | Reads arguments; on functions that allow it, overrides the return value (needs CONFIG_BPF_KPROBE_OVERRIDE) | LinkPro makes bpf() return -ENOENT (no such entry) for its own program IDs |
| XDP | Inspects incoming packets in the driver, before the network stack; drops or redirects them | Trigger packets for TripleCross and LinkPro |
| TC egress or ingress | Rewrites packets leaving or entering an interface | Backdoor replies (TripleCross), port rewriting (LinkPro) |
Lifetime. A program stays loaded while something holds it: the loader's file descriptor, a pin in the BPF file system at /sys/fs/bpf, or an attachment such as a TC filter. Pinned programs survive their loader's exit (Linux Forensics: eBPF programs). Nothing survives a reboot, so TripleCross adds cron and sudoers files, and LinkPro installs /etc/systemd/system/systemd-resolveld.service, named to resemble systemd-resolved.
Privileges. Loading these programs needs root, or CAP_BPF (Linux 5.8 and later, capabilities(7)) with the related capabilities. kernel.unprivileged_bpf_disabled only blocks callers without CAP_SYS_ADMIN or CAP_BPF (sysctl documentation); it does nothing against root.
Classic BPF is not eBPF
Classic BPF (cBPF) is the older packet filter that capture tools attach to a socket with the SO_ATTACH_FILTER socket option; libpcap is its biggest user. The kernel converts classic socket filters internally, but they are not loaded through bpf() (kernel socket filtering documentation).
Symbiote works at that level, from userland. Intezer reports that its preloaded library hooks the libc function setsockopt. When a capture tool attaches a filter with SO_ATTACH_FILTER, Symbiote "prepends its own bytecode" so that its own traffic never reaches the capture (Intezer). Intezer's text calls that bytecode eBPF; the option it names takes a classic BPF program. Either way, Symbiote loads no eBPF program of its own: its filter lives inside the capture tool's socket and goes away with it. It is a preload rootkit, not an eBPF rootkit. BPFDoor's magic-packet filter is also classic BPF; see magic-packet backdoors.
How families use it
| Family | eBPF use | Source |
|---|---|---|
| TripleCross | A libbpf loader (kit) attaches tracepoint programs on getdents64, read, openat, execve and timerfd_settime to hide files, escalate privileges, hijack execution and inject a library; an XDP program watches for backdoor packets and a TC egress program sends replies. Persistence through /etc/cron.d and /etc/sudoers.d | Repository and thesis |
No other catalogue family uses eBPF programs. Outside the catalogue, Elastic's bpf_probe_write_user detection rule fired on the public boopkit and nysm tools (Elastic, 2026). LinkPro, found in the wild, pairs a "Hide" module (tracepoints on getdents, a kretprobe on sys_bpf) with a "Knock" module (XDP and TC). Synacktiv makes no formal attribution (Synacktiv).
Traces it leaves
| Where | Trace | Notes |
|---|---|---|
| Kernel, live | Programs in bpftool prog, maps in bpftool map, attachments in bpftool link and bpftool net | Type, name, load time, user and owning PIDs |
/sys/fs/bpf/ | Pinned programs and maps | Gone at reboot |
/proc/<pid>/fd | Links to anon_inode:bpf-prog and anon_inode:bpf-map in the loader process | Live only |
| Audit log | type=BPF ... prog-id=N op=LOAD and op=UNLOAD | Linux 5.6 and later, with auditd running (commit) |
kern.log, journal | is installing a program with bpf_probe_write_user helper that may corrupt user memory! | Kernels before 6.14 |
kern.log, journal | Lockdown: ...: use of bpf to write user RAM is restricted | Lockdown refused the helper |
| Disk | The loader, eBPF object files (file reports eBPF), and the cron, sudoers or unit files that restart it | The dependable offline trace |
How to check a host
Live, as root, early. Use a trusted bpftool.
bpftool prog show; bpftool map show; bpftool link show
bpftool net show # XDP, tc and netfilter attachments
ip -d link show | grep -i xdp
ls -laR /sys/fs/bpf/
ls -l /proc/[0-9]*/fd 2>/dev/null | grep -E 'bpf-(prog|map)'
dmesg | grep -iE 'bpf_probe_write_user|use of bpf to write user RAM'
ausearch -m BPF -i 2>/dev/null | tail -n 40
bpftoolasks the kernel through thebpf()system call, and an eBPF rootkit can tamper with that. LinkPro hides its programs frombpftoolwith a kretprobe onsys_bpf, but Synacktiv found its maps and links still listed. A link or map whose program is missing frombpftool progis a strong sign.- systemd, container networking and security agents load programs too. Compare with a known-good host of the same build.
- Linux Forensics' eBPF programs page explains every field.
Memory. Capture memory before rebooting: programs exist nowhere else. Volatility 3's linux.ebpf "enumerates eBPF programs" from the image, without going through bpf(), so a hook on that system call does not hide them from it.
Offline, from an image.
R=/mnt/evidence
find "$R" -xdev -type f -size -20M -exec file {} + 2>/dev/null | grep -i 'eBPF'
ls -la "$R"/etc/cron.d "$R"/etc/sudoers.d "$R"/etc/systemd/system
zgrep -hE 'bpf_probe_write_user|use of bpf to write user RAM' "$R"/var/log/kern.log* "$R"/var/log/syslog* 2>/dev/null
ausearch -if "$R"/var/log/audit -m BPF -i 2>/dev/null | head -40
What the checker looks for
None of the checker's modules sees eBPF programs, so this page lists no checks. The linuxkernel module reads kernel modules, their load configuration, ld.so.preload, shared objects and the kernel log's module lines. An eBPF rootkit has no module, no module configuration and no module taint line. The checker does not read eBPF objects, /sys/fs/bpf, cron or sudoers files, and does not flag the bpf_probe_write_user warning. If kern.log is in your collection, search it by hand as above.
One fallback does show: when LinkPro's eBPF hiding fails, it writes /etc/libld.so into /etc/ld.so.preload (Synacktiv). The checker raises "Library preloaded into every program" for that entry.
Mitigation and recovery
- Kernel lockdown, integrity mode, refuses "use of bpf to write user RAM", the helper TripleCross depends on. Confidentiality mode also refuses "use of bpf to read kernel RAM" (security.c).
cat /sys/kernel/security/lockdownshows the mode. - Limit who holds
CAP_BPFandCAP_SYS_ADMIN, including in containers, and keepkernel.unprivileged_bpf_disabledset. - Audit
bpf(). Elastic recommends auditing map creation, program load and attach, tuned per environment (Elastic, 2026). Keep the auditBPFrecords. - Know your kernel options. LinkPro's hiding needed
CONFIG_BPF_KPROBE_OVERRIDE; without it, it fell back told.so.preload.
Recovery. Record the bpftool outputs and capture memory first: a reboot unloads the programs and leaves only the loader. Remove the loader and its persistence from the image or a rescue boot. A program that could rewrite what sudo read or redirect execve leaves nothing on the host trustworthy. Rebuild and rotate credentials.
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
- 2025-10-14LinkPro: eBPF rootkit analysisSynacktiv
- 2022-07-03TripleCross v0.1.0 releaseGitHub
- 2022-06-09Symbiote Deep-Dive: Analysis of a New, Nearly-Impossible-to-Detect Linux ThreatIntezer (with BlackBerry)
- 2021-10-27TripleCross source repository and thesisGitHub
- 2019-12-06bpf: Emit audit messages upon successful prog load and unloadLinux kernel (git.kernel.org)
See also
Related techniques
- ftrace and kprobe hookingHiding
- Magic-packet backdoorsBackdoors and covert channels
- Dynamic linker preloading (LD_PRELOAD)Hiding
Families that use it
- TripleCrosseBPF rootkit