Good morning,
we are using clamAV on our Linux Systems and we are trying to get virus alerts using your wazuh 2.1 infrastructure.
At first, we have tried to apply a common configuration to our Linux systems using /var/ossec/etc/shared/agent.conf on Wazuh Manager:
<agent_config os="Linux">
<localfile>
<location>/var/log/clamav/clamav.log</location>
<log_format>syslog</log_format>
</localfile>
</agent_config>
Second step, make sure we are using this new configuration at least one Linux System:
[root@465254f6f06f /]# md5sum /var/ossec/etc/shared/agent.conf
b935f4a97f3f01997b240c8bf0847d52 /var/ossec/etc/shared/agent.conf
[root@465254f6f06f /]# /var/ossec/bin/agent_control -i 283 | grep version
Client version: Wazuh v2.1.0 / 172abe98c0f15723c3eed3b83f32788f
Force a restart on wauzh manager and wazuh agent 283, later:
[root@465254f6f06f /]# /var/ossec/bin/agent_control -R -u 283
Wazuh agent_control: Restarting agent: 283
but nothing changes:
[root@465254f6f06f /]# /var/ossec/bin/agent_control -i 283 | grep version
Client version: Wazuh v2.1.0 / 172abe98c0f15723c3eed3b83f32788f
Third step, we change ossec.conf directly on the wazuh agent 283 with new setting (some output truncated):
root@xtg-gc-proxypci-02:~# cat /var/ossec/etc/ossec.conf
<!--
Wazuh - Agent - Default configuration for ubuntu 16.04
-->
...
<localfile>
<log_format>syslog</log_format>
<location>/var/log/clamav/clamav.log</location>
</localfile>
We restart the wazuh agent and cause a false virus with the eicar file. We can see as clamAV detect and write a log on /var/log/clamav/clamav.log but we are not able to see any log on the wazuh manager (/var/ossec/logs/alerts/alerts.log)
root@xtg-gc-proxypci-02:~# cat /var/log/clamav/clamav.log
-------------------------------------------------------------------------------
./eicar_false_virus.txt: Eicar-Test-Signature FOUND
We would appreciate any thoughts or tips to helps us to gather this logs on our wazuh manager.
Thanks and best regards.