<agent_config os="Windows">Hello, Stephen,
I’m glad to help here,
The quick answer would be that all 554 alerts have appeared because the first FIM scan has finished and the new directories have been added to monitor through agent.conf.
We can go directly to the database to find out if that is what has happened.
In /var/ossec/queue/db/<agent_id>.db you can find the FIM database of that agent.
To open the database:
sqlite3 /var/ossec/queue/db/
<agent_id>.db
In the table `scan_info` we have the dates of execution of the first and last scan. The third column of this table indicates the completion date of the first scan.
schema scan_info
TABLE scan_info ( module TEXT PRIMARY KEY, first_start INTEGER, first_end INTEGER, start_scan INTEGER, end_scan INTEGER, fim_first_check INTEGER, fim_second_check INTEGER, fim_third_check INTEGER);
select first_end from scan_info where module=’fim’;
Having this reference we can execute the following query:
select file date from fim_entry where date>’
<first_end>`
If the result of the query coincides with the alerts received, we have the answer.
Hope it help. Regards.
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/6f01b532-495c-4a49-a7ef-f6db7c7796c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
sqlite> select first_end from scan_info where module='fim';
0To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/6f01b532-495c-4a49-a7ef-f6db7c7796c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/f410de76-fd2f-4b5f-ba14-ebefe02907cf%40googlegroups.com.
{"timestamp":"2018-11-07T16:45:55.255-0500","rule":{"level":5,"description":"File added to the system.","id":"554","firedtimes":95601,"mail":false,"groups":["ossec","syscheck"],"pci_dss":["11.5"],"gpg13":["4.11"],"gdpr":["II_5.1.f"]},"agent":{"id":"002","name":"SANITIZED","ip":"SANITIZED"},"manager":{"name":"SANITIZED"},"id":"1541627155.226259532","full_log":"New file 'C:\\Windows\\WinSxS\\x86_windows-media-speechsynthesis-winrt_31bf3856ad364e35_6.3.9600.17415_none_148a01188942cbc3\\xml.xsd' added to the file system.\n","syscheck":{"path":"C:\\Windows\\WinSxS\\x86_windows-media-speechsynthesis-winrt_31bf3856ad364e35_6.3.9600.17415_none_148a01188942cbc3\\xml.xsd","size_after":"10205","perm_after":"100666","uid_after":"S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464","md5_after":"79f05e58d3ac430625bacf952f55b857","sha1_after":"e2399d6447ad9084ee5db3c35afe4b9a67781d7d","sha256_after":"c58ef0320d55ed3dba9d6665ae984326a82beb46cb56472ad4c22d6dc15e07ea","uname_after":"TrustedInstaller","mtime_after":"2013-06-18T07:36:03","event":"added"},"decoder":{"name":"syscheck_integrity_changed"},"location":"syscheck"}
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+unsubscribe@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/6f01b532-495c-4a49-a7ef-f6db7c7796c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+unsubscribe@googlegroups.com.
Hello Stephen,
Sorry for the late response.
I’ve been trying to replicate the problem and haven’t got any ADD alerts. I think the problem is that there was a previous FIM scan and the alerts are subsequent to this scan.
Is it possible that the agent is less than 3.7.0? If so, to check that there are no false positives I would do the following:
In Agent: Stop the wazuh agent:
ossec/bin/ossec-control stop
In Manager: Delete the DDBB in the manager of that agent (FIM and Syscollector records from previous scans will be lost)
rm /var/ossec/queue/db/<id-agent-windows>.db
In Agent: Restart the agent:
ossec/bin/ossec-control start
Now the FIM scan will start again and ADD alerts should NOT appear.
IMPORTANT NOTE:
It is possible that when there are so many FIM events, the agent queue will be flooded. In this case, an alert will appear in the manager with id 202. When it is full in a high percentage and with id 203 when it is already full, in this case, the agent has lost events, which could cause that in the next scan ADD alerts appear because the manager did not receive those events.
This can be solved by increasing the waiting time after a certain number of FIM events, in the internal_options.conf should increase the value of:
syscheck.sleep=1 (by default)
For example, double. This way you will wait 2 seconds every 100 events.
Hope it help. Regards.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/6f01b532-495c-4a49-a7ef-f6db7c7796c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/f410de76-fd2f-4b5f-ba14-ebefe02907cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/9aad0e58-56d8-45ec-b2c3-e7d72346a8c4%40googlegroups.com.