How toolshive/intrudex works
Project type and purpose
• Intrudex is a hybrid, full-stack security monitoring system for Windows.
• It consists of a native C++ client (real-time Sysmon log collector and Sigma rule engine) and a Python/Flask server (centralized REST API, database, and web dashboard).
File structure
• Top-level directories:
• Intrudex-Client (C++ WinAPI client)
– config (JSON, XML Sigma rule exports)
– header/*.h and includes/*.{hpp,cpp} (third-party libs: nlohmann/json, pugixml)
– src/*.cpp (HttpClient, SysmonCollector, sysmon_manager, main)
• Intrudex-Server (Python Flask backend + static assets)
– app/ (Flask application package)
• db.py (SQLAlchemy setup)
• models/auth.py, logs.py
• routes/auth.py, logs.py, main.py, errors.py
• static/ (Tailwind CSS, fonts)
• templates/ (Jinja2 HTML pages)
– run.py, init_db.py, requirements.txt, package.json, sample.env
• Configuration/build files: CMakeLists.txt, version.rc (client); .env, npm build scripts (server).
README for architecture clues
• C++ client uses Sysmon + Sigma rules → real-time detection → Windows notifications and automatic responses.
• Client can run standalone or connect to Flask server over REST using public/private key authentication.
• Server uses Flask-Migrate, SQLAlchemy (SQLite or PostgreSQL), TailwindCSS, and provides admin panel & log dashboard.
Main components and interactions
a. Windows C++ Client
• SysmonManager: installs registry entries & scheduled tasks (self-healing).
• SysmonCollector: reads Windows Event Logs & Sigma rules (YAML) → generates alerts.
• HttpClient: establishes secure REST connection (public/private key) to server.
• Response engine: blocks IPs, kills processes, disables accounts.
b. Python Flask Server
• REST API Endpoints: /auth, /logs, /main, error handlers.
• Database Layer: SQLAlchemy models (users, logs).
• Admin CLI (flask create-admin) & Flask-Migrate migrations.
• Web Dashboard: Jinja2 templates + TailwindCSS static assets.
c. Database
• SQLite (default) or PostgreSQL (configurable via DATABASE_URL).
d. External infrastructure
• Windows Registry & Task Scheduler (client self-healing).
• Optional Docker containerization (indicated by Docker badge).
Data flow:
[Sysmon Event] → SysmonCollector → Sigma rule engine → Alert → HttpClient → Flask REST API (/logs) → DB → Web Dashboard → Admin actions back to client (optional).
Architectural patterns & design principles
• Client-Server (two-tier) with clear separation of concerns.
• Modular C++ design (collector, manager, network).
• MVC-like Flask app (models, routes/controllers, templates/views, static assets).
• Self-healing Windows service pattern (registry+scheduled tasks).
• Secure communication: public/private key auth, HTTPS/REST.