Modern C++23 Intrusion Prevention System designed specifically for SCADA infrastructure protection
Grid Watcher is a lightweight, high-performance network security solution that provides real-time threat detection and automated response capabilities for industrial control systems. Built with modern C++23, it combines deep packet inspection, protocol analysis, and active defense mechanisms to protect critical infrastructure.
- Modbus TCP Protocol Analysis - Detects unauthorized write commands (
0x05,0x06,0x10) - Industrial Protocol Awareness - Understands SCADA communication patterns
- Zero False Positives - Precision-tuned for industrial environments
- Port Scan Detection - Identifies horizontal and vertical scanning patterns
- SYN Flood Recognition - Detects TCP-based reconnaissance attempts
- Real-time Deep Packet Inspection - Zero-copy packet analysis for minimal overhead
- Automatic IP Blocking - Instant firewall integration (
iptables/netsh) - Multi-threaded Pipeline - Non-blocking packet capture and analysis
- Sub-millisecond Response Time - Critical for time-sensitive SCADA operations
- Web-based Command Center - HTML5/JavaScript interface
- Live Threat Visualization - Real-time attack feed and metrics
- System Health Monitoring - Uptime, throughput, and performance stats
# Clone the repository
git clone https://github.com/zuudevs/grid_watcher.git
cd grid_watcher
# Build the project (automatically generates run.sh/run.bat)
cmake -S . -B build
cmake --build build --config Release
# Launch everything with one command!
# Linux:
./run.sh
# Windows:
run.bat
# Or manually:
sudo ./bin/grid_watcher # IPS Engine
cd www && python -m http.server 8080 # DashboardDashboard Access: http://localhost:8080
Grid Watcher uses a Producer-Consumer Pipeline with three independent threads:
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Packet โ โโโโบ โ Analyzer โ โโโโบ โ Executor โ
โ Sniffer โ โ (DPI) โ โ (Firewall) โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ โ โ
Raw Socket Threat Logic OS Firewall
(AF_PACKET) Detection Commands
For detailed architecture documentation, see docs/ARCHITECTURE.md.
- Operating System: Linux (Production) / Windows (Development Mode)
- Privileges: Root (Linux) / Administrator (Windows)
- Network: Raw socket capability
- C++ Compiler: GCC 13+, Clang 16+, or MSVC 2022+
- Build System: CMake 3.20+
- Standard: C++23 with concepts and ranges support
- Linux:
iptables(for firewall integration) - Windows: Windows Firewall with Advanced Security
- Dashboard: Python 3.x (for local HTTP server)
Detailed build instructions are available in BUILD.md.
Linux:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)Windows (MSVC):
cmake -S . -B build -G "Visual Studio 17 2022"
cmake --build build --config Release| Document | Description |
|---|---|
| QUICKSTART.md | 5-minute tutorial and basic usage |
| ARCHITECTURE.md | System design and technical details |
| API.md | Class and function reference |
| BUILD.md | Comprehensive build instructions |
| CONTRIBUTING.md | How to contribute to the project |
| ROADMAP.md | Future features and development plans |
# Start the IPS engine
sudo ./bin/grid_watcher
# In another terminal, start the dashboard
cd www && python -m http.server 8080# Run the built-in attack simulator
./bin/attack_sim 192.168.1.100// Configure port scan threshold
constexpr int PORT_SCAN_THRESHOLD = 10;
// Configure Modbus protection
std::vector<uint8_t> protected_function_codes = {0x05, 0x06, 0x10};- Raw Socket Access: Requires elevated privileges
- Firewall Modifications: Automatically modifies system firewall rules
- Network Visibility: Captures all network traffic on the interface
- Production Deployment: Test thoroughly in staging environment first
For security policy and vulnerability reporting, see SECURITY.md.
We welcome contributions! Please read our Contributing Guidelines and Code of Conduct before submitting pull requests.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
| Metric | Performance |
|---|---|
| Packet Processing Rate | ~50,000 pps |
| Memory Footprint | <50 MB |
| CPU Usage | <5% (idle), <15% (high load) |
| Detection Latency | <1ms |
| Platform Overhead | Minimal (raw sockets) |
Benchmarked on Intel i7-12700K, 32GB RAM, Linux 6.x kernel
This software is designed for authorized security testing and legitimate network monitoring of SCADA infrastructure. Users are responsible for ensuring compliance with applicable laws and regulations. The authors assume no liability for misuse or damages resulting from the use of this software.
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 Rafi Indra Pramudhito Zuhayr (Zuudevs)
Rafi Indra Pramudhito Zuhayr (Zuudevs)
- GitHub: @zuudevs
- Email: zuudevs@gmail.com
- SCADA security research community
- Industrial Control Systems security standards (IEC 62443)
- Modbus protocol specification contributors
Current Version: 1.0.0
Status: Active Development
Last Updated: December 2025
For planned features and roadmap, see ROADMAP.md.
โก Protect Your Infrastructure with Modern C++ โก
Report Bug โข Request Feature โข Documentation