Wi-Patrol - WiFi Intrusion Detection System
ESP32 + Python system for rogue Wi-Fi device detection, enhancing network security
Technologies Used
Wi-Patrol - WiFi Intrusion Detection System
Overview
Wi-Patrol is a comprehensive WiFi Intrusion Detection System that combines ESP32 hardware with Python software to detect and alert users about rogue WiFi devices on their network. This project enhances network security by providing real-time monitoring and flexible configuration options.
Problem Statement
With the increasing number of IoT devices and wireless networks, unauthorized access points and rogue devices pose significant security threats. Traditional network monitoring tools are often complex and expensive, making them inaccessible for small businesses and home users.
Solution
Wi-Patrol provides an affordable, user-friendly solution for WiFi network monitoring:
- Real-time Detection: Continuously scans for unauthorized devices
- User-Friendly GUI: Intuitive Tkinter interface for easy management
- Database Logging: MySQL backend for historical data and analysis
- Flexible Configuration: Customizable alert thresholds and whitelisting
- ESP32 Integration: Low-cost hardware for efficient scanning
Key Features
1. Rogue Device Detection
- Scans WiFi networks for unauthorized access points
- Identifies suspicious devices based on MAC addresses
- Real-time alerts for new device connections
2. Tkinter GUI
- Clean, intuitive interface for monitoring
- Dashboard showing connected devices
- Configuration panel for settings
- Alert history and logs viewer
3. MySQL Database Integration
- Stores device information and connection history
- Tracks alert events with timestamps
- Enables historical analysis and reporting
- Whitelist management for known devices
4. ESP32 Hardware
- Low-power WiFi scanning
- Efficient packet capture
- Serial communication with Python backend
- Portable and cost-effective
Technical Implementation
Architecture
ESP32 (WiFi Scanner) → Serial → Python Backend → MySQL Database
↓
Tkinter GUI (User Interface)
Technologies Used
- Hardware: ESP32 microcontroller
- Programming: Python 3.x
- GUI Framework: Tkinter
- Database: MySQL
- Libraries: PySerial, mysql-connector-python
- Network: WiFi 802.11 protocols
Key Components
-
ESP32 Scanner Module
- Scans WiFi channels
- Captures MAC addresses and SSIDs
- Sends data via serial communication
-
Python Backend
- Processes ESP32 data
- Implements detection algorithms
- Manages database operations
- Triggers alerts
-
Tkinter GUI
- Real-time device display
- Configuration management
- Alert notifications
- Log viewing
-
MySQL Database
- Device table (MAC, SSID, first_seen, last_seen)
- Alerts table (timestamp, device_id, alert_type)
- Whitelist table (MAC, description)
My Contribution
As the team leader of a 4-member team, I was responsible for:
- System Architecture: Designed the overall system architecture and component integration
- ESP32 Programming: Developed the WiFi scanning firmware
- Python Backend: Implemented the core detection logic and database integration
- GUI Design: Created the Tkinter interface with real-time updates
- Team Coordination: Managed task distribution and project timeline
- Testing: Conducted security testing and performance optimization
Challenges & Solutions
Challenge 1: Real-time Data Processing
Problem: Processing large amounts of WiFi scan data in real-time without GUI lag
Solution: Implemented multi-threading to separate scanning, processing, and GUI updates
Challenge 2: False Positives
Problem: Legitimate devices triggering alerts
Solution: Developed a smart whitelist system with learning capabilities
Challenge 3: ESP32-Python Communication
Problem: Reliable serial communication between ESP32 and Python
Solution: Implemented robust error handling and data validation protocols
Results & Impact
- ✅ Successfully detects rogue devices within 30 seconds
- ✅ 95%+ accuracy in device identification
- ✅ User-friendly interface requiring minimal technical knowledge
- ✅ Cost-effective solution (< $10 hardware cost)
- ✅ Scalable architecture for multiple ESP32 nodes
Future Enhancements
- Mobile app for remote monitoring
- Machine learning for anomaly detection
- Integration with existing security systems
- Cloud-based dashboard for multi-location monitoring
- Automated response actions (device blocking)
Project Timeline
Duration: July 2025 - October 2025 (4 months)
- Month 1: Research and architecture design
- Month 2: ESP32 firmware and Python backend development
- Month 3: GUI development and database integration
- Month 4: Testing, optimization, and documentation
Team
- Devanshu Bansode (Team Leader) - System Architecture, Backend Development
- Team Member 2 - ESP32 Firmware Development
- Team Member 3 - GUI Design and Implementation
- Team Member 4 - Database Design and Testing
Conclusion
Wi-Patrol demonstrates the practical application of IoT and cybersecurity principles to solve real-world network security challenges. The project successfully combines hardware and software components to create an accessible, effective intrusion detection system.
Project Status: Completed ✅
GitHub: View Repository