Hi Felix,
Yes, it is possible to create alerts for successful brute force attacks, you can achieve this by creating custom rules.
For example, to create a rule on successful login after three unsuccessful attempts, you can follow these steps:
- Identify the log entries that correspond to unsuccessful attempts, this will depend on the operating system.
- Create a custom decoders to extract the relevant information of your choice.
- Write custom rules to trigger the alert.
Here's a general example on the on the config for the decoder and rule:
<!-- Custom decoder for failed login attempts -->
<decoder name="failed_login_decoder">
<regex>Failed login from (.*)</regex>
<!-- Additional parsing logic as needed -->
</decoder>
<!-- Custom decoder for successful logins -->
<decoder name="success_login_decoder">
<regex>Successful login from (.*)</regex>
<!-- Additional parsing logic as needed -->
</decoder>
<!-- Custom rule for detecting successful login after three or more failed attempts -->
<group name="custom_rules">
<rule id="100001" level="5">
<decoded_as>failed_login_decoder</decoded_as>
<description>Successful login after three or more failed attempts</description>
<group>brute_force</group>
<threshold>3</threshold>
<field>srcip</field>
</rule>
</group>
You will need to customize the decoders and rules to match the actual log format and conditions in your environment.
Remember to always restart the Wazuh server after changing the rules.
Hope this helps.