A security operations (SOC) practice lab
Collect and search real logs on your own machines, use a free SIEM or just command-line tools, and practise triage, detection and hunting on data you generate yourself.
What you need
Security analysis needs data. You can generate your own safely: the authentication log of a Linux VM, the web server log of a test site, command history and process events. Then you search it, exactly as the lessons did in the browser.
You can start with no extra software at all: grep, awk, sort, uniq -c and jq can count failed logins, group by address and find rare values, and they teach the same thinking as a query language. When you want a proper search interface, free options include the Elastic stack (elastic.co, self-managed with its free features), Wazuh (wazuh.com, open source detection and response) and Security Onion (a free security-monitoring distribution). They are heavy, so give the VM 4 to 8 GB of memory.
Set it up
- Build a small lab: a target VM (Ubuntu with SSH and a web server such as nginx) and a log VM (or the same VM at first). Keep them on an internal or host-only network.
- Make the target produce data. Failed logins appear in
/var/log/auth.log; web requests in/var/log/nginx/access.log. - Practise the lesson queries by hand. For example, failed logins by address:
grep "Failed password" /var/log/auth.log | awk '{print $(NF-3)}' | sort | uniq -c | sort -rn | head
- To use a platform, follow its official quick-start for a single-node install in a VM, install its agent on the target, and confirm events arrive.
- For detection rules, learn Sigma (a generic rule format used by many tools) and write one rule for a behaviour from the course, such as repeated failed logins followed by a success.
Check that it works
- You can answer “which address failed most often?” from the log with a one-line command.
- Fresh events appear in your platform within a minute of you causing them (for example, three wrong SSH passwords from the log VM).
- A rule you write fires on your staged attack and stays quiet on normal logins.
Practise safely
- Stage attacks only against your own lab VMs. Failed logins and scans against your own target are fine; never aim anything at a system you do not own.
- Mark your staged events (a note in your lab diary with times) so you can tell tests from real activity.
- Keep real personal data out of the lab. Use made-up users and fake passwords, and do not collect logs from real people.
- Protect the log platform like any server: change default passwords and keep it off the internet.
Go further
- Add a second source (for example web logs) and rebuild a timeline across the two sources, as in the incident case.
- Hunt your own data: find the rarest user agent, the rarest process parent or the most regular connection interval.
- Write three detections and test each against your staged attacks and some normal behaviour; measure what each catches and falsely flags (the capstone asks for exactly this).
- Practise on public, safe datasets and challenges from blue-team training sites; read their terms and current free offers first.
Courses that use this lab
Other lab guides
- A virtual machine lab on your own computer
- A Linux practice machine
- A network lab with free simulators and virtual routers
- A packet-capture lab with Wireshark and tcpdump
- A network-services lab: DHCP, DNS, proxy, load balancer, time and failover
- A Windows Server and Active Directory lab
- A developer workstation: editor, Git, Python and Node
- A container and Kubernetes lab
- A monitoring lab with Prometheus and Grafana
- An isolated security lab for authorised practice
- A cloud lab that cannot surprise you with a bill
- An embedded and microcontroller lab: simulators first, hardware second
- An electronics lab: simulate first, then build on a breadboard
- A Raspberry Pi lab, with or without a Pi
- A home automation lab with Home Assistant and MQTT
- An audio, video, streaming and show-control lab
- A data lab: Python, pandas and Jupyter on your own computer
- A machine learning lab: scikit-learn, notebooks and honest experiments
- An LLM lab: a free local model, embeddings and a test harness
- A TypeScript lab: Node.js, the compiler and a test runner
- A web deployment lab: Git, a free host and environment settings
Software changes quickly. Menu names and version numbers may differ a little from what you see; the ideas and the check at the end of each section stay the same. Always download from the project's own website, and read the licence terms for your situation.