Hello, team!
Im trying to configure active response. I have 1 master server and 2 worker servers. I have script in powershell that sends syslog from Windows endpoint to wazuh worker server while triggered. I found out that file with .ps1 extension dont work and in C:\Program Files (x86)\ossec-agent\active-response\bin\ directory must be only .cmd or .exe type files. I have created my script in .exe extension and put it to directory C:\Program Files (x86)\ossec-agent\active-response\bin\.
Server side:
So I have configured active response section in ossec.conf on my wazuh master server as is below:
<command>
<name>command</name>
<executable>SID.exe</executable>
</command>
<active-response>
<disabled>no</disabled>
<command>command</command>
<location>all</location>
<rules_id>60122</rules_id>
<timeout>60</timeout>
</active-response>
60122 rule is authentication failure event that must trigger my active response script.
Workstation side:
I put my script with .exe extension and put it to directory C:\Program Files (x86)\ossec-agent\active-response\bin\.
I have configured C:\Program Files (x86)\ossec-agent\ossec.conf as is below:
<!-- Active response -->
<active-response>
<disabled>no</disabled>
<command>
<name>command</name>
<executable>SID.exe</executable>
<location>all</location>
<timeout_allowed>60</timeout_allowed>
</command>
<ca_store>wpk_root.pem</ca_store>
<ca_verification>yes</ca_verification>
</active-response>
Nothing works. Rule 60122 doesnt trigger my active respinse script.
- I have restarted all services (agent, wazuh-manager).
- Checked files permissions. As I understood, active response scripts runs by system user. So system user have full permissions.
- Reviewed logs C:\Program Files (x86)\ossec-agent\active-response\active-response.log. There is nothing about my active response.
- Checked 60122 rule activation on my Windows Workstation.
- Checked logs /var/ossec/logs/ossec.log on my wazuh master server. There is nothing about active response. No any of errors.
I can see that in my Wazuh dashboard - Settings - Configuration - System threats and incident response - Active Response there is folder of my command and in field "Status of this active response" is value "disabled". I cant understand why this value is disabled event tho I have marked field <disabled>no</disabled> in my active-response section.
You can see screenshot in attachments.
Thank you in advance. I will be glad to hear feedback from you.