OpenSOC / opensoc-vagrant

Vagrantfile and scripts for building a disposable OpenSOC Cluster
29 stars 25 forks source link

OpenSOC Vagrant

A collection of shell scripts and a Vagrant file for building an OpenSOC cluster. There are two primary goals we hope to solve with this project:

To accomplish this, we have provided a collection of bash scripts that are orchestrated using Vagrant and Fabric. Both of these tools should be installed prior to using this project.

Inspiration

Credit to https://github.com/vangj/vagrant-hadoop-2.4.1-spark-1.0.1 for the inspiration for this. This project is heavily influenced by that one.

Quick Start

If you don't want to bother with the details of the cluster, and just want to see OpenSOC, place a RPM For Oracle's JVM in resources/ and edit common.sh to set JRE_RPM to the name of the RPM. Then run:

vagrant up
fab vagrant quickstart

Finally, point your browser at https://localhost:8443

This should get you a running OpenSOC cluster with Bro, Snort, and PCAP. If you are looking to customize the setup or run your own topologies, see the secions below on running the cluster and running an OpenSOC Topology.

Advanced Setup

If you are interested in tweaking the underlying cluster, running your own OpenSOC topology, or just want to understand how it all works, this section will break down how the cluster is started, and now topoogies can be run.

Running the cluster

To get the cluster up and running, do the following:

The vagrant up command will build the VMs for the cluster, and install all dependencies which include:

After this, the fab vagrant postsetup command will run a handful of tasks that need to occur after the cluster is running, but before it can be used. These are:

Running an OpenSOC Topology

After provisioning the cluster as described above, you can use some more fabric tasks to run a topology. Before you start, you should have the following:

Then you can run fab vagrant start_topology:<topology_name> which will do the following:

If your topology is pulling data from Kafka, you can create a topic with the fabric task fab vagrant create_topic:<topic>

Virtual Machines

By default, 4 VMs will be created. They are named node1, node2, node3, and node4. Here is a breakdown of what services run where:

Port Forwarding

Some service's UIs are forwarded to localhost for ease of use. You can find the following services forwarded by default:

Progress

Here is a list of what will be provisioned via vagrant and its current status: