Cybersecurity

Setting Up a SIEM on a Budget with Elastic Stack and Wazuh

Commercial SIEM solutions from Splunk, IBM QRadar, or Microsoft Sentinel carry price tags that put them out of reach for many organizations. But the open-source ecosystem has matured dramatically. Elastic Stack combined with Wazuh gives you enterprise-grade threat detection, log correlation, and alerting at a fraction of the cost — if you’re willing to put in the setup work.

Why Roll Your Own SIEM?

Splunk’s licensing model charges per daily ingest volume — at enterprise scale, costs climb quickly into six figures annually. Microsoft Sentinel charges per GB ingested into Log Analytics. For a 500-seat organization generating 50GB of logs per day, these costs add up fast. The open-source alternative — Elastic Stack plus Wazuh — can run on commodity hardware or modest cloud VMs for a fraction of the licensing cost, with the trade-off being that you manage the infrastructure yourself.

Beyond cost, running your own SIEM gives you full control over data residency, retention policies, and detection logic. You’re not constrained by vendor rule update schedules or limited API access. The Elastic SIEM interface (now called Elastic Security) has grown significantly and provides timeline investigation, anomaly detection via machine learning, and prebuilt detection rules that track the MITRE ATT&CK framework.

Standing Up the Elastic Stack

The core stack is Elasticsearch (the search and analytics engine), Logstash or Elastic Agent (data ingestion), and Kibana (the visualization and UI layer). For a lab or small production deployment, a single VM with 8+ cores, 32GB RAM, and fast SSD storage works well. For production with high ingest rates, plan for a multi-node cluster. Elastic provides official APT and YUM repositories making installation straightforward on Debian/Ubuntu or RHEL/CentOS systems.

Security hardening from day one is critical. Enable TLS on all inter-node and client-facing communications, configure Elasticsearch security features (formerly X-Pack), set up role-based access control, and put Kibana behind a reverse proxy like nginx with authentication. An unsecured Elasticsearch instance exposed to the internet is a data breach waiting to happen — this has happened to real organizations and made headlines.

# Install Elastic Stack on Ubuntu 22.04
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | \
    sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg

echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] \
https://artifacts.elastic.co/packages/8.x/apt stable main" | \
    sudo tee /etc/apt/sources.list.d/elastic-8.x.list

sudo apt-get update

# Install Elasticsearch
sudo apt-get install -y elasticsearch

# Capture the auto-generated password from first start
sudo /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic

# Install Kibana
sudo apt-get install -y kibana

# Generate enrollment token for Kibana
sudo /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana

# Enable and start services
sudo systemctl enable --now elasticsearch kibana

Connecting Wazuh as Your Security Engine

Wazuh is an open-source security platform that functions as a HIDS (Host Intrusion Detection System), vulnerability detector, log analysis engine, and compliance framework. It deploys as a central manager with lightweight agents on each endpoint. The agents collect logs, monitor file integrity, detect rootkits, and enforce security policies. Wazuh then forwards enriched security events into Elasticsearch, where Kibana dashboards surface actionable alerts.

Wazuh ships with thousands of out-of-the-box detection rules mapped to MITRE ATT&CK techniques. These cover everything from brute-force detection and privilege escalation attempts to web application attacks and malware execution patterns. The ruleset is actively maintained and updated regularly. You can also write custom rules in a simple XML format — useful for application-specific log sources or internal tooling that Wazuh doesn’t know about natively.

Correlation Rules and Alert Tuning

Raw alerts without tuning are noise. The first two weeks after standing up a SIEM are critical for establishing a baseline and suppressing false positives from known-good behavior. Wazuh supports active response (automatic actions triggered by alerts), alert thresholds, and exception lists. Start by identifying your top 10 highest-volume alert types and determining which are actionable versus noise. Create exclusions for known-good patterns before they bury your real alerts.

Sigma rules provide a vendor-neutral format for detection logic that can be converted to Elasticsearch queries, Splunk SPL, or other backend formats. The SigmaHQ repository on GitHub contains thousands of community-contributed detection rules covering Windows, Linux, network, and application log sources. Integrating Sigma into your Elastic SIEM workflow lets you pull in community detections without writing every rule from scratch and keeps your detection library current with emerging threat intelligence.