How stamusnetworks/selks works
Project Type and Purpose
• SELKS is an open-source, Debian-based Network Security Monitoring (NSM) platform that integrates multiple specialized tools (Suricata, Elasticsearch, Logstash, Kibana, Scirius, EveBox, Arkime, CyberChef) into a cohesive, containerized/microservices-style monitoring solution.
File Structure Analysis
• Top-level:
• docker/ – Dockerfiles, Compose definitions, container config and bootstrap scripts
• kubernetes/ – Namespaces, Deployments, Services, ConfigMaps, StatefulSets for each component
• scripts/ – Upgrade and helper scripts for ISO/staging installations
• staging/ – Debian Live chroot hooks, packaging and default configs for ISO
• build-debian-live.sh, install-deps.sh – ISO build and host dependency scripts
• Each major component (Suricata, Elasticsearch, Logstash, Kibana, Scirius, EveBox, Arkime) has its own Dockerfile or Deployment YAML and supporting config under docker/containers-data or kubernetes/.
README Insights
• Confirms core pipeline:
1. Suricata captures and inspects network packets →
2. Emits JSON logs →
3. Ingested via Logstash (or Fluentd/Filebeat) →
4. Indexed in Elasticsearch →
5. Visualized in Kibana and EveBox →
6. Threat-hunt UI in Scirius; PCAP storage and search in Arkime; ad-hoc data analysis in CyberChef.
• Provides a list of default dashboards and indexes.
• Network Tap/Sensor (Suricata IDS)
• Log Collector (Logstash / Fluentd-Fluent Bit / Filebeat)
• Search & Storage (Elasticsearch cluster)
• Visualization & Dashboards (Kibana, EveBox)
• Threat Hunting UI (Scirius)
• Packet Capture Storage & Search (Arkime)
• Ad-hoc Analysis Tool (CyberChef)
• Reverse Proxy / Web Server (Nginx)
• Orchestration Layer (Docker Compose or Kubernetes)
• Supporting Services: Cron Jobs (rule updates, log rotation), System Services (Debian Live init scripts)
• External Integrations (optional alerts, exports to SIEM/SOAR)
1. Suricata → JSON logs → Logstash/Fluent Bit
2. Logstash → Elasticsearch
3. Elasticsearch ←→ Kibana (UI queries)
4. Elasticsearch ←→ Scirius (queries, index management)
5. Suricata PCAPs → Arkime (ingest) → Elasticsearch (metadata)
6. Elasticsearch ←→ EveBox (event viewer)
7. User Browsers → Nginx (TLS termination, routing) → Kibana / Scirius / EveBox / Arkime UI
8. CyberChef invoked by user with selected event/payload
9. Cron jobs → update Suricata rules, rotate logs, refresh templates
c. Architectural Patterns & Principles:
• Microservices/Containerization: each component isolated in its own container/deployment
• Event-driven pipeline: log generation → ingestion → indexing → visualization
• Stateless UIs + Stateful storage (Elasticsearch, Arkime PVs)
• Infrastructure-as-Code: Docker Compose & Kubernetes manifests for repeatable deployments
• Separation of concerns: sensor layer, processing layer, storage layer, presentation layer
d. Key Technologies & Configs:
• Suricata (IDS/NSM); custom YAML rules under docker/containers-data/suricata
• Logstash config (docker/containers-data/logstash/conf.d/logstash.conf)
• Elasticsearch (StatefulSet, PV/PVC)
• Kibana (Deployment + Dashboards job)
• Scirius (Deployment, Web UI, uses own PV/PVC for rule DB)
• EveBox (Deployment + Service)
• Arkime (Dockerfile + startup script; uses large PV for PCAP storage)
• Nginx & OWASP-modsecurity for HTTPS and WAF functionality
• Fluentd/Fluent Bit and Filebeat for alternative log ingestion paths
• Debian Live ISO staging (hooks, default configs, polkit rules)