Skip to content

AsjadAbbas995/Intrusion-detection

Repository files navigation

🛡️ AI-Based Intrusion Detection System

An AI-powered Intrusion Detection System (IDS) built using Python, Streamlit, and Scikit-learn that analyzes network traffic logs and classifies sessions as Normal or Suspicious.


Features

  • Upload network log CSV files
  • Machine learning-based intrusion detection
  • Displays attack probability for every session
  • Classifies traffic into:
    • ✅ Normal
    • ⚠️ Suspicious
  • Interactive web interface using Streamlit

Technologies Used

  • Python
  • Streamlit
  • Pandas
  • Scikit-learn
  • Joblib

Project Structure

Intrusion-detection/
│
├── app.py
├── requirements.txt
├── intrusion_pipeline.pkl
├── sample_input.csv
├── README.md
└── screenshots/

Installation

Clone the repository:

git clone https://github.com/AsjadAbbas995/Intrusion-detection.git

Go into the project directory:

cd Intrusion-detection

Install dependencies:

pip install -r requirements.txt

Running the Application

Start the Streamlit application:

streamlit run app.py

The application will open in your browser.


Input Format

The uploaded CSV should contain the same feature columns used during model training.

Example:

session_id feature_1 feature_2 ...

Output

The application generates:

  • Attack Probability
  • Prediction

Example:

Attack Probability Prediction
0.95 Suspicious
0.12 Normal

Machine Learning Model

The application uses a pre-trained Scikit-learn pipeline stored as:

intrusion_pipeline.pkl

The model predicts the probability that a network session is malicious.


Requirements

  • Python 3.10+
  • Streamlit
  • Pandas
  • Scikit-learn
  • Joblib

Install all dependencies using:

pip install -r requirements.txt

Future Improvements

  • Real-time packet monitoring
  • Multiple ML model comparison
  • Threat severity scoring
  • Visualization dashboard
  • Explainable AI (SHAP/LIME)
  • Database logging
  • REST API integration

Author

Asjad Abbas

Cybersecurity Student | AI & Machine Learning | Penetration Testing

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors