Alienvault OSSIM is a great open-source product but I recently struggled to get my Snare logs to show up in the Security Events (SIEM) viewer.
First of all follow the steps in the Snare setup guide.
Now that you’ve setup snare and enabled the plugin you should see the plugin running when you go to Configuration -> Collection -> Sensors -> Click on the SIEM host. The SnareWindows plugin should show up as ENABLED and UP.
Check the Security Events for snare logs. They should look like:
Snare: A service was successfully sent a start/stop control
If you don’t see any then try this:
1. SSH to the server
2. As root type
3. Find the line that says:
4. Comment it out by putting a # at the start of the line so it looks like this:
5. Now copy and paste the line and change the snare.log part to say messages so it looks like this:
6. Restart the ossim-agent
Now go back and check your Security Events view. If your problem was the same as mine then your snare logs should now start appearing.
Perhaps the best way to reduce the CPU load caused by the agent parsing is to split the syslogs into separate log files using rsyslog. It needs a bit of planning in advance. Configure your snare installs to send their syslog messages to a particular facility, e.g. Local3. You can then setup rsyslog to split these into a new snare log.
Edit /etc/rsyslog.conf and scroll to the bottom and add in something like:
if $syslogfacility-text == 'local3' then /var/log/snare.log
and restart the rsyslogd (/etc/init.d/rsyslog restart). Tail the /var/log/snare.log file to see if the logs are coming into the file correctly.
Now edit /etc/ossim/agent/plugins/snare.cfg and change the location line to point to this new log file:
Now edit the agent configuration file to include the plugin (/etc/ossim/agent/config.cfg). Scroll to the [plugins] section and check if the snare.cfg is listed. If it isn’t add it in:
now restart the agent service
and check back in the GUI.
If you still get nothing in the GUI it could be that the logs that are coming into the log file don’t match the regex’s in the snare.cfg. To test this take a small sample of your logs and create a test log file, e.g tail -100 /var/log/snare.log > /var/log/snare-test.log. Now use the following to test the regex’s:
/usr/share/ossim/scripts/regexp.py /var/log/snare-test.log /etc/ossim/agent/plugins/snare.cfg q
You should see some lines being matched.
Some logs to check for errors: