BehaviorShield is a lightweight real-time monitoring system that detects abnormal system behavior using AI.
Instead of relying on fixed thresholds, it learns normal CPU, memory, network, and GPU patterns — and flags unusual activity such as:
- Cryptomining abuse
- Ransomware-like encryption spikes
- Suspicious background workloads
- GPU resource hijacking
It focuses on behavior change over time, not just high usage.
- Learns baseline system behavior automatically
- Uses Isolation Forest for anomaly detection
- Adds temporal pattern analysis
- Combines multiple signals into a single risk score
- Streams live detection results via WebSocket
- Fully explainable risk scoring
Core idea: Detect early abnormal behavior before visible damage occurs.
- Collect system metrics
- Store in rolling window
- Compute behavioral features
- Run anomaly detection
- Apply temporal & contextual checks
- Generate risk score
- Stream live results to dashboard
- FastAPI
- Scikit-learn (Isolation Forest)
- WebSockets
- Async streaming
- JavaScript dashboard
git clone https://github.com/GaliAkshatha/BehaviorShield.git
cd BehaviorShieldpython -m venv venv
venv\Scripts\activatepip install -r requirements.txtuvicorn main:app --reloadhttp://127.0.0.1:8000/docs
Open index.html using Live Server to view the real-time dashboard.
Modern systems are vulnerable to silent resource abuse. Most monitoring tools detect crashes — not behavioral anomalies.
BehaviorShield focuses on early behavioral detection using AI.