Hello Joshua Strickland,
Custom rules are a good start, but you need to ensure they are properly structured to filter VirusTotal checks.
You can try writing the custom rules like this:
<group name="test,">
<rule id="100001" level="7">
<if_sid>550</if_sid>
<field name="file">c:\\users\\\.+\\downloads\\\.+</field>
<description>File modified at Downloads directory.</description>
</rule>
<rule id="100002" level="7">
<if_sid>554</if_sid>
<field name="file">c:\\users\\\.+\\downloads\\\.+</field>
<description>File added to Downloads directory.</description>
</rule>
</group>
Then you need to edit the
<integration> block of the Wazuh server's
ossec.conf file like this:
<ossec_config>
<integration>
<name>virustotal</name>
<api_key>KEY</api_key> <!-- Replace with your VirusTotal API key -->
<rule_id>100100,100101</rule_id>
<alert_format>json</alert_format>
</integration>
</ossec_config>
Restart the Wazuh manager:
systemctl restart wazuh-manager
Mentioning the updated custom rules in the VirusTotal configuration will allow it to check the paths defined in the custom rules instead of all syscheck paths, while keeping syscheck active across the entire system.
To test it, you can try out the attack simulation from the documentation and check if it is working:
https://documentation.wazuh.com/current/proof-of-concept-guide/detect-remove-malware-virustotal.html#id2Hope this information was helpful!