ProBackend
Threats & Attacks
3 days ago6 min read

Linux eBPF Rootkits: Underground Code, Malware and Kernel Defenses

Linux eBPF Rootkits: Underground Code, Malware and Kernel Defenses

What underground eBPF rootkit tutorials and security research reveal about Linux kernel risks, verified malware, and practical detection.

Linux eBPF Rootkits: What Underground Tutorials and Security Research Reveal

SEO description: Flare found eBPF rootkit code and tutorials circulating on underground forums. Here’s how those claims compare with research demonstrations, BPFDoor, Symbiote and reported LinkPro activity—and what remains unverified.

eBPF rootkit code turns up in underground tutorials

Flare found Russian-language forum posts sharing eBPF rootkit code and tutorials. The material adds to published research, conference demonstrations and malware analyses documenting ways attackers could use Linux’s eBPF interface. The posts show that code and implementation ideas are circulating; they do not establish that the tutorials work as described or have been used in intrusions.

eBPF is a standard Linux technology used for network observability, performance analysis and security products. Its programs run at supported kernel hooks, where they can observe or influence activity reported by user-space tools. The kernel verifier checks whether a program meets safety constraints, not whether its purpose is legitimate.

A different route into the kernel

Many traditional Linux rootkits use loadable kernel modules (LKMs) to intercept system calls or hide activity. Module loads can be monitored, and lsmod lists modules currently loaded. eBPF programs use the kernel’s bpf() interface and can attach to supported hooks, observe system calls or process network traffic without appearing as conventional modules. A separate Linux rootkit example illustrates credential theft through a compromised package supply chain.

Defenders need to inspect loaded programs, who loaded them, their attachment points and whether their behavior fits the host’s role. A verifier-approved program can still be designed to conceal an attacker’s activity.

Packet filters, preload libraries and research demonstrations

BPFDoor, documented in 2022 by PwC and Elastic Security Labs, is Linux malware activated through packet filtering. The analyzed sample used a classic BPF socket filter to recognize specially crafted TCP, UDP or ICMP traffic. Once activated, it could open a reverse shell or redirect traffic to the implant. Public reporting linked BPFDoor to activity against organizations in the Middle East and Asia and attributed it to the Red Menshen actor. Its packet-filtering technique is a precedent, but BPFDoor is distinct from later eBPF rootkit projects.

Symbiote uses another route. It relies on the dynamic linker to preload a malicious shared library into affected processes. The library intercepts calls to setsockopt() that attach classic BPF filters through SO_ATTACH_FILTER, then prepends filter instructions designed to conceal selected traffic from packet capture. The technique combines a user-space preload mechanism with kernel packet filtering.

Research projects have demonstrated more direct eBPF capabilities. The ebpfkit demonstration appeared at Black Hat USA and DEF CON in 2021. TripleCross combined syscall hooks with XDP and traffic-control programs to demonstrate concealment, execution hijacking, library injection and command and control. Boopkit demonstrated hiding directory entries by hooking getdents64; its published work also described remote activation approaches. These are research demonstrations, not evidence of confirmed intrusion use.

In October 2025, Synacktiv reported LinkPro after investigating a compromise that began with an exposed Jenkins server. LinkPro used eBPF programs to hide host activity and activate a backdoor when it received a specially crafted packet. The reported sequence began with access through the exposed service, followed by deployment of the rootkit.

What the forum posts describe

Flare found Russian-language posts sharing code and step-by-step instructions. One post on the Duty Free forum described an implant inspired in part by BPFDoor and Symbiote. Its author included source code and screenshots presented as demonstrations. The tutorial described triggering the implant with a TCP SYN packet carrying a particular window size, hiding processes through a getdents64 hook and encrypting command-and-control traffic with AES-256-GCM.

The post also described using XDP to inspect incoming plaintext HTTP traffic and drop packets matching a list of 43 IP addresses the author associated with antivirus vendors. Flare identified ten related Pastebin posts containing XDP packet-processing code and timing thresholds expressed in microseconds.

Exploit code needs independent testing

Flare also found exploit code circulating on several platforms. One frequently reposted sample targeted CVE-2017-16995, an older Linux BPF verifier flaw involving incorrect sign extension. The case highlights kernel implementation vulnerabilities alongside abuse of supported features.

Flare described a more recently circulating, unverified local privilege-escalation proof of concept involving kTLS and eBPF sockmaps. The code purported to corrupt the page cache for /etc/passwd and add an account with UID 0. Its claim to work on kernels from version 4.18 onward was inaccurate: upstream Linux 4.18 lacks a BPF helper used by the code. Successful escalation on Ubuntu 22.04 or 24.04 had not been verified.

One examined exploit sample included a source-code comment crediting Claude with generating BPF instructions. The comment records the author’s claim of AI assistance; it does not establish that an AI system independently found or exploited the vulnerability.

What defenders can check

An eBPF program load may not produce the familiar signal of a new kernel module. User-space process and network tools can also give an incomplete picture if an attacker has altered host reporting or filtered activity lower in the stack.

Monitor calls to bpf(), inventory loaded programs and maps, and review attachment points. bpftool can help responders inspect programs; endpoint telemetry can identify the process and identity that requested a load. Scrutinize unexpected hooks affecting operations such as getdents64 or execve, along with unapproved XDP and traffic-control attachments. Compare program types, instructions, attachments, owners and lifecycles with known-good baselines; names alone are weak evidence.

Restrict permission to load BPF programs, minimize privileged container access, keep kernels and relevant packages current, and reduce exposure of services that could provide initial access. Send BPF-related events to central logging. During an investigation, compare kernel and cloud telemetry with commands run locally rather than relying on the host’s own view.

Observability and networking agents also use eBPF. Document approved programs and change procedures, establish baselines for each host role, and preserve program metadata and host evidence before remediation when practical.

Reading the evidence

The record spans analyzed malware (BPFDoor and Symbiote), research demonstrations (ebpfkit, TripleCross and Boopkit), a reported compromise involving LinkPro, and Flare’s forum posts and exploit samples. The forum material establishes that code and claims are circulating, not that the described techniques have been validated or used in intrusions. Taken together, the findings give defenders specific techniques to monitor but do not establish widespread eBPF rootkit deployment.

For Linux infrastructure, the practical priorities are limiting privileged access, maintaining supported kernels, tracking program loads and attachments, and preserving evidence beyond a single user-space view.

Sources

linux ebpf rootkitslinux ebpf rootkits

Linux eBPF rootkit code turns up in underground tutorialsLinux eBPF rootkit code turns up in underground tutorials