I want to make a filtering rule on the rule 60204 (Multiple Logon Failure Windows) for when it is a list of User and PC to lower the level.
I have a FileServer "FS-001" where the users log in, so for example:
If it is Juan in the Workstation 001 lower the level because it is correct
If it is Marta in the Workstation 002 lower the level because it is correct
But if it is Marta in the Workstation 001 keep the level.
I have the list of users with their allowed workstations.
Also, here is some reference that could be useful:
If you need some help with this, I will need some examples of logs that you have received, including the login information for the different users.
Can you please give me an example rule?
I have tried with CDB List but it didn't work as expected
Each user has only one authorised workstation, if it happens from that user on that workstation it is not an alert but if the user or the workstation is different it is.
Hi, the ruler is not working as expected.
It is still capturing the event of the rule 60204 even if the conditions of the new created rule are fulfilled.
I attach images about the case
Thank you very much, that's what I was expecting ❤️
Sorry for the delay. I want to reproduce your test, but to do so, I need you to share the event exactly as the manager received it.
Could you enable the archive.log (see documentation) by setting <logall> to yes in the ossec.conf file?
Afterward, please find the raw event in /var/ossec/logs/archives/archives.log and share it with me. I need that specific event so I can test it locally.
Hi! You won't be able to test it locally as they are events coming from EventChannel and Wazuh (as far as I understand) doesn't allow testing of these events
Please help me with the rule.
<rule id="60000" level="2">
<!-- category>ossec</category -->
<!-- decoded_as>windows_eventchannel</decoded_as -->
<decoded_as>json</decoded_as>
<field name="win.system.providerName">\.+</field>
<options>no_full_log</options>
<description>Group of windows rules.</description>
</rule>
archive.log. To do this, you need to enable the archiving feature (refer to the Wazuh documentation) by setting <logall> to "yes" in the ossec.conf file. Then, look for the entry in /var/ossec/logs/archives/archives.log to retrieve the raw event before the decoder processes it.Luis Enrique Chico Capistrano
Developer
--
You received this message because you are subscribed to a topic in the Google Groups "Wazuh | Mailing List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wazuh/ychgtU8VPWA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wazuh+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/wazuh/85dd6277-3042-4613-bc33-88ebfd9a5a8en%40googlegroups.com.
It is impossible to do the step you are asking me to do, by changing the rule 60000 Wazuh does not register any Windows event. I can't lose this data in a productive and critical environment.
Other colleagues of yours have previously informed me that the Windows decoders come aged in C inside Wazuh so it is not possible to test with them. Is this true?
You're right; that change is only for testing and should not be used in production. I suggested it only to demonstrate that wazuh-logtest can process Windows events if formatted as JSON.
Could you send some sample events from the archives.log so I can help you? If you need to rewrite any sensitive data, please do so. However, I require the full log structure to test with wazuh-logtest.
This is a screenshot of an event from archives.log:
I tried to make a rule with that user and workstation specifically to lower the level of the rule but it didn't work.
Here are the rules I have created for 60204.
The custom rule 101200 works perfectly, but 101203 does not work and that is the one I need help with. The ideal would be to make 101203 work with a CDB List, as I mentioned at the beginning of the ticket, but as it was not working I commented the lines
<rule id="60204" level="12" frequency="10" timeframe="60" overwrite="yes">
<if_matched_group>authentication_failed</if_matched_group>
<same_field>win.eventdata.ipAddress</same_field>
<description>Multiple Windows Logon Failures - Usuario: $(win.eventdata.targetUserName) - IP: $(win.eventdata.ipAddress)</description>
<options>no_full_log</options>
<group>authentication_failures,pci_dss_10.2.4,pci_dss_10.2.5,pci_dss_11.4,gdpr_IV_35.7.d,gdpr_IV_32.2,hipaa_164.312.b,nist_800_53_AU.14,nist_800_53_AC.7,nist_800_53_SI.4,tsc_CC6.1,tsc_CC6.8,tsc_CC7.2,tsc_CC7.3,</group>
<mitre>
<id>T1110</id>
</mitre>
</rule>
<rule id="101200" level="10">
<if_sid>60204</if_sid>
<field name="win.eventdata.targetUserName">^SRVXSQL1</field>
<field name="win.eventdata.ipAddress">172.16.1.116</field>
<description>Multiple Windows Logon Failures (baja prioridad) - Usuario: $(win.eventdata.targetUserName) - IP: $(win.eventdata.ipAddress)</description>
<group>authentication_failures,pci_dss_10.2.4,pci_dss_10.2.5,pci_dss_11.4,gdpr_IV_35.7.d,gdpr_IV_32.2,hipaa_164.312.b,nist_800_53_AU.14,nist_800_53_AC.7,nist_800_53_SI.4,tsc_CC6.1,tsc_CC6.8,tsc_CC7.2,tsc_CC7.3,</group>
<mitre>
<id>T1110</id>
</mitre>
</rule>
<rule id="101203" level="10">
<if_sid>60204</if_sid>
<field name="win.system.computer">^srvxx.empresayy.com.ar$</field>
<!--<list field="win.eventdata.targetUserName" lookup="match_key_value" check_value="win.eventdata.workstationName">etc/lists/multiple-logon-failure</list>-->
<field name="win.eventdata.targetUserName">^jpepe$</field>
<field name="win.eventdata.ipAddress">^PC002$</field>
<description>Multiple Windows Logon Failures user jpepe on authorized workstation PC002</description>
<!--<description>Multiple Windows Logon Failures on srvxx - User on authorized workstation (level lowered)</description>-->
<group>authentication_failures,pci_dss_10.2.4,pci_dss_10.2.5,pci_dss_11.4,gdpr_IV_35.7.d,gdpr_IV_32.2,hipaa_164.312.b,nist_800_53_AU.14,nist_800_53_AC.7,nist_800_53_SI.4,tsc_CC6.1,tsc_CC6.8,tsc_CC7.2,tsc_CC7.3,</group>
<mitre>
<id>T1110</id>
</mitre>
</rule>
Thank you for your response.
Similarly it does not work for me to make a single rule for each case, if you check the rule 101203 I sent you is a possible combination and does not work as it continues to enter the rule 60204
If the rule 101200 works correctly but is another use case.
In the previous message you clarify "Note that you should not have two rules (101200, 101203) that depend on 60204, when I tested I did not have rule 101200"
How do I make multiple rules that depend on 60204? Or is this not possible? Because rule 60204 is generating a lot of false positives in my environment and I need to make specific rules for each case so I can lower the level of false positives.
Hi Facu,
The previous warning about not having both rules (101200 and 101203) was likely because having multiple rules during troubleshooting can make it harder to identify which one is causing a conflict. Once you have confirmed the logic for one, you can safely add as many as you need to cover all your false positive scenarios.
However, it looks like the fields you are matching in rule 101200 are different from those in 101203. Make sure that if a log is supposed to trigger 101200, your custom child rule follows that specific logic. I hope that clears things up rather than causing more confusion!
The 101200 rule works perfectly but the 101203 rule does not work, it keeps entering the default rule 60204 and I need it to enter the 101203 rule as it generates false positives
Can you test in your environment with both rules?
<rule id="60000" level="2">
<!-- category>ossec</category -->
<!-- decoded_as>windows_eventchannel</decoded_as -->
<decoded_as>json</decoded_as>
<field name="win.system.providerName">\.+</field>
<options>no_full_log</options>
<description>Group of windows rules.</description>
</rule>