All Projects → farrokhi → Dnsdiag

farrokhi / Dnsdiag

Licence: bsd-2-clause
DNS Measurement, Troubleshooting and Security Auditing Toolset

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Dnsdiag

Bugcrowd Levelup Subdomain Enumeration
This repository contains all the material from the talk "Esoteric sub-domain enumeration techniques" given at Bugcrowd LevelUp 2017 virtual conference
Stars: ✭ 513 (-21.08%)
Mutual labels:  dns
Java Dns Cache Manipulator
🌏 A simple 0-dependency thread-safe Java™ lib/tool for setting dns programmatically without touching host file, make unit/integration test portable.
Stars: ✭ 557 (-14.31%)
Mutual labels:  dns
Singularity
A DNS rebinding attack framework.
Stars: ✭ 621 (-4.46%)
Mutual labels:  dns
Doggo
🐶 Command-line DNS Client for Humans. Written in Golang
Stars: ✭ 515 (-20.77%)
Mutual labels:  dns
Dnscrypt Resolvers
Lists of public DNSCrypt / DoH DNS servers and DNS relays
Stars: ✭ 536 (-17.54%)
Mutual labels:  dns
Dns
Kubernetes DNS service
Stars: ✭ 561 (-13.69%)
Mutual labels:  dns
Auroradns.gui
纯净抗污染,简单轻量级
Stars: ✭ 494 (-24%)
Mutual labels:  dns
Hostctl
Your dev tool to manage /etc/hosts like a pro!
Stars: ✭ 642 (-1.23%)
Mutual labels:  dns
Pyexfil
A Python Package for Data Exfiltration
Stars: ✭ 554 (-14.77%)
Mutual labels:  dns
Dnsserver
Technitium DNS Server
Stars: ✭ 603 (-7.23%)
Mutual labels:  dns
Freeipa
Mirror of FreeIPA, an integrated security information management solution
Stars: ✭ 520 (-20%)
Mutual labels:  dns
Whonow
A "malicious" DNS server for executing DNS Rebinding attacks on the fly (public instance running on rebind.network:53)
Stars: ✭ 533 (-18%)
Mutual labels:  dns
Bender
An easy-to-use library for creating load testing applications
Stars: ✭ 583 (-10.31%)
Mutual labels:  dns
Hosts For Surge
🌟 Hosts for Internet Freedom
Stars: ✭ 514 (-20.92%)
Mutual labels:  dns
Dns
DNS library in Go
Stars: ✭ 5,944 (+814.46%)
Mutual labels:  dns
Shuffledns
shuffleDNS is a wrapper around massdns written in go that allows you to enumerate valid subdomains using active bruteforce as well as resolve subdomains with wildcard handling and easy input-output support.
Stars: ✭ 498 (-23.38%)
Mutual labels:  dns
Amass
In-depth Attack Surface Mapping and Asset Discovery
Stars: ✭ 6,284 (+866.77%)
Mutual labels:  dns
Spotify Adblock Linux
Spotify adblocker for Linux
Stars: ✭ 641 (-1.38%)
Mutual labels:  dns
Libnet
A portable framework for low-level network packet construction
Stars: ✭ 640 (-1.54%)
Mutual labels:  dns
Subdomain3
A new generation of tool for discovering subdomains( ip , cdn and so on)
Stars: ✭ 605 (-6.92%)
Mutual labels:  dns

Build Status PyPI PyPI PyPI Docker Pulls GitHub stars

DNS Measurement, Troubleshooting and Security Auditing Toolset

Ever been wondering if your ISP is hijacking your DNS traffic? Ever observed any misbehavior with your DNS responses? Ever been redirected to wrong address and suspected something is wrong with your DNS? Here we have a set of tools to perform basic audits on your DNS requests and responses to make sure your DNS is working as you expect.

You can measure the response time of any given DNS server for arbitrary requests using dnsping. Just like traditional ping utility, it gives you similar functionality for DNS requests.

You can also trace the path your DNS request takes to destination to make sure it is not being redirected or hijacked. This can be done by comparing different DNS queries being sent to the same DNS server using dnstraceroute and observe if there is any difference between the path.

dnseval evaluates multiple DNS resolvers and helps you choose the best DNS server for your network. While it is highly recommended to use your own DNS resolver and never trust any third-party DNS server, but in case you need to choose the best DNS forwarder for your network, dnseval lets you compare different DNS servers from performance (latency) and reliability (loss) point of view.

Prerequisites

This script requires python3 as well as latest dnspython and cymruwhois.

Installation

There are several ways that you can use this toolset. However using the sourcecode is always recommended.

From Source Code

  1. You can checkout this git repo and its submodules
git clone https://github.com/farrokhi/dnsdiag.git
cd dnsdiag
pip3 install -r requirements.txt
  1. You can alternatively install the package using pip:
pip3 install dnsdiag

From Binary

From time to time, binary version will be released for Windows, Mac OS X and Linux platforms. You can grab the latest release from releases page.

Docker

If you don't want to install dnsdiags on your local machine, you may use the docker image and run programs in a container. For example:

docker run -it --rm farrokhi/dnsdiag ./dnsping.py

dnsping

dnsping pings a DNS resolver by sending an arbitrary DNS query for given number of times:

% ./dnsping.py -c 3 -t AAAA -s 8.8.8.8 dnsdiag.org
dnsping.py DNS: 8.8.8.8:53, hostname: dnsdiag.org, rdatatype: AAAA
4 bytes from 8.8.8.8: seq=0   time=123.509 ms
4 bytes from 8.8.8.8: seq=1   time=115.726 ms
4 bytes from 8.8.8.8: seq=2   time=117.351 ms

--- 8.8.8.8 dnsping statistics ---
3 requests transmitted, 3 responses received,   0% lost
min=115.726 ms, avg=118.862 ms, max=123.509 ms, stddev=4.105 ms

This script calculates minimum, maximum and average response time as well as jitter (stddev)

dnstraceroute

dnstraceroute is a traceroute utility to figure out the path that your DNS request is passing through to get to its destination. You may want to compare it to your actual network traceroute and make sure your DNS traffic is not routed to any unwanted path.

% ./dnstraceroute.py --expert -C -t A -s 8.8.4.4 facebook.com
dnstraceroute.py DNS: 8.8.4.4:53, hostname: facebook.com, rdatatype: A
1	192.168.0.1 (192.168.0.1) 1 ms
2	192.168.28.177 (192.168.28.177) 4 ms
3	192.168.0.1 (192.168.0.1) 693 ms
4	172.19.4.17 (172.19.4.17) 3 ms
5	google-public-dns-b.google.com (8.8.4.4) 8 ms

=== Expert Hints ===
 [*] public DNS server is next to a private IP address (possible hijacking)

Using --expert will instruct dnstraceroute to print expert hints (such as warnings of possible DNS traffic hijacking).

dnseval

dnseval is a bulk ping utility that sends an arbitrary DNS query to a give list of DNS servers. This script is meant for comparing response time of multiple DNS servers at once:

% ./dnseval.py -t AAAA -f public-servers.txt -c10 yahoo.com
server           avg(ms)     min(ms)     max(ms)     stddev(ms)  lost(%)  ttl     flags
------------------------------------------------------------------------------------------------------
8.8.8.8          270.791     215.599     307.498     40.630      %0       298     QR -- -- RD RA -- --
8.8.4.4          222.955     171.753     307.251     60.481      %10      291     QR -- -- RD RA -- --
ns.ripe.net      174.855     160.949     187.458     10.099      %0       289     QR -- -- RD RA -- --
4.2.2.1          172.798     163.892     189.918     7.823       %0       287     QR -- -- RD RA -- --
4.2.2.2          178.594     169.158     184.696     5.067       %0       285     QR -- -- RD RA -- --
4.2.2.3          153.574     138.509     173.439     12.015      %0       284     QR -- -- RD RA -- --
4.2.2.4          153.182     141.023     162.323     6.700       %0       282     QR -- -- RD RA -- --
4.2.2.5          154.840     141.557     163.889     7.195       %0       281     QR -- -- RD RA -- --
209.244.0.3      156.270     147.320     161.365     3.958       %0       279     QR -- -- RD RA -- --
209.244.0.4      159.329     151.283     163.726     3.958       %0       278     QR -- -- RD RA -- --
195.46.39.39     171.098     163.612     181.147     5.067       %0       276     QR -- -- RD RA -- --
195.46.39.40     175.335     160.920     185.618     8.726       %0       274     QR -- -- RD RA -- --

Author

Babak Farrokhi

License

dnsdiag is released under a 2 clause BSD license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].