White Hat Institute

DNS enumeration using domain information groper (Dig)

Dig (domain information groper) is a versatile instrument for cross-examining DNS name servers. It performs DNS queries and shows the appropriate responses that are come back from the name server(s) that were queried. Most DNS administrators use Dig to investigate DNS issues as a result of its adaptability, convenience, and clarity of output. Other query devices will, in general, have less functionality than Dig.

Even though Dig is ordinarily utilized with command-line arguments, it is likewise has a clustering method of activity for perusing query demands from a document. A short outline of its command-line arguments and choices is printed when the “-h” alternative is given. In contrast to prior variants, the BIND 9 execution of Dig enables various queries to be issued from the command line.

Unless it is told to query a distinct name server, Dig will try each of the servers listed in “/etc/resolv.conf. At the point when no command-line arguments or alternatives are given, Dig will play out an NS inquiry for “.” (the root). It is conceivable to set per-user defaults for Dig via “${HOME}/.digrc.” This file is read-only, and any options in it applied before the command-line arguments.

A typical invocation of Dig looks like this: ([email protected]:# dig @server name type)

Ex: ([email protected]:# dig @8.8.8.8 exampledomain.com ANY)

“server”: is the name server or IP address to query. It can be an IPv4 or an IPv6 address. If the supplied server argument is a hostname, Dig will resolve that name before querying the name server. When no server argument is given, Dig consults “/etc/resolv.conf” and queries the name servers listed there.

“name”: is the resource record that is to be looked up.

“type”: connotes what kind of query is required — “ANY,” “A,” “MX,” “SIG,” etc. If no “type” argument is provided, Dig will perform a lookup for an “A” record.

For more information on Dig visit the “man” page or use the “-h” operator to list the help menu.

Dig, domain information groper, dns