Skip to content

ManojThamke/ML_NIDS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

83 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿšจ ML-Based Network Intrusion Detection System

Real-Time Threat Detection ยท Machine Learning ยท MERN Stack


An end-to-end cybersecurity solution that uses 10+ supervised ML algorithms and a hybrid stacked ensemble to detect network intrusions in real-time โ€” with live dashboards, attack simulation, and dual logging.



๐Ÿ“‹ Table of Contents


๐ŸŒŸ Overview

The ML-Based Network Intrusion Detection System (NIDS) is an advanced cybersecurity solution built to monitor, analyze, and detect malicious network activity in real-time using Machine Learning.

Unlike traditional signature-based systems, this project trains on real-world traffic data and applies a hybrid stacked ensemble model to maximize detection accuracy while minimizing false positives. The detection engine feeds into a full MERN stack dashboard, forming a complete, production-ready pipeline:

Packet Capture  โ”€โ”€โ–บ  Feature Extraction  โ”€โ”€โ–บ  ML Prediction  โ”€โ”€โ–บ  Live Dashboard

๐ŸŽฏ Key Highlights

Feature Description
๐Ÿ•ต๏ธ Real-Time Sniffing Live packet capture using Scapy
๐Ÿค– 10+ ML Models Classical, advanced, and ensemble algorithms
๐Ÿงฌ Hybrid Ensemble Stacked model: RF + XGBoost + LightGBM โ†’ LR meta-classifier
๐Ÿ’พ Dual Logging Simultaneous logging to MongoDB and CSV
๐Ÿ“Š Live Dashboard React-based UI with charts, filters, and export
๐ŸŽญ Attack Simulation UDP Flood, Port Scan, SYN Flood built-in
๐ŸŽš๏ธ Tunable Threshold Adjustable prediction probability cutoff (default: 0.6)
โœ… High Accuracy Achieves ~90%+ detection accuracy on CICIDS2018

๐Ÿง  Problem Statement

Traditional Intrusion Detection Systems carry critical weaknesses that leave networks exposed:

โŒ Problem Impact
Static rule-based signatures Cannot adapt to new or evolving attack patterns
Zero-day attack blindness Unknown threats go undetected
High false positive rate Security teams suffer from alert fatigue

โœ… How This Project Addresses It

  • ML-based classification โ€” learns attack patterns, not rigid rules
  • Trained on CICIDS2017, a benchmark dataset with real traffic flows
  • Ensemble stacking boosts precision and suppresses false alarms
  • Configurable threshold provides fine-grained sensitivity control

๐Ÿ—๏ธ System Architecture

          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ”‚          Network Traffic              โ”‚
          โ”‚   (Live packets or simulated flows)   โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ†“
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ”‚       Packet Sniffer (Scapy)          โ”‚
          โ”‚   Captures raw TCP/UDP/ICMP packets   โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ†“
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ”‚      Feature Extraction Engine        โ”‚
          โ”‚   Computes 6 flow-based features      โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ†“
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ”‚     ML Prediction Engine              โ”‚
          โ”‚   Stacked Ensemble (RF+XGB+LGBM+LR)   โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ†“
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ”‚       Classification Output           โ”‚
          โ”‚     ๐Ÿšจ ATTACK  โ”€โ”€orโ”€โ”€  โœ… BENIGN     โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ†“
     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
     โ”‚      Dual Logging System (CSV + MongoDB)       โ”‚
     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ†“
     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
     โ”‚         Node.js + Express REST API             โ”‚
     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ†“
     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
     โ”‚     React Dashboard (Live Visualization UI)    โ”‚
     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โš™๏ธ Tech Stack

Layer Technology Purpose
๐Ÿง  ML Engine Python, scikit-learn, XGBoost, LightGBM, Pandas, NumPy Model training, prediction, feature processing
๐ŸŒ Networking Scapy Real-time packet sniffing and flow analysis
๐Ÿ–ฅ๏ธ Backend Node.js, Express.js, MongoDB (Mongoose) REST API, database logging, data persistence
๐ŸŽจ Frontend React.js, Tailwind CSS, Recharts Live dashboard, charts, alerts, export

๐Ÿ“Š Dataset Details

Property Value
Name CICIDS2018
Source Canadian Institute for Cybersecurity (UNB)
Traffic Types BENIGN, DoS, DDoS, PortScan, Brute Force
Label Encoding BENIGN โ†’ 0 / All Attacks โ†’ 1

๐Ÿ“Œ Preprocessing Pipeline

1. Drop irrelevant columns  โ”€โ”€โ–บ  Flow ID, Timestamp, IP addresses removed
2. Binary label encoding    โ”€โ”€โ–บ  BENIGN=0, ATTACK=1
3. Handle nulls & infinities โ”€โ”€โ–บ  Missing/inf values replaced or dropped
4. Feature normalization    โ”€โ”€โ–บ  MinMaxScaler / StandardScaler applied
5. Feature selection        โ”€โ”€โ–บ  6 real-time-compatible features retained

๐Ÿ” Selected Features (Optimized for Real-Time)

These 6 features balance computational speed with classification quality:

Feature Description
Destination Port Target port number
Flow Duration Total flow duration (ยตs)
Fwd Packet Length Min Minimum forward packet size
Packet Length Std Standard deviation of packet lengths
Flow IAT Mean Mean inter-arrival time of packets
Fwd IAT Mean Mean inter-arrival time (forward direction)

๐Ÿค– Machine Learning Models

Classical Baselines

Model Type Notes
Logistic Regression Linear Classifier Fast, interpretable baseline
Decision Tree Tree-based Captures non-linear boundaries
Naรฏve Bayes Probabilistic Lightweight, works well with limited data

Advanced Models

Model Type Notes
Random Forest Bagging Ensemble Robust to noise, strong base learner
Gradient Boosting Sequential Boosting Handles class imbalance well
SVM Margin-based Effective in high-dimensional space
KNN Instance-based Simple, good for local patterns
XGBoost Extreme Boosting Regularized, high-performance
LightGBM Leaf-wise Boosting Fastest of the ensemble trio

๐Ÿ† Final Model โ€” Stacked Ensemble (Hybrid)

The production model uses stacking โ€” a meta-learning strategy where base model outputs serve as inputs to a final classifier:

 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ”‚                        BASE LAYER                               โ”‚
 โ”‚                                                                 โ”‚
 โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
 โ”‚   โ”‚ Random Forest โ”‚  โ”‚   XGBoost     โ”‚  โ”‚    LightGBM       โ”‚  โ”‚
 โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ†“
 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ”‚                       META LAYER                                โ”‚
 โ”‚           โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                 โ”‚
 โ”‚           โ”‚  Logistic Regression (Combiner)   โ”‚                 โ”‚
 โ”‚           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                 โ”‚
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ†“
                    ๐ŸŽฏ Final Prediction (ATTACK / BENIGN)

Why stacking? The meta-learner learns which base model to trust for which type of input โ€” correcting individual model errors and achieving higher accuracy than any single model alone.


โšก Real-Time Detection Pipeline

 Step 1  โ”€โ–บ  Capture raw packets via Scapy
 Step 2  โ”€โ–บ  Maintain per-flow statistics in memory
 Step 3  โ”€โ–บ  Extract 6 feature values per flow
 Step 4  โ”€โ–บ  Pass feature vector to stacked ML model
 Step 5  โ”€โ–บ  Receive attack probability score (0.0 โ€“ 1.0)
 Step 6  โ”€โ–บ  Apply threshold (default: 0.6)
              โ”‚
              โ”œโ”€โ”€โ–บ score โ‰ฅ 0.6 โ†’ ๐Ÿšจ ATTACK
              โ””โ”€โ”€โ–บ score < 0.6 โ†’ โœ… BENIGN
 Step 7  โ”€โ–บ  Log result to CSV + MongoDB
 Step 8  โ”€โ–บ  Push alert to React Dashboard via REST API

๐Ÿ“ˆ Evaluation Metrics

Metric What It Measures
Accuracy Overall correct predictions across all classes
Precision How many flagged alerts are true attacks (minimizes false positives)
Recall How many real attacks are caught (minimizes missed detections)
F1-Score Harmonic mean of Precision and Recall
ROC-AUC Threshold-independent discrimination ability

๐Ÿ“Š Dashboard Features

๐Ÿ”ด Real-Time Monitoring

  • Live attack alerts with timestamp, source/destination IPs, and probability score
  • Continuously updated benign traffic log

๐Ÿ“‰ Visualizations

Chart Purpose
Pie Chart Attack vs Benign traffic distribution
Line Chart Attack frequency trend over time

๐Ÿ—‚๏ธ Traffic Log Table

Column Description
Source IP Origin address
Destination IP Target address
Timestamp Detection time
Prediction ๐Ÿšจ ATTACK / โœ… BENIGN
Probability Model confidence score

๐Ÿ”Ž Filters & Export

  • Search logs by IP address
  • Filter by prediction label (ATTACK / BENIGN)
  • Time range selection
  • Export to CSV or PDF

๐Ÿ“‚ Project Structure

ML_NIDS/
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ data/                        # CICIDS2018 dataset files
โ”‚   โ””โ”€โ”€ *.csv                       # Raw and preprocessed data
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ detection-engine/            # Python ML core
โ”‚   โ”œโ”€โ”€ realtime_detector.py        # Main detection loop
โ”‚   โ”œโ”€โ”€ feature_extractor.py        # Flow-based feature computation
โ”‚   โ”œโ”€โ”€ simulate_attack.py          # Attack traffic generator
โ”‚   โ””โ”€โ”€ ๐Ÿ“ models/                  # Trained .pkl model files
โ”‚       โ”œโ”€โ”€ random_forest.pkl
โ”‚       โ”œโ”€โ”€ xgboost_model.pkl
โ”‚       โ”œโ”€โ”€ lightgbm_model.pkl
โ”‚       โ””โ”€โ”€ stacked_ensemble.pkl
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ server/                      # Node.js + Express backend
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ models/                  # Mongoose schemas
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ routes/                  # API route handlers
โ”‚   โ””โ”€โ”€ server.js                   # Entry point (port 5000)
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ client/                      # React frontend
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ components/              # Reusable UI components
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ pages/                   # Dashboard pages
โ”‚   โ””โ”€โ”€ App.js                      # Root component (port 3000)
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ logs/                        # CSV detection logs
โ”œโ”€โ”€ ๐Ÿ“ docs/                        # Reports & analysis notebooks
โ””โ”€โ”€ README.md

๐Ÿš€ Installation & Setup

Prerequisites

Make sure the following are installed and running before setup:

Requirement Version
Python 3.10+
Node.js 16+
MongoDB Running locally (default port 27017)

Step 1 โ€” Clone the Repository

git clone https://github.com/ManojThamke/ML_NIDS.git
cd ML_NIDS

Step 2 โ€” Python Environment Setup

# Create and activate a virtual environment
python -m venv venv

# Windows
venv\Scripts\activate

# macOS / Linux
source venv/bin/activate

# Install Python dependencies
pip install pandas numpy scikit-learn joblib scapy matplotlib seaborn xgboost lightgbm

Step 3 โ€” Start the Detection Engine

cd detection-engine
python realtime_detector.py

โš ๏ธ Permissions required: Run as Administrator on Windows or with sudo on Linux/macOS for raw packet capture.

Step 4 โ€” Start the Backend Server

cd server
npm install
npm start

Backend REST API runs at http://localhost:5000

Step 5 โ€” Launch the React Dashboard

cd client
npm install
npm start

Dashboard accessible at http://localhost:3000


๐Ÿงช Testing Strategy

โœ… Benign Traffic Simulation

  • Normal web browsing
  • Video/audio streaming traffic

๐Ÿšจ Attack Simulation

Run these commands from within the detection-engine/ directory:

python simulate_attack.py --type udp_flood
python simulate_attack.py --type port_scan
python simulate_attack.py --type syn_flood
Attack Type Method Description
UDP Flood Scapy UDP packet burst Overwhelms target with UDP datagrams
Port Scan Sequential port probing Identifies open ports on target host
SYN Flood Half-open TCP connections Exhausts server connection table

๐Ÿ“Œ Results & Achievements

Metric Result
๐ŸŽฏ Detection Accuracy ~90%+ on CICIDS2018 test set
โšก Real-Time Monitoring โœ… Fully functional
๐Ÿงฌ Ensemble Improvement over Single Models โœ… Confirmed
๐Ÿ“Š Live Dashboard with Alerts โœ… Operational
๐Ÿ“ Dual Logging (CSV + MongoDB) โœ… Working

โš ๏ธ Limitations

Limitation Details
Computational overhead Ensemble inference is slower than single models
Feature dependency Detection quality is tied to feature engineering quality
Hardware sensitivity Performance varies on low-resource machines
Dataset gap Trained on CICIDS2017; real-world accuracy may differ

๐Ÿ”ฎ Future Scope

Enhancement Description
๐Ÿง  Deep Learning LSTM / CNN / Transformer models for sequential traffic analysis
โ˜๏ธ Cloud Deployment Containerized deployment on AWS / Azure / GCP
๐Ÿ”ฅ Auto-Blocking Automatic firewall rule injection on confirmed attack detection
โšก WebSocket Streaming True real-time push to frontend (replacing polling)
๐Ÿ“ฑ Mobile Dashboard React Native monitoring app for on-the-go alerting
๐Ÿ” Explainability SHAP / LIME integration for interpretable predictions
๐Ÿ—‚๏ธ Multi-Dataset Support Extend to NSL-KDD, UNSW-NB15 for generalization testing

๐Ÿ‘จโ€๐Ÿ’ป Author


Manoj Thamke
Final Year B.E. โ€” Information Technology


GitHub Project Repo



๐Ÿ“œ License

This project is developed for academic and educational purposes. You are free to reference, study, and build upon it with attribution.


๐Ÿค Contributing

Contributions, suggestions, and improvements are welcome!

1. ๐Ÿด Fork the repository
2. ๐ŸŒฟ Create a feature branch     โ†’  git checkout -b feature/your-feature
3. ๐Ÿ’ฌ Commit your changes         โ†’  git commit -m 'Add: your feature description'
4. ๐Ÿ“ค Push to your branch         โ†’  git push origin feature/your-feature
5. ๐Ÿ” Open a Pull Request

Please ensure your code follows existing conventions and is well-documented.


If this project helped you, please consider giving it a โญ

View on GitHub

About

Machine Learning based Network Intrusion Detection System with real-time packet analysis and MERN dashboard.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors