Windows logs in Wazuh: fixing two default rules
Contents
After earning Security+, I wanted to see what Windows Security and Sysmon events actually look like inside a SIEM instead of only reading Event IDs in study notes. I connected my local Active Directory lab (DC01, WS01, and WS02) to a single Wazuh Manager VM (v4.14.9) over the isolated 10.10.10.0/24 network, installed Sysmon with the SwiftOnSecurity config (adding a <TargetImage condition="image">lsass.exe</TargetImage> rule under ProcessAccess, since the default file drops Event ID 10), forwarded the Microsoft-Windows-Sysmon/Operational channel via the agent config with logall_json enabled on the manager, and ran simple PowerShell tests to see what alerted.
Two default Wazuh rules immediately stood out: one flooded the alert view with benign Windows Defender noise, and the other stayed completely quiet during a basic encoded PowerShell test.
Silencing Defender false positives on rule 92900
Once Sysmon Event ID 10 (ProcessAccess) started logging access to lsass.exe, built-in Wazuh rule 92900 began firing Level 12 alerts during routine background scans. Checking the raw event fields showed MsMpEng.exe (Windows Defender) opening lsass.exe with the access mask 0x101000 (SYNCHRONIZE | PROCESS_QUERY_LIMITED_INFORMATION), which does not read process memory.
The issue was in the default regex: rule 92900 checks for 0x1010 without anchoring the end of the value, so 0x101000 matched as a substring. Rather than disabling rule 92900 globally, I added a narrow Level 0 suppression rule inside a <group name="local,sysmon,"> block in /var/ossec/etc/rules/local_rules.xml matching only the exact benign mask (unlike 0x1010, 0x101000 never grants PROCESS_VM_READ):
<rule id="100100" level="0">
<if_sid>92900</if_sid>
<field name="win.eventdata.grantedAccess" type="pcre2">(?i)^0x101000$</field>
<description>Suppression: Benign SYNCHRONIZE|QUERY_LIMITED_INFORMATION (0x101000) access to lsass.exe</description>
</rule>
Catching encoded PowerShell with -enc
Next, I ran a harmless Base64-encoded command (Write-Host 'wazuh-test') on WS02 using -enc:
powershell.exe -NoProfile -enc VwByAGkAdABlAC0ASABvAHMAdAAgACcAdwBhAHoAdQBoAC0AdABlAHMAdAAnAA==
The Sysmon Event ID 1 (ProcessCreate) record arrived on the manager, but built-in rule 92057 did not trigger. Reading the default rule showed two gaps: its flag list omitted -enc, and it only matched when the parent process was also powershell.exe. Adding a local rule (100110) directly under sysmon_event1 covered -enc, common shorthand variations, and typical download-cradle keywords (FromBase64String, DownloadString, IEX) regardless of the parent process:
<rule id="100110" level="12">
<if_group>sysmon_event1</if_group>
<field name="win.eventdata.image" type="pcre2">(?i)\\\\(powershell|pwsh)\.exe$</field>
<field name="win.eventdata.commandLine" type="pcre2">(?i)(\s[-/](e|en|enc|enco|encod|encode|encoded|encodedc|encodedco|encodedcom|encodedcomm|encodedcomma|encodedcomman|encodedcommand|ec|ea)\s+[A-Za-z0-9+/=]{12,}|FromBase64String|DownloadString|DownloadData|\bIEX\b|Invoke-Expression)</field>
<options>no_full_log</options>
<description>Suspicious PowerShell execution with encoded payload or download cradle by $(win.eventdata.parentImage)</description>
<mitre>
<id>T1059.001</id>
<id>T1027</id>
</mitre>
</rule>

Verification
After restarting wazuh-manager, I confirmed both changes against live logs from DC01 and WS02. Nine benign MsMpEng.exe (0x101000) events arrived in /var/ossec/logs/archives/archives.json while alerts.json recorded zero 92900 false positives. Running the same -enc test on WS02 immediately fired rule 100110 at Level 12 (trimmed key fields from alerts.json):
{
"agent": "WS02",
"rule": "100110",
"level": 12,
"desc": "Suspicious PowerShell execution with encoded payload or download cradle by C:\\Windows\\System32\\OpenSSH\\sshd.exe",
"cmd": "\"c:\\windows\\system32\\windowspowershell\\v1.0\\powershell.exe\" -c \"powershell.exe -NoProfile -enc VwByAGkAdABlAC0ASABvAHMAdAAgACcAdwBhAHoAdQBoAC0AdABlAHMAdAAnAA==\""
}
Checking raw logs next to the default ruleset taught me more about SOC triage than any dashboard chart: an alert queue only becomes useful once you verify what the rules actually match and clear out predictable noise.