Labs

Minimal detection lab

Section: Labs · about 4–8 hours · last checked 2026-11-26

One Windows machine that records what happens, one place to search the records, and a way to reset. That is enough for most of these roadmaps. Complete the safety checklist first.

What you are building#

Diagram: Windows VM, Sysmon and event logs; SIEM, host, second VM or cloud; Your searches and rules

Open the diagram full size

Diagram source (Mermaid)
Mermaid
flowchart LR
    V["Windows VM<br/>Sysmon and event logs"] -->|forwarder or agent| S["SIEM<br/>host, second VM or cloud"]
    S --> Q["Your searches and rules"]
Part Rough needs
Host computer 16 GB RAM and 100 GB free disk is comfortable
Windows VM 4–8 GB RAM, 2 CPUs, 60 GB disk
SIEM See Choosing a SIEM

Steps#

1. Hypervisor and Windows#

Install a hypervisor such as VirtualBox. Get a Windows evaluation image from the Microsoft Evaluation Center and note when it expires. Create the VM with a local account and a password used nowhere else. Update it while it is on NAT.

Take a snapshot: 01-clean-install.

2. Turn on logging#

In an administrator PowerShell window inside the VM, enable process creation auditing and script block logging:

PowerShell
auditpol /set /subcategory:"Process Creation" /success:enable
$key = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging'
New-Item -Path $key -Force | Out-Null
Set-ItemProperty -Path $key -Name EnableScriptBlockLogging -Value 1

Illustrative: test it in your lab before relying on it. To record command lines in event 4688, also follow Microsoft's command line process auditing page.

3. Install Sysmon#

Download Sysmon from Microsoft. Pick a published configuration and read it before using it: sysmon-config is a well-commented starting point, and sysmon-modular lets you assemble your own.

PowerShell
.\Sysmon64.exe -accepteula -i .\sysmonconfig.xml
Get-WinEvent -LogName 'Microsoft-Windows-Sysmon/Operational' -MaxEvents 5

A configuration filters events. If something is missing later, check the configuration first.

Windows 11 and Windows Server 2025 also offer Sysmon as a built-in optional feature (as of 2026-11-26; see how to enable it). Use it or the download, not both: they cannot coexist.

PowerShell
Enable-WindowsOptionalFeature -Online -FeatureName Sysmon
sysmon -i .\sysmonconfig.xml

4. Send the logs to your SIEM#

Install your SIEM's forwarder or agent in the VM and collect at least:

  • Microsoft-Windows-Sysmon/Operational
  • Security
  • System
  • Microsoft-Windows-PowerShell/Operational

If the SIEM runs on your host or another VM, add a host-only adapter for that traffic. A cloud SIEM needs internet access from the VM; keep that for collection, and disconnect it for any test that should not reach out.

5. Prove it works#

  1. In the VM, run whoami from PowerShell.
  2. Search the SIEM for that process.
  3. Check you can see the time, host, user, process, parent process and command line.
  4. Note the delay between running it and being able to search it.

If a field is missing, fix it now. Detection Engineering stage 3 explains how to check data properly.

6. Snapshot and routine#

Take a second snapshot: 02-logging-ready. Then, for each test:

  1. Revert to 02-logging-ready.
  2. Set the network mode the test needs. Disconnect NAT first: it reaches your home network as well as the internet.
  3. Note the start time.
  4. Run the action.
  5. Search, and save what you found.
  6. Revert.

After reverting, check the VM clock. A wrong clock puts new events at the wrong time in your searches.

If nothing arrives#

Symptom Check
No events at all Agent running, destination address and port, host firewall
Sysmon missing, others present The channel name in the agent configuration, and the agent's rights
Events but no fields Parsing or the add-on for that source
Events appear in the past or future Time zone and clock in the VM and SIEM

Done when#


Labs overview · Sample data and replay

View this page on GitHub