I have indexes in my Wazuh started with my_ubuntu_(creation date). It contains records about unsuccessfully login attempt to server. My task is creating alert when in index like this started writing information. Simply, when someone has failed login attempt i want to have an alert in Wazuh. I founded some information about creation rules and tried to find logs for rule field, but unfortunately i couldn't find. Can you please advice or provide some practise examples? Thnx
Hi Anhelina Sukhorebra,
Hope you are doing well. Thank you for using Wazuh.
If the Wazuh agent is installed in your endpoint normally Wazuh shows alerts related to authentication.
If you need help with Wazuh-agent installation check this document:
https://documentation.wazuh.com/current/installation-guide/wazuh-agent/index.html
If you are trying to produce some alerts from specific logs that are not covered by Wazuh default rules and decoder. First, check if relevant logs are forwarded to your server.
For this, You can try the following steps:
Activate the 'logall' option within the manager's ossec.conf file, as outlined in our Documentation:Wazuh Documentation | logall
This option will allow you to see all the events being monitored by your manager in the /var/ossec/logs/archives/archives.log file. You will then be able to observe the incoming log generated by your endpoint. After setting this option, restart the manager and check the archives.log file.
Note: Don't forget to disable the logall parameter once you have finished troubleshooting. Leaving it enabled could lead to high disk space consumption.
Look for if there are any logs inside the archive log which is relevant to authentication failure. Use grep parameters related to the Firewall log.
cat /var/ossec/logs/archives/archives.log | grep Keywoard
Test those logs using logtest to find out if logs are decoded by decodes and rules.
Check this document to get help with the logtest tool.
https://documentation.wazuh.com/current/user-manual/ruleset/testing.html
Based on the findings of your logtest write custom decoders and rules.
https://documentation.wazuh.com/current/user-manual/ruleset/custom.html
I hope this helps. Let me know If you need any further information or assistance.
Regards
Md. Nazmur Sakib
Hi Anhelina Sukhorebra,
Hope you are doing well.
You can use a local configuration file on the Wazuh agent or Wazuh server to monitor log files. Using this you can send the logs from the file that contains records about unsuccessfully login attempts to the server.
Check this document to learn more about Configuration for monitoring log files.
Also check the supported log formats.
https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/localfile.html#log-format
Ex:
<localfile>
<location>/<FILE_PATH>/file.log</location>
<log_format>syslog</log_format>
</localfile>
Next, you can check if the logs that you are referring to are arriving in the Wazuh manager. To check this please enable <logall> in ossec config.
Activate the 'logall' option within the manager's ossec.conf file, as outlined in our Documentation:
This option will allow you to see all the events being monitored by your manager in the /var/ossec/logs/archives/archives.log file. You will then be able to observe the incoming log. After setting this option, restart the manager and check the archives.log file.
Note: Don't forget to disable the logall parameter once you have finished troubleshooting. Leaving it enabled could lead to high disk space consumption.
Look for if there are any logs inside the archive log related to Fortigate. Use grep parameters related to the authentication log.
cat /var/ossec/logs/archives/archives.log | grep KEYWORD
Test those logs using logtest to find out if logs are decoded by decodes and rules.
Check this document to get help with logtest tool
https://documentation.wazuh.com/current/user-manual/ruleset/testing.html
Based on the findings of your logtest write custom decoders and rules.
https://documentation.wazuh.com/current/user-manual/ruleset/custom.html
Check this document for Ruleset XML syntax:
https://documentation.wazuh.com/current/user-manual/ruleset/ruleset-xml-syntax/inde
I hope this helps. Please let me know if you need any further information.
Regards
Md. Nazmur Sakib