Hi, for testing windows events using wazuh-log test you must:
0 - make a backup of rules file 0575-win-base_rules.xml.
1.- edit 0575-win-base_rules.xml and change rule 60000
From
<rule id="60000" level="0">
<category>ossec</category>
<decoded_as>windows_eventchannel</decoded_as>
<field name="win.system.providerName">\.+</field>
<options>no_full_log</options>
<description>Group of windows rules.</description>
</rule>
To
<rule id="60000" level="0">
<decoded_as>json</decoded_as>
<field name="win.system.providerName">\.+</field>
<options>no_full_log</options>
<description>Group of windows rules.</description>
</rule>
2.- restart your wazuh-manager
3.- run wazuh-logtest and paste your json windows event in a single line like this
{"win":{"system":{"providerName":"Microsoft-Windows-Security-Auditing", "providerGuid":"{54849625-5478-4994-a5ba-3e3b0328c30d}", "eventID":"4688", "version":"2", "level":"0", "task":"13312", "opcode":"0", "keywords":"0x8020000000000000", "systemTime":"2022-02-05T09:14:01.392646200Z", "eventRecordID":"11005", "processID":"4", "threadID":"3252", "channel":"Security", "computer":"Test", "severityValue":"AUDIT_SUCCESS", "message":"\"A new process has been created.\r\n\r\nCreator Subject:\r\n\tSecurity ID:\t\tS-1-5-21-175740394-4162424364-2627364229-1000\r\n\tAccount Name:\t\twin10\r\n\tAccount Domain:\t\tTest\r\n\tLogon ID:\t\t0x108FA2\r\n\r\nTarget Subject:\r\n\tSecurity ID:\t\tS-1-0-0\r\n\tAccount Name:\t\t-\r\n\tAccount Domain:\t\t-\r\n\tLogon ID:\t\t0x0\r\n\r\nProcess Information:\r\n\tNew Process ID:\t\t0x1c2c\r\n\tNew Process Name:\tC:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\r\n\tToken Elevation Type:\t%%1938\r\n\tMandatory Label:\t\tS-1-16-8192\r\n\tCreator Process ID:\t0x1670\r\n\tCreator Process Name:\tC:\\Windows\\explorer.exe\r\n\tProcess Command Line:\t\r\n\r\nToken Elevation Type indicates the type of token that was assigned to the new process in accordance with User Account Control policy.\r\n\r\nType 1 is a full token with no privileges removed or groups disabled. A full token is only used if User Account Control is disabled or if the user is the built-in Administrator account or a service account.\r\n\r\nType 2 is an elevated token with no privileges removed or groups disabled. An elevated token is used when User Account Control is enabled and the user chooses to start the program using Run as administrator. An elevated token is also used when an application is configured to always require administrative privilege or to always require maximum privilege, and the user is a member of the Administrators group.\r\n\r\nType 3 is a limited token with administrative privileges removed and administrative groups disabled. The limited token is used when User Account Control is enabled, the application does not require administrative privilege, and the user does not choose to start the program using Run as administrator.\""}, "eventdata":{"subjectUserSid":"S-1-5-21-175740394-4162424364-2627364229-1000", "subjectUserName":"win10", "subjectDomainName":"Test", "subjectLogonId":"0x108fa2", "newProcessId":"0x1c2c", "newProcessName":"C:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe", "tokenElevationType":"%%1938", "processId":"0x1670", "targetUserSid":"S-1-0-0", "targetLogonId":"0x0", "parentProcessName":"C:\\\\Windows\\\\explorer.exe","mandatoryLabel":"S-1-16-8192"} } }
Now you can see your rule output.
Ping me if there is something not working
Thanks