Windows telemetry that matters — hands-on guide to Sysmon + Sigma + Atomic Red Team (Home SOC edition)
This article is a complete, step-by-step piece you can publish on your blog. It covers design, implementation, detection engineering (Sigma → pySigma), safe validation with Atomic Red Team, ATT&CK mapping, tuning, and a compact incident-response runbook. I cite primary references throughout and list every source at the end.
TL;DR (what you’ll end up with)
A Windows VM running Sysmon with a community-grade config, forwarded into a lightweight SIEM stack (Elastic / Splunk / Wazuh options), Sigma detection rules converted with pySigma, and safe Atomic Red Team tests used to validate detections and iterate on tuning. This closes the learning loop: generate telemetry → detect → validate → tune. (Microsoft Learn, GitHub)
Who this is for & prerequisites
Audience: intermediate beginners to defenders — you know basic Windows admin and can run a VM.
Prerequisites:
-
A Windows 10/11 (or Server) VM for the endpoint under test (isolated network).
-
A second VM running your SIEM (Elastic stack, Splunk, or Wazuh) or a hosted evaluation.
-
PowerShell administrative access on the Windows VM.
-
Git and basic terminal comfort.
High-level architecture
-
Windows VM: Sysmon collects enriched telemetry (process, network, file, registry, etc.). (Microsoft Learn)
-
Shipper: Winlogbeat (Elastic), Splunk UF, or Wazuh agent forwards Sysmon events. (Elastic, splunk.github.io, Wazuh)
-
SIEM / Index: Parse Sysmon fields into searchable indices.
-
Detection layer: Sigma rules (YAML) → convert to SIEM queries using pySigma or Sigma CLI. (GitHub, sigmahq-pysigma.readthedocs.io)
-
Validation: Invoke selected atomic tests from Atomic Red Team to generate telemetry and confirm hits. (GitHub)
Sysmon: install & sensible baseline
Why Sysmon?
Sysmon provides kernel-level, persistent visibility (process creation with command line, network connections, file creation, registry changes, image loads and many more). It is the single best free tool to make endpoint telemetry useful for detection engineering. (Microsoft Learn)
Recommended config
Use the community-vetted SwiftOnSecurity sysmon config as a starting point — it focuses on high-quality events and provides reasonable exclusions to reduce noise. Fork it, and tune to your environment. (GitHub)
Install example (quick)
-
Download Sysmon from Microsoft Sysinternals and the SwiftOnSecurity config.
-
From an elevated PowerShell or CMD in the Sysmon folder:
# Example — run as Administrator (adjust filenames/paths)
.\Sysmon64.exe -accepteula -i sysmonconfig-export.xml
# or specify network logging:
.\Sysmon64.exe -accepteula -i sysmonconfig-export.xml -n
-i installs Sysmon with the given XML config; the -n option enables network connection logging for event id 3 (useful). After install, Sysmon writes to the channel Microsoft-Windows-Sysmon/Operational. (Microsoft Learn, EventSentry)
Verify quickly
Open Event Viewer → Applications and Services Logs → Microsoft → Windows → Sysmon → Operational; or use PowerShell:
# show last 20 Sysmon Process Create events (Event ID 1)
Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-Sysmon/Operational'; ID=1} -MaxEvents 20
Get-WinEvent is the recommended cmdlet for querying. (Microsoft Learn, Medium)
Ship the data to a SIEM (three sensible options)
Choose the one you’re comfortable with. The detection content in this guide is vendor-agnostic (via Sigma).
Option A — Elastic (Winlogbeat)
-
Install Winlogbeat on the Windows VM and enable the sysmon module (it knows how to parse Sysmon event structures). Winlogbeat will forward to Logstash or directly to Elasticsearch. (Elastic)
-
Quick path: enable
winlogbeatwithevent_logsfor"Microsoft-Windows-Sysmon/Operational"and load the module.
Option B — Splunk
-
Use Splunk Universal Forwarder on Windows and install the Splunk Add-On for Sysmon or TA-Microsoft-Sysmon to parse fields and field-extract properly. Configure an index (e.g.,
sysmon). (splunk.github.io, Splunk Community)
Option C — Wazuh
-
Wazuh offers integration guides for Sysmon and many teams use Wazuh rules out of the box; it’s an excellent choice for an open solution with detection rule examples. (Wazuh)
Notes on mapping & parsing: Make sure your shipper or TA maps Sysmon fields (Image, CommandLine, ParentImage, SourceIp, DestinationIp, hashes) into named fields. Sigma rules assume field names — pySigma will transform for target backends. (sigmahq.io)
Detection engineering with Sigma (theory + example)
What is Sigma?
Sigma is a vendor-agnostic rule format for expressing detection logic in YAML. You write once, convert to queries for your SIEM. That portability is why Sigma is indispensable for home labs that may switch stacks. (GitHub, sigmahq.io)
A compact Sigma rule: detect encoded PowerShell
This is a practical detection: look for PowerShell process starts where the command line includes -EncodedCommand or common base64 decode patterns.
title: Suspicious Encoded PowerShell Command Line
id: 0001-encoded-powershell
description: Detect PowerShell executed with encoded command or FromBase64String usage (Sysmon Process Create).
status: experimental
author: YourName
date: 2025-08-25
references:
- https://attack.mitre.org/techniques/T1059/001/
logsource:
product: windows
service: sysmon
detection:
selection:
EventID: 1
Image|endswith: '\powershell.exe'
CommandLine|contains:
- '-EncodedCommand'
- 'FromBase64String('
condition: selection
level: high
This follows examples used across Sigma repositories and detection hubs. You can find similar, community-tested rules as starting points. (detection.fyi)
Convert Sigma → SIEM query with pySigma
pySigma is the modern Python conversion library for Sigma rules. Example usage (conceptual):
from sigma.collection import SigmaCollection
from sigma.pipelines.sysmon import sysmon_pipeline
from sigma.backends.splunk import SplunkBackend
pipeline = sysmon_pipeline()
backend = SplunkBackend(pipeline)
with open("encoded_powershell.yml") as f:
rules = SigmaCollection.from_yaml(f.read())
queries = backend.convert(rules)
print("\n".join(queries))
This produces a Splunk query (or Elastic/KQL equivalents depending on backend) you can paste into your SIEM. Use the official pySigma docs for backend setup and installation. (sigmahq-pysigma.readthedocs.io, GitHub)
Validate detections with Atomic Red Team (safely)
Why validate?
Detection engineering without validation is guesswork. Atomic Red Team (ART) supplies small, mapped tests to exercise ATT&CK techniques and produce the telemetry your rule should catch. Run them in an isolated lab and observe the chain: Sysmon → shipper → SIEM → Sigma → alert. (GitHub)
Safe, recommended test(s) to start with
-
T1059.003 (Windows Command Shell) — e.g., Atomic Test #2: Writes text to a file and displays it. Minimal, non-destructive, shows process creation and command line fields. (GitHub)
-
T1059.001 (PowerShell) — small atomics print or write markers (many atomics created by ART are benign and create
art-marker.txtto signal completion). See the atomic details and choose TestNumbers that are clearly non-destructive. (GitHub, Medium)
Install & run (example)
-
Clone or download the Atomic Red Team repository locally:
# on Windows (PowerShell as Admin)
git clone https://github.com/redcanaryco/atomic-red-team.git C:\AtomicRedTeam
Set-Location C:\AtomicRedTeam
-
Install or import the Invoke-AtomicRedTeam PowerShell module (there are multiple install paths; the GitHub wiki documents them):
# Option: install Invoke-AtomicRedTeam from the PowerShell Gallery (if available)
Install-Module -Name Invoke-AtomicRedTeam -Scope CurrentUser -Force
# or import the module from the repo
Import-Module C:\AtomicRedTeam\invoke-atomicredteam\Invoke-AtomicRedTeam.psm1
-
Run a safe atomic (example: run atomic test number 2 for T1059.003):
# Run atomic test that writes a benign file / prints a message
Invoke-AtomicTest T1059.003 -TestNumbers 2
# or
Invoke-AtomicTest T1059.001 -TestNumbers 10 # check the atomic docs for what each number does
The Invoke-* framework supports flags like -ShowDetails, -GetPrereqs, and -Cleanup. Use -GetPrereqs first to view any dependencies. NEVER run atomic tests on production systems; always in a sandbox. (GitHub)
Observe and iterate
-
Watch the Sysmon log on the endpoint (Event Viewer or
Get-WinEvent) to confirm the event shows up. (Microsoft Learn) -
Check the SIEM to see if the converted Sigma query triggers. If not: gather the raw event, note field names, and adjust the Sigma rule (or pySigma mapping). This feedback loop is the heart of detection engineering.
Map alerts to MITRE ATT&CK
Every Sigma rule should include ATT&CK technique IDs in tags or references. This makes your detections threat-informed and easier to prioritize. For example, the encoded-PowerShell rule is T1059.001 (PowerShell). Use MITRE ATT&CK as the taxonomy for your detection mapping. (MITRE)
Tuning, exclusions, and noise control
Tune Sysmon config
-
Exclude benign, high-volume noisy processes that flood your SIEM (common signed system processes, legitimate installers), but do so conservatively. Use the SwiftOnSecurity baseline and progressively add
onmatch="exclude"filters for processes/paths that are reliably benign in your lab. (GitHub)
Tune Sigma rules
-
Start with
status: testand log hits as low-priority until you validate. Add whitelists (e.g., internal admin tools) usingnotclauses or exceptions in Sigma. -
Prefer contextual rules (parent image, user) over simple command-line substring matches when possible.
Rate limiting and aggregation
-
Use correlation (e.g., multiple suspicious process creations within N minutes) to reduce false positives. Sigma supports such conditions; your SIEM may provide aggregation features too. (detection.fyi)
Short incident-response runbook
When the alert fires, capture this, in order:
-
Alert summary: rule name, SIEM query, ATT&CK ID, timestamp.
-
Endpoint slice: hostname, OS, logged on user, process tree (ParentImage → Image), command line, hashes. (Sysmon Event ID 1 provides Process Create + CommandLine). (Microsoft Learn)
-
Network context: source/destination IPs and ports from Sysmon Event ID 3 (if enabled). (Microsoft Learn)
-
Containment decision: isolate endpoint if suspicious and high-confidence.
-
Collect: export relevant Sysmon events (
wevtutilorGet-WinEvent), memory/process dumps if required (follow legal/policy). -
Hunt: search for same indicators across your estate. Use Sigma conversions to run broad queries.
-
Post-mortem: update the Sysmon exclusions or Sigma rule to reduce noise; record the ATT&CK mapping and confidence level.
Appendix — useful commands & snippets
Sysmon install (example)
# In Sysmon directory, as Administrator:
.\Sysmon64.exe -accepteula -i sysmonconfig-export.xml -n
# To update the configuration later:
.\Sysmon64.exe -c sysmonconfig-export.xml
(Use -i to install; many doc examples show -c or re-install for config updates — check your Sysmon version docs). (Microsoft Learn, EventSentry)
Quick PowerShell to inspect recent Sysmon process creations
Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-Sysmon/Operational'; ID=1} -MaxEvents 50 |
Select-Object TimeCreated, Id, @{n='Image';e={$_.Properties[6].Value}}, @{n='CommandLine';e={$_.Properties[18].Value}} |
Format-Table -AutoSize
Indexes for the Properties[...] elements vary by Sysmon version; prefer structured extraction (Get-WinEventData helpers) for production scripts. (Gist, Medium)
Convert Sigma rule with pySigma (conceptual)
pip install pySigma
# Use the Python snippet from pySigma docs to instantiate a backend and convert rules.
See pySigma documentation for backend names (Splunk, Elastic/KQL) and pipeline configuration. (sigmahq-pysigma.readthedocs.io, GitHub)
Run a safe atomic (example)
# from the repo or after installing module
Import-Module Invoke-AtomicRedTeam
# Show tests for a technique
Invoke-AtomicTest T1059.003 -ShowDetailsBrief
# Run the benign test that writes a file
Invoke-AtomicTest T1059.003 -TestNumbers 2
Use -GetPrereqs and -Cleanup to see and handle dependencies safely. (atomicredteam.io, GitHub)
Final notes, ethics & safety
-
Never run atomic tests on production networks or machines you do not control. Some atomics will download or execute tools (read
-GetPrereqsandatomicdescriptions first). Use an air-gapped or otherwise isolated lab. (GitHub) -
Attribution caution: Sigma rules are heuristics — use multiple signals and human review before escalating.
-
Document every change to Sysmon configs and Sigma rules (version control helps).
References
-
Microsoft Sysmon documentation (Sysinternals). (Microsoft Learn)
-
SwiftOnSecurity sysmon-config (community baseline). (GitHub)
-
Sigma project (SigmaHQ repository and site). (GitHub, sigmahq.io)
-
pySigma documentation / pySigma GitHub. (sigmahq-pysigma.readthedocs.io, GitHub)
-
Atomic Red Team (redcanaryco / atomic-red-team) and Invoke-AtomicRedTeam docs. (GitHub)
-
Winlogbeat Sysmon module (Elastic). (Elastic)
-
Splunk Add-On for Sysmon documentation. (splunk.github.io)
-
Wazuh blog: detecting Windows persistence & Sysmon integration. (Wazuh)
-
Get-WinEvent (PowerShell) docs and usage examples. (Microsoft Learn, Gist)
-
Detection examples and Sigma rule variants (detection.fyi)

Comments
Post a Comment