Tools

T1654

Sysmon

Microsoft Sysinternals Sysmon — installation, configuration, Event IDs 1-29, common use cases, config files, and how analysts use Sysmon telemetry for endpoint detection and threat hunting.

View on Graph

What Sysmon Is and Why Every SOC Needs It

Sysmon is a Microsoft Sysinternals tool that installs as a Windows system service and device driver. Once installed, it logs system activity to the Windows Event Log with far more detail than the built-in Security log provides.

  • Sysmon Event ID 1 (process creation) includes the SHA1, SHA256, and MD5 hash of every executable that runs — enabling immediate file reputation lookup without a separate EDR agent.
  • Sysmon Event ID 3 (network connection) maps outbound connections to the specific process that made them — you see not just “connection on port 443” but “powershell.exe connected to 192.168.1.100:8443”.
  • Sysmon Event ID 22 (DNS query) logs every DNS query per-process — critical for detecting DGAs, DNS tunneling, and C2 domains.
  • Sysmon does all of this without a reboot, without replacing Windows core components, and at minimal performance cost.

MITRE ATT&CK maps log enumeration to T1654. Sysmon does the enumerating — turning Windows endpoint activity into structured, searchable events.


Installation and Configuration

Installation

# Download Sysmon from Microsoft Sysinternals
curl -o C:\Tools\Sysmon.zip https://download.sysinternals.com/files/Sysmon.zip
expand C:\Tools\Sysmon.zip -F:* C:\Tools\Sysmon

# Install Sysmon with a configuration file
Sysmon64.exe -accepteula -i C:\Configs\sysmon-config.xml

# Check installed version and status
Sysmon64.exe -s

# Update Sysmon without rebooting
Sysmon64.exe -accepteula -u  (uninstall current)
Sysmon64.exe -accepteula -i C:\Configs\sysmon-config.xml  (reinstall with updated config)
ConfigMaintainerFocusNotes
SwiftOnSecurity sysmon-configSwiftOnSecurityBroad coverage — captures all high-value events with minimal noiseMost widely used. Good starting point for every SOC.
Olaf Hartong’s sysmon-modularOlaf HartongModular configs — choose per use case (process injection, network, file, registry)More granular. Allows different configs for domain controllers, servers, workstations.
ION-Storm sysmon-configION-StormDetection-focused — tuned for threat huntingIncludes rules specific to Cobalt Strike, Meterpreter, and common post-exploitation frameworks.

What a Good Sysmon Config Does

A well-tuned Sysmon configuration should:

  1. Enable all high-value Event IDs: 1 (ProcessCreate), 3 (NetworkConnect), 7 (ImageLoad), 8 (CreateRemoteThread), 10 (ProcessAccess), 11 (FileCreate), 15 (FileCreateStreamHash), 22 (DNSEvent)
  2. Exclude known-good noise: svchost.exe network connections to Windows Update, SearchIndexer.exe file accesses, MsMpEng.exe (Defender) scanning activity
  3. Include known-bad patterns as includes: powershell.exe command-line logging, rundll32.exe image loads, wmic.exe command-line logging

Configuration Syntax

Sysmon configs are XML files with rules per Event ID:

<Sysmon>
  <EventFiltering>
    <!-- Include all process creation events -->
    <ProcessCreate onmatch="include">
      <!-- No child rules = capture everything -->
    </ProcessCreate>

    <!-- Exclude known-good network connections -->
    <NetworkConnect onmatch="exclude">
      <DestinationIp condition="is">10.0.0.1</DestinationIp>  <!-- Internal monitoring -->
      <Image condition="is">C:\Windows\System32\svchost.exe</Image>
    </NetworkConnect>

    <!-- Only capture specific DLL loads -->
    <ImageLoad onmatch="include">
      <Image condition="contains any">rundll32.exe</Image>
      <Image condition="contains any">regsvr32.exe</Image>
    </ImageLoad>

    <!-- Include all file creation events but exclude known-good paths -->
    <FileCreate onmatch="exclude">
      <TargetFilename condition="begin with">C:\Windows\Temp\</TargetFilename>
    </FileCreate>
  </EventFiltering>
</Sysmon>

Event ID Reference — The Full 1-29 Map

Event IDNameWhat It CapturesDetection Use
1Process creationExecutable path, command line, SHA1/SHA256/MD5 hash, parent process, userMalware execution, LOLBin abuse, suspicious command lines
2File creation time changedOriginal file creation time (timestomp detection)Timestomping (T1070.006) — attacker modifying file timestamps
3Network connectionSource/destination IP, port, protocol, process that made connectionC2 beaconing, data exfiltration, lateral movement
4Sysmon service state changedService started or stoppedAttacker disabling Sysmon — immediate escalation
5Process terminatedProcess exit timeProcess lifetime analysis, forensic timeline
6Driver loadedKernel driver loaded into the OSMalicious kernel driver, vulnerable driver exploitation
7Image loaded (DLL)DLL loaded into a processDLL sideloading, process injection, reflective DLL loading
8CreateRemoteThreadOne process creates a thread in another processProcess injection (T1055) — the golden event for injection detection
9RawAccessReadDirect disk readCredential dumping (Mimikatz lsadump) — LSASS raw read
10Process accessedOne process opens a handle to anotherCredential dumping — lsass.exe accessed by non-SYSTEM process
11FileCreateFile creationMalware drops, persistence via startup folder, scheduled task scripts
12RegistryEvent (create/delete)Registry key creation or deletionPersistence via Run keys, service entries
13RegistryEvent (value set)Registry value modificationPersistence configuration, startup modification
14RegistryEvent (rename)Registry key renamedEvasion technique — renaming to avoid detection
15FileCreateStreamHashAlternate Data Stream creationADS hiding — malware stored in NTFS streams
16Sysmon config changeConfig updated or changedConfig tampering — compare against approved baseline
17Pipe createdNamed pipe creationLateral movement tools (PsExec creates named pipes, T1572)
18Pipe connectedNamed pipe connectionLateral movement confirmed — which process connected to which pipe
19WmiEventFilterWMI filter createdWMI persistence (T1546.003)
20WmiEventConsumerWMI consumer createdWMI persistence
21WmiEventConsumerToFilterWMI filter bound to consumerWMI persistence — the actual trigger binding
22DNSEventDNS query per processDNS tunneling, DGA detection, C2 domain lookup
23FileDeleteFile deletion with volume shadow copy infoLog clearing, evidence destruction (T1070.004)
24Clipboard changeClipboard content changeClipboard monitoring — data exfiltration
25Process tamperingProcess image change (hollowing detection)Process hollowing (T1055.012)
26FileDeleteDetectedFile deletion logged (file already deleted)Retrospective file deletion detection
27FileBlockExecutableExecutable blockedMalicious executable blocked by Sysmon
28FileBlockShreddingFile shredding detectedForensic evidence destruction
29FileExecutableDetectedExecutable file writtenNew executable creation on disk

Top Detection Queries Using Sysmon

Event 1 — Process Creation with Hashes

SPL query — find processes with high-entropy command lines (likely encoded/encrypted):

index=windows sourcetype=WinEventLog:Sysmon EventCode=1
| eval cmd_len = len(CommandLine)
| where cmd_len > 500
| eval alert = "HIGH — Long command line (" . cmd_len . " chars): " . CommandLine
| table _time, Computer, Image, CommandLine, Hashes, alert
| sort - cmd_len

Event 3 — Network Connection

SPL query — find beaconing patterns (consistent outbound connections):

index=windows sourcetype=WinEventLog:Sysmon EventCode=3
| stats earliest(_time) as first, latest(_time) as last, count as total_connections by Computer, Image, DestinationIp, DestinationPort
| eval duration_hours = (last - first) / 3600
| eval connections_per_hour = total_connections / duration_hours
| where connections_per_hour > 1 AND connections_per_hour < 60
| eval interval_seconds = round(3600 / connections_per_hour, 1)
| table Computer, Image, DestinationIp, DestinationPort, total_connections, duration_hours, interval_seconds
| sort interval_seconds

Event 8 — CreateRemoteThread (Process Injection)

SPL query — detect all process injection events:

index=windows sourcetype=WinEventLog:Sysmon EventCode=8
| stats count by Computer, SourceImage, TargetImage, StartAddress
| eval alert = "CRITICAL — " . SourceImage . " injected a thread into " . TargetImage
| table Computer, SourceImage, TargetImage, count, alert
| sort - count

Event 10 — Process Access (LSASS Access)

SPL query — detect LSASS process access from non-standard processes:

index=windows sourcetype=WinEventLog:Sysmon EventCode=10
| search TargetImage="*lsass.exe"
| search SourceImage!="*svchost.exe" AND SourceImage!="*csrss.exe" AND SourceImage!="*wininit.exe"
| stats count by Computer, SourceImage, TargetImage, GrantedAccess
| eval alert = "CRITICAL — " . SourceImage . " accessed lsass.exe (GrantedAccess: " . GrantedAccess . ")"
| table _time, Computer, SourceImage, GrantedAccess, count, alert

Event 22 — DNS Query

SPL query — detect DGA domains (high entropy subdomains):

index=windows sourcetype=WinEventLog:Sysmon EventCode=22
| eval subdomain = mvindex(split(QueryName, "."), 0)
| eval entropy = len(subdomain) / log(36) * count
| where len(subdomain) > 15
| stats count by Computer, Image, QueryName
| eval alert = "MEDIUM — High-entropy subdomain: " . QueryName . " from " . Image
| table _time, Computer, Image, QueryName, count, alert

Sysmon Data Flow

Windows Endpoint

  ├── Sysmon driver → Sysmon Event Log (Applications and Services Logs > Microsoft > Windows > Sysmon/Operational)

  ├── Windows Event Forwarding (WEF) → Centralized collector → SIEM (Splunk/Sentinel/Elastic)

  └── Direct forwarding via WinRM → SIEM forwarder

Analyst → SIEM search → Sysmon Event IDs → Correlation → Alert

Key Integration Points

IntegrationHow It WorksValue
WEF + SysmonWEF subscription collects Sysmon Operational log from all endpointsCentralized Sysmon telemetry without a SIEM agent
Splunk Universal ForwarderReads Sysmon event log, forwards to Splunk indexerFull Sysmon telemetry in SIEM with correlation
Microsoft SentinelAzure Monitor Agent collects Sysmon eventsCloud SIEM with KQL query support
Elastic SecurityElastic Agent or Winlogbeat collects Sysmon eventsOpen-source SIEM with Sysmon integration
YARA + SysmonSysmon file create/capture events trigger YARA scansAutomated malware detection on file drops

Common Deployment Mistakes

MistakeSymptomFix
No configuration fileSysmon logs everything — 100,000+ events/hour per endpointDeploy with a tuned config (SwiftOnSecurity as baseline)
No Event ID 3No per-process network connection dataEnsure NetworkConnect is in the config
No Event ID 22No per-process DNS queriesEnsure DNSEvent is enabled (requires Sysmon 13+)
Config overly restrictiveMissing telemetry for LOLBins, WMI, PowerShellStart with SwiftOnSecurity, then tune
Not forwarding to SIEMTelemetry exists but cannot be searchedConfigure WEF, Splunk UF, or Elastic Agent
Installing without -accepteulaSysmon fails to install silentlyInclude -accepteula in deployment script
No periodic config reviewConfig out of date with new techniquesReview monthly against MITRE ATT&CK and new tools

Sources