Real-time threat detection β’ Autonomous response β’ 99.99% ML accuracy
Live Demo β’ Documentation β’ Report Bug β’ Request Feature
NeuroShield is a production-grade, AI-powered Security Operations Center (SOC) platform that autonomously detects, analyzes, and responds to cybersecurity threats in real-time β without human intervention.
Built on cutting-edge ML models trained on real-world attack data (CICIDS2017), NeuroShield combines a Random Forest classifier (99.99% accuracy), Isolation Forest anomaly detection, and an intelligent auto-response engine to deliver enterprise-grade security at scale.
"The same technology that Fortune 500 companies spend millions on β built from scratch."
- Random Forest Classifier β 99.99% accuracy on real network attack data
- Isolation Forest β Detects unknown zero-day anomalies without prior signatures
- SMOTE Balancing β Handles real-world imbalanced threat data
- Trained on CICIDS2017 β Industry-standard cybersecurity dataset (2.8M+ records)
- Real-time log analysis with pattern-based detection
- Detects: Port Scanning, Brute Force, SQL Injection, XSS, DDoS, and more
- AI confidence scoring on every alert
- Attack chain reasoning and kill-chain visualization
- Severity-based auto-response (Low β Critical)
- Automatic IP blocking on high/critical threats
- Real-time Slack/Email alerting
- Human-in-the-loop approval for critical actions
- 3D Interactive Globe β Live world attack map with animated arcs
- Real-time charts: Area, Bar, Donut, Circular Gauges
- Live threat feed with auto-refresh every 5 seconds
- Dark cyberpunk UI with neon animations and Matrix effects
- Auto-generated professional incident reports
- SOC2 & ISO 27001 compliance templates
- Full audit trail with timestamps
- Risk scoring and impact assessment
| Layer | Technology |
|---|---|
| Backend | FastAPI, SQLAlchemy, SQLite/PostgreSQL |
| AI/ML | Scikit-learn, PyTorch, Isolation Forest, Random Forest |
| Data | CICIDS2017, SMOTE (imbalanced-learn), Pandas, NumPy |
| Frontend | React 18, Framer Motion, Recharts, Three.js |
| 3D Globe | react-globe.gl, Three.js |
| Security | JWT Auth, RBAC, Rate Limiting |
| DevOps | Docker, Railway, Vercel, GitHub Actions |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β NEUROSHIELD PLATFORM β
ββββββββββββββββ¬βββββββββββββββββββ¬ββββββββββββββββββββββββ€
β FRONTEND β BACKEND β AI/ML ENGINE β
β β β β
β React 18 β FastAPI β Random Forest β
β 3D Globe β SQLAlchemy β (99.99% accuracy) β
β Recharts β Log Parser β β
β Framer β Auto-Response β Isolation Forest β
β Motion β Alert Engine β (Anomaly Detection) β
β β β β
β Dashboard β REST API β CICIDS2017 Dataset β
β Threat UI β WebSocket β 50,000+ samples β
β AI Terminal β JWT Auth β SMOTE Balancing β
ββββββββββββββββ΄βββββββββββββββββββ΄ββββββββββββββββββββββββ
Python 3.10+
Node.js 18+
Git
git clone https://github.com/yourusername/NeuroShield.git
cd NeuroShieldcd backend
python -m venv venv
venv\Scripts\activate # Windows
pip install -r requirements.txtCreate .env file:
APP_NAME=NeuroShield
DEBUG=True
DATABASE_URL=sqlite:///./neuroshield.db
SECRET_KEY=your-super-secret-key-hereRun backend:
uvicorn app.main:app --reload --port 8000cd ml_engine
pip install -r requirements.txt
# Download CICIDS2017 dataset from Kaggle
# Place in ml_engine/data/cicids2017_cleaned.csv
python preprocess.py # Data preprocessing + SMOTE
python train_models.py # Train ML modelscd frontend
npm install
npm starthttp://localhost:3000
| Model | Accuracy | Precision | Recall | F1-Score |
|---|---|---|---|---|
| Random Forest | 99.99% | 1.00 | 1.00 | 1.00 |
| Isolation Forest | 40.33%* | β | β | β |
*Isolation Forest is unsupervised β used for unknown anomaly detection, not classification accuracy.
Training Data: CICIDS2017 (50,000 samples after SMOTE balancing)
- Normal Traffic: 49,787 samples
- Port Scanning: 49,787 samples (after SMOTE)
NeuroShield/
βββ backend/
β βββ app/
β β βββ main.py # FastAPI entry point
β β βββ core/
β β β βββ config.py # Settings & env vars
β β β βββ database.py # DB connection
β β βββ models/
β β β βββ threat.py # SQLAlchemy models
β β βββ api/
β β β βββ routes.py # API endpoints
β β βββ services/
β β βββ log_parser.py # Log analysis
β β βββ predictor.py # ML predictions
β β βββ security.py # Auto-response engine
β βββ models/ # Trained ML models
β βββ random_forest.pkl
β βββ isolation_forest.pkl
β βββ scaler.pkl
β βββ label_encoder.pkl
β
βββ ml_engine/
β βββ explore.py # Data exploration
β βββ preprocess.py # Data preprocessing
β βββ train_models.py # Model training
β βββ data/ # Dataset (not in git)
β
βββ frontend/
βββ src/
βββ App.js # Router & auth
βββ pages/
β βββ Login.js # Matrix rain login
β βββ Dashboard.js # 3D Globe + Charts
β βββ ThreatCenter.js # Live threat table
β βββ AIAnalysis.js # Neural net terminal
β βββ Reports.js # Incident reports
βββ components/
βββ Layout.js # Sidebar navigation
βββ StatsCards.js # Animated stat cards
βββ CircularGauge.js # SVG gauge charts
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/v1/analyze-log |
Analyze raw log for threats |
POST |
/api/v1/ml-predict |
ML model prediction |
GET |
/api/v1/threats |
Get all detected threats |
GET |
/api/v1/dashboard/stats |
Dashboard statistics |
PUT |
/api/v1/threats/{id}/block |
Block a threat |
POST |
/api/v1/security/auto-respond |
Trigger auto-response |
POST |
/api/v1/security/block-ip |
Block an IP |
GET |
/api/v1/security/blocked-ips |
List blocked IPs |
POST |
/api/v1/security/incident-report |
Generate report |
Interactive API Docs: http://localhost:8000/docs
# Test threat detection
curl -X POST http://localhost:8000/api/v1/analyze-log \
-H "Content-Type: application/json" \
-d '{"raw_log": "Failed password for root from 192.168.1.105 port 22"}'
# Expected response:
# {
# "threat_detected": true,
# "attack_type": "BRUTE_FORCE",
# "severity": "critical"
# }# Push to GitHub, connect Railway
# Set environment variables in Railway dashboard
railway up# Push to GitHub, connect Vercel
# Set root directory to /frontend
vercel --prod- Core threat detection engine
- ML model training (Random Forest + Isolation Forest)
- Auto-response system
- 3D dashboard with Globe visualization
- LLM integration (GPT-4/Claude) for attack explanation
- WebSocket real-time push notifications
- Multi-user RBAC authentication
- Kubernetes deployment config
- IP Geolocation tracking
- Dark Web threat intelligence feed
# Fork the repo
git fork https://github.com/yourusername/NeuroShield
# Create feature branch
git checkout -b feature/amazing-feature
# Commit changes
git commit -m "Add amazing feature"
# Push and create PR
git push origin feature/amazing-featureDistributed under the MIT License. See LICENSE for more information.
Isha Singh Rathore
- LinkedIn: linkedin.com/in/yourname
- GitHub: @yourusername
- Email: ishasinghrathore514@gmail.com
β Star this repo if you found it helpful!
Built with β€οΈ and a lot of β