How chaudharybishal091/ids works
This is a machine-learning network intrusion detection system. Its principal workflow turns prepared traffic data into trained models, then accepts live or batch flows through the API, classifies attacks, persists predictions and alerts, and presents results in a dashboard. A Zeek watcher bridges live Zeek logs to the API; optional response actions and WhatsApp alerts extend detection. The graph includes documented capabilities and source-index relationships; some unsampled API integrations are connected only where the index names the dependency, so their exact call behavior is not established here.
Main entry points: app.py Prediction API · main.py CLI entry point · train.py Training workflow · real_dataset_prep.py Public dataset prep
Components 21
Data preparation
- Sample data generator
src/data_Pipelines/generate_sample_data.py - Public dataset prep
src/data_Pipelines/real_dataset_prep.py - Zeek log parser
src/data_Pipelines/zeek_pipeline.py - Preprocessing
src/data_Pipelines/data_pipeline.py
Model training
- Training workflow
src/models/train.py - ML models
src/models/models.py
Live detection
- CLI entry point
main.py - Zeek log watcher
src/real_time/zeek_watcher.py - Prediction API
src/api/app.py - Flow correlation
src/utils/flow_correlation.py - Label normalization
src/utils/labels.py
Response and persistence
- Response actions
src/utils/response_engine.py - WhatsApp alerts
src/utils/whatsapp_alert.py - SQLite persistence
src/utils/sqlite_store.py
Monitoring
- Dashboard
src/visualization/dashboard.py - Dataset replay
src/verification/dataset_replay.py
Other components
- Operator
- Traffic datasets
- Zeek sensor
- API clients
- Twilio WhatsApp
Connections 28
- Operator → CLI entry point: runs commands
README.md - Traffic datasets → Public dataset prep: supplies CSVs
README.md - Traffic datasets → Preprocessing: supplies data
README.md - Operator → Sample data generator: generates samples
README.md - CLI entry point → Sample data generator: dispatches
main.py - CLI entry point → Public dataset prep: dispatches
main.py - Public dataset prep → Label normalization: normalizes labels
src/data_Pipelines/real_dataset_prep.py - Operator → Training workflow: trains model
README.md - Training workflow → Preprocessing: prepares data
src/models/train.py - Training workflow → ML models: trains models
src/models/train.py - Zeek sensor → Zeek log watcher: writes conn.log
README.md - Operator → Zeek log watcher: starts bridge
README.md - Zeek log watcher → Prediction API: forwards flows
src/real_time/zeek_watcher.py - Zeek log parser → Prediction API: converts Zeek flows
src/api/app.py - API clients → Prediction API: submits flows
README.md - Prediction API → ML models: predicts with
src/api/app.py - Prediction API → Preprocessing: transforms flows
src/api/app.py - Prediction API → Flow correlation: correlates detections
src/api/app.py - Prediction API → Label normalization: normalizes results
src/api/app.py - Prediction API → SQLite persistence: persists results
src/api/app.py - Prediction API → Response actions: requests response
src/api/app.py - Prediction API → WhatsApp alerts: sends alerts
src/api/app.py - WhatsApp alerts → Twilio WhatsApp: delivers messages
- Operator → Dashboard: views monitoring
README.md - Dashboard → SQLite persistence: reads snapshots
src/visualization/dashboard.py - Operator → Dataset replay: replays dataset
README.md - Dataset replay → Prediction API: posts batches
src/verification/dataset_replay.py - CLI entry point → Dataset replay: dispatches
main.py