How sathwikkbhat/acds---soc-analyst-dashboard works
1. Overall shape
- ACDS is a two-tier SOC dashboard: a FastAPI/Python backend handles log ingestion, normalization, detection, and playbook generation, while a React/Vite frontend renders real-time security views and consumes both REST and WebSocket data.
2. Backend control plane
- acds/backend/main.py is the hub. It exposes the REST endpoints, the /ws/alerts stream, and startup/shutdown behavior for the monitoring and simulation subsystems.
- The backend is the source of truth for alerts, threat stats, MITRE mappings, and archive data.
3. Ingestion paths
- The system supports multiple inputs:
- Live monitoring via log_monitor.py
- Uploaded logs via /upload
- Synthetic/fake logs via log_generator.py and generate_fake_logs.py
- Attack replay / stress testing via simulation_engine.py and /warp
- Filebeat-based collection via filebeat.yml, local_filebeat.yml, and the filebeat_data/ registry state
- INPUT_MODE in config.py decides whether the backend runs in simulation mode or file-driven mode.
4. Normalization boundary
- normalizer.py is the preprocessing layer that turns heterogeneous log formats into a consistent internal event schema.
- This is the key boundary between raw inputs and downstream analytics; detection and UI code depend on the normalized event shape rather than source-specific formats.
5. Detection engine
- detection_engine.py contains the security logic for brute force, C2 beaconing, exfiltration, correlation across multiple threats, and false-positive suppression via whitelisting.
- Thresholds and timing windows are configuration-driven from config.py, which makes detection tunable without changing the frontend.
6. AI playbook generation
- playbook_generator.py is an external-service adapter around Google Gemini.
- It is triggered only for selected critical alerts and returns incident-response guidance: summary, likely next attacker moves, containment steps, and IOCs to block.
- This is a separate enrichment path, not part of the core detection pipeline.
7. Stateful monitoring and replay
- log_monitor.py manages live event observation, while simulation_engine.py and log_generator.py generate controlled alert streams for testing, demos, and load scenarios.
- simulate_attack.ps1 and the Filebeat setup scripts support operational bootstrap on Windows.
- speed_test_manifest.json and sample_logs.json suggest a repeatable test corpus for replay and benchmarking.
8. Backend outputs and API surface
- The backend serves several read-model endpoints: /stats, /alerts, /threats, /threats/stats, /intelligence/mitre, /intelligence/iocs, and /reset.
- These endpoints are optimized for dashboard views rather than raw event storage; they expose derived/security-meaningful aggregates.
- /monitor/start and /monitor/stop control ingestion, making the backend an actively managed runtime.
9. Frontend presentation layer
- frontend/src/App.jsx routes between the dashboard pages: Blueprints, Threats, Intelligence, Archives, and Settings.
- components/Sidebar.jsx and components/Topbar.jsx provide persistent navigation and system-status chrome.
- The frontend is a visualization and operator console; it does not implement detection logic itself.
10. Frontend data flow
- src/api.js handles REST calls to the backend.
- context/SocketContext.jsx is the real-time state bridge for WebSocket alerts and feed status, which drives live updates in the UI.
- syntheticEngine.js provides a browser-side fallback/simulation layer for offline or mock behavior when the backend is unavailable.
11. Dashboard page responsibilities
- Blueprints appears to be the main incident view for alert drill-down and AI playbook generation.
- Threats focuses on active detector health and live threat status.
- Intelligence surfaces MITRE ATT&CK coverage and IOC analytics.
- Archives presents paginated historical events.
- Settings manages thresholds, mode selection, and operational configuration.
12. Deployment and runtime boundaries
- Backend runtime is Python 3.12 with FastAPI/Uvicorn.
- Frontend runtime is Node/Vite/React and is deployable separately, including on Vercel, while the backend needs a server that can expose port 8000.
- stitch_screens/ is design/reference material, not part of runtime.
13. Key architecture diagram takeaway
- The important system boundary is: raw log sources → normalization → detection/enrichment → alert/state APIs + WebSocket → React operator console.
- Filebeat, upload, and synthetic replay are alternate ingress paths into the same backend event pipeline.
Main entry points: main.py API hub · App.jsx App shell · normalizer.py Normalizer · detection_engine.py Detection engine
Components 23
Backend
FastAPI control plane, event pipeline, and enrichment services.
- API hub · REST endpoints, WebSocket stream, startup and shutdown orchestration.
acds/backend/main.py - Config · Mode selection and detector thresholds.
acds/backend/config.py - Log monitor · Watches live events and feeds the backend pipeline.
acds/backend/log_monitor.py - Normalizer · Converts raw logs into the internal normalized event shape.
acds/backend/normalizer.py - Detection engine · Brute force, beaconing, exfiltration, correlation, and whitelisting.
acds/backend/detection_engine.py - Playbooks · Generates incident-response guidance for selected critical alerts.
acds/backend/playbook_generator.py - Simulation · Generates attack streams for stress tests and demos.
acds/backend/simulation_engine.py - Log gen · Creates synthetic or fake log events.
acds/backend/log_generator.py - Fake logs · Scripted fake-log generation entrypoint.
acds/backend/generate_fake_logs.py - Warp manifest · Builds manifests for attack replay scenarios.
acds/backend/generate_warp_manifest.py
Frontend
React operator console and real-time dashboard.
- API client · Frontend calls to backend read-model endpoints.
acds/frontend/src/api.js - Socket state · Live alert and feed-status state for the UI.
acds/frontend/src/context/SocketContext.jsx - App shell · Routes between the dashboard pages.
acds/frontend/src/App.jsx - Sidebar · Persistent page navigation.
acds/frontend/src/components/Sidebar.jsx - Topbar · Global status and controls.
acds/frontend/src/components/Topbar.jsx - Blueprints · Alert drill-down and playbook-assisted response.
acds/frontend/src/pages/Blueprints.jsx - Threats · Active detector health and live threat status.
acds/frontend/src/pages/Threats.jsx - Intelligence · ATT&CK coverage and indicator analytics.
acds/frontend/src/pages/Intelligence.jsx - Archives · Paginated historical events.
acds/frontend/src/pages/Archives.jsx - Settings · Thresholds, mode selection, and runtime configuration.
acds/frontend/src/pages/Settings.jsx
Ops & Replay
Filebeat setup, sample corpora, and replay/test artifacts.
- Filebeat · External log collection configuration and registry state.
acds/filebeat.yml - Local Filebeat · Local Filebeat configuration for bootstrap and development.
acds/backend/local_filebeat.yml - Sample corpus · Sample logs and speed-test manifest for replay and benchmarking.
acds/backend/sample_logs.json
Connections 26
- API hub → Config: reads mode/thresholds
- API hub → Log monitor: starts/stops
- API hub → Simulation: controls replay
- API hub → Normalizer: routes events
- Log monitor → Normalizer: raw logs
- Simulation → Normalizer: simulated events
- Log gen → Normalizer: synthetic logs
- Fake logs → Log gen: creates inputs
- Normalizer → Detection engine: normalized events
- Detection engine → Playbooks: critical alerts
- API hub → Detection engine: serves alert state
- API hub → Playbooks: enrichment API
- API hub → API client: REST endpoints
- API hub → Socket state: alerts stream
- API client → App shell: data for views
- Socket state → App shell: live updates
- App shell → Sidebar: navigation
- App shell → Topbar: status chrome
- App shell → Blueprints: incident page
- App shell → Threats: threat page
- App shell → Intelligence: intelligence page
- App shell → Archives: history page
- App shell → Settings: settings page
- Filebeat → API hub: collector input
- Local Filebeat → API hub: collector input
- Sample corpus → Simulation: replay corpus