CyberVision IDS is a Python-based Intrusion Detection System with a modern GUI. It analyzes network traffic from CSV or PCAP files using machine learning models to detect anomalies and attacks in real time, generates alerts, visualizes activity, and creates detailed PDF security reports automatically.
CyberVision IDS is a Python-based Intrusion Detection System with a modern desktop GUI (PySide6). It analyzes network traffic data (CSV / PCAP) using Machine Learning models to detect malicious, suspicious, or anomalous activities in real time. The system is designed for educational, research, and small-scale security monitoring purposes.
An Intrusion Detection System (IDS) monitors network or system activities to identify unauthorized access, attacks, or policy violations.
Types of IDS
| Type | Description |
|---|---|
| Signature-based | Detects known attack patterns |
| Anomaly-based | Detects unusual behavior (used in CyberVision IDS) |
| Host-based (HIDS) | Monitors a single system |
| Network-based (NIDS) | Monitors network traffic |
๐ CyberVision IDS is mainly a Network-based + Anomaly-based IDS.
- User uploads network logs (CSV / PCAP)
- Features are extracted (for PCAP files)
- Data is preprocessed & normalized
- Selected ML model is trained
- System performs real-time detection
- Alerts & visualizations are generated
- A PDF security report can be exported
Supervised Models (Require label column)
| Model | Purpose |
|---|---|
| Random Forest | High accuracy, handles complex patterns |
| Logistic Regression | Fast, interpretable |
| Naive Bayes | Lightweight, probabilistic |
Unsupervised Models (No label required)
| Model | Purpose |
|---|---|
| Isolation Forest | Best for anomaly detection |
| One-Class SVM | Detects outliers in normal traffic |
- CSV โ Pre-extracted network features
- PCAP โ Raw packet captures (features extracted automatically)
- ๐ Upload CSV / PCAP network logs
- ๐ง Multiple ML model support
- โก Real-time packet-by-packet detection
- ๐จ Alert system (HIGH severity alerts)
- ๐ Live visualization timeline
- ๐ Accuracy & evaluation metrics
- ๐ Automatic PDF report generation
- ๐ฅ๏ธ Modern GUI (Desktop App)
- ๐งต Background training (no UI freeze)
| Button | Function |
|---|---|
| Upload Network Logs | Load CSV or PCAP files |
| Train Model | Train selected ML model |
| Start Detection | Begin real-time detection |
| Stop Detection | Stop live detection |
| Generate PDF Report | Export security report |
CyberVision_IDS/
โ
โโโ main.py # Application entry point
โ
โโโ gui/
โ โโโ dashboard.py # Main dashboard window
โ โโโ model_panel.py # ML controls & detection logic
โ โโโ alert_panel.py # Alert display system
โ โโโ visualization_panel.py # Live graphs/timeline
โ
โโโ backend/
โ โโโ feature_extraction.py # PCAP feature extraction
โ โโโ data_processing.py # Preprocessing & scaling
โ โโโ ml_models.py # Model training/loading
โ โโโ anomaly_detection.py # Detection logic
โ โโโ evaluation_metrics.py # Accuracy & confusion matrix
โ โโโ report_generation.py # PDF report generator
โ
โโโ models/ # Saved ML models (.pkl)
โโโ reports/ # Generated PDF reports
โโโ datasets/ # Sample datasets
โโโ README.md
| Technology | Purpose |
|---|---|
| Python 3.10+ | Core language |
| PySide6 (Qt) | GUI framework |
| Pandas | Data handling |
| Scikit-learn | Machine learning |
| FPDF | PDF report generation |
| Threading | Background processing |
git clone https://github.com/SyedShaheerHussain/Intrusion-Detection-System-IDS-using-Machine-Learning-GUI-.git
cd Intrusion Detection System (IDS) using Machine Learning
pip install -r requirements.txt
Required Libraries
pandas
scikit-learn
pyside6
fpdf
numpy
python main.py
- Launch application
- Upload dataset (CSV / PCAP)
- Select ML model
- Click Train Model
- Click Start Detection
- Observe alerts & visuals
- Generate PDF report
- Model used
- Total records analyzed
- Total suspicious alerts
- Accuracy (if supervised)
- Timestamped filename
- Beginner-friendly IDS
- Supports multiple ML models
- Real-time visualization
- Automatic reporting
- Modular & extensible code
- Not production-grade IDS
- Accuracy depends on dataset quality
- Limited PCAP feature extraction
- No live network sniffing (offline only)
- ๐ด Live packet sniffing (Scapy)
- ๐ง Deep Learning models (LSTM, Autoencoders)
- ๐ Web dashboard
- ๐ก Email / SMS alerts
- โ๏ธ Cloud deployment
- ๐ Role-based authentication
Important
This project is for educational & research purposes only Not recommended for real-world enterprise security Use only on authorized networks
Note
The author is not responsible for misuse of this software. Any illegal or unethical use is strictly prohibited.
CyberVision IDS demonstrates how Machine Learning + Python GUI can be used to build a functional Intrusion Detection System. It is ideal for students, researchers, and cybersecurity learners who want hands-on IDS experience.
+--------------------+
| User Interface |
| (PySide6 Desktop) |
+---------+----------+
|
v
+--------------------+
| Data Ingestion |
| CSV / PCAP Upload |
+---------+----------+
|
v
+-----------------------------+
| Feature Extraction Module |
| - CSV: Pandas Processing |
| - PCAP: Scapy/Tshark |
+--------------+--------------+
|
v
+-----------------------------+
| Data Preprocessing Layer |
| - Cleaning |
| - Scaling (StandardScaler) |
+--------------+--------------+
|
v
+-----------------------------+
| Machine Learning Engine |
| Supervised / Unsupervised |
+--------------+--------------+
|
v
+-----------------------------+
| Detection Engine |
| Real-time Packet Analysis |
+--------------+--------------+
|
v
+-----------------------------+
| Alerts | Visualization | |
| Reports (PDF) |
+-----------------------------+
- User uploads CSV/PCAP
- Features extracted
- Data normalized
- Model trained or loaded
- Detection starts (real-time)
- Alerts triggered
- Results saved
- PDF report generated
CyberVision IDS โ AI Based Intrusion Detection System
Traditional IDS systems are rule-based, static and unable to detect modern or unknown attacks. There is a need for an intelligent IDS that can learn attack patterns automatically using machine learning.
- Detect malicious network traffic
- Use ML for intelligent detection
- Support real-time monitoring
- Generate detailed reports
- Academic & research use
- Small to medium networks
- Cybersecurity education
- Data Collection
- Feature Extraction
- Preprocessing
- Model Training
- Detection & Evaluation
| src_ip | dst_ip | protocol | packet_size | duration | label |
|---|---|---|---|---|---|
| 10.0.0.1 | 10.0.0.5 | TCP | 1500 | 0.2 | Normal |
| 192.168.1.3 | 8.8.8.8 | UDP | 3000 | 0.9 | Attack |
- Normal โ 1
- Attack โ 0
- Upload dataset
- Select ML model
- Click Train Model
- Wait for progress bar
- Click Start Detection
- Generate PDF report
Idea: Multiple decision trees vote for final output
Math intuition:
- Gini Index / Entropy
- Majority voting
Pros:
- High accuracy
- Handles non-linearity
Cons:
- More memory
Idea: Probability-based binary classifier
Formula:
P(y=1) = 1 / (1 + e^(-z))
Pros:
- Fast
- Interpretable
Cons:
- Linear boundaries
Idea: Bayes Theorem with independence assumption
Formula:
P(A|B) = P(B|A)P(A)/P(B)
Pros:
- Fast
- Good for large data
Cons:
- Assumes independence
Idea: Isolate anomalies using random splits
Key Concept: Anomalies are easier to isolate
Pros:
- No labels needed
Cons:
- Needs tuning
Idea: Learns normal boundary
Pros:
- Good for zero-day attacks
Cons:
- Slow on large datasets
- Deep Learning (LSTM, CNN)
- Live packet sniffing
- Cloud-based IDS
- SIEM integration
- Web dashboard
If you find this repository useful or insightful, please consider:
- โญ Starring the repository
- ๐ Sharing it within your network
- ๐ค Following my GitHub profile for future projects and updates
Your support helps drive continued innovation and open-source contributions.
โ Syed Shaheer Hussain
Note
This project is intended for academic and learning purposes. Do not deploy on production networks without security validation.
Caution
Use labeled data for supervised models Unsupervised models detect unknown attacks Always validate dataset before training
Developed with โค๏ธ for Cybersecurity Learning By ยฉ Syed Shaheer Hussain
.png)
.png)
.png)
.png)