RIOT IDS/IPS is a lightweight, real-time anomaly detection system built using machine learning to detect and prevent intrusions in IoT environments. Designed for both simulation and practical demonstration, it features a sleek login UI, real-time anomaly monitoring, device blocking capabilities, and a detailed analytics dashboard.
View Live Page : https://g0w6y.github.io/RIOT
- Intrusion Detection with supervised (Random Forest) and unsupervised (Isolation Forest) models
- Anomaly Detection based on simulated IoT traffic
- Device Blocking/Unblocking for suspicious IPs
- Interactive Dashboard to view system metrics and alerts
- Glassmorphism Login UI with particle background effects
- Session-based Authentication (client-side logic, ready for Flask integration)
- Extensible Backend API using Flask
Layer | Tools/Frameworks |
---|---|
Backend | Python, Flask, Scikit-learn |
Frontend | HTML5, CSS3, JavaScript, FontAwesome |
ML Models | RandomForestClassifier, IsolationForest |
UI Enhancements | Particles.js, Inter font, custom CSS |
├── main.py # Flask backend with ML models and APIs
├── attacker.py # Script to simulate normal and malicious IoT traffic
├── login.html
├── dashboard.html
├── device_data.log # Log file with device behavior data
├── README.md # You’re here!
-
Training:
main.py
trains ML models using provided log data.- Two approaches: Supervised (labeled data) and Unsupervised (anomaly detection).
-
Simulation:
attacker.py
simulates IoT traffic including port scans, DDoS-like floods, etc.- Data is continuously appended to
device_data.log
.
-
Detection & Dashboard:
- Flask app reads the log, detects anomalies, and displays them in the dashboard.
- Suspicious devices can be blocked/unblocked via buttons.
-
Login Page:
- UI styled with animated particles and glassmorphism.
- Validates credentials and redirects to
/dashboard
.
git clone https://github.com/g0w6y/RIOT.git
cd RIOT
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
If requirements.txt
isn't available, use:
pip install flask scikit-learn
python main.py
- App will start on
http://localhost:5000
- Visit
/
for the login page - Credentials:
admin / password123
In a new terminal:
python attacker.py
Login Page | Dashboard |
---|---|
- Add database-backed authentication & registration
- Real-time WebSocket updates for incoming attacks
- Extend detection rules using signature-based methods
- Integrate with real IoT edge devices (Raspberry Pi, ESP8266)
This project is licensed under the Non-Commercial Open Source License (NC-OSL).
- ✅ Allowed: Personal use, modification, distribution (with attribution)
- ❌ Prohibited: Commercial use without explicit permission
- Attribution Required: Derivative works must credit the original author and link to this repository.
See full terms in LICENSE.md.
Disclaimer: This software is provided "as-is" for non-commercial use only.
For commercial licensing inquiries, contact the author.
Made with ❤️ By g0w6y