Hi All...
I'm trying to configure Wazuh to monitor and apply an active response to brute force attacks.
I put this rules in the local_rules.xml file:
<group name="windows,authentication_failed,">
<rule id="100100" level="6">
<if_sid>18180</if_sid>
<description>18180 - MSSQL: Intento de login detectado - IP: $(srcip)</description>
</rule>
<rule id="100101" level="13" frequency="3" timeframe="120">
<if_matched_sid>100100</if_matched_sid>
<description>18180 - MSSQL: ATAQUE DE FUERZA BRUTA (3 fallos) - IP: $(srcip)</description>
</rule>
</group>
And work fine!!!
I can see in the alert in the dashboard.

But the active response don´t work.
In the ossec.conf (manager) file i have this configuration:
<active-response>
<disabled>no</disabled>
<command>netsh</command>
<location>local</location>
<rules_id>100101</rules_id>
<timeout>300</timeout>
</active-response>
In the ossec.conf (windows agent):
<!-- Log analysis - Windows Defender -->
<localfile>
<location>Microsoft-Windows-Windows Defender/Operational</location>
<log_format>eventchannel</log_format>
</localfile>
<!-- Log analysis - Windows Defender Firewall -->
<localfile>
<location>Microsoft-Windows-Windows Firewall With Advanced Security/Firewall</location>
<log_format>eventchannel</log_format>
</localfile>
<!-- Log analysis - Terminal Service RDP -->
<localfile>
<location>Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational</location>
<log_format>eventchannel</log_format>
</localfile>
<localfile>
<location>Application</location>
<log_format>eventlog</log_format>
<!--<log_format>eventchannel</log_format>-->
</localfile>
With that configuration I should see
rule.id 657 where the netsh.exe command is triggered and then the rule where the IP is added to the firewall.
In this case... i don´t understand way in the /var/ossec/etc/shared/ar.conf file i have this config:
restart-ossec0 - restart-ossec.sh - 0
restart-ossec0 - restart-ossec.cmd - 0
restart-wazuh0 - restart-ossec.sh - 0
restart-wazuh0 - restart-ossec.cmd - 0
restart-wazuh0 - restart-wazuh - 0
restart-wazuh0 - restart-wazuh.exe - 0
netsh300 - netsh.exe - 300
# sudo /var/ossec/bin/agent_control -L
Wazuh agent_control. Available active responses:
Response name: netsh300, command: netsh.exe
Why wazuh use the 300 tag in the RA name??? This is normal?
Any idea what could be happening?
Thanks to everyone...