Skip to main content

๐Ÿ›ฐ๏ธ Talus

๐Ÿงช View animated test results โ€” 9/9 โ†’

eBPF endpoint security agent for Linux โ€” detect ransomware behaviour, respond at the kernel edge.

Talus traces execve, openat, connect, accept, sendto and recvfrom syscalls at the kernel level using eBPF tracepoints, streams events into userspace through per-CPU perf buffers, and surfaces them in a live terminal FrankenTUI โ€” while continuously scoring per-process file-open rates against a sliding window to flag ransomware-style mass file access, and automatically SIGKILL-ing offending processes.

Project status: production-quality Rust + eBPF engineering showcase.


๐ŸŽฏ What it doesโ€‹

CapabilityDescription
Kernel-level tracingexecve and openat tracepoints attached on every online CPU
Verifier-safe kernel codeUserspace pointers read exclusively via bpf_probe_read_user โ€” never dereferenced
Zero-copy event pipelineFixed-size ProcessEvent records streamed through per-CPU PerfEventArray buffers
Live FrankenTUI7-panel cyberpunk interface: events, processes, network, files, extensions, alerts, heatmap
Sliding-window heuristic1-second rolling window per PID; alerts when a process exceeds the configured open rate
Multiple output modesHuman TUI, newline-delimited JSON, plain text log, and a built-in self-diagnostic
Lost-event accountingPerf-buffer overruns are counted and reported, never silently dropped
Single static binaryFull LTO, panic = "abort", symbol-stripped release profile

โš™๏ธ Architectureโ€‹

Kernel-side eBPF programs capture every execve/openat into a compact ProcessEvent record pushed into a PerfEventArray. A dedicated userspace reader thread opens one perf buffer per CPU, decodes events, and forwards them over an MPSC channel to the monitor core, which feeds a 1-second sliding window per PID and emits alerts when the threshold is crossed.

execve/openat โ”€โ–บ eBPF tracepoints โ”€โ–บ EVENTS (PerfEventArray)
โ”‚ per-CPU perf buffers
reader thread โ—„โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ MPSC channel
monitor core (sliding window + alerting)
โ”‚
TUI / JSON / plain / diagnose

See the full architecture for the complete design.

๐Ÿš€ Quick startโ€‹

# Distro-aware installer (apt, dnf, pacman, zypper, apk, xbps)
./install.sh # user-local install to ~/.local
./install.sh --system # system-wide install to /usr/local

# Or build manually
./build.sh
sudo target/release/process-monitor

๐Ÿ–ฅ๏ธ Usageโ€‹

sudo process-monitor # TUI (default when stdout is a terminal)
sudo process-monitor --alert-threshold 100 # raise alert threshold (opens/s)
sudo process-monitor --json | jq . # machine-readable NDJSON
sudo process-monitor --plain # plain text log
sudo process-monitor --diagnose # 5-second end-to-end self-diagnostic

TUI keys: q / Esc / Ctrl+C quit ยท p pause/resume ยท c clear log ยท โ†‘/โ†“/j/k scroll ยท PgUp/PgDn faster ยท Home/End jump.

๐Ÿ›ก๏ธ The ransomware heuristicโ€‹

For every PID, keep a 1-second sliding window of openat calls. If the window contains โ‰ฅ N opens (default 50), emit an alert.

  • Sliding window, not a rate counter โ€” bursts are caught as reliably as steady streams
  • Per-process isolation โ€” no cross-process false positives
  • --alert-threshold 0 disables the heuristic entirely

๐Ÿ“ฆ Project layoutโ€‹

talus-process-monitor/
โ”œโ”€โ”€ process-monitor/ # Userspace: monitor core + TUI + web + FFI
โ”‚ โ””โ”€โ”€ src/
โ”‚ โ”œโ”€โ”€ main.rs # CLI, mode selection, signal handling
โ”‚ โ”œโ”€โ”€ monitor.rs # eBPF loading, perf reader, sliding-window tracker
โ”‚ โ””โ”€โ”€ tui.rs # 7-panel frankentui (ftui) cyberpunk interface
โ”œโ”€โ”€ process-monitor-ebpf/ # Kernel side (#![no_std], aya-ebpf)
โ”‚ โ””โ”€โ”€ src/main.rs # tracepoint hooks โ†’ PerfEventArray
โ”œโ”€โ”€ build.sh # Build script (nightly for eBPF, stable for TUI)
โ”œโ”€โ”€ install.sh # Distro-aware installer / uninstaller
โ””โ”€โ”€ ARCHITECTURE.md # Full design document

๐Ÿ”ง Requirementsโ€‹

  • Linux kernel 5.8+ (eBPF + tracepoint support)
  • root (CAP_BPF / CAP_SYS_ADMIN) to load and attach eBPF programs
  • Rust nightly + rust-src for the eBPF crate; stable for userspace
  • bpf-linker, clang, C compiler; BTF (/sys/kernel/btf/vmlinux) recommended