SIEM with Splunk

Search, filter and visualise security logs using Splunk and its Search Processing Language (SPL).

Intermediate · about 14 hours · difficulty 3/5

Learn first: Log Sources and Telemetry

A SIEM (Security Information and Event Management) collects logs from many sources, normalises them and lets analysts search, correlate and alert. Splunk is one of the most widely used SIEMs, and Splunk's free training plus the Boss of the SOC datasets make it a great learning choice.

Core concepts

  • Indexes store data; sourcetypes describe its format.
  • Fields are extracted at search time, so the same data can be sliced many ways.
  • Searches are pipelines: filter first, then transform.

SPL you should know

  • Filtering: index=wineventlog EventCode=4625
  • Aggregating: | stats count by src_ip, user
  • Ordering and limits: | sort -count | head 10
  • Time buckets: | timechart span=1h count
  • Presenting: | table _time host user CommandLine
  • Enrichment: | lookup against a CSV of known-bad IPs.

From search to detection

Save a useful search as a scheduled alert with a threshold, add context fields, and document what an analyst should do when it fires. Dashboards help managers, but saved searches with clear runbooks help analysts more.

Pitfalls

  • Searching all time across all indexes: slow and expensive. Always set a time range and index.
  • Trusting field names blindly; check the raw event to confirm extraction.

Good enough to move on: you can answer questions like "which user had the most failed logins yesterday and from where" with a single SPL search, and turn it into an alert.

Key concepts

  • Indexes, sourcetypes and fields
  • SPL search and filtering
  • stats, timechart and table
  • Lookups for enrichment
  • Saved searches and alerts
  • Dashboards
  • Boss of the SOC datasets

Other options for this step

  • SIEM with the Elastic Stack: Use Elasticsearch, Kibana and Elastic Security to ingest logs, hunt with KQL/ES|QL and run detection rules.

Mini project

Load a sample dataset (such as Boss of the SOC) into Splunk Free, answer five investigative questions with SPL, and save one of your searches as a scheduled alert with a written runbook.

Check yourself

Why should you filter by index and time range at the start of every Splunk search?

Free resources