Skip to content
doksu edited this page Jan 10, 2019 · 12 revisions

TA-asngen

ASN Lookup Generator for Splunk

This app provides a generating command asngen, which downloads MaxMind's ASN database (http://dev.maxmind.com/geoip/legacy/geolite/), unzips the contents (in memory) and outputs a table of the results that can be easily put into a lookup. N.B. To the best of our knowledge, CIDR-based lookups in Splunk do not support IPv6 (https://answers.splunk.com/answers/474542/feature-request-cidr-matching-for-ipv6-in-search.html) and so the asngen command does not output the IPv6 autonomous systems even though provided by MaxMind.

TA-asngen has a scheduled search which automatically updates the 'asn' lookup daily. It's a standard csv lookup and can be used like so:

... | lookup asn ip AS <your_ip_field>

Be aware that the app automatically blacklists replication of the asn lookup to indexers in the search bundle (distsearch.conf), as it's typically around 13MB in size.

N.B. A custom search command was used rather than a scripted input so as to work better with search head clustering and scripted lookup was not used to prevent users from piping search results to the lookup and DoSing the provider.


OVERVIEW

  • Release notes
  • Disclaimer
  • Support and resources

INSTALLATION AND CONFIGURATION

  • Requirements
  • Installation
  • Configuration

USAGE


OVERVIEW

Release notes

About this release

Version 1.0.x of TA-asngen is compatible with:

Splunk Enterprise versions 6.3+
Platforms Platform independent
Vendor Products MaxMind
Lookup file changes None
Fixed issues

Version 1.0.0 of TA-asngen fixes the following issues:

Version 0.1.2 of TA-asngen fixes the following issues:

Known issues
  • None
Disclaimer

The author in no way endorses the provider's service, has no affiliation whatsoever with the provider, and makes no guarantees about the quality or accuracy of the information provided.

Support and resources

Please post questions at https://answers.splunk.com, however this app is provided as is with no warranty, implied or otherwise; please see the LICENSE document for more information. Feedback about possible improvements and good news stories of how this app has helped your organisation are most welcome.

INSTALLATION AND CONFIGURATION

Requirements

Hardware requirements

  • None

Software requirements

To function properly, TA-asngen requires the following software:

  • Splunk Enterprise 6.3+

Installation

Install this app on your search head/s as you would with any other app, then restart Splunk.

Configuration

Lookup size limit

If the maximum size of static lookup files has not yet been increased from the default in your environment, you will need to do so by adding a stanza such as this to limits.conf on your search head/s:

[lookup]
max_memtable_bytes=20000000

ASN Matches

MaxMind provides the hierarchy of networks in their database. Generally we wish to know only the longest match and so the 'asn' lookup's default behaviour (as of v0.1.2) is to provide only the longest CIDR mask match. If you wish to see more, change the 'asn' lookup's 'max_matches' value in transforms.conf.

Proxy

If use of a proxy is required, please click 'Manage Apps' under the app menu, find TA-asnlookup and click 'Set up', then fill in the details. e.g: https://proxy.example.com:3128

Create lookup

Run the following search to initially populate the asn lookup:

| asngen | table ip asn autonomous_system | outputlookup asn

The lookup will automatically update itself each morning.

USAGE

The 'asn' lookup matches the longest CIDR mask for a given IPv4 address and can be used in the same way as any other lookup:

... | lookup asn ip AS <your_ip_field>
Clone this wiki locally