Skip to main content

Talus โ€” Userspace TUI

Overviewโ€‹

The userspace component reads eBPF events from perf buffers, maintains process state, runs the ransomware heuristic, and renders a real-time terminal UI.

Event Pipelineโ€‹

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ PerfBuffer โ”‚โ”€โ”€โ”€โ”€โ–บโ”‚ Deserialise โ”‚โ”€โ”€โ”€โ”€โ–บโ”‚ Tracker โ”‚
โ”‚ (async read)โ”‚ โ”‚ (bincode) โ”‚ โ”‚ (PID map) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Heuristic โ”‚
โ”‚ (sliding) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ TUI Render โ”‚
โ”‚ (frankentui)โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Process Trackerโ€‹

Maintains a bounded map of active processes:

struct ProcessInfo {
pid: u32,
ppid: u32,
name: String,
start_time: u64,
file_ops: u64, // total file operations
renames: u64, // rename count in window
last_activity: u64, // last event timestamp
}
  • PID โ†’ ProcessInfo map with LRU eviction
  • Process tree construction from PPID chains
  • Zombie cleanup on process exit

Ransomware Heuristicโ€‹

Sliding-window analysis (default: 60-second window):

Signals Monitoredโ€‹

  1. Rename velocity โ€” file renames per second per process
  2. Entropy delta โ€” Shannon entropy change in file contents
  3. Extension mass-change โ€” .doc โ†’ .locked, .jpg โ†’ .enc, etc.
  4. Write-after-rename โ€” write to file immediately after rename

Scoringโ€‹

Each signal contributes to a confidence score:

  • Rename velocity > 10/s โ†’ +0.3
  • Entropy increase > 2.0 bits โ†’ +0.3
  • Known ransomware extension โ†’ +0.4
  • Combined score > 0.7 โ†’ ALERT

Alert Outputโ€‹

When triggered, the TUI shows:

  • Process name, PID, PPID
  • Full process tree (who spawned it)
  • File operations in the last 60 seconds
  • Entropy profile of modified files

TUI Layoutโ€‹

โ”Œโ”€ Talus eBPF Monitor โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Process Tree โ”‚ File Operations โ”‚ Alerts โ”‚
โ”‚ โ”œโ”€ systemd (1) โ”‚ /etc/passwd READ โ”‚ โ”‚
โ”‚ โ”‚ โ”œโ”€ sshd (1234) โ”‚ /var/log/auth WRITE โ”‚ โ”‚
โ”‚ โ”‚ โ””โ”€ bash (5678) โ”‚ doc.pdf RENAME โ”‚ โ”‚
โ”‚ โ”‚ โ””โ”€ vim (9012) โ”‚ doc.locked WRITE โ”‚ โš  ALERT โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ suspicion โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Keyboard Controlsโ€‹

KeyAction
qQuit
TabSwitch panel focus
โ†‘โ†“Navigate process tree
EnterExpand/collapse process
/Search process name
1/2/3Filter: all / processes / file ops