Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
673bfd4
Added repo structure folders with .gitkeep files
theamityadavv Aug 19, 2025
e1df259
Added new Files
upasanaprabhakar Aug 20, 2025
0953741
Added NSL-KDD deep dive analysis script
theamityadavv Aug 20, 2025
c4e6f3b
Add NSL-KDD training dataset and related scripts
theamityadavv Aug 20, 2025
612bce4
Update README with project structure, dataset, installation, and usage
theamityadavv Aug 20, 2025
396f9cb
Update README.md
theamityadavv Aug 20, 2025
f88400a
Update README.md
theamityadavv Aug 20, 2025
093461b
Update README.md
theamityadavv Aug 20, 2025
6291d2a
Update README.md
theamityadavv Aug 20, 2025
cd2c88f
Update README.md
theamityadavv Aug 20, 2025
b146929
Update README.md
theamityadavv Aug 20, 2025
cfee203
Update README.md
theamityadavv Aug 20, 2025
94293f4
Update README.md
theamityadavv Aug 20, 2025
71a7f17
Update README.md
theamityadavv Aug 20, 2025
2972655
Update README.md
theamityadavv Aug 20, 2025
e4db33c
Update README.md
theamityadavv Aug 20, 2025
4714d47
Update README.md
theamityadavv Aug 20, 2025
b8a80e9
Add NSL-KDD dataset overview and schema
theamityadavv Aug 21, 2025
204ad90
Merge remote-tracking branch 'upstream/amityadav' into amityadav
theamityadavv Aug 21, 2025
cf7fe7e
Update data_overview.md
theamityadavv Aug 21, 2025
284ab81
Update data_overview.md
theamityadavv Aug 21, 2025
f98b08a
Update README.md
theamityadavv Aug 21, 2025
c1aa2ab
Create reflection.md
theamityadavv Aug 21, 2025
1a95a8a
Update reflection.md
theamityadavv Aug 21, 2025
88349f2
Update reflection.md
theamityadavv Aug 21, 2025
8c8a917
Delete docs/docs directory
theamityadavv Aug 21, 2025
5fd8c50
Create reflection.md
theamityadavv Aug 21, 2025
10bb404
Update README.md
theamityadavv Aug 21, 2025
bf700c6
Update README.md
theamityadavv Aug 21, 2025
49f737f
Update main.py
AARIFA-R Aug 21, 2025
3d472cd
Update data_overview.md
theamityadavv Aug 22, 2025
59c9c71
added kddtestfile
its-saravanan Aug 22, 2025
dd9ebaa
Merge pull request #10 from SpringBoardMentor193s/Saravanan
itzsaravanan Aug 22, 2025
df4a1d6
Delete data/NSLKDD directory
itzsaravanan Aug 22, 2025
4431fb7
Add KDDTest+ dataset file
sindhu262005 Aug 23, 2025
64425e1
Add KDDTrain+.txt dataset to NSL-KDD folder
sindhu262005 Aug 23, 2025
ccba038
Merge pull request #13 from SpringBoardMentor193s/Sindhu
sindhu262005 Aug 23, 2025
0546a8c
Remove accidentally added NSL-KDD dataset folder
sindhu262005 Aug 23, 2025
9c3e750
Add NSL-KDD dataset and docs folder
sindhu262005 Aug 23, 2025
6c9d690
Deleted docs folder
sindhu262005 Aug 23, 2025
1441d2e
Add documentation.md file to docs folder
sindhu262005 Aug 23, 2025
5390084
Delete documentation.md
sindhu262005 Aug 23, 2025
5bdbd32
Update documentation: SentinelNet project overview and datasets
sindhu262005 Aug 23, 2025
27a7361
Merge branch 'sindhu' into main
sindhu262005 Aug 23, 2025
073d246
Delete docs/documentation.md
sindhu262005 Aug 23, 2025
5f17b83
Update nsl_kdd_analysis.py to Improved plot readability by increasing…
theamityadavv Aug 23, 2025
1debea8
Update nsl_kdd_analysis.py to Improve plot readability by increasing …
theamityadavv Aug 23, 2025
a431b6a
Added main.py
AARIFA-R Aug 24, 2025
c7fcf77
Create Data sets
AARIFA-R Aug 24, 2025
607ac0d
Renamed
AARIFA-R Aug 24, 2025
dfcb999
Update Data sets.md
AARIFA-R Aug 24, 2025
6b7d29d
updated files
AARIFA-R Aug 24, 2025
26a2f9b
Updated README with changes
Aug 25, 2025
497f05a
Merge pull request #22 from upasanaprabhakar/main
upasanaprabhakar Aug 25, 2025
a76ac4a
Revert "Added new Files"
upasanaprabhakar Aug 25, 2025
14021e0
Merge pull request #24 from SpringBoardMentor193s/revert-22-main
upasanaprabhakar Aug 25, 2025
833e87f
Add files via upload
AARIFA-R Aug 27, 2025
4343d3f
Add files via upload
AARIFA-R Aug 27, 2025
8b64808
Add files via upload
AARIFA-R Aug 27, 2025
02d1317
files added
AARIFA-R Aug 27, 2025
3f3729e
Created main.py
AARIFA-R Aug 27, 2025
f3e3307
Create files
AARIFA-R Aug 27, 2025
807e214
Update README.md
theamityadavv Aug 29, 2025
9fe3385
Update README.md
theamityadavv Aug 29, 2025
90f6e96
Removed NSL-KDD dataset folder
theamityadavv Aug 29, 2025
ace5bf4
Merge remote-tracking branch 'upstream/amityadav' into amityadav
theamityadavv Aug 29, 2025
9b4ea82
Added back NSL-KDD dataset folder
theamityadavv Aug 29, 2025
8554341
Added download script for CICIDS2017, updated README, ignored dataset…
theamityadavv Aug 29, 2025
0ce7cb0
Add files via upload
cmohanraaj3 Aug 29, 2025
0a572e8
Merge branch 'main' into Mohanraaj
cmohanraaj3 Aug 29, 2025
75cd168
Merge pull request #39 from SpringBoardMentor193s/Mohanraaj
cmohanraaj3 Aug 29, 2025
7a2e103
Add files via upload
cmohanraaj3 Aug 29, 2025
80c19b3
Requirements.txt
cmohanraaj3 Aug 29, 2025
ee156f8
Add files via upload
cmohanraaj3 Aug 29, 2025
2d1c705
Add files via upload
cmohanraaj3 Aug 29, 2025
9542abb
Delete KDDTest+.arff
cmohanraaj3 Aug 29, 2025
f82a927
Delete KDDTest+.txt
cmohanraaj3 Aug 29, 2025
8e4d581
Delete KDDTest-21.arff
cmohanraaj3 Aug 29, 2025
2b09f60
Delete KDDTest-21.txt
cmohanraaj3 Aug 29, 2025
1e4b757
Delete KDDTest1.jpg
cmohanraaj3 Aug 29, 2025
b31d80d
Delete KDDTrain+.arff
cmohanraaj3 Aug 29, 2025
216550a
Delete KDDTrain+.txt
cmohanraaj3 Aug 29, 2025
33d43d0
Added README and DataOverview documentation
Aug 29, 2025
1a68a17
Updated NSL-KDD and CICIDS2017 loading and analysis script
theamityadavv Aug 29, 2025
3a9ccd0
Merge pull request #43 from theamityadavv/amityadav
theamityadavv Aug 29, 2025
0b2fa28
Add files via upload
AARIFA-R Aug 29, 2025
3c71a9a
Merge pull request #50 from SpringBoardMentor193s/AARIFA
AARIFA-R Aug 29, 2025
7b0ed9d
documented
AARIFA-R Aug 29, 2025
a07009e
Create project_overview.md
AARIFA-R Aug 29, 2025
4cfd62a
Rewrite README for SentinelNet NIDS
Aug 30, 2025
2b4f8fa
graph added in project_overview.md
AARIFA-R Sep 1, 2025
4f8787f
Add files via upload
yasaswitaraja Sep 3, 2025
795560c
Delete KDDTest+.txt directory
yasaswitaraja Sep 3, 2025
57bd1f5
Delete KDDTrain+.txt directory
yasaswitaraja Sep 3, 2025
0f25aca
Delete analysis directory
yasaswitaraja Sep 3, 2025
70220e6
Delete data directory
yasaswitaraja Sep 3, 2025
bdedabe
Delete docs directory
yasaswitaraja Sep 3, 2025
8967153
Delete notebooks directory
yasaswitaraja Sep 3, 2025
28b0f9b
Delete scripts directory
yasaswitaraja Sep 3, 2025
935a50f
Delete .gitignore
yasaswitaraja Sep 3, 2025
240bef0
Add new folders and files
yasaswitaraja Sep 3, 2025
a4cadf0
Add project directories: data, analysis, notebooks, docs, script
yasaswitaraja Sep 3, 2025
e20ea93
Add NSL-KDD and CICIDS-2017 datasets
yasaswitaraja Sep 3, 2025
e631deb
Add NSL-KDD exploration code in scripts/main.py
yasaswitaraja Sep 3, 2025
6d379ee
Update NSL-KDD exploration code in main.py
yasaswitaraja Sep 3, 2025
fb89724
Add KDDTrain+ dataset to NSL-KDD folder
yasaswitaraja Sep 3, 2025
2a383a4
Updated main.py to save outputs in repo root outputs folder
yasaswitaraja Sep 3, 2025
d1c4fff
Update main.py to save outputs and visualizations to outputs directory
yasaswitaraja Sep 3, 2025
4c9e7e7
Add outputs folder placeholder
yasaswitaraja Sep 3, 2025
4b8b8fa
Added plot saving functionality and outputs directory
yasaswitaraja Sep 3, 2025
11be55e
Updated main.py to save plots and added outputs
yasaswitaraja Sep 3, 2025
85ce2a2
Update requirements.txt
yasaswitaraja Sep 3, 2025
c6c3b9d
Update README.md
yasaswitaraja Sep 3, 2025
d244d10
README.md
yasaswitaraja Sep 3, 2025
2c31a5f
README.md
yasaswitaraja Sep 3, 2025
bb8167f
Merge branch 'SpringBoardMentor193s:main' into main
yasaswitaraja Sep 3, 2025
932d897
Delete Network Intrusion Detection Dataset.md
yasaswitaraja Sep 3, 2025
f982aef
Delete main.py
yasaswitaraja Sep 3, 2025
12e525e
Delete Requirements.txt
yasaswitaraja Sep 3, 2025
b802604
requirements.txt
yasaswitaraja Sep 3, 2025
a0a3248
README.md
yasaswitaraja Sep 3, 2025
205000e
Delete Datasets directory
yasaswitaraja Sep 3, 2025
0cb35b2
Delete Scripts directory
yasaswitaraja Sep 3, 2025
088a044
Updated project_overview.md
AARIFA-R Sep 3, 2025
4fa5022
Delete README.md
Poornitha006 Sep 7, 2025
7c4d0b6
Delete DataOverview.md
Poornitha006 Sep 7, 2025
9d896cd
Add files via upload
AARIFA-R Sep 10, 2025
d75d70b
Add files via upload
AARIFA-R Sep 11, 2025
6dbe1e9
Add files via upload
AARIFA-R Sep 11, 2025
9704394
NSS-KDD dataset Preprocessing
yasaswitaraja Sep 11, 2025
6b5bec6
Merge branch 'SpringBoardMentor193s:main' into main
yasaswitaraja Sep 11, 2025
a9ab3ed
Add files via upload
AARIFA-R Sep 11, 2025
7a4c094
Merge pull request #66 from SpringBoardMentor193s/AARIFA
AARIFA-R Sep 11, 2025
eb4e4f5
Create README.md
Poornitha006 Sep 11, 2025
949eab5
Update README.md
Poornitha006 Sep 11, 2025
753c28d
Update README.md
Poornitha006 Sep 11, 2025
c6e43dc
Update README.md
Poornitha006 Sep 11, 2025
4195a9f
Update README.md
Poornitha006 Sep 11, 2025
72b5836
Update README.md
Poornitha006 Sep 11, 2025
ff48a01
Implement preprocessing steps for CICIDS2017 dataset
yasaswitaraja Sep 11, 2025
843a668
Merge branch 'SpringBoardMentor193s:main' into main
yasaswitaraja Sep 11, 2025
43b8871
New changes made
AARIFA-R Sep 12, 2025
ecc93d6
Add files via upload
AARIFA-R Sep 12, 2025
45c0352
Delete KDD.ipynb
yasaswitaraja Sep 14, 2025
222e118
Add NSL-KDD preprocessing
yasaswitaraja Sep 14, 2025
a5c5727
Add NSL-KDD preprocessing
yasaswitaraja Sep 14, 2025
2b1f079
Add CICIDS 2017 dataset and preprocessing code
yasaswitaraja Sep 14, 2025
24c1be2
Delete CICIDS2017.ipynb
yasaswitaraja Sep 14, 2025
88f15d9
Delete NSS_KDD.ipynb
yasaswitaraja Sep 14, 2025
5006451
Update DataOverview.md
Poornitha006 Sep 14, 2025
0e06e97
Update README.md
Poornitha006 Sep 14, 2025
7b8aa30
Delete DataOverview.md
Poornitha006 Sep 14, 2025
26d2fd1
Delete docs/datapreprocessing-checkpoint.ipynb
yasaswitaraja Sep 15, 2025
314f24f
Added project folder structure with .gitkeep files
Sep 15, 2025
10c368d
Update README.md
Poornitha006 Sep 16, 2025
b222019
Merge branch 'SpringBoardMentor193s:poornitha' into poornitha
Poornitha006 Sep 16, 2025
04755c1
Merge pull request #75 from Poornitha006/poornitha
Poornitha006 Sep 16, 2025
f0e91e8
Create requirements.txt
Poornitha006 Sep 16, 2025
363c4c9
Created using Colab
yasaswitaraja Sep 16, 2025
2d0ebcf
Add files via upload
yasaswitaraja Sep 16, 2025
ad0913b
NSS-KDD Distribution of Network Traffic
yasaswitaraja Sep 16, 2025
9af5fea
Add NSS-KDD analysis outputs and visualizations
yasaswitaraja Sep 16, 2025
565fc5b
Merge branch 'SpringBoardMentor193s:poornitha' into poornitha
Poornitha006 Sep 19, 2025
377509b
Created using Colab
yasaswitaraja Sep 20, 2025
9e6cac6
Created using Colab
yasaswitaraja Sep 20, 2025
2abd342
Add files via upload
Poornitha006 Sep 23, 2025
60f950e
Create data_overview.md
Poornitha006 Sep 23, 2025
18e8858
Update data_overview.md
Poornitha006 Sep 23, 2025
a6c4050
Created using Colab
yasaswitaraja Sep 25, 2025
2dde58b
Merge pull request #86 from Poornitha006/poornitha
Poornitha006 Sep 28, 2025
b8ee447
Delete data/.gitkeep
Poornitha006 Sep 28, 2025
c7c4c7e
Delete notebooks/.gitkeep
Poornitha006 Sep 28, 2025
3a2adba
Created using Colab
yasaswitaraja Sep 28, 2025
6b35e6d
Created using Colab
yasaswitaraja Sep 29, 2025
34ab6de
Created using Colab
yasaswitaraja Sep 29, 2025
f8987da
Delete notebooks/NSS_KDD.ipynb
yasaswitaraja Sep 29, 2025
9cb72ca
Created using Colab
yasaswitaraja Sep 29, 2025
3a49ff8
Added Streamlit IDS app with model selection
yasaswitaraja Oct 1, 2025
279ef37
Merge pull request #98 from SpringBoardMentor193s/poornitha
Poornitha006 Oct 6, 2025
35c891d
Delete requirements.txt
Poornitha006 Oct 6, 2025
da9f7f5
Update README.md
Poornitha006 Oct 6, 2025
bc9f604
Delete scripts directory
Poornitha006 Oct 6, 2025
8a2c641
Delete notebooks directory
Poornitha006 Oct 6, 2025
1f2e071
Delete docs directory
Poornitha006 Oct 6, 2025
d8cc202
Delete data directory
Poornitha006 Oct 6, 2025
c745d56
Add files via upload
AARIFA-R Oct 22, 2025
9903c05
Add files via upload
AARIFA-R Oct 22, 2025
49e0809
documented
AARIFA-R Oct 22, 2025
ae78972
Merge pull request #110 from SpringBoardMentor193s/AARIFA
AARIFA-R Oct 22, 2025
205481d
Add working SentinelNet app
yasaswitaraja Apr 9, 2026
152e892
Revise README with detailed project overview
yasaswitaraja Apr 9, 2026
e5e7604
Merge branch 'SpringBoardMentor193s:main' into main
yasaswitaraja Apr 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"githubPullRequests.ignoredPullRequestBranches": [
"main"
]
}
13 changes: 2 additions & 11 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2025 SpringBoardMentor193s
Copyright (c) 2025 yasaswitaraja

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -9,13 +9,4 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
[Full MIT License Text here or link to https://opensource.org/licenses/MIT]
289 changes: 287 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,287 @@
# SentinelNet
The goal of this project is to develop an AI-powered Network Intrusion Detection System (NIDS) capable of identifying malicious network trafic and cyber-attacks in real time. By leveraging machine learning techniques, the system will classify trafic as normal or suspicious based on historical data.
<div align="center">

<img src="https://em-content.zobj.net/source/google/387/locked_1f512.png" width="80"/>

# 🔐 SentinelNet

### AI-Powered Network Intrusion Detection System

[![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://sentinel-net-ids.streamlit.app/)
![Python](https://img.shields.io/badge/Python-3.8+-3776AB?style=flat&logo=python&logoColor=white)
![Scikit-learn](https://img.shields.io/badge/Scikit--learn-ML-F7931E?style=flat&logo=scikit-learn&logoColor=white)
![Streamlit](https://img.shields.io/badge/Streamlit-Dashboard-FF4B4B?style=flat&logo=streamlit&logoColor=white)
![License](https://img.shields.io/badge/License-MIT-green?style=flat)
![Status](https://img.shields.io/badge/Status-Live-brightgreen?style=flat)

> **Detect cyber attacks in network traffic using machine learning — upload a dataset, choose a model, and get instant results.**

[🚀 Live Demo](https://sentinel-net-ids.streamlit.app/) · [📂 Repository](https://github.com/yasaswitaraja/SentinelNet) · [🐛 Report Bug](https://github.com/yasaswitaraja/SentinelNet/issues)

</div>

---

## 📌 Table of Contents

- [About the Project](#-about-the-project)
- [Live Demo](#-live-demo)
- [Features](#-features)
- [Tech Stack](#-tech-stack)
- [Datasets](#-datasets)
- [ML Models](#-ml-models)
- [How It Works](#-how-it-works)
- [Project Structure](#-project-structure)
- [Getting Started](#-getting-started)
- [Deployment](#-deployment)
- [Attack Categories](#-attack-categories)
- [Screenshots](#-screenshots)
- [License](#-license)

---

## 🛡️ About the Project

**SentinelNet** is an AI-powered **Network Intrusion Detection System (NIDS)** that leverages machine learning to classify network traffic as **normal or malicious** in real time.

The system analyzes labeled network traffic datasets, applies multiple ML algorithms, and provides detailed evaluation metrics — all through an interactive Streamlit dashboard. It is built to work with industry-standard cybersecurity datasets like **NSL-KDD** and **CICIDS2017**.

> **Problem it solves:** Traditional rule-based intrusion detection systems struggle with novel attacks. SentinelNet uses ML to learn patterns from historical data and generalize to unseen threats.

---

## 🚀 Live Demo

👉 **[https://sentinel-net-ids.streamlit.app/](https://sentinel-net-ids.streamlit.app/)**

Upload any labeled network traffic CSV and detect intrusions instantly — no setup required.

---

## ✨ Features

| Feature | Description |
|---|---|
| 📂 **CSV Upload** | Upload any labeled network traffic dataset |
| 🤖 **4 ML Models** | Logistic Regression, Random Forest, Decision Tree, Gradient Boosting |
| 📊 **Evaluation Metrics** | Accuracy, Precision, Recall, F1 Score |
| 🔢 **Confusion Matrix** | Visual breakdown of TP, FP, TN, FN |
| 📈 **Feature Importance** | Top 10 most influential features for tree-based models |
| 📋 **Classification Report** | Per-class precision, recall, F1 |
| 🔎 **Sample Predictions** | See actual vs predicted labels for test rows |
| ⚙️ **Configurable Split** | Adjust train/test split ratio from the sidebar |
| 🎨 **Dark Cyber Theme** | Premium dark UI designed for security professionals |
| 📱 **Responsive** | Works on desktop and tablets |

---

## 🛠️ Tech Stack

| Layer | Technology |
|---|---|
| **Language** | Python 3.8+ |
| **Web App** | Streamlit |
| **Machine Learning** | Scikit-learn |
| **Data Processing** | Pandas, NumPy |
| **Visualization** | Matplotlib |
| **Notebooks** | Jupyter Notebook |
| **Deployment** | Streamlit Community Cloud |
| **Version Control** | GitHub |

---

## 🗂️ Datasets

SentinelNet is designed to work with two industry-standard NIDS datasets:

### 1. NSL-KDD
A classic, widely-used benchmark dataset for network intrusion detection research. Contains labeled connection records with 5 traffic categories.

- ✅ Removes duplicate records from KDDCup'99
- ✅ Balanced class distribution
- ✅ Standard benchmark for comparing NIDS models

### 2. CICIDS2017
A modern, realistic dataset generated by the Canadian Institute for Cybersecurity with actual network traffic captures.

- ✅ Contains real PCAP files converted to flow features
- ✅ Covers modern attack types (DDoS, PortScan, Brute Force)
- ✅ More representative of current real-world traffic

> Any other labeled CSV dataset with features + a target column will also work.

---

## 🤖 ML Models

| Model | Strength | Best For |
|---|---|---|
| **Logistic Regression** | Fast, interpretable baseline | Binary classification, quick benchmarks |
| **Decision Tree** | Highly interpretable, rule-based | Explainable predictions |
| **Random Forest** | High accuracy, handles imbalance well | General-purpose, most datasets |
| **Gradient Boosting** | Best accuracy, handles complex patterns | High-performance detection |

> 💡 **Recommendation:** Random Forest and Gradient Boosting typically give the best results on NIDS datasets due to their ability to handle non-linear patterns and class imbalance.

---

## ⚙️ How It Works

```
┌─────────────────────────────────────────────────┐
│ USER UPLOADS CSV DATASET │
└─────────────────────┬───────────────────────────┘
┌─────────────────────────────────────────────────┐
│ DATA PREPROCESSING │
│ • Encode categorical features (LabelEncoder) │
│ • Handle missing values (median imputation) │
│ • Encode target labels │
│ • Stratified Train/Test Split (default 80/20) │
│ • Feature Scaling (StandardScaler) │
└─────────────────────┬───────────────────────────┘
┌─────────────────────────────────────────────────┐
│ MODEL TRAINING │
│ User selects one of 4 ML models │
│ Model trains on scaled training data │
└─────────────────────┬───────────────────────────┘
┌─────────────────────────────────────────────────┐
│ EVALUATION & VISUALIZATION │
│ • Accuracy / Precision / Recall / F1 │
│ • Confusion Matrix │
│ • Feature Importance Chart │
│ • Sample Predictions Table │
│ • Full Classification Report (optional) │
└─────────────────────────────────────────────────┘
```

---

## 📁 Project Structure

```
SentinelNet/
├── app.py ← Main Streamlit web application
├── requirements.txt ← Python dependencies
├── README.md ← Project documentation
├── notebooks/ ← Jupyter notebooks for EDA & experiments
│ ├── eda_nslkdd.ipynb
│ └── eda_cicids2017.ipynb
├── data/ ← Dataset storage
│ ├── NSL-KDD/
│ └── CICIDS2017/
├── analysis/ ← Analysis scripts and outputs
├── outputs/ ← Saved plots and results
├── script/ ← Standalone Python scripts
│ └── main.py
├── docs/ ← Additional documentation
└── documentation/ ← Project reports
```

---

## 🏁 Getting Started

### Prerequisites

- Python 3.8 or above
- pip

### Installation

```bash
# 1. Clone the repository
git clone https://github.com/yasaswitaraja/SentinelNet.git

# 2. Navigate into the project folder
cd SentinelNet

# 3. Install dependencies
pip install -r requirements.txt

# 4. Run the app
streamlit run app.py
```

Open **http://localhost:8501** in your browser.

### Quick Test

1. Download the [NSL-KDD dataset](https://www.unb.ca/cic/datasets/nsl.html) or use any labeled CSV
2. Upload via the sidebar
3. Select a model
4. Click **Run Intrusion Detection**

---

## 🌐 Deployment

This project is deployed on **Streamlit Community Cloud** — free hosting for Streamlit apps.

### Deploy Your Own Fork

1. Fork this repository
2. Go to [share.streamlit.io](https://share.streamlit.io)
3. Sign in with GitHub
4. Click **New App** → select your forked repo
5. Set **Main file path** to `app.py`
6. Click **Deploy** ✅

The app auto-redeploys on every `git push` to the main branch.

---

## 🎯 Attack Categories (NSL-KDD)

| Category | Full Name | Description | Example |
|---|---|---|---|
| 🟢 **Normal** | Normal Traffic | Legitimate network activity | Regular web browsing |
| 🔴 **DoS** | Denial of Service | Overwhelms target with requests | SYN Flood, Ping of Death |
| 🟡 **Probe** | Reconnaissance | Scanning for vulnerabilities | Port Scanning, Nmap |
| 🟣 **R2L** | Remote to Local | Unauthorized remote access attempt | Password brute force |
| 🟠 **U2R** | User to Root | Privilege escalation attack | Buffer overflow exploit |

---

## 📊 Evaluation Metrics Explained

| Metric | Formula | Why It Matters in NIDS |
|---|---|---|
| **Accuracy** | (TP+TN) / Total | Overall correctness |
| **Precision** | TP / (TP+FP) | Fewer false alarms |
| **Recall** | TP / (TP+FN) | Fewer missed attacks ⚠️ Most critical |
| **F1 Score** | 2 × (P×R)/(P+R) | Balanced metric for imbalanced data |

> ⚠️ **In cybersecurity, Recall is the most critical metric.** Missing a real attack (False Negative) is far more dangerous than a false alarm (False Positive).

---

## 🙏 Credits & Acknowledgements

- Inspired by **[Meta SeamlessM4T](https://github.com/facebookresearch/seamless_communication)** research on AI-powered detection
- Dataset: **[NSL-KDD](https://www.unb.ca/cic/datasets/nsl.html)** — University of New Brunswick
- Dataset: **[CICIDS2017](https://www.unb.ca/cic/datasets/ids-2017.html)** — Canadian Institute for Cybersecurity
- Forked from: **[SpringBoardMentor193s/SentinelNet](https://github.com/SpringBoardMentor193s/SentinelNet)**
- Built with ❤️ using [Streamlit](https://streamlit.io) + [Scikit-learn](https://scikit-learn.org)

---

## 📄 License

Distributed under the **MIT License**. See `LICENSE` for more information.

---

<div align="center">

Made with ❤️ by [yasaswitaraja](https://github.com/yasaswitaraja)

⭐ **Star this repo if you found it useful!** ⭐

**[🚀 Live Demo](https://sentinel-net-ids.streamlit.app/)** · **[📂 GitHub](https://github.com/yasaswitaraja/SentinelNet)**

</div>
Empty file added analysis/.gitkeep
Empty file.
Loading