Using this document as a template, to build the sensor, it is time to download and extract the installation tarball on the sensor to install Suricata & Zeek as well as the Elasticsearch applications filebeate, metricbeat and packetbeat if using ELK to analyze the traffic. Refer to the document to configure each of the ELK applications. There are two tarball, the first installation.tgz is to setup all the scripts listed below to install the software and the second tarball is to preconfigure some of the sensor configuration files (Suricata, Zeek, softflowd, Filebeat, Metricbeat & Packetbeat).
After Suricata & Zeek have been installed, if you plan to send the logs to Elasticsearch, install filebeat (metricbeat & packetbeat are optional).
The sensor.tgz tarball has Zeek configured to save the logs in JSON format which has support by most commercial products like ELK, RSA NetWitness, Splunk, etc.
If the packet capture interface is other than ens160 (ifconfig), update the following files:
If using packetbeat:
If using softflowd (make script executable: chmod 755 /etc/rc.local):
Enable Suricata & Zeek to start on reboot:
Update Suricata's rules:
Lets start some services:
Last, configure filebeat (metricbeat & packetbeat are optional) Elasticsearch server section to send the logs to the server. To make sure nothing is missed to configure Elasticsearch applications, review this document Logging Data to Elasticsearch which contains all the steps to configure these Elastic Beats.
If using any of the Beats, enable them to start on reboot:
Let's start Filebeat:
Note: Because Suricata logs are sent to ELK with filebeat, there is an hourly cronjob that delete the previous hour logs from the /nsm/suricata directory to keep it clean and in the end requires a minimal /nsm/suricata partition documented in [4]. Since I use VMs as sensors, I exported this sensor template as an OVA, which requires minimum configuration changes for the next deployment. [1] https://github.com/irino/softflowd ----------- |
Guy 522 Posts ISC Handler Apr 10th 2021 |
Thread locked Subscribe |
Apr 10th 2021 1 year ago |
Great article! What's missing, and this is common out there, is the detailed part for configuring dashboards.
Most of the time you see guide how to export to ELK, but only a few stuff, or just predefined dashboards, on what to do with this data. Thx! :) |
Anonymous |
Quote |
Apr 12th 2021 1 year ago |
Agree that is usually the difficult part to have good dashboards and good actionable information. The current version has 2 Suricata dashboards and Zeek one. However, with the introduction of the Threat module in filebeat, the current version combined with detection rules Indicator match rules, Elasticsearch is on its way to provide more accurate information. The Enrich processor is another option I use for adding meta I can use to create custom dashboards.
elastic.co/guide/en/beats/filebeat/master/… elastic.co/guide/en/security/current/… elastic.co/guide/en/elasticsearch/reference/master/… |
Guy 522 Posts ISC Handler |
Quote |
Apr 12th 2021 1 year ago |
Sign Up for Free or Log In to start participating in the conversation!