How naderyb/implementation-of-an-intelligent-defense-router-with-an-integrated-honeypot works
HoneyNet is an AI-assisted router that classifies incoming SSH and web traffic, then steers it to a honeypot; a Flask dashboard also presents and exports honeypot activity. The graph includes the documented dataset-preparation and model-training stages, although some stages were not sampled directly. The router’s packet handling and dashboard parsing are excerpted; links for other documented pipeline steps and the router-to-dashboard report use README evidence.
Main entry points: ai_router.py AI packet router · app.py Flask dashboard · cowrie_parser.py Cowrie log parser · dvwa_parser.py DVWA log parser
Components 20
Traffic routing
- AI packet router
ai_config_for_router/ai_router.py - TF-IDF classifier
ai_config_for_router/ai_router.py - iptables DNAT
Model preparation
- Dataset preparation
ai_config_for_router/prep_dataset.py - Label correction
ai_config_for_router/fix_labels.py - Noise augmentation
ai_config_for_router/add_noise.py - Recon augmentation
ai_config_for_router/add_recon.py - Model training
ai_config_for_router/train_model.py - Prepared dataset
- Model artifacts
ai_config_for_router/model/model.pkl
Activity dashboard
- Flask dashboard
dashboard/app.py - Cowrie log parser
dashboard/cowrie_parser.py - DVWA log parser
dashboard/dvwa_parser.py - Real IP cache
dashboard/cache.py - Dashboard view
dashboard/templates/dashboard.html
Honeypot services
- Cowrie logs
- Apache access log
- Cowrie honeypot
- DVWA honeypot
Other components
- Attacker
Connections 20
- Attacker → AI packet router: sends traffic
README.md - AI packet router → TF-IDF classifier: classifies payload
ai_config_for_router/ai_router.py - TF-IDF classifier → Model artifacts: loads artifacts
ai_config_for_router/ai_router.py - AI packet router → iptables DNAT: installs DNAT
ai_config_for_router/ai_router.py - iptables DNAT → Cowrie honeypot: forwards SSH
README.md - iptables DNAT → DVWA honeypot: forwards web
README.md - Dataset preparation → Prepared dataset: exports dataset
README.md - Prepared dataset → Label correction: relabels rows
README.md - Label correction → Noise augmentation: augments data
README.md - Noise augmentation → Recon augmentation: adds samples
README.md - Recon augmentation → Model training: trains from data
README.md - Model training → Model artifacts: saves artifacts
ai_config_for_router/train_model.py - Cowrie logs → Cowrie log parser: reads events
dashboard/cowrie_parser.py - Apache access log → DVWA log parser: reads requests
dashboard/dvwa_parser.py - Cowrie log parser → Real IP cache: looks up IP
dashboard/cowrie_parser.py - DVWA log parser → Real IP cache: reads latest IP
dashboard/dvwa_parser.py - Flask dashboard → Cowrie log parser: loads Cowrie logs
dashboard/app.py - Flask dashboard → DVWA log parser: loads DVWA logs
dashboard/app.py - Flask dashboard → Dashboard view: renders view
README.md - AI packet router → Flask dashboard: reports attacker IP
README.md