Hello.
It seems the behavior you are observing occurs because the logs you are testing from the archives.log file in the wazuh-logtest tool are being processed in JSON format, as that is how they are stored in the file. However, the agent sends the logs decoded as an eventchannel.
As a result, the rule you added and tested might not generate an alert when decoded differently.
To address this, I recommend temporarily modifying the Windows base rules in the Wazuh Manager. These rules can be found in the /var/ossec/ruleset/rules directory, specifically in the file 0575-win-base_rules.xml.
Within this file, you can make the following changes to rule 60000:
Comment out the <category> tags.
Modify the <decoded_as> tag from windows_eventchannel to json, so the line appears as follows: <decoded_as>json</decoded_as>.
After making this adjustment, you can retest the logs from the archives.log file in the Wazuh Logtest tool. This will help you identify exactly which rule is being triggered. Based on this information, you can create a custom rule to analyze the log effectively.
Once you confirm that the rule generates the corresponding alert in the tool, you can revert the 0575-win-base_rules.xml file to its original state. Finally, test whether the logs sent by the agent generate the expected alert.
Remember to restart the Wazuh Manager only after completing all tests and restoring the XML file to its initial configuration.
Please let me know if you need any additional information or further assistance. I'm here to help!
Best regards.
On Monday, December 30, 2024 at 12:00:57 PM UTC-5 Miran Ul Haq wrote: