Hi my aim is Ignore multiple notepad.exe terminations during system shutdown (when RuntimeBroker starts it), but alert on isolated / unexpected ones.I tried many rules but it didn't work please help me
Based on the rules you shared, it seems you are trying to ignore alerts from rule ID 100033 when rule ID 100030 is triggered. This means a Notepad process is terminated and should be considered part of a system shutdown by checking rule ID 100032.
However, there are some syntax and logic issues in your last two rules.
Issues with rule ID 100032You have configured frequency and timeframe, but you are using the <if_sid> tag, which is not correct for this use case.
If your goal is to trigger this rule when rule ID 61607 is triggered 10 times within 6 seconds, you must use the <if_matched_sid> tag instead.
Also, the parent rule (61607) has a level of 0. For correlation rules to work correctly, the parent rule level should be 1 or greater, otherwise the rule will not trigger unless you modify the default rule.
Additionally, it seems you are trying to use rule ID 100032 to ignore the Notepad process closing alert during system shutdown, but there is no field in your rule that checks whether the system is actually shutting down.
If the log contains a field that indicates the system is shutting down, then that field can be used in the rule condition. Otherwise, this rule will not work as expected.
In rule ID 100033, you added ! inside the <if_matched_sid> tag. This will cause a syntax error.
The <if_matched_sid> tag only accepts rule IDs. Other symbols are not allowed.
You can refer to the Wazuh documentation for more details about the correct syntax for creating custom rules.
To assist you better, could you please share some sample logs that you are using to test these rules? This will allow us to reproduce and validate the behavior on our end.
To collect sample logs, you need to enable archive logs.
Hi,
It looks like these are two different events. Based on your use case, this correlation is not possible with the current Wazuh rule engine because it does not support correlating two separate events. In your case, one event is Event ID 5 and the other is Event ID 1074, so they are handled independently.
That said, in the upcoming Wazuh 5.0 release, the current rule engine is expected to be replaced with a newer and improved version, which should provide better correlation capabilities. Scenarios like this are more likely to be supported in future versions. For now, this type of correlation cannot be implemented with the existing engine.
In the meantime, you can refer to the Wazuh rule syntax documentation to understand what is possible with custom rules using the current rule engine.