Hello everyone,
I’m currently working on customizing some Wazuh rules and would appreciate your guidance.
My goal is to reduce false positives for certain alerts that I know are safe. These alerts usually reference binaries, executables, or PowerShell script paths that I personally create and fully trust.
I want to keep the original rules intact, but create child rules with regex filters that match only these known-safe files. When these child rules trigger, I want the alert level to be lowered (for example, reduced to level 7), and ideally prevent the parent rule from triggering at its original severity (e.g., level 15).
I attempted this approach, but I ran into an issue: Wazuh always triggers the most specific child rule. Since the SOC Fortress ruleset contains very specific child rules, my custom rules are not being prioritized the way I need. I want to find a solution that:
Doesn’t require deleting or modifying existing rules
Allows my custom child rules to remain valid
Ensures that when my “safe file” rule matches, it correctly overrides or mutes the parent rule’s higher-severity alert
If anyone has experience with rule ordering, rule IDs, or techniques to ensure custom child rules take priority without modifying upstream rules, I would really appreciate your advice.
Thank you in advance for your help.
Best regards,
Let’s assume we create the following rule:
Rule 100110 will trigger a level 7 alert only if one of the rules 1234, 12345, or 5555 matched previously, and matches the regular expression ^C:\\MyTrustedTool\\.*.
If the regular expression does not match, then the original rules (1234, 12345, 5555) will continue to trigger normally with their original severity levels.
https://wazuh.com/blog/creating-decoders-and-rules-from-scratch/
https://documentation.wazuh.com/current/user-manual/ruleset/custom.html
https://documentation.wazuh.com/current/user-manual/ruleset/ruleset-xml-syntax/index.htm
Hello,
Here is the parent rule I’m working with:
And here is the custom child rule I created to lower the severity for a known safe file:
This child rule does work, but only if I remove one of the existing child rules under the same parent rule.
The issue is that one of the built-in child rules is more specific than mine, so Wazuh always selects that rule instead of my custom one.
My goal is to keep all existing rules (including the SOC Fortress children) untouched, while having my custom child rule take priority when the filename matches my known safe pattern.
Do you have recommendations on how to correctly prioritize custom child rules without removing or modifying the default ones?
Thank you!