How to Configure Wazuh Audit Logs

Security teams rely on visibility into user activity, authentication events, privilege changes, file access, and system configuration changes to identify malicious behavior before it escalates into a breach. This is where Wazuh audit logs become essential.

By collecting and analyzing audit data from operating systems, applications, cloud platforms, and identity services, Wazuh enables organizations to detect suspicious activity, investigate incidents, and meet regulatory compliance requirements from a centralized platform.

Unlike basic log collection, audit logging focuses on recording security-relevant events that provide accountability and traceability.

Whether you’re monitoring failed login attempts, privilege escalation, file modifications, or administrative actions, properly configured audit logs provide the evidence needed for both real-time threat detection and forensic investigations.

Configuring audit logs in Wazuh offers several important benefits:

  • Detect unauthorized access and privilege escalation attempts
  • Improve threat hunting with detailed user activity records
  • Support compliance frameworks such as PCI DSS, HIPAA, ISO 27001, NIST, and CIS Controls
  • Accelerate incident response through centralized security monitoring
  • Correlate audit events across endpoints, servers, and cloud environments

By the end of this guide, you’ll understand how Wazuh collects audit events, which audit sources are supported, how audit logging differs from traditional system logging, and how to configure and optimize audit logging for comprehensive security monitoring across your environment.


What Are Wazuh Audit Logs?

Audit logs are detailed records of security-related activities performed by users, applications, services, and operating systems.

Unlike general system logs, which primarily record operational information and software events, audit logs are specifically designed to answer questions such as:

  • Who performed an action?
  • What action was performed?
  • When did it happen?
  • Where did it occur?
  • Was the action successful or denied?

These records are critical during security investigations because they establish a chronological trail of system activity.

Within Wazuh, audit logs are collected by the Wazuh agent from multiple operating system components and security tools.

The agent forwards the events to the Wazuh manager, where decoders normalize the log data and detection rules evaluate each event against known attack techniques, suspicious behaviors, and compliance requirements.

Matching events generate alerts that are indexed and displayed in the Wazuh Dashboard for analysis.

Wazuh supports audit log collection from numerous operating systems and platforms, including:

  • Linux servers
  • Windows workstations and servers
  • macOS endpoints
  • Cloud platforms
  • Network devices
  • Identity providers
  • Security applications

Common audit data sources include Linux’s Audit Framework (auditd), Windows Security Event Logs, Sysmon, Active Directory auditing, authentication logs, cloud audit services, and many third-party security products.

One important distinction is the difference between audit logs and standard system logs.

Standard system logs typically capture application messages, service startup information, hardware events, and operational status updates.

While useful for troubleshooting, they often lack the detailed security context needed for investigations.

Audit logs, on the other hand, record security-sensitive activities such as:

  • User authentication
  • Permission changes
  • Administrative actions
  • File access
  • Policy modifications
  • Process execution
  • Security configuration changes

Because of their forensic value, audit logs form the foundation of many detection rules and compliance reporting requirements.

For organizations implementing a Security Information and Event Management (SIEM) platform, properly configured audit logs provide the high-quality telemetry necessary to detect insider threats, compromised accounts, privilege abuse, ransomware activity, and lateral movement.


Common Audit Log Sources Supported by Wazuh

Wazuh can ingest audit events from numerous operating systems and security platforms, allowing organizations to centralize security monitoring across hybrid environments.

Each log source provides different visibility into user behavior, system activity, and potential attack techniques.

Linux Audit Framework (auditd)

The Linux Audit Framework (auditd) is one of the most important audit sources for Linux servers.

It records detailed security events including:

  • User logins and logouts
  • File access
  • File deletions
  • Permission changes
  • Process execution
  • Privilege escalation
  • System call activity
  • SELinux events

When integrated with Wazuh, these events are correlated with detection rules that identify suspicious administrative activity, unauthorized file access, persistence techniques, and privilege abuse.

Auditd is especially valuable for organizations that must comply with PCI DSS, HIPAA, CIS Benchmarks, or government security standards.

Related Guide: How to Add Linux Endpoints to Wazuh

Windows Security Event Logs

Windows Security Event Logs contain authentication, authorization, and account management events generated by Windows systems.

Common events include:

  • Successful logins
  • Failed login attempts
  • Account lockouts
  • User creation
  • Group membership changes
  • Password resets
  • Privilege assignments
  • Security policy modifications

Wazuh continuously monitors these logs and generates alerts when suspicious patterns emerge, such as repeated authentication failures or unauthorized administrative changes.

Organizations often combine these logs with custom detection rules to improve visibility into Windows attack techniques.

Related Guide: How to Monitor Windows Event Logs Using Wazuh

Sysmon Events

Microsoft Sysmon extends Windows logging by providing detailed endpoint telemetry that is not available through native Windows Event Logs.

Sysmon records events such as:

  • Process creation
  • Command-line execution
  • Network connections
  • Driver loading
  • DLL loading
  • Registry modifications
  • File creation timestamps
  • Process injection activity

These events greatly improve detection coverage for advanced threats including ransomware, malware execution, living-off-the-land attacks, and credential theft.

Many security researchers recommend Sysmon because it significantly increases endpoint visibility while integrating well with SIEM platforms like Wazuh.

Related Guide: Step-by-Step: Custom Wazuh Sysmon Rules Guide

Active Directory Audit Logs

Active Directory auditing provides visibility into identity-related events occurring across Windows domains.

Common monitored activities include:

  • User account creation
  • Group policy changes
  • Domain administrator activity
  • Password modifications
  • Organizational Unit changes
  • Security group membership updates
  • Privileged account usage

Since identity systems are a frequent target of attackers, monitoring Active Directory audit logs enables Wazuh to detect privilege escalation, persistence, and lateral movement techniques much earlier in the attack lifecycle.

Authentication Logs

Authentication logs record login activity across Linux, Windows, network devices, VPNs, cloud services, and applications.

These logs commonly include:

  • Successful authentication
  • Failed authentication
  • Multi-factor authentication events
  • SSH logins
  • RDP logins
  • VPN access
  • Remote administration sessions

By correlating authentication events from multiple sources, Wazuh can detect brute-force attacks, password spraying, credential stuffing, impossible travel scenarios, and compromised user accounts.

Related Guide: How to Monitor Failed SSH Login Attempts Using Wazuh

File Integrity Monitoring (FIM) Events

Although File Integrity Monitoring is separate from operating system auditing, FIM events are an important audit source because they record changes made to monitored files and directories.

Wazuh tracks events such as:

  • File creation
  • File deletion
  • File modification
  • Permission changes
  • Ownership changes
  • Hash changes

These records help security teams identify ransomware encryption activity, unauthorized software installation, web shell deployment, and unexpected configuration changes.

Organizations frequently correlate FIM events with user authentication logs to determine who modified a sensitive file and when the change occurred.

Related Guide: How to Configure File Integrity Monitoring (FIM) in Wazuh

Cloud Audit Logs (AWS CloudTrail, Azure Activity Logs, Google Cloud Audit Logs)

Modern organizations increasingly rely on cloud audit logs to monitor administrative activity across cloud infrastructure.

Wazuh supports ingesting audit data from major cloud providers, including:

  • AWS CloudTrail — Records API calls, IAM changes, resource creation, and administrative actions.
  • Azure Activity Logs — Tracks Azure resource operations, policy changes, deployments, and management events.
  • Google Cloud Audit Logs — Records administrative actions, data access, and policy modifications across Google Cloud services.

Centralizing these cloud audit logs alongside endpoint telemetry enables analysts to correlate user activity across on-premises and cloud environments, providing a unified view of security events.

The importance of centralized logging is emphasized by both the National Institute of Standards and Technology (NIST) and the Center for Internet Security (CIS), which recommend collecting audit logs from all critical systems to improve detection capabilities and support incident investigations.

Related Guide: How to Monitor AWS CloudTrail Logs Using Wazuh


Prerequisites

Before configuring Wazuh audit logs, verify that your environment meets several foundational requirements.

Proper preparation helps ensure reliable event collection, accurate alerting, and efficient troubleshooting throughout the deployment.

Wazuh Manager Installation

A functioning Wazuh manager is required to receive, process, and analyze audit events collected from endpoints.

The manager performs several key tasks:

  • Receives events from Wazuh agents
  • Decodes raw log data into structured fields
  • Matches events against detection rules
  • Generates alerts
  • Forwards alerts to the Wazuh Indexer for storage

If you’re deploying Wazuh for the first time, ensure your manager is running the latest supported version to take advantage of newer decoders, rules, and performance improvements.

Related Guide: The Complete Wazuh Cluster Architecture Guide

Wazuh Agent Deployment

Each endpoint that generates audit events should have the Wazuh agent installed and properly registered with the manager.

The agent is responsible for collecting local audit logs and securely forwarding them for analysis.

Supported endpoints include:

  • Linux servers
  • Windows desktops and servers
  • macOS systems
  • Cloud virtual machines
  • Container hosts

Verify that agents are online before enabling audit log monitoring.

An offline or misconfigured agent will prevent audit events from reaching the manager.

Related Guide: The Ultimate Wazuh Agent Deployment Guide

Administrative Privileges

Configuring audit logging typically requires elevated privileges because you’ll be modifying operating system security settings and installing or configuring system services.

Depending on the operating system, you may need:

  • Root or sudo access on Linux
  • Administrator privileges on Windows
  • Permission to modify audit policies
  • Access to Wazuh configuration files

Without sufficient privileges, audit rules may fail to load or essential logs may not be accessible.

Time Synchronization (NTP)

Accurate timestamps are essential for event correlation across multiple systems.

If servers have inconsistent clocks, security investigations become significantly more difficult because:

  • Event timelines become inaccurate.
  • Correlation rules may fail.
  • Distributed attacks become harder to reconstruct.
  • Compliance reports may contain inconsistent timestamps.

Synchronize all Wazuh components, including managers, agents, indexers, and monitored systems, using Network Time Protocol (NTP) or another trusted time source.

Required Ports and Network Connectivity

Agents must be able to communicate reliably with the Wazuh manager.

Before enabling audit logging, verify that:

  • Firewalls permit required Wazuh communication ports.
  • Network routes are available between agents and managers.
  • TLS communication is functioning correctly.
  • DNS resolution is working where applicable.
  • No security appliance is blocking agent traffic.

If connectivity issues exist, audit events may never reach the manager, even if audit logging is correctly configured.

Related Guide: Wazuh Agent Not Connecting to Manager? 12 Proven Fixes

Basic Understanding of Wazuh Rules and Decoders

Audit logs become useful only after Wazuh successfully interprets them.

Understanding the following components will make configuration much easier:

  • Decoders extract structured information from raw logs.
  • Rules determine whether an event should generate an alert.
  • Rule groups categorize related detections.
  • Alert levels define event severity.

Knowing how these components interact makes it easier to customize detections and troubleshoot missing alerts.

Related Guides:


Understanding the Wazuh Audit Log Architecture

Understanding how audit events flow through the Wazuh platform makes it much easier to troubleshoot collection issues, optimize performance, and customize detection rules.

Every audit event passes through several processing stages before it appears in the Wazuh Dashboard.

Audit Event Generation

Everything begins on the monitored endpoint.

Operating systems and applications continuously generate audit events whenever security-relevant actions occur, such as:

  • User authentication
  • File access
  • Permission changes
  • Process execution
  • Administrative actions
  • Policy modifications
  • Network access
  • Service creation

For Linux systems, these events are commonly produced by the Linux Audit Framework (auditd), while Windows relies on Security Event Logs, Sysmon, and Active Directory auditing.

Log Collection by the Wazuh Agent

The Wazuh agent continuously monitors configured log sources for new audit events.

Depending on the operating system, the agent may collect events from:

  • Audit log files
  • Windows Event Channels
  • Sysmon logs
  • Authentication logs
  • Journal logs
  • File Integrity Monitoring events
  • Cloud service integrations

The agent securely forwards collected events to the Wazuh manager using encrypted communication, minimizing the risk of interception or tampering during transmission.

Event Decoding

Once the manager receives an event, it passes through the decoding engine.

Decoders identify:

  • Log format
  • Event type
  • Timestamp
  • Username
  • Source IP address
  • Destination
  • Process name
  • Command executed
  • Event identifiers
  • Additional metadata

This process transforms unstructured log data into normalized fields that detection rules can evaluate consistently across different operating systems and log sources.

Related Guide: Wazuh Decoder Guide

Rule Matching

After decoding, Wazuh evaluates the event against its ruleset.

Rules determine whether the event represents:

  • Normal activity
  • Policy violations
  • Suspicious behavior
  • Known attack techniques
  • Compliance findings
  • Threat indicators

Rules can also correlate multiple audit events together, allowing Wazuh to identify attack patterns that would otherwise appear harmless when viewed individually.

Organizations frequently customize these rules to match their own security policies and reduce unnecessary alerts.

Related Guide: How to Create Custom Detection Rules in Wazuh (With Examples)

Alert Generation

If a rule matches the decoded event, Wazuh generates an alert containing information such as:

  • Rule ID
  • Alert level
  • Timestamp
  • Agent name
  • Event source
  • User involved
  • MITRE ATT&CK mappings (when applicable)
  • Compliance mappings
  • Full event details

Higher-severity alerts can also trigger automated responses, email notifications, or integrations with third-party incident response platforms.

Related Guide: How to Configure Wazuh Alerts

Indexing in the Wazuh Indexer

Generated alerts are forwarded to the Wazuh Indexer, where they are indexed for fast searching and long-term storage.

The indexer enables analysts to:

  • Search millions of audit events quickly
  • Aggregate security data
  • Build dashboards
  • Perform forensic investigations
  • Execute threat hunting queries

Efficient indexing is especially important in large environments where thousands of audit events may be generated every second.

Related Guide: The Ultimate Wazuh Indexer Guide

Visualization in the Wazuh Dashboard

Finally, indexed audit data becomes available in the Wazuh Dashboard.

Security analysts can:

  • Search audit events
  • Filter by user, host, or event type
  • Build visualizations
  • Investigate alerts
  • Review compliance reports
  • Create saved searches
  • Monitor dashboards in real time

This centralized visibility allows security teams to quickly detect abnormal activity across endpoints, servers, and cloud infrastructure.


How to Configure Audit Logs on Linux

Linux systems provide one of the richest sources of security telemetry through the Linux Audit Framework (auditd).

Integrating auditd with Wazuh enables detailed monitoring of authentication events, privilege escalation, file access, command execution, and administrative actions.

Install and Enable auditd

Most enterprise Linux distributions include the Linux Audit Framework in their repositories.

On Debian and Ubuntu:

sudo apt update
sudo apt install auditd audispd-plugins

On RHEL, Rocky Linux, AlmaLinux, and CentOS:

sudo dnf install audit

or

sudo yum install audit

Enable and start the service:

sudo systemctl enable auditd
sudo systemctl start auditd

Verify that the service is running:

sudo systemctl status auditd

Configure Audit Rules

Audit rules define which activities the Linux kernel records.

Rules can monitor:

  • Sensitive files
  • Directory access
  • Command execution
  • System calls
  • Privilege escalation
  • User account modifications
  • Security configuration changes

For example, to monitor changes to the /etc/passwd file:

-w /etc/passwd -p wa -k identity

To monitor /etc/shadow:

-w /etc/shadow -p wa -k identity

Many organizations maintain audit rules in files under:

/etc/audit/rules.d/

Keeping rules modular makes them easier to maintain and audit over time.

Verify Audit Rule Loading

After updating your rules, reload them and verify they are active.

Load the rules:

sudo augenrules --load

Display active rules:

sudo auditctl -l

You should confirm that newly added rules appear in the output before proceeding.

If expected rules are missing, review the syntax and audit daemon logs for errors.

Configure the Wazuh Agent to Monitor Audit Logs

Next, configure the Wazuh agent to collect audit events.

On many Linux distributions, audit logs are stored at:

/var/log/audit/audit.log

Add or verify the corresponding <localfile> configuration in the agent’s ossec.conf:

<localfile>
  <location>/var/log/audit/audit.log</location>
  <log_format>audit</log_format>
</localfile>

This instructs the Wazuh agent to continuously monitor the Linux Audit Framework output and forward new events to the manager.

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

Restart Required Services

After updating both auditd and the Wazuh agent configuration, restart the necessary services.

Restart auditd:

sudo systemctl restart auditd

Restart the Wazuh agent:

sudo systemctl restart wazuh-agent

Confirm both services are running without errors before generating test events.

Validate Event Collection

Finally, verify that audit events are successfully reaching the Wazuh manager.

A simple validation process includes:

  1. Generate an audited event, such as modifying a monitored file.
  2. Confirm the event appears in the local audit log (/var/log/audit/audit.log).
  3. Verify the Wazuh agent forwards the event.
  4. Search for the event in the Wazuh Dashboard.
  5. Confirm that the appropriate rule triggered and an alert was generated.

If events do not appear, check:

  • auditd service status
  • Loaded audit rules
  • Wazuh agent logs
  • Agent-to-manager connectivity
  • Decoder and rule matching

Related Guides:


How to Configure Audit Logs on Windows

Windows environments generate a wealth of security telemetry that can help detect unauthorized access, privilege escalation, credential theft, and lateral movement.

By enabling Advanced Audit Policies, collecting Windows Security Event Logs, and optionally deploying Sysmon, you can significantly improve Wazuh’s detection capabilities.

Enable Advanced Audit Policy

Windows Advanced Audit Policy provides granular control over which security events are recorded.

Unlike the basic audit policy settings, Advanced Audit Policy allows administrators to selectively enable auditing for specific categories.

Some of the most valuable audit categories include:

  • Account Logon
  • Logon/Logoff
  • Account Management
  • Object Access
  • Policy Change
  • Privilege Use
  • Process Creation
  • Detailed Tracking
  • System Events
  • DS Access (for Domain Controllers)

You can configure these settings through:

  • Local Group Policy (gpedit.msc)
  • Group Policy Management Console (GPMC)
  • PowerShell
  • Active Directory Group Policy Objects

For enterprise deployments, configuring audit policies through Group Policy ensures consistency across all Windows endpoints.

Configure Windows Security Auditing

After enabling Advanced Audit Policy, configure the specific audit categories that align with your security and compliance requirements.

Common events worth collecting include:

Audit CategoryTypical Events
Logon EventsSuccessful and failed logins
Account ManagementUser creation, deletion, password changes
Privilege UseAdministrative privilege assignments
Policy ChangesSecurity policy modifications
Object AccessAccess to sensitive files and folders
Process TrackingProcess creation and termination
System EventsService starts, shutdowns, system integrity events

Organizations often begin with Microsoft’s recommended security baselines and then expand auditing based on their operational needs to avoid generating unnecessary event volume.

Install Sysmon (Optional but Recommended)

Although Windows Security Event Logs provide valuable audit data, Sysmon (System Monitor) offers much deeper visibility into endpoint activity.

Sysmon can record events such as:

  • Process creation with command-line arguments
  • Network connections
  • Registry modifications
  • Driver loading
  • DLL loading
  • File creation timestamps
  • WMI activity
  • Process injection
  • Named pipe creation

This additional telemetry greatly improves detection coverage for advanced threats, including ransomware, malware, and living-off-the-land attacks.

Most security teams deploy Sysmon using a community-maintained configuration such as the SwiftOnSecurity Sysmon Config or the Olaf Hartong Sysmon Modular Configuration, which filter noisy events while capturing high-value security telemetry.

Related Guide: Step-by-Step: Custom Wazuh Sysmon Rules Guide

Configure Wazuh Agent Log Collection

Once Windows auditing is enabled, configure the Wazuh agent to monitor the appropriate Windows Event Channels.

A typical configuration in ossec.conf includes:

<localfile>
  <location>Security</location>
  <log_format>eventchannel</log_format>
</localfile>

You can also monitor additional channels such as:

  • Microsoft-Windows-Sysmon/Operational
  • Application
  • System
  • Windows PowerShell
  • Microsoft Defender
  • Windows Firewall

Collecting multiple event channels enables Wazuh to correlate authentication events, process execution, malware detections, and system changes into higher-confidence alerts.

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

Validate Windows Audit Events

After configuring auditing and restarting the Wazuh agent, verify that events are being collected correctly.

A simple validation process includes:

  1. Log in to the Windows system.
  2. Perform an action that should generate an audit event (for example, create a local user or modify a monitored file).
  3. Open Event Viewer and confirm the event appears in the appropriate log.
  4. Verify the Wazuh agent forwards the event to the manager.
  5. Search for the event in the Wazuh Dashboard.
  6. Confirm that the expected detection rule generated an alert.

If expected events are missing, verify:

  • Audit policies are enabled.
  • Event channels are configured correctly.
  • The Wazuh agent service is running.
  • Agent-to-manager communication is functioning.
  • The appropriate decoder and rule exist.

Related Guides:


Collecting Cloud Audit Logs

Cloud environments continuously generate audit data for administrative actions, authentication events, API calls, and resource modifications.

Centralizing these logs within Wazuh allows security teams to monitor hybrid infrastructures from a single platform and quickly detect suspicious activity across multiple cloud providers.

AWS CloudTrail Integration

AWS CloudTrail records nearly every API call made within an AWS account, making it one of the most valuable cloud audit sources.

Common events include:

  • IAM user activity
  • Role assumption
  • EC2 instance creation
  • S3 bucket modifications
  • Security Group changes
  • CloudTrail configuration updates
  • AWS Console logins
  • API calls from SDKs and CLI tools

Wazuh can ingest CloudTrail logs through supported integrations, allowing rules to detect unauthorized administrative actions, privilege escalation, or unusual API activity.

Organizations should enable CloudTrail across all AWS Regions, including newly created Regions, to avoid blind spots in monitoring.

Related Guide: How to Monitor AWS CloudTrail Logs Using Wazuh

Azure Activity Logs Integration

Azure Activity Logs provide visibility into operations performed on Azure resources and subscriptions.

Common events include:

  • Virtual machine creation
  • Resource deletion
  • Network Security Group modifications
  • RBAC role assignments
  • Policy updates
  • Subscription changes
  • Service Health notifications

Wazuh can collect Azure Activity Logs to detect unauthorized infrastructure changes and administrative actions that could indicate account compromise or insider threats.

Administrators should also consider collecting Microsoft Entra ID (formerly Azure AD) audit and sign-in logs for more comprehensive identity monitoring.

Google Cloud Audit Logs Integration

Google Cloud Audit Logs record administrative, data access, and system events across Google Cloud services.

Key event categories include:

  • Admin Activity logs
  • Data Access logs
  • Policy Denied logs
  • System Event logs

Typical monitored actions include:

  • IAM policy changes
  • Compute Engine instance management
  • Cloud Storage access
  • Kubernetes administration
  • Service account usage
  • API enablement

By ingesting these logs into Wazuh, security teams gain visibility into configuration changes, unauthorized API usage, and suspicious administrative activity across Google Cloud environments.

Best Practices for Centralized Cloud Auditing

Collecting cloud audit logs is only the first step.

To maximize their value, organizations should implement a consistent logging strategy across all cloud environments.

Recommended best practices include:

  • Enable auditing in every cloud account and subscription.
  • Collect logs from all supported regions.
  • Synchronize timestamps across cloud and on-premises systems.
  • Retain logs according to compliance requirements.
  • Correlate cloud audit logs with endpoint and identity events.
  • Protect audit logs from unauthorized modification or deletion.
  • Regularly review detection rules for new cloud attack techniques.

The Cybersecurity and Infrastructure Security Agency (CISA) recommends maintaining centralized logging and continuous monitoring across cloud environments to improve detection and incident response capabilities.


Creating Custom Detection Rules for Audit Logs

Although Wazuh includes thousands of built-in detection rules, organizations often need custom rules to monitor proprietary applications, internal security policies, or environment-specific risks.

Creating custom audit log rules enables you to detect behaviors that default rules may not cover while tailoring alerts to your operational priorities.

Writing Custom Wazuh Rules

Custom rules are typically stored in the local rules file (for example, local_rules.xml) so they remain separate from the default ruleset and are preserved during upgrades.

A simple custom rule might look like:

<group name="audit_custom,">
  <rule id="100500" level="8">
    <if_group>auditd</if_group>
    <match>sudo</match>
    <description>Privileged command executed</description>
  </rule>
</group>

This example generates an alert whenever an audit event containing the string sudo matches the specified rule group.

When creating custom rules, use descriptive rule names and comments to simplify long-term maintenance.

Related Guide: How to Create Custom Detection Rules in Wazuh (With Examples)

Matching Specific Audit Events

Effective rules should target behaviors rather than isolated log messages.

Examples include:

  • Multiple failed login attempts
  • Privileged command execution
  • New administrator account creation
  • Changes to sensitive configuration files
  • Disabled security services
  • Unexpected scheduled task creation
  • Execution of tools from temporary directories
  • Unauthorized cloud administrative actions

By matching specific audit fields such as usernames, event IDs, process names, file paths, or command-line arguments, you can build highly targeted detections with fewer false positives.

Severity Levels

Every Wazuh rule includes a severity level that indicates the importance of the detected event.

Although organizations can customize severity assignments, a common approach is:

SeverityTypical Use
0–3Informational events
4–7Low-risk suspicious activity
8–10Medium-risk security events
11–13High-risk attacks requiring investigation
14–15Critical incidents requiring immediate response

Consistent severity assignments help analysts prioritize investigations and automate response workflows.

Rule IDs and Organization

As your custom ruleset grows, maintaining a logical structure becomes increasingly important.

Recommended practices include:

  • Reserve a dedicated range of custom rule IDs.
  • Group related rules by technology or use case.
  • Use meaningful group names.
  • Document rule purpose and expected behavior.
  • Track rule ownership and revision history.

A well-organized ruleset reduces maintenance effort and minimizes conflicts during upgrades.

Related Guide: The Complete Custom Wazuh Rules and Decoders Guide

Testing Custom Rules

Every new rule should be tested before deployment into production.

The recommended testing workflow is:

  1. Generate representative audit events.
  2. Run the events through wazuh-logtest.
  3. Verify the correct decoder is used.
  4. Confirm the expected rule triggers.
  5. Review alert fields and severity.
  6. Deploy the rule to production only after successful validation.

Routine testing helps prevent missed detections and ensures rule changes do not unintentionally affect existing alerts.

Related Guides:

Reducing False Positives

Custom rules should strike a balance between sensitivity and accuracy.

Excessive false positives can overwhelm analysts and obscure genuine threats.

Several techniques can help improve rule quality:

  • Match on multiple event attributes instead of a single keyword.
  • Exclude known administrative accounts or trusted service accounts where appropriate.
  • Use frequency and timeframe conditions to identify repeated suspicious behavior rather than isolated events.
  • Fine-tune rules as infrastructure and business processes evolve.
  • Regularly review triggered alerts to identify noisy detections and refine matching logic.

Experienced SOC teams treat detection engineering as an ongoing process, continuously tuning rules based on operational feedback and emerging attack techniques.

Related Guide: How to Reduce False Positives in Wazuh


Be First to Comment

    Leave a Reply

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