icon/x Created with Sketch.

Splunk Cookie Policy

We use our own and third-party cookies to provide you with a great online experience. We also use these cookies to improve our products and services, support our marketing campaigns, and advertise to you on our website and other websites. Some cookies may continue to collect information after you have left our website. Learn more (including how to update your settings) here.
Accept Cookie Policy

We are working on something new...

A Fresh New Splunkbase
We are designing a New Splunkbase to improve search and discoverability of apps. Check out our new and improved features like Categories and Collections. New Splunkbase is currently in preview mode, as it is under active development. We welcome you to navigate New Splunkbase and give us feedback.

Accept License Agreements

This app is provided by a third party and your right to use the app is in accordance with the license provided by that third-party licensor. Splunk is not responsible for any third-party apps and does not provide any warranty or support. If you have any questions, complaints or claims with respect to this app, please contact the licensor directly.

Thank You

Downloading DNS Insight
SHA256 checksum (dns-insight_0010.tgz) b5e82ce08b809ae5ce05fc2c26c610d0b423029626c38fe4f2054dcdb9ed529d SHA256 checksum (dns-insight_009.tgz) 7a15f0e8d98d8dbf0a4bce7c96549e57072660906f431f8705bdd5ea80293c26 SHA256 checksum (dns-insight_008.tgz) 7ad639a1fa8e607f5e452282ea7b56a64897bd1fa7c70149ecadf62fdbf0a1b8 SHA256 checksum (dns-insight_007.tgz) 636c8918a102694b7f93cd1035a05d82d576b5a2c411c195e9c2f584c4c0c467
To install your download
For instructions specific to your download, click the Details tab after closing this window.

Flag As Inappropriate

splunk

DNS Insight

Splunk Cloud
Overview
Details
This App visualizes DNS traffic and helps to pinpoint errors and anomalies (like DNS-Tunneling).

DNS Insight takes an output of tcpdump as input, parses it and displays results as following charts and tables:

Overview
-Total Events
-Parsing Errors
-Query Type Distribution
-Return Code Distribution
-Protocol (UDP/TCP) Distribution
Top Queries
-Top Queries
-Top Level Domains
-Top Domains
-Top Reverse Resolution Entries (PTR) IPv4
-Top Reverse Resolution Entries (PTR) IPv6
-Top Destinations
-Top Sources
Anomalies
-Top DNS Errors
-DNS Packet Length
-Number of Labels in the query
Performance
-Slowest Transactions
-Duration
DNS Tunneling
-Possible DNS Tunnelling
Search
Help


The DNS Traffic can be collected simultaneously from many different sources:

-windows (using TA-tshark or by capturing with dumpcap/tshark/Wireshark)
-linux (tcpdump script or using TA-tcpdump)
-switch mirror port (SPAN)
-TAP device
-manual import from a saved network dump (pcap file)
-Splunk Stream (https://splunkbase.splunk.com/app/1809/)
-Technology Add-On for Unbound DNS (https://splunkbase.splunk.com/app/4888/)
-Splunk Add-on for ISC BIND (https://splunkbase.splunk.com/app/2876/) - query log only

ABOUT

This App visualizes DNS traffic and helps to pinpoint errors and anomalies like DNS-Tunneling

This App takes an output of tcpdump as input, parses it and displays results as the following charts and tables:

Total Events
Parsing Errors
Query Type Distribution
Return Code Distribution
Protocol (UDP/TCP) Distribution
Top Queries
Top Level Domains
Top Reverse Resolution Entries (PTR)
Top DNS Errors
Slowest Transactions
Top Destinations
Top Sources
Packet count vs number of query names
DNS Packet Length
Number of Labels in the dns_qry_name
Query duration
Possible DNS Tunnelling

The DNS Traffic can be collected simultaneously from many different devices:

-windows (using TA-tshark or by capturing with Wireshark/tshark/dumpcap, and parsing with tcpdump on linux)
-linux (using TA-tcpdump or TA-tshark)
-switch mirror port (SPAN)
-TAP device
-manual import from a saved network dump (pcap file)
-Splunk Stream (https://splunkbase.splunk.com/app/1809/)
-Technology Add-On for Unbound DNS (https://splunkbase.splunk.com/app/4888/)
-Splunk Add-on for ISC BIND (https://splunkbase.splunk.com/app/2876/) - query log only

INSTALLATION

For a single deployment (to collect DNS traffic from one system only) you need to install Splunk Enterprise + DNS_Insight App + TA-tcpdump (Linux) or TA-tshark (Windows).

For a distributed deploymeint (to collect DNS traffic from many systems):
Windows: Splunk Universal Forwarder + TA-tshark
Linux: Splunk Universal Forwarder + TA-tcpdump
Indexer: Splunk Enterprise + DNS_Insight App + TA-tshark + TA-tcpdump
Search Head: Splunk Enterprise + DNS_Insight App + TA-tshark + TA-tcpdump

Here is an example of a complete setup using a CentOS 7 or Debian 10 as a source of a DNS data input:

ATTENTION: running tcpdump as suggested can be a security risk and an example is provided for informational purposes only! Consult a security expert to minimize risk if unsure!

Option 1 - using TA-tcpdump (prefered, more secure and real time):

Download and install a preconfigured TA-tcpdump Addon from https://splunkbase.splunk.com/app/4818/

Option 2 - parsing after pcap rotation

Check if there is enough free space on the hard drive. You can consider using a separate partition for the tcpdump data.

aa-complain /usr/sbin/tcpdump # set tcpdump to complain mode - debian only
useradd -d /nonexistent -s /usr/sbin/nologin tcpdup # add a restricted tcpdump user
mkdir var/tcpdump # create a folder where pcap files and a script are stored
chown :tcpdump /var/tcpdump # change ownership of the directory
chmod g+w,o-w /var/tcpdump # change permissions of the directory

create /var/tcpdump/pcap2txt.sh file with this content:

#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
INFILE=$1
OUTFILE=/var/tcpdump/tcpdump.txt
LOG=/var/tcpdump/out.log
date >> $LOG
/usr/sbin/tcpdump -tttt -nns0 port 53 -r $INFILE > $OUTFILE 2>> $LOG
wc $OUTFILE >> $LOG

add an executable bit:

chmod +x /var/tcpdump/pcap2txt.sh

This script will create a text dump from the recorded data after the rotation which can be sent to the splunk indexer using rsyslog/syslog-ng or splunk-forwarder. This input should be configured as a "port53tttt" sourcetype on the splunk indexer.

now start tcpdump (change the interface name as needed):

nohup tcpdump -pnns0 port 53 [-i ens32] -w /var/tcpdump/tcpdump.pcap -W100 -C100 -z /var/tcpdump/pcap2txt.sh -Z tcpdump &>>/var/tcpdump/out.log &

where:

-pnns0 - no promiscuous mode, don't convert protocol and port numbers etc. to names
-C100 -W100 - create a ring buffer of 100 files a 100MB (10GB in total)
-w - where to store recorded data
-z /var/tcpdump/pcap2txt.sh - run a simple script after rotation
-Z tcpdump - run as restricted "tcpdump" user

This app tested with CentOS 6/7, Debian 9/10 and Splunk 6/7/8.

TROUBLESHOOTING

Q: Some panels, like "Total events", show wrong number of events, something between 500.000 and 550.000, even if there are much more events available.
A: Most panels utilize base_search, that has a default limit of 500.000 results. To overcome this limitation, increase [search] max_count in local/limits.conf or rewrite searches to remove base_search from the query.

SUPPORT

Contact: splunk@compek.net

Release Notes

Version 0.0.10
March 14, 2024

Saved Search renamed from "search" to DNS_insight_search to avoid name clash. Supported sourcetypes are called now tshark:port53 and tcpdump:port53. A macro named DNS_insight_index_and_sourcetype is used to define all used sourcetypes and indexes.

Version 0.0.9
May 26, 2022

added "source" input to facilitate ad-hoc search, added sc_admin role to default.meta

Version 0.0.8
Aug. 7, 2021

applied required changes to keep compatibility with Splunk Cloud (use jquery 3.5)

Version 0.0.7
March 23, 2020

-minor fixes and cleanups
-better description


Subscribe Share

Are you a developer?

As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps from Splunk, our partners and our community. Find an app for most any data source and user need, or simply create your own with help from our developer portal.

Follow Us:
Splunk, Splunk>,Turn Data Into Doing, Data-to-Everything, and D2E are trademarks or registered trademarks of Splunk LLC in the United States and other countries. All other brand names,product names,or trademarks belong to their respective owners.