Splunking The Modern Honey Network: Adding Context Using Threat Feeds (Part 2)

Last week, I showed how to ingest Modern Honey Network data into Splunk and visualise it with the MHN Splunk App.

Hopefully you’ve been getting lots of additional value on-top of the Modern Honey Network web app. I’m sure you’re now ready to ramp things up.

As with all security events — including honeypot events— context is key. For example, an IP trying once to SSH into your machine is probably hoping to exploit default login credentials (hopefully not you!). Whereas an IP seen trying to SSH 10 times every second might be a more serious, targeted attack.

In this post I’m going to show you how to add context the MHN data you’re Splunking using Anomali Threatstream data via the Anomali Threatstream Community Splunk App (for free). Doing so will help you easily identify and quickly investigate the most critical events seen by your honeypot network.

A brief intro…

The Anomali ThreatStream Community App for Splunk leverages threat intelligence from Anomali’s ThreatStream platform to identify potential threats and breaches. The Community App does this by downloading and matching ThreatStream’s intelligence (known indicators of compromise (IOC)) against your event data in Splunk.

Configuring the Anomali ThreatStream Community App with MHN data

0. Prerequisites

You have a Splunk instance with Modern Honey Network data being ingested. Here’s a walkthrough detailing how to do this.

1. Install the Anomali ThreatStream Community Splunk App

Download the Anomali ThreatStream Community Splunk App here.

Navigate to: Apps > Manage Apps > Install App from File. Follow the instructions to upload the app you’ve just downloaded.

2. Sign up for a free Anomali Threatstream Account

In order to download data from Threatstream into Splunk to perform matching you will need a free Anomali Threatstream account. If you don’t already have an account, you can sign up for one whilst configuring the app: Apps > Anomali Threatstream Community > Help > Run setup.

3. Get familiar with the App lookups

You will notice the app ships with a number of lookups for different functions within the app when navigating to: Settings > Lookups > Anomali Threatstream Community App.

The lookups are separated by IOC type and include: URL, MD5 hash, IP, email, and domain. Each lookup file has differing column headers. For example the the tsi_ip lookup has the following headers:

_key, asn, classification, confidence, country, date_first, date_last, detail, id, itype, lat, lon, lookup_key_value, maltype, org, resource_uri, severity, source, actor, campaign, tipreport, _time, last_time, link, type

The app lookups ship with a small sample of historic IOC data from Threatstream. You can view this in Splunk by running the “inputlookup” command. For example, to view the “tsi_ip” lookup run:

| inputlookup tsi_ip

Note: It may take up to 24 hours for the download of new lookup data from Threatstream for matching.

3. Start matching lookups against MHN events

The default MHN Server Splunk key / value log file only contains IP and MD5 fields, so I will only use these two lookup files to perform matches against.

Start by matching MHN data against the “tsi_ip” lookup:

source=”*mhn-splunk.log*” | lookup tsi_ip lookup_key_value AS src OUTPUTNEW confidence AS ts_confidence, itype AS ts_itype, detail AS ts_detail | search ts_confidence=”*”

Lets break down this search:


First returns all data Splunk holds from the MHN log file.

| lookup tsi_ip lookup_key_value AS src OUTPUTNEW confidence AS ts_confidence, itype AS ts_itype, detail AS ts_detail |

The “lookup” command is then used to call the “tsi_ip” lookup, telling Splunk that the “lookup_key_value” column in the lookup should be matched against the “src” field values in our MHN log. The “lookup_key_value” contains the malicious IP values from Threatstream, whilst the “src” field in our MHN data is the origin IP of a MHN event. If the two match there is an event that likely warrants investigation.

The “OUTPUTNEW” function then adds additional context to the MHN event by allowing us to enrich it with lookup data. You can see a list of the fields available in each lookup to enrich a MHN event by running a Splunk search: “| inputlookup LOOKUP_NAME”. In the example above; confidence, itype and detail fields are used from the lookup. I rename each field with a “ts_” prefix so that I can easily identify fields from the lookup in search. The fields added from the lookup can then be used in search, as per the final |.

| search ts_confidence=”*”

Once the matching has completed another search is run, this time to filter only events that have a “ts_confidence” field. Events will only have a “ts_confidence” field if they successfully matched against Threatstream IOCs.

4. Search on

You now know how to enrich MHN event data with Threatstream IOCs. However, depending on the matches returned, you might want to add more context. Time, for example, as discussed at the start of this post.

source=”*mhn-splunk.log*” | lookup tsi_ip lookup_key_value AS src OUTPUTNEW confidence AS ts_confidence, itype AS ts_itype, detail AS ts_detail | search ts_confidence=”*” | transaction src maxpause=5s

The search above adds a “transaction” command to the end of the search created before.

| transaction src maxpause=5s

After events that match against Threatstream IOCs are returned (| search ts_confidence=”*”), the transaction command further filters results by requiring events grouped by IP (src) that have been seen within 5 seconds of each other (maxpause=5s). For example, the search would return events from an IP that visited a honeypot at 12:00:01 and 12:00:02 (1 sec pause), but not an IP that visited a honeypot at 12:00:01 and 12:00:11 (10 sec pause).

4. Visualise

Data alone is good. It’s often much easier to understand and share in more visual form.

source=”*mhn-splunk.log*” | lookup tsi_ip lookup_key_value AS src OUTPUTNEW confidence AS ts_confidence, itype AS ts_itype, detail AS ts_detail | search ts_confidence=”*” | timechart count

Using the “timechart” command, a graph is generated showing a daily count of MHN events that match Threatstream IOCs. If there is a sudden spike, it may be indicative of a targeted attack, for example. Splunk has many visualisation options including maps, line graphs, and tables.

Further reading

If you’re new to Splunk, a good place to start would be to explore Splunk’s search language — specifically the lookup and transaction commands introduced in this post.

The Anomali Threatstream Community App is a powerful tool to identify threats to your network. I’ve skimmed over its additional functionality in this post. Read more about what the app does and how to configure the additional functionality.

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.

Next up: Automated Honeypot Alerts


Cyber Threat Intelligence Modern Honey Network SIEM Splunk

Related Content

Get the Anomali Newsletter

The latest Anomali updates and cybersecurity news, delivered straight to your inbox each month.