How secureworks/dalton works
Project type and purpose
• Dalton is an open‐source, Docker‐orchestrated IDS-testing platform.
• It provides a Flask-based web “controller” (UI + HTTP/REST API) and one or more “agent” processes that run IDS engines (Snort, Suricata, Zeek) on user-supplied pcaps and rulesets.
• A Redis server is used as a job queue and result store; Nginx acts as a reverse proxy; all pieces are wired together via Docker Compose.
File structure
• Top-level: docker-compose.yml, Dockerfiles, .env, start-dalton.sh, run.py → orchestrate containers and launch scripts.
• /app: Flask controller code (dalton.py, flowsynth.py, certsynth.py), static files (JS/CSS, engine‐configs, rulesets), and Jinja2 templates for UI.
• /api: Python client wrapper and examples for programmatic job submission.
• /dalton-agent: Python agent code + Dockerfiles to build sensor containers embedding Snort/Suricata/Zeek.
• /engine-configs, /rulesets: persisted on controller container and shared into Docker for runtime sensor configs and rule files.
• /nginx-conf: Nginx config and TLS certs.
• tests: pytest tests for controller and Flowsynth module.
Key insights from README
• Controller:
• Written in Python/Flask with REST and web UI.
• Uses Redis for job queuing, storing transient job data and results.
• Stores job archives on disk (/opt/dalton/jobs).
• Exposes API endpoints under /dalton/controller_api and /dalton/sensor_api.
• Agents:
• Poll controller frequently over HTTP to fetch pending jobs.
• Run job: download pcap(s), ruleset, config; invoke IDS engine; collect alerts, logs, profiling data; POST results back.
• Flowsynth WebUI: integrated into controller to generate custom pcaps.
• Docker: everything is containerized: Nginx, Redis, controller, one or more agent containers, optional CyberChef.
Detail is key – capture all critical elements
• Docker service (nginx, controller, redis, agent-suricata-<version>, agent-snort-<version>, cyberchef).
• Shared mounts: rulesets → controller & nginx; engine-configs → controller & nginx; jobs directory → controller & nginx.
• Polling interval of agents (e.g. “Agent polls /controller_api for jobs every 1s”).
• “teapot” vs “regular” job TTL differences in Redis (optional annotation).