Hi
Farshin,
Instead of the current rules you’ve created, I suggest adding this rule to meet your requirements. You can place it in the
/var/ossec/etc/rules/local_rules.xml file:
<group name="windows,windows_security,">
<rule id="60204" level="12" frequency="5" timeframe="60" overwrite="yes">
<if_matched_group>authentication_failed</if_matched_group>
<same_field>win.eventdata.ipAddress</same_field>
<options>no_full_log</options>
<description>Bruteforce Attack Detected</description>
<mitre>
<id>T1110</id>
</mitre>
<group>authentication_failures,gdpr_IV_32.2,gdpr_IV_35.7.d,hipaa_164.312.b,nist_800_53_AC.7,nist_800_53_AU.14,nist_800_53_SI.4,pci_dss_10.2.4,pci_dss_10.2.5,pci_dss_11.4,tsc_CC6.1,tsc_CC6.8,tsc_CC7.2,tsc_CC7.3,</group>
</rule>
</group>This rule will trigger an alert when Windows logon failures are detected. If 5 failed logon attempts from the same IP address are logged within 60 seconds and match the authentication_failed group, this rule will generate an alert for a potential brute-force attack.
Ref:
https://documentation.wazuh.com/current/proof-of-concept-guide/detect-brute-force-attack.htmlhttps://documentation.wazuh.com/current/user-manual/ruleset/rules/custom.html#custom-rulesIf you need further assistance, Please share the sample logs to check further your issue.
You can find from the alerts.json file.
cat /var/ossec/logs/alerts/alerts.json | grep -i -E "<part_of_the_log>"Let me know if this helps!
Regards,
Hasitha Upekshitha