Home

Awesome

Autosuricata - The meerkat's mastery

What is Autosuricata?

Autosuricata is a shell script that Automates the task of building Suricata from source.

This script is primarily for students attempting to build Suricata for my book, Building Virtual Machine Labs: A Hands-On Guide (Second Edition), and/or the very soon to be announced updated Applied Network Defense training, bearing the same name.

I'll get into the details of what this script does in a little bit.

Supported Operating Systems

As of right now, Autosuricata is supported on Ubuntu 20.04 and 18.04. This script is entirely built off of Suricata's read the docs documentation and recommendations.

https://suricata.readthedocs.io

Prerequisites

System Resource Recommendations: at a minimum, I recommend a system with at least:

These are the specs for the VM I used to test this script. As with most software, the more resources it has available, the better it will perform. Suricata has always been multi-threaded, so more CPU cores is never a bad thing.

OS Recommendations: This script has been tested on Ubuntu 20.04 and above. If you want to use another Debian-based distro, be my guest. However that is entirely unsupported and untested.

Other Recommendations:

This script takes a significant period of time to run. Suricata will take a little bit of time to compile. If you're using the minimum system requirements, you'll need at least 30+ minutes for it to compile and configure everything. That's also assuming a moderately decent internet connection required to download everything.

This script defaults to assuming you want to run Suricata in inline mode. If you don't want that, I'll show you how to undo that in a little bit.

What does this script do exactly?

AutoSuricata automates all of the following tasks:

Instructions for use

  1. If you are running this script behind a proxy, make sure you run your export commands to set the http_proxy and https_proxy variables.
  1. Clone this repo (git clone https://github.com/da667/Autosuricata)
  2. cd into Autosuricata/AutoSuricata-Deb/AVATAR
  3. using your favorite text editor, open full_autosuricata.conf
  4. input the names of the network interfaces you'd like to bridge together for inline mode (if you want to use inline mode) in the suricata_iface_1= (line 12) and suricata_iface_2= (line 20) fields. For example, the script defaults to the interface names eth1 and eth2.
  5. the script file, autosuricata-deb-AVATAR.sh, needs to specifically be ran with the bash interpreter, and with root permissions.

That's all there is to it. Once the script starts running, you'll get status updates printed to the screen to let you know what task is currently being executed. If you want to make sure the script isn't hanging, you can run tail -f /var/log/autosuricata_install.log to view detailed command output.

The script bombed on me. Wat do?

Every task the script performs gets logged to /var/log/autosuricata_install.log. This will hopefully make debugging problems with the script much easier. Take a look and see if you can figure out what caused the installer script to vomit.

I am not interested in inline mode operation at all. Wat do?

Fun fact: the suricata_iface_1 and suricata_iface_2 options in full_autosuricata.conf aren't technically required. If you leave these fields blank, or their default values (assuming you don't have an eth1 or eth2 interface) the script will still finish. However, there are a couple of minor things you'll need to fix:

Licensing

This script is released under the MIT license. There is no warranty for this software, implied or otherwise.

Acknowledgements

A big thanks to @inliniac and the rest of the OISF dev team for being so approachable, and writing good, accessible documentation.

Patch Notes