How kaushik-kishor/chainbreaker works
ChainBreaker is a real-time network intrusion detection and incident-response application. Its main workflow takes Kafka or batch network flows through parsing and ML classification, records communications and attack events in Neo4j, enriches them with kill-chain stages, and exposes graph, alert, forensic, and live telemetry views to the dashboard. The README documents these capabilities; edges below are limited to relationships shown in excerpts, SOURCE INDEX references, or README statements, so some subsystem connections are intentionally omitted.
Main entry points: neo4j_client.py Neo4j graph store · orchestrator.py Pipeline orchestrator · report_generator.py Forensic reports · kafka_consumer.py Kafka consumer
Components 29
Flow Ingestion
- Flow parser
backend/ingestion/cicflow_parser.py - Kafka consumer
backend/ingestion/kafka_consumer.py - Batch collector
backend/ingestion/batch_collector.py - Pipeline orchestrator
backend/pipeline/orchestrator.py
Detection & Mapping
- ML inference & models
backend/ml/inference.py - Feature engineering
backend/ml/features.py - Model training
backend/ml/train.py - Model lifecycle
backend/ml/model_manager.py - ATT&CK stage mapping
backend/mitre/stage_mapper.py - Kill-chain taxonomy
backend/mitre/attack_matrix.py - Temporal analytics
backend/temporal
Attack Graph
- Neo4j graph store
backend/graph/neo4j_client.py - Graph event writers
backend/graph/attack_writer.py - Kill-chain writer
backend/graph/kill_chain_writer.py - Flow writer
backend/graph/flow_writer.py - Host manager
backend/graph/host_manager.py
Forensics & Response
- Forensic analysis
backend/forensics/attack_path_tracer.py - Blast radius
backend/forensics/blast_radius.py - Kill-chain profiler
backend/forensics/kill_chain_profiler.py - Event timeline
backend/forensics/timeline_builder.py - Forensic reports
backend/forensics/report_generator.py - Response agent
backend/agent/kill_chain_env.py
API & Dashboard
- FastAPI routes
backend/main.py - WebSocket telemetry
backend/api/routes/ws.py - SOC dashboard
frontend/src/components/GraphView.tsx - Dashboard API client
frontend/src/api/client.ts
Other components
- Kafka
- CSV batch input
- SOC analyst
Connections 37
- Kafka → Kafka consumer: supplies flows
README.md - Kafka consumer → Flow parser: parses flows
backend/ingestion/kafka_consumer.py - Kafka consumer → ML inference & models: classifies flows
backend/ingestion/kafka_consumer.py - Kafka consumer → Flow writer: writes flows
backend/ingestion/kafka_consumer.py - CSV batch input → Batch collector: supplies flows
README.md - Flow parser → Pipeline orchestrator: normalizes flows
README.md - Pipeline orchestrator → Model lifecycle: requests predictions
backend/pipeline/orchestrator.py - Model lifecycle → ML inference & models: scores flows
backend/ml/model_manager.py - ML inference & models → Feature engineering: extracts features
backend/ml/inference.py - Model lifecycle → Model training: trains when needed
backend/ml/model_manager.py - Pipeline orchestrator → Host manager: upserts hosts
backend/pipeline/orchestrator.py - Pipeline orchestrator → Graph event writers: writes attack events
backend/pipeline/orchestrator.py - Pipeline orchestrator → Kill-chain writer: updates stages
backend/pipeline/orchestrator.py - Pipeline orchestrator → ATT&CK stage mapping: maps stages
backend/pipeline/orchestrator.py - Kill-chain writer → Kill-chain taxonomy: uses taxonomy
backend/graph/kill_chain_writer.py - Flow writer → Neo4j graph store: writes graph
backend/ingestion/kafka_consumer.py - Graph event writers → Neo4j graph store: persists events
README.md - Kill-chain writer → Neo4j graph store: persists stages
backend/graph/kill_chain_writer.py - Host manager → Neo4j graph store: upserts hosts
backend/graph/host_manager.py - Pipeline orchestrator → Neo4j graph store: links communications
backend/pipeline/orchestrator.py - Neo4j graph store → Forensic analysis: provides graph data
backend/forensics/attack_path_tracer.py - Neo4j graph store → Blast radius: provides graph data
backend/forensics/blast_radius.py - Neo4j graph store → Kill-chain profiler: provides graph data
backend/forensics/kill_chain_profiler.py - Neo4j graph store → Event timeline: provides graph data
backend/api/routes/forensics.py - Forensic reports → Blast radius: calculates impact
backend/forensics/report_generator.py - Forensic reports → Kill-chain profiler: summarizes stages
backend/forensics/report_generator.py - Forensic reports → Forensic analysis: traces attack path
backend/forensics/report_generator.py - Forensic reports → Event timeline: builds timeline
backend/forensics/report_generator.py - Response agent → Neo4j graph store: reads incident state
backend/agent/kill_chain_env.py - Response agent → Kill-chain writer: contains stages
backend/agent/kill_chain_env.py - FastAPI routes → WebSocket telemetry: registers route
backend/main.py - WebSocket telemetry → Neo4j graph store: broadcasts graph telemetry
README.md - WebSocket telemetry → SOC dashboard: streams telemetry
README.md - Dashboard API client → FastAPI routes: calls REST API
README.md - SOC analyst → SOC dashboard: views dashboard
README.md - SOC dashboard → WebSocket telemetry: receives live updates
- Temporal analytics → Pipeline orchestrator: adds temporal analysis