🚨 Alert Fatigue is Real – SOC teams face thousands of alerts every day, and missing one critical threat can cost millions.
This project solves that by using AI-driven threat detection, prioritization, and visualization in real-time.
🧠 Model Training – Trained on the CICIDS 2017 dataset to classify network traffic as Normal or Malicious.
🔎 Primary Prediction – First model classifies incoming logs in real time.
🤖 Secondary Analysis (Gemini Model) – If malicious, a secondary ML model classifies the exact attack type (e.g., DDoS, PortScan).
🛢 Data Storage – Predictions (both normal & malicious) are pushed into MongoDB for dashboard visualization.
🌍 Visualization – Dashboard maps attackers, shows risk scores, and allows filtering for SOC analysis.
Frontend: React.js, Chart.js Backend: Node.js (Express) Database: MongoDB Machine Learning: Scikit-learn, Pandas, NumPy, Dataset: CICIDS 2017 (Combined & Preprocessed) # 1️⃣ Clone the repo git clone https://github.com/devansh436/threat-detection.git
cd threat-detection # 2️⃣ Install backend dependencies cd server
npm install # 3️⃣ Start the backend server npm run dev # 4️⃣ Start the frontend (if React) cd client
npm install
npm run dev # 5️⃣ Start the python microservice pip install -r requirements.txt
python3 ml-service.py Upload network logs or use sample data
Model will process logs & generate predictions
Visit dashboard → See threats, risk scores & map visualization
Filter results by threat type or risk level {
"source_ip": "192.168.15.22",
"dest_ip": "192.168.10.1",
"protocol": "udp",
"threat_score": 15,
"threat_level": "Low",
"reason": "The log shows a single DNS query (UDP port 53) from a local IP to another local IP. This is generally normal network activity.",
"threat_type": "normal_traffic"
} 📈 More explainable AI with SHAP/LIME
🧠 Deep Learning models for advanced detection We welcome contributions! Feel free to fork this repo, make changes, and submit a pull request. For major changes, open an issue first to discuss what you would like to change. Ketan Dav (Team Lead)
Devansh Deshpande
Dharm Patel
Aksh Patel
Devarsh Dalwadi - [CICIDS 2017 Dataset](https://www.unb.ca/cic/datasets/ids-2017.html) - [Scikit-learn Documentation](https://scikit-learn.org/stable) - [MongoDB Docs](https://www.mongodb.com/docs/) # threat-detection
















