An AI-powered Intrusion Detection System (IDS) built using Machine Learning and the CICIDS2017 dataset. This project detects malicious network traffic, classifies multiple attack types, and provides an interactive Streamlit dashboard for prediction and analysis.
This project implements a supervised machine learning pipeline for network intrusion detection using the CICIDS2017 dataset.
The workflow includes:
- Data Cleaning
- Feature Engineering
- Feature Selection
- Class Imbalance Handling (Controlled SMOTE)
- Random Forest Classification
- Model Evaluation
- Streamlit Web Application
- Detects 15 network traffic classes
- Supports CSV and Parquet datasets
- Interactive Streamlit dashboard
- Attack confidence scores
- Risk level assessment
- Downloadable prediction results
- Feature importance visualization
- Confusion matrix generation
- Modular Python codebase
- Python
- Scikit-learn
- Pandas
- NumPy
- Matplotlib
- Plotly
- Streamlit
- Joblib
- Imbalanced-learn
Dataset: CICIDS2017
The dataset contains both benign and malicious network traffic representing modern cyber attacks.
Attack categories include:
- Benign
- Bot
- DDoS
- DoS Hulk
- DoS GoldenEye
- DoS Slowloris
- DoS SlowHTTPTest
- FTP-Patator
- SSH-Patator
- PortScan
- Heartbleed
- Infiltration
- Web Attack – Brute Force
- Web Attack – SQL Injection
- Web Attack – XSS
Raw Dataset
│
▼
Data Cleaning
│
▼
Feature Engineering
│
▼
Feature Selection
│
▼
Controlled SMOTE
│
▼
Random Forest
│
▼
Evaluation
│
▼
Streamlit Dashboard
| Metric | Score |
|---|---|
| Accuracy | 99.86% |
| Precision | 99.86% |
| Recall | 99.86% |
| F1 Score | 99.86% |
AI_IDS/
│
├── app.py
├── requirements.txt
├── README.md
│
├── dataset/
├── figures/
├── models/
├── notebooks/
├── reports/
│
└── src/
├── config.py
├── data_loader.py
├── preprocessing.py
├── feature_engineering.py
├── train.py
├── evaluate.py
├── visualization.py
├── resampling.py
├── predict.py
Clone the repository
git clone https://github.com/YOUR_USERNAME/AI_IDS.gitMove into the project
cd AI_IDSCreate a virtual environment
python -m venv .venvActivate it
.venv\Scripts\activateInstall dependencies
pip install -r requirements.txtstreamlit run app.pyAdd screenshots of:
- Home Page
- Prediction Dashboard
- Attack Distribution
- Prediction Results
- Real-time flow monitoring
- Deep Learning models
- Model comparison
- Deployment
- REST API
- Database integration
Sambhav Jha
B.Tech Electronics and Communication Engineering
SRM Institute of Science and Technology