rupurt is a Linux rootkit detection tool that uses eBPF for kernel-level behavioral monitoring alongside traditional signature scanning. With 280+ signatures and 15 detection modules, it's designed to find threats that other tools miss.

The Rootkit Problem in 2026

Rootkits have evolved. The classic LKM rootkit (load a kernel module, hook system calls, hide everything) is well-understood. Modern rootkits use eBPF programs, modify kernel data structures without hooking, or live entirely in memory.

Traditional tools like rkhunter and chkrootkit rely primarily on file-based signatures. They're great at finding known rootkits that leave files on disk, but they struggle with:

  • Memory-only rootkits that never touch the filesystem
  • eBPF rootkits like TripleCross that use legitimate kernel mechanisms
  • DKOM attacks that manipulate kernel data structures directly
  • Custom implants that don't match known signatures

rupurt's 15 Detection Modules

#ModuleWhat It Checks
1kernel-checkKernel symbol table integrity
2syscall-tableSystem call hooking
3hidden-filesFiles hidden from readdir()
4hidden-procsProcesses hidden from /proc
5hidden-portsNetwork ports hidden from netstat
6module-checkMalicious kernel modules
7memory-scanIn-memory artifacts
8ebpf-monitorMalicious eBPF programs
9binary-checkModified system binaries
10log-checkTampered log files
11network-checkSuspicious connections
12persistenceBoot persistence mechanisms
13container-checkContainer escape indicators
14apt-implantsKnown APT implant signatures
15integrityFile integrity verification

eBPF: The Double-Edged Sword

eBPF is incredibly powerful. It lets you run sandboxed programs in the kernel with minimal overhead. Security tools love it for tracing and monitoring. But attackers love it too.

rupurt's ebpf-monitor module enumerates all loaded eBPF programs and checks for suspicious behavior:

// Simplified eBPF program enumeration
void check_ebpf_programs(void) {
    uint32_t id = 0;
    int fd;
    struct bpf_prog_info info = {};
    
    while (bpf_prog_get_next_id(id, &id) == 0) {
        fd = bpf_prog_get_fd_by_id(id);
        bpf_obj_get_info_by_fd(fd, &info, sizeof(info));
        
        // Check for suspicious program types
        if (info.type == BPF_PROG_TYPE_KPROBE ||
            info.type == BPF_PROG_TYPE_TRACEPOINT) {
            
            // Verify against allowlist
            if (!is_known_program(info.name, info.tag)) {
                report_suspicious_ebpf(&info);
            }
        }
        close(fd);
    }
}
🔴 Important

rupurt requires root privileges to perform kernel-level checks. Always run as sudo ./rupurt --full-scan for complete detection coverage.

Signature Database

The 280+ signatures cover:

  • 45 LKM rootkits — Diamorphine, Reptile, Kovid, and more
  • 20 eBPF rootkits — TripleCross, pamspy, ebpfkit
  • 35 userland rootkits — Azazel, Jynx2, Vlany
  • 40 APT implants — Drovorub (GRU), Winnti, Rekoobe
  • 50+ backdoors — Turla, cd00r, Prism
  • 90+ generic patterns — Suspicious behaviors

Signatures are JSON-based and community-contributed. Adding your own is as simple as dropping a JSON file in signatures/custom/.

Full source and documentation at github.com/bad-antics/rupurt.