I created an Active Response script that kills the Notepad process whenever FIM detects a file change.
To avoid triggering on every normal file change, I also created a custom rule so you can limit it to a specific path if needed.
First, download the test.exe file from this link ,and move it to the agent at:
C:\Program Files (x86)\ossec-agent\active-response\bin
Then follow these steps.
Option 1: Kill Notepad for any file change detected by rule 550On the manager, edit:
Add:
This will trigger the script for file change alerts matched by rule 550.
Option 2: Kill Notepad only for changes in a specific pathIf you only want this to happen for a specific folder, for example C:\test, create a custom rule like this:
This rule will match file changes under C:\test.
Then update the Active Response in ossec.conf to use your custom rule ID:
After updating the manager configuration, restart the Wazuh manager:
systemctl restart wazuh-manager
Please let me know how it goes or if you want help adjusting the rule for a different file path.