This project demonstrates a basic Security Operations Center (SOC) lab using Splunk SIEM.
It simulates Linux log collection from a Log Source VM using the Splunk Universal Forwarder, forwarding authentication logs to a Splunk Server VM hosted on Google Cloud Platform (GCP).
This project is designed for SOC learning, industry best practices, and threat simulation.
Log Source VM (Debian 12 Bookworm)
ββ Splunk Universal Forwarder (splunkfwd user)
ββ Monitors: /var/log/auth.log
ββ Forwards logs β Splunk Server VM (9997)
Splunk Server VM (Debian 12 Bookworm)
ββ Splunk Enterprise Free
ββ Receives logs (port 9997)
ββ Web UI (port 8000)
ββ Dashboards / Searches / Alerts
** π§©Components:**
-
Splunk Enterprise Server VM
- Receives logs from forwarders
- Hosts Splunk Web UI on port
8000 - TCP input port
9997for Universal Forwarders
-
Log Source VM (Linux)
- Installs Universal Forwarder
- Monitors
/var/log/auth.log - Sends logs securely to Splunk Server
-
Firewall Layers
- GCP Firewall: Controls ingress/egress traffic between VMs
- UFW OS Firewall: Secures the VM at the operating system level
- Google Cloud account (Free Trial with $300 credit for 90 days)
- Two Ubuntu VMs:
- Splunk Server VM: 2 vCPU, 8 GB RAM (for lab)
- Log Source VM: 1 vCPU, 2 GB RAM
- Internet access to download Splunk packages
Link to VMs Setup guide: GCP VMs Setup Guide
Note: Create the required VMs first before proceeding to the next step
ssh -i PATH_TO_SSH-KEY.pub user@SPLUNK-SERVER_IPsudo apt update && sudo apt upgrade -y
sudo apt install wget curl ufw -y# Sign up and download Splunk Enterprise Free trial package : https://www.splunk.com/en_us/download.html
wget -O splunk-10.x.x.deb 'DOWNLOAD LINK'
# Install
sudo dpkg -i splunk-10.x.x.debsudo useradd -m splunk
sudo passwd splunksudo chown -R splunk:splunk /opt/splunksudo su - splunk
/opt/splunk/bin/splunk start --accept-license- When prompted, enter/create the Splunk administrator username and password, and store them securely.
- Note: Splunk Enterprise runs as
splunkuser. Do NOT run as root in production.
Find VM external IP:
http://YOUR_VM_IP:8000Login:
- Username : admin
- Password : set during install
Exit splunk user first:
exit
sudo /opt/splunk/bin/splunk enable boot-start -user splunk# SSH
sudo ufw allow from YOUR_IP to any port 22 proto tcp
# Splunk Web
sudo ufw allow from YOUR_IP to any port 8000 proto tcp
# Splunk Forwarders
sudo ufw allow from FORWARDER_IP to any port 9997 proto tcpDon't forget the Default Deny rules.
sudo ufw default deny incoming
sudo ufw default allow outgoingEnable firewall:
sudo ufw enable
sudo ufw status verbosessh -i PATH_TO_SSH-KEY.pub user@LOG_SOURCE_IP
sudo apt update && sudo apt upgrade -ywget -O splunkforwarder-10.2.0-d749cb17ea65-linux-amd64.deb "DOWNLOAD LINK"**Never run forwarder as root
sudo useradd -m splunkfwd
sudo passwd splunkfwdsudo dpkg -i splunkforwarder.deb
sudo chown -R splunkfwd:splunkfwd /opt/splunkforwarder# Switch to Splunk Forwarder User.
sudo su - splunkfwd
/opt/splunkforwarder/bin/splunk start --accept-license- Create another Administrator username and password and keep it securely.
-Exit as splunkfwd user:
exit
sudo -u splunkfwd /opt/splunkforwarder/bin/splunk stop
sudo /opt/splunkforwarder/bin/splunk enable boot-start -user splunkfwdSwitchback to user splunkfwd:
sudo su - splunkfwd/opt/splunkforwarder/bin/splunk add forward-server SPLUNK_SERVER_IP:9997/opt/splunkforwarder/bin/splunk add monitor /var/log/auth.log -index linux_auth -sourcetype linux_secure/opt/splunkforwarder/bin/splunk restart/opt/splunkforwarder/bin/splunk list forward-serverExpected output:
Active forwards:
SPLUNK_SERVER_IP:9997Allow your local machine to SSH the Log Source VM
# SSH
sudo ufw allow from YOUR_IP to any port 22 proto tcp
# Default deny
sudo ufw default deny incoming
sudo ufw default allow outgoing
# Enable the firewall
sudo ufw enable
sudo ufw status verboseRun on Splunk Server VM
sudo -u splunk /opt/splunk/bin/splunk enable listen 9997On Log Source VM:
for i in {1..5}; do ssh wronguser@localhost; doneCheck in Splunk
index=linux_auth "Invalid user"
This lab can be extended to simulate a full enterprise SOC environment. Future improvements include:
- Windows Endpoint Logging: Deploy Windows VMs with Splunk Universal Forwarder and ingest Security, PowerShell, and Sysmon logs to detect brute-force attacks, privilege escalation, and lateral movement.
- Additional Linux Telemetry: Ingest syslog, auditd, and system logs to improve visibility into command execution and persistence techniques.
- Network and Cloud Logs: Integrate GCP VPC Flow Logs, firewall logs, and web server logs to detect network anomalies and web-based attacks.
- Detection & Alerting: Build correlation searches, alerts, and SOC dashboards for authentication anomalies and admin activity monitoring.
- Automation & SOAR: Automate response actions (e.g., blocking IPs, sending alerts) using scripts or orchestration tools.
- Threat Intelligence & MITRE Mapping: Enrich logs with threat intel feeds and map detections to MITRE ATT&CK techniques.
These enhancements will evolve the lab into a comprehensive detection engineering and SOC simulation platform.
This project demonstrates a complete end-to-end deployment of a Splunk-based SIEM lab on Google Cloud Platform, covering infrastructure provisioning, security hardening, log ingestion, and validation. By building both a Splunk Enterprise server and a Linux log source with Universal Forwarder, this lab replicates a real-world SOC ingestion pipeline where telemetry is collected, transported, and indexed for security monitoring.
Key outcomes of this project include:
- Designing a secure cloud-based SIEM architecture with network segmentation and firewall controls
- Implementing OS-level and cloud-level firewall rules to restrict management and data ingestion traffic
- Deploying Splunk Enterprise and Universal Forwarder using dedicated service accounts to follow least-privilege best practices
- Configuring log monitoring for Linux authentication logs and validating ingestion through Splunk searches
Overall, this project showcases practical SIEM engineering skills, cloud security fundamentals, and SOC operational workflowsβskills directly applicable to security analyst, detection engineer, and cloud security roles.




