PISA Pakistan — Community CERT

← ⚙️ Cyber Security Fundamentals

14. Deploying a SOC‑Grade SIEM with the ELK Stack, Beats, and Sigma Rules

⏱ 9 min

Overview

A Security Information and Event Management (SIEM) system turns raw logs into actionable intelligence. For Pakistani SOCs, the open‑source ELK Stack (Elasticsearch, Logstash, Kibana) combined with Beats and Sigma detection rules offers a scalable, cost‑effective alternative to commercial platforms.

Architecture of the ELK Stack

  • Beats (Filebeat, Winlogbeat, Metricbeat) are lightweight agents that collect logs from endpoints, network devices, and cloud services.
  • Logstash parses, enriches (e.g., adding geolocation from NADRA IP ranges), and forwards events to Elasticsearch.
  • Elasticsearch stores indexed documents and supports fast full‑text and field‑based searches.
  • Kibana provides visualisations, dashboards, and ad‑hoc investigation views.

Integrating Threat Intelligence with MISP

  1. Export MISP events as STIX/TAXII or CSV.
  2. Ingest the feed into Logstash using the misp filter plugin.
  3. Correlate log entries with known malicious indicators (e.g., SHA‑256 hashes of malware seen targeting Pakistani banks).
  4. Create Kibana dashboards that highlight matches.

Writing and Managing Sigma Rules

Sigma rules translate detection logic into a vendor‑agnostic YAML format that can be converted to Elasticsearch queries, Splunk SPL, or other SIEM query languages.

Example Sigma rule for brute‑force login detection:

title: Brute‑Force Login Attempt
id: 1a2b3c4d‑5e6f‑7890‑abcd‑ef1234567890
status: stable
detection:
  selection:
    EventID: 4625
    LogonType: 2
  condition: count(%System%) by TargetAccount > 5
level: high

Commit Sigma rules to a Git repository and automate conversion with sigmac in your CI/CD pipeline.

Operational Workflow

  1. Collect Windows security logs via Winlogbeat from domain controllers.
  2. Parse with Logstash pipelines that tag fields (source_ip, destination_port, user_name).
  3. Index into Elasticsearch with an appropriate index template (e.g., winlogbeat‑*).
  4. Visualise login failures, privileged account usage, and lateral movement patterns in Kibana.
  5. Tune alerts weekly to reduce false positives.

Do / Don't

  • Do keep Sigma rules version‑controlled and peer‑reviewed.
  • Do map each rule to a MITRE ATT&CK technique for clear coverage reporting.
  • Don’t ignore false positives – they erode analyst confidence and cause alert fatigue.
  • Don’t rely solely on static thresholds; incorporate behavioural baselines.

Takeaway: Deploy a simple Filebeat‑Logstash‑Elasticsearch pipeline on a test Windows domain controller this week and write your first Sigma rule to detect repeated failed logins.

← PrevNext →