Hi Henry
If the web logs decode the source IP as srcip, similar to the SSH decoder, you can use the same script. However, if the source IP is decoded under a different field name, replace srcip with the appropriate field name in the script. Then proceed with the remaining steps as usual.
Ref: https://wazuh.com/blog/detecting-known-bad-actors-with-wazuh-and-abuseipdb/
If you need further assistance on this, please share sample web logs from archives.json logs.Hi Henry If the web logs decode the source IP as srcip, similar to the SSH decoder, you can use the same script. However, if the source IP is decoded under a different field name, replace srcip with the appropriate field name in the script. Then proceed with the remaining steps as usual.
Ref: https://wazuh.com/blog/detecting-known-bad-actors-with-wazuh-and-abuseipdb/
If you need further assistance on this, please share sample web logs from archives.json logs.
Enable archives.json log, set the <logall_json>yes</logall_json> to yes at /var/ossec/etc/ossec.conf file of the Wazuh manager.
Documentation:Wazuh Documentation | logall
<ossec_config>
<global>
___________________
<logall_json>yes</logall_json>
_______________
This option will allow you to see all the events being monitored by your manager in the /var/ossec/logs/archives/archives.json file. You will then be able to observe the incoming logs generated by your endpoints. After setting this option, restart the manager and check the archives.json 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. Use grep parameters related to the log.
cat /var/ossec/logs/archives/archives.json | grep Keywoard
We can see the field full_log, which is the one being parsed by analysis, one of the archives.json events should look like this (the field of interest is in bold):
{"timestamp":"2023-09-05T02:47:40.074+0000","agent":{"id":"001","name":"abc","ip":"10.0.2.29},"manager":{"name":"Server85"},"id":"1693882060.373586","full_log ":"Sep 5 03:10:19 Server91 dbus-daemon[676]: [system] Successfully activated service 'org.freedesktop.UPower","predecoder":{"program_name":"dbus-daemon","timestamp":"Sep 5 03:10:19","hostname":"Server91"},"decoder":{},"location":"/var/log/syslog"}
Ref: https://wazuh.com/blog/creating-decoders-and-rules-from-scratch/
Please share the sample full_logs from archives.json log, so that I can assist you in customizing the script and rules.
Let me know the update on this.
It appears that your logs do not match any default Wazuh decoders or rules. Therefore, I’ve created custom decoders to extract the relevant fields and written custom rules to generate alerts based on your specific scenario.
Please start by copying the following decoders into your custom decoder file.
nano /var/ossec/etc/decoders/local_decoder.xml