Whilst The Modern Honey Network Server alone is powerful, exporting the data for further manipulation and analysis can be very useful. It is common to see security teams feeding MHN attack data directly into their SIEM for correlation against events generated from other security tools, like Threatstream.
It is easy to export data from a MHN Server. It natively supports integration with Splunk and Arcsight. The logs generated also make it easy to import data into other tools, like the ELK stack for example.
This post will guide you through integrating your MHN Server with Splunk (for free). That said, it will introduce MHN log files that can be monitored by another tool of your choice.
Integrating The MHN with Splunk
You have The MHN Server running with at least one Honeypot connected. Here’s a walkthrough detailing how to do this.
1. Get your MHN Server to generate a Splunk log file
The MHN Server has a built-in process that can be used to create key/value log files that can be easily read by Splunk. First, enable this on your MHN Server:
$ cd /opt/mhn/scripts/ $ sudo ./install_hpfeeds-logger-splunk
After you’ve enabled the Splunk logging feature future attack data will be outputted into a log file named `mhn-splunk.log` in `/var/log/mhn/`. Here is a sample log line of the file:
2017–01–09T20:36:26.642072 src=”0.0.0.0", direction=”inbound”, protocol=”ip”, ids_type=”network”, dionaea_action=”reject”, type=”dionaea.connections”, app=”dionaea”, dest=”22.214.171.124", vendor_product=”Dionaea”, dest_port=”23", signature=”Connection to Honeypot”, src_port=”63762", sensor=”888760fa-d6a8–11e6–95e1–5226d7e0443e”, transport=”tcp”, severity=”high”
2. Install Splunk
Download the latest version of Splunk into `/opt/` on your MHN Server.
Now unpack and install Splunk:
$ cd /opt/ $ tar -zxvf SPLUNK_BINARY.tgz $ cd /opt/splunk/bin/ $ ./splunk start
After accepting the license agreement and the installation completes, you should now be able to access the Splunk GUI on the MHN Server on port :8000.
Splunk allows you to store up to 500Mb each day at no cost — more than enough for MHN logs. I’m currently running a personal network of 20 honeypots that generate less than 100Mb per day total.
If you are more familiar with how Splunk works, you can instead use a Splunk Forwarder on the MHN Server to send data to an existing Splunk Indexer on another server.
3. Install the MHN Splunk App
Splunk has a concept of apps. In Splunk’s own words:
A Splunk App is a prebuilt collection of dashboards, panels and UI elements powered by saved searches and packaged for a specific technology or use case to make Splunk immediately useful and relevant to different roles.
The MHN Splunk App comes prepackaged with visualisations for the honeypots natively supported by MHN.
Navigate to: Apps > Manage Apps > Install App From File. Follow the instructions to upload the app you’ve just downloaded.
4. Splunk the log file
In order to populate the dashboards in the app with data, you must point Splunk to the log file where MHN attack data is being written on the server.
Navigate to: Settings > Data Inputs > File & Directories. Select the MHN Splunk log file created earlier: `/var/log/mhn/mhn-splunk.log`.
After selecting the log file make sure “Continuously monitor” is selected. You can now click next and accept all the defaults. If you are a more advanced Splunk user, you can edit the settings as you move through the import wizard.
5. Explore the data
Once the log file starts populating with data Splunk will ingest it. Note, the Splunk log file will only populate with honeypot data received after it has been enabled (you will not be able to see any historic logs).
Navigate to the MHN Splunk app: Apps > Modern Honey Network. The visualisations will begin to populate as data is recieved. You’ll notice in the screenshot above some panels are blank as I am not using all native MHN honeypots in my network.
If you're new Splunk, start to explore Splunk’s search language to dig deeper into the data being generated. Tip: click the search icon on each dashboard panel in the MHN Splunk App to see the searches used to create them.
Exploring The Modern Honey Network
Over the next few weeks I will be posting a series of guides about how to get value out of the data being generated by your honeypots. You can get updated about new MHN posts by Anomali on Twitter.