Step-by-Step: Custom Wazuh Sysmon Rules Guide

Modern Windows environments generate an enormous amount of security telemetry. While this visibility is valuable, it can also overwhelm security teams if they rely solely on default detection rules. Attackers increasingly use legitimate Windows tools, PowerShell, WMI, scheduled tasks, and signed binaries to avoid traditional antivirus detection. Identifying these techniques requires detailed endpoint telemetry and well-crafted detection logic.This is where Wazuh Sysmon Rules become essential.

By combining Microsoft’s Sysmon with Wazuh’s rule engine, organizations can detect suspicious process execution, persistence mechanisms, credential theft attempts, lateral movement, and other advanced attack behaviors that would otherwise remain hidden in standard Windows Event Logs.

Although Wazuh includes built-in support for many Sysmon events, every organization has unique applications, administrators, and security requirements.

Creating custom Sysmon rules allows you to detect behaviors specific to your environment while reducing false positives and improving incident response.

In this guide, you’ll learn how Wazuh processes Sysmon events, how custom rules work, how to build and test them, and how to create production-ready detections that generate actionable alerts instead of unnecessary noise.


What Are Wazuh Sysmon Rules?

Wazuh Sysmon Rules are custom or built-in detection rules that analyze events generated by Microsoft Sysmon (System Monitor).

These rules evaluate Sysmon event data after it has been collected by the Wazuh agent and determine whether an event should generate a security alert.

Rather than relying solely on native Windows Security logs, Sysmon records significantly richer telemetry, including:

  • Process creation
  • Parent-child process relationships
  • Command-line arguments
  • Network connections
  • DLL loading
  • File creation timestamps
  • Registry modifications
  • Driver loading
  • Named pipe creation
  • WMI activity
  • DNS queries
  • Process injection attempts

Wazuh parses these events, extracts relevant fields through decoders, and evaluates them against XML-based rules.

If rule conditions match, Wazuh generates alerts with severity levels, MITRE ATT&CK mappings, and detailed forensic information.

This layered architecture makes Wazuh far more effective than monitoring Windows Event Logs alone.


How Sysmon Improves Windows Security Monitoring

Sysmon is part of the Sysinternals Suite developed by Microsoft.

Unlike Windows Security logs, which primarily focus on authentication and system auditing, Sysmon continuously records detailed endpoint activity that security analysts use to identify attacker behavior.

For example, Sysmon can capture:

  • Every process that launches
  • Full command-line arguments
  • Parent process information
  • Hashes of executable files
  • Outbound network connections
  • Registry persistence changes
  • PowerShell execution
  • DLL injection activity

These events remain available in the Microsoft-Windows-Sysmon/Operational event log, where Wazuh can collect and analyze them.

Security researchers at Microsoft and the MITRE ATT&CK project consistently recommend process creation telemetry and command-line logging because they provide valuable visibility into attacker techniques such as credential dumping, living-off-the-land attacks, persistence, and privilege escalation.

How Wazuh Processes Sysmon Events

When Sysmon records an event, it writes it to the Windows Event Log rather than sending it directly to Wazuh.

The processing workflow typically follows these steps:

  1. Sysmon captures an endpoint event.
  2. The event is written to the Sysmon Operational log.
  3. The Wazuh agent monitors the event channel.
  4. The event is securely forwarded to the Wazuh Manager.
  5. Wazuh decoders extract useful fields.
  6. Detection rules evaluate the decoded data.
  7. Matching rules generate alerts.
  8. Alerts appear in the Wazuh Dashboard or trigger Active Response actions.

Because Wazuh separates data collection, field extraction, and rule evaluation, administrators can customize detections without modifying how events are collected.

Related Guides:

Why Custom Sysmon Rules Are Important

The default Wazuh ruleset provides excellent baseline detection, but every environment behaves differently.

For example:

  • A software development company regularly launches PowerShell scripts.
  • A financial institution blocks PowerShell almost entirely.
  • An enterprise management platform may legitimately spawn thousands of scheduled tasks every day.
  • A small business may never use scheduled tasks outside Windows updates.

Using identical detection rules across all environments often leads to either excessive false positives or missed attacks.

Custom Sysmon rules allow you to:

  • Detect organization-specific attack techniques
  • Ignore trusted administrative tools
  • Alert only on high-risk behaviors
  • Add custom severity levels
  • Detect suspicious command-line arguments
  • Identify unauthorized software
  • Monitor critical business applications
  • Map alerts to MITRE ATT&CK techniques

This customization dramatically improves detection quality while reducing alert fatigue.

Related Guide: How to Reduce False Positives in Wazuh

Benefits of Extending the Default Wazuh Ruleset

Extending Wazuh’s built-in Sysmon rules provides several operational and security advantages.

Some of the biggest benefits include:

  • Improved visibility into attacker behavior
  • Faster detection of lateral movement
  • Better ransomware detection
  • Earlier identification of persistence mechanisms
  • Organization-specific threat detection
  • Reduced false positives
  • Better compliance reporting
  • Easier threat hunting
  • More accurate severity scoring
  • Custom MITRE ATT&CK mappings

Many mature Security Operations Centers (SOCs) treat vendor-provided detection rules as a starting point rather than a finished solution.

They continuously refine detections using their own infrastructure, threat intelligence, and incident history.

This approach aligns with guidance from organizations such as the Center for Internet Security (CIS), which recommends continuous monitoring and environment-specific detection tuning as key elements of effective cyber defense.


How Wazuh Integrates with Sysmon

Wazuh and Sysmon complement one another by combining rich endpoint telemetry with a flexible detection engine.

Sysmon focuses on collecting detailed Windows activity, while Wazuh centralizes, parses, correlates, and analyzes that information to generate meaningful security alerts.

Understanding how data flows between the two systems helps when creating custom rules, troubleshooting missing alerts, or optimizing detection performance.

Installing and Configuring Sysmon

Before Wazuh can analyze Sysmon events, Sysmon must be installed on each Windows endpoint.

A typical installation involves:

  1. Downloading Sysmon from Microsoft’s Sysinternals website.
  2. Selecting a trusted configuration file.
  3. Installing Sysmon using administrative privileges.
  4. Verifying that the Sysmon service is running.
  5. Confirming events are appearing in the Sysmon Operational log.

While Sysmon can run with its default configuration, most organizations deploy a community-maintained configuration that enables useful event types while filtering excessive noise.

One of the most widely used configurations is maintained by SwiftOnSecurity, whose Sysmon configuration has become a de facto standard across many enterprise environments because it balances visibility with manageable event volume.

Forwarding Sysmon Logs to Wazuh

Once Sysmon is installed, the Wazuh agent must monitor the appropriate Windows Event Channel.

Typically, this is accomplished by configuring the agent to collect events from:

  • Microsoft-Windows-Sysmon/Operational

The Wazuh agent continuously reads new events from this channel and securely forwards them to the Wazuh Manager over an encrypted connection.

Unlike traditional log forwarding tools, Wazuh also enriches the incoming data, correlates events, and applies custom detection rules before generating alerts.

Related Guide: How to Configure ossec.conf for Log Monitoring in Wazuh

Event Flow from Windows Endpoint to Wazuh Manager

A typical Sysmon event follows this processing path:

Windows Activity
       │
       ▼
Microsoft Sysmon
       │
       ▼
Windows Event Log
(Microsoft-Windows-Sysmon/Operational)
       │
       ▼
Wazuh Agent
       │
       ▼
Encrypted Transmission
       │
       ▼
Wazuh Manager
       │
       ▼
Decoder
       │
       ▼
Rules Engine
       │
       ▼
Alerts
       │
       ▼
Wazuh Dashboard / Active Response

This modular pipeline allows administrators to customize decoding logic and detection rules independently, making it easier to adapt to new log formats or evolving attack techniques.

Related Guide: How to Configure Wazuh Active Response

Relationship Between Decoders and Rules

Many new Wazuh users confuse decoders with rules, but they perform different functions.

A decoder extracts structured data from incoming logs, such as:

  • Process name
  • Username
  • Parent process
  • Destination IP
  • Command line
  • Hash values
  • Event ID

A rule then evaluates those extracted fields to determine whether the activity matches suspicious behavior.

Without a decoder, Wazuh cannot reliably identify individual log fields. Without rules, decoded data is simply collected without generating meaningful alerts.

Understanding this relationship is fundamental when creating custom Sysmon detections.

Related Guides:

Understanding Sysmon Event IDs

Every Sysmon event belongs to a specific Event ID that represents a particular type of system activity.

Custom Wazuh rules often target one or more of these IDs to detect malicious behavior.

Some of the most commonly monitored Event IDs include:

Sysmon Event IDDescriptionCommon Detection Use Cases
1Process CreationMalware execution, PowerShell abuse, LOLBins
3Network ConnectionC2 traffic, suspicious outbound connections
7Image LoadedDLL hijacking, unsigned modules
8CreateRemoteThreadProcess injection
10Process AccessCredential dumping, LSASS access
11File CreateRansomware activity, malware drops
12–14Registry EventsPersistence mechanisms
22DNS QueryMalicious domains, DNS tunneling
25Process TamperingDefense evasion

Rather than alerting on every occurrence of these events, effective custom rules combine Event IDs with additional conditions, such as process names, parent processes, command-line arguments, or destination IP addresses, to improve detection accuracy and reduce false positives.


Prerequisites

Before creating custom Wazuh Sysmon rules, verify that your environment is correctly configured.

Missing components or incorrect configurations can prevent Sysmon events from reaching the Wazuh Manager or stop detection rules from triggering altogether.

The following prerequisites help ensure a smooth implementation.

Supported Wazuh Versions

Custom Sysmon rules are supported in all modern Wazuh releases that include Windows Event Channel monitoring and the current XML-based rules engine.

For production environments, use a currently supported Wazuh release to benefit from the latest:

  • Security updates
  • Decoder improvements
  • Built-in detection rules
  • Dashboard enhancements
  • Performance optimizations
  • Bug fixes

Keeping managers and agents on compatible versions also helps avoid decoding inconsistencies and rule compatibility issues.

Related Guide: How to Upgrade a Wazuh Agent

Supported Windows Versions

Sysmon supports a broad range of Windows operating systems, including:

  • Windows 10
  • Windows 11
  • Windows Server 2016
  • Windows Server 2019
  • Windows Server 2022
  • Newer supported Windows Server releases

For enterprise deployments, ensure all endpoints receive consistent Sysmon configurations so your custom Wazuh rules behave predictably across the environment.

Installing Sysmon with an Appropriate Configuration

Installing Sysmon with its default settings provides only limited visibility.

Most organizations deploy a carefully curated configuration that enables valuable event types while filtering common noise sources.

A well-designed configuration should:

  • Enable process creation logging
  • Capture command-line arguments
  • Monitor network connections
  • Log registry persistence events
  • Record driver loading
  • Track DNS queries
  • Exclude trusted system activity where appropriate

This approach produces high-quality telemetry while keeping storage requirements manageable.

Configuring Windows Event Channel Collection

The Wazuh agent must be configured to collect the Sysmon Operational event channel.

Verify that:

  • The Sysmon Operational log is enabled.
  • The Wazuh agent monitors the correct event channel.
  • Event collection settings have been applied successfully.
  • The agent service is running.
  • The manager is receiving Windows event data.

Incorrect channel names or disabled event logs are common reasons for missing Sysmon alerts.

Related Guide: How to Monitor Windows Event Logs Using Wazuh

Verifying Sysmon Events Are Reaching Wazuh

Before creating custom rules, confirm that Sysmon events are successfully reaching the Wazuh Manager.

You can verify this by:

  • Launching a test process (such as Command Prompt).
  • Confirming a Process Creation (Event ID 1) appears in the Sysmon Operational log.
  • Checking that the event reaches the Wazuh Dashboard.
  • Running wazuh-logtest against a sample event.
  • Verifying that the appropriate decoder extracts the expected fields.

Testing the full ingestion pipeline before writing rules helps isolate configuration issues early and ensures your custom detections behave as expected.

Related Guide: How to Use Wazuh Logtest


Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *