Skip to content

SIEM Dashboard

CarterPerez-dev edited this page Feb 11, 2026 · 1 revision

SIEM Dashboard

Full-stack Security Information and Event Management platform with real-time log correlation, alerting, and attack playbooks.

Overview

A SIEM platform that ingests log events from multiple sources, normalizes them into a common schema, classifies severity using pattern matching, and runs a real-time correlation engine to generate alerts. Includes a React dashboard for monitoring, investigation, and attack scenario playback using MITRE ATT&CK techniques.

Status: Complete | Difficulty: Intermediate

Tech Stack

Backend

Technology Version Purpose
Flask - Web framework (app factory pattern)
MongoDB - Log and alert persistence
Redis Streams - Real-time event delivery
MongoEngine - MongoDB ODM
Pydantic - Request/response validation
JWT + Argon2id - Authentication

Frontend

Technology Version Purpose
React - UI framework
TypeScript - Type safety
Zustand - Client state management
TanStack Query v5 Server state management
visx - Chart visualization
SSE - Real-time streaming

Infrastructure

  • Docker Compose (dev + prod configs)
  • Nginx reverse proxy (SSE-aware)
  • Gunicorn WSGI server

Features

Log Processing

  • Multi-source ingestion (firewall, IDS, auth, endpoint, DNS, proxy)
  • Common schema normalization
  • Regex-based severity classification
  • Event pivot API for investigation workflows

Correlation Engine

  • Sliding window rule evaluation
  • Threshold counting (e.g., 20 failed logins in 5 minutes)
  • Ordered sequence detection (brute force β†’ successful login)
  • Distinct-value aggregation
  • Rule testing against historical data

Alert Management

  • Full lifecycle: detection β†’ acknowledgment β†’ investigation β†’ resolution
  • False positive classification
  • Severity-based prioritization

Attack Playbooks

  • YAML-based scenario definitions
  • MITRE ATT&CK technique mapping
  • Brute force (T1110.001), DNS tunneling (T1048.003), and more
  • Threaded scenario execution

Real-Time Dashboard

  • Server-Sent Events for live updates
  • Protocol distribution charts
  • Severity breakdown timelines
  • Top source analysis
  • MongoDB aggregation pipelines

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Frontend (React + TS)                   β”‚
β”‚  Zustand stores | TanStack Query | SSE streaming         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Nginx (SSE-aware proxy)                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Backend (Flask)                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                     Engine                        β”‚   β”‚
β”‚  β”‚  normalizer.py | severity.py | correlation.py    β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                   Scenarios                       β”‚   β”‚
β”‚  β”‚  playbook.py (YAML parser) | runner.py (thread)  β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚           Routes / Controllers / Schemas          β”‚   β”‚
β”‚  β”‚  ~30 endpoints under /v1/                         β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                  β”‚
         β–Ό                  β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   MongoDB   β”‚    β”‚    Redis    β”‚
β”‚  Logs/Alertsβ”‚    β”‚   Streams   β”‚
β”‚  Rules/Usersβ”‚    β”‚  + Consumer β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚    Groups   β”‚
                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Quick Start

cd PROJECTS/intermediate/siem-dashboard

# Start development environment
docker compose -f dev.compose.yml up --build

# Access at http://localhost:8431
# API at http://localhost:8431/api/v1/

# Create admin account
docker exec -it siem-backend-dev flask admin create \
  --username admin --email admin@example.com

# Ingest a test event
curl -X POST http://localhost:8431/api/v1/logs/ingest \
  -H "Content-Type: application/json" \
  -d '{"source_type":"auth","event_type":"login_failure","source_ip":"10.0.0.1","username":"root"}'

Project Structure

siem-dashboard/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ __init__.py           # Flask app factory
β”‚   β”‚   β”œβ”€β”€ config.py             # Pydantic settings (60+ values)
β”‚   β”‚   β”œβ”€β”€ core/                 # Auth, streaming, errors, decorators
β”‚   β”‚   β”œβ”€β”€ engine/               # Normalizer, severity, correlation
β”‚   β”‚   β”œβ”€β”€ models/               # MongoEngine documents
β”‚   β”‚   β”œβ”€β”€ routes/               # Flask blueprints
β”‚   β”‚   β”œβ”€β”€ controllers/          # Business logic
β”‚   β”‚   β”œβ”€β”€ schemas/              # Pydantic validation
β”‚   β”‚   └── scenarios/            # Attack playbooks (YAML)
β”‚   └── pyproject.toml
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/                  # TanStack Query hooks + Zod types
β”‚   β”‚   β”œβ”€β”€ core/                 # Shell, routing, stores, charts
β”‚   β”‚   └── routes/               # Page components (lazy loaded)
β”‚   └── package.json
β”œβ”€β”€ conf/                         # Docker + Nginx configs
β”œβ”€β”€ compose.yml                   # Production
└── dev.compose.yml               # Development

Development

# Backend
make backend-lint
make backend-test

# Frontend
make frontend-lint
make frontend-build

# Both
make lint
make test

Source Code

View on GitHub

Clone this wiki locally