How sumit-chand/hybrid-nids works
Hybrid ML + signature network intrusion detection system: train or load a classifier, submit flow records through the Flask dashboard/API, combine deterministic signatures with model predictions, and persist alerts for history and statistics. The README also documents CSV upload, simulation, metrics, and alert clearing. Evidence for runtime links comes from the excerpts and README; live capture is explicitly not included.
Main entry points: app.py Flask API · train.py Training workflow · nids.py Hybrid detector · index.html Dashboard
Components 15
API and dashboard
- Dashboard
templates/index.html - Flask API
app.py - Flow inputs
app.py
Flow detection
- Synthetic flows
nids.py - Features and labels
nids.py - Signature rules
nids.py - Hybrid detector
nids.py
Model training
- Trained classifier
models/nids_model.joblib - Training workflow
train.py - CIC-IDS2017 CSVs
- Training metrics
models/metrics.json
Alert history
- Alert ingestion
nids.py - SQLite alert store
nids.py - Alert history and stats
nids.py
Other components
- User
Connections 20
- User → Dashboard: views
README.md - User → Flask API: submits flows
README.md - Dashboard → Flask API: uses endpoints
- Flask API → Flow inputs: accepts uploads
app.py - Flask API → Synthetic flows: generates simulation
app.py - Flask API → Alert ingestion: submits flows
app.py - Flask API → Alert history and stats: requests stats and alerts
app.py - Flask API → Training metrics: reads metrics
app.py - Flask API → SQLite alert store: clears records
app.py - Training workflow → Features and labels: uses features
train.py - Training workflow → CIC-IDS2017 CSVs: loads CSVs
train.py - Training workflow → Synthetic flows: generates fallback data
train.py - Features and labels → Training workflow: loads and cleans
nids.py - Training workflow → Trained classifier: saves classifier
train.py - Training workflow → Training metrics: writes metrics
train.py - Alert ingestion → Hybrid detector: inspects batch
nids.py - Hybrid detector → Signature rules: applies rules
nids.py - Hybrid detector → Trained classifier: loads classifier
nids.py - Alert ingestion → SQLite alert store: writes alerts
nids.py - Alert history and stats → SQLite alert store: queries and clears
nids.py