Skip to content

oussama134/treat-detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

treat-detector

πŸ”’ Cybersecurity Threat Detector

LSTM-based network intrusion detection system using the CICIDS2017 dataset for real-time threat classification.

πŸš€ Features

  • LSTM Neural Networks for sequence-based anomaly detection
  • Multi-class classification of 15 attack types
  • Handles class imbalance in network traffic
  • Real-time threat prediction capabilities

πŸ“ Project Structure

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Network Traffic β”‚ pyshark β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ (sniff) β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β” β”‚ Feature β”‚ β”‚ Extractor β”‚ ← scapy / nfstream / CICFlowMeter script that extract features from live data trafiic β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜ β”‚ (vector) β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β” β”‚ LSTM Model β”‚ ← your trained detector feed the mmodel with data to predict β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜ β”‚ (predictions) β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Alert System β”‚ ← logs, visualization if attack happends --> send alerts β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β” β”‚ Dashboard β”‚ ← Flask + React (optional) visualisation des donnes : attaques types ... β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

venv = activate the virtula environement venv/scripts/activate

uvicorn main:app --reload --port 8000


Tu devrais voir :

βœ… Database initialized: C:\Users\lenovo\Desktop\cybersec-anamoly-detector\data\ids_alerts.db βœ… Model loaded: 15 classes, 78 features [*] Background capture thread started


### Γ‰tape 5 : Teste les Nouveaux Endpoints

Ouvre ton navigateur et teste :

1. **Dashboard avec stats persistantes** :
   http://localhost:8000/api/dashboard
2. **Filtrer les alertes** :
   http://localhost:8000/api/alerts?label=DoS%20GoldenEye&min_score=0.8
3. **Export CSV** :
   http://localhost:8000/api/export/csv?table=alerts
4. **Stats sur 7 jours** :
   http://localhost:8000/api/stats?days=7
5: API Directe
bash# Test avec curl
curl "http://localhost:8000/api/stats?days=0.003"
::::
# RΓ©ponse attendue :
{
  "total": 45,
  "benign": 32,
  "malicious": 13,
  "period_days": 0.003,
  "period_label": "5 minutes"  ← Nouveau !
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors