Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛡️ AI-Powered Intrusion Detection System

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.


📌 Overview

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

🚀 Features

  • 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

🛠 Technologies Used

  • Python
  • Scikit-learn
  • Pandas
  • NumPy
  • Matplotlib
  • Plotly
  • Streamlit
  • Joblib
  • Imbalanced-learn

📂 Dataset

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

🧠 Machine Learning Pipeline

Raw Dataset
      │
      ▼
Data Cleaning
      │
      ▼
Feature Engineering
      │
      ▼
Feature Selection
      │
      ▼
Controlled SMOTE
      │
      ▼
Random Forest
      │
      ▼
Evaluation
      │
      ▼
Streamlit Dashboard

📊 Model Performance

Metric Score
Accuracy 99.86%
Precision 99.86%
Recall 99.86%
F1 Score 99.86%

📁 Project Structure

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

▶ Installation

Clone the repository

git clone https://github.com/YOUR_USERNAME/AI_IDS.git

Move into the project

cd AI_IDS

Create a virtual environment

python -m venv .venv

Activate it

Windows

.venv\Scripts\activate

Install dependencies

pip install -r requirements.txt

▶ Running the Streamlit App

streamlit run app.py

📷 Screenshots

Add screenshots of:

  • Home Page
  • Prediction Dashboard
  • Attack Distribution
  • Prediction Results

📈 Future Improvements

  • Real-time flow monitoring
  • Deep Learning models
  • Model comparison
  • Deployment
  • REST API
  • Database integration

👨‍💻 Author

Sambhav Jha

B.Tech Electronics and Communication Engineering

SRM Institute of Science and Technology

About

AI-powered Intrusion Detection System using Random Forest and CICIDS2017.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages