How proffaro/major-p1-v1 works
KShark is a hybrid eBPF security platform: its Go agent captures kernel telemetry, the Python engine analyzes it with behavioral rules and ML, persists events and alerts, and exposes an API; a PyQt GUI provides interactive event analysis. The graph follows the documented orchestration and the excerpted real-time processing path. Agent-to-probe details and several GUI/API connections are not shown in sampled source, so uncertain links are omitted or marked unverified.
Main entry points: realtime_engine.py Real-time ingestion · main.py Python orchestrator · app.py GUI entry · coloring_engine.py Event coloring
Components 24
Kernel capture
- Go eBPF agent
agent/cmd/agent/main.go - eBPF probes
bpf/probes - Tetragon LSM probe
bpf/probes/tetragon_lsm.bpf.c - Agent WebSocket
agent/server/websocket.go
Detection pipeline
- Real-time ingestion
ml_engine/inference/realtime_engine.py - Feature extraction
ml_engine/preprocessing/feature_extractor.py - Process lineage
ml_engine/preprocessing/process_graph.py - Behavioral rules
ml_engine/rules/behavioral_engine.py - Falco rules
ml_engine/rules/falco_engine.py - ML detector
ml_engine/models/detector.py - Alert dispatcher
ml_engine/detection/alert_dispatcher.py
Storage and API
- DuckDB and SQLite
ml_engine/storage/db_manager.py - FastAPI server
ml_engine/api/server.py - REST routes
ml_engine/api/routes.py
Desktop analysis
- GUI entry
kshark/app.py - Main window
kshark/main_window.py - Event table model
kshark/models/event_table_model.py - Display filters
kshark/core/filter_engine.py - Event coloring
kshark/core/coloring_engine.py - Theme manager
kshark/core/theme.py - Syscall lookup
kshark/core/syscall_table.py
System orchestration
- Python orchestrator
main.py
Other components
- Operator
- Linux kernel
Connections 28
- Operator → Python orchestrator: starts
- Operator → GUI entry: opens
kshark/app.py - Linux kernel → eBPF probes: emits events
- eBPF probes → Go eBPF agent: streams events
- Tetragon LSM probe → Linux kernel: observes and enforces
bpf/probes/tetragon_lsm.bpf.c - Python orchestrator → Go eBPF agent: starts agent
main.py - Go eBPF agent → Agent WebSocket: serves telemetry
- Agent WebSocket → Real-time ingestion: streams telemetry
ml_engine/inference/realtime_engine.py - Python orchestrator → Real-time ingestion: starts ingestion
main.py - Python orchestrator → DuckDB and SQLite: initializes storage
main.py - Python orchestrator → FastAPI server: starts API
main.py - Python orchestrator → GUI entry: launches GUI
main.py - Real-time ingestion → Feature extraction: extracts features
ml_engine/inference/realtime_engine.py - Real-time ingestion → Process lineage: updates lineage
ml_engine/inference/realtime_engine.py - Real-time ingestion → Behavioral rules: evaluates events
ml_engine/inference/realtime_engine.py - Behavioral rules → Falco rules: evaluates Falco rules
ml_engine/rules/behavioral_engine.py - Real-time ingestion → ML detector: scores features
ml_engine/inference/realtime_engine.py - Real-time ingestion → Alert dispatcher: dispatches alerts
ml_engine/inference/realtime_engine.py - Real-time ingestion → DuckDB and SQLite: persists telemetry
ml_engine/inference/realtime_engine.py - FastAPI server → REST routes: registers routes
ml_engine/api/server.py - REST routes → DuckDB and SQLite: queries alerts
ml_engine/api/routes.py - GUI entry → Main window: creates window
kshark/app.py - GUI entry → Display filters: imports filters
kshark/app.py - GUI entry → Event coloring: imports coloring
kshark/app.py - GUI entry → Event table model: imports model
kshark/app.py - Event coloring → Display filters: matches rules
kshark/core/coloring_engine.py - Event coloring → Theme manager: reads theme
kshark/core/coloring_engine.py - Display filters → Syscall lookup: resolves syscalls
kshark/core/filter_engine.py