My Cart 0

Single Post

Gather information using “dig” command in Kali Linux

Gather information using dig command in Kali Linux

Dig Overview

Dig ( Domain Information Groper ) is a tool in Kali Linux used  to gather information about host addresses, mail exchange servers, name servers by sending query to the DNS Name server. This tool can be run by Linux or Mac OS. Simply this works with single domain name, to get the result of multiple domain you will have to run multiple queries.

Dig Usage Options

To see the available options used to dig command, Open terminal and execute the following command

#dig -h

dig help

Dig Usage Instructions

#dig authority www.google.com

dig authority

in the above command, the result indicates that the authoritative search went from ns2->ns1->ns4->ns3, that means name server 2 have more authority over the search according to the context of the domain name over name server 1.

Now lets fool around with some other commands

#dig nssearch www.facebook.com  **searches for name servers**

dig nssearch

dig additional www.facebook.com **controls all additional queries **

dig nssearch

dig nsid www.facebook.com ** searches for the name servers ID**

dig nsid

Similarly , there are other options that can be used for several other purposes. Here we go folks yet another command prominent in information gathering.

What can I find using the dig command?

dig will let you perform any valid DNS query, the most common of which are:

  • A (the IP address),
  • TXT (text annotations),
  • MX (mail exchanges), and
  • NS nameservers.

Use the following command to get the addresses for mt-example.com.

 dig mt-example.com A +noall +answer

Use the following command to get a list of all the mailservers for mt-example.com.

 dig mt-example.com MX +noall +answer

Use the following command to get a list of authoritative DNS servers for mt-example.com.

 dig mt-example.com NS +noall +answer

Use the following command to get a list of all the above in one set of results.

dig mt-example.com ANY +noall +answer 

Use the following command to query using a specific nameserver.

dig @ns1.mediatemple.net mt-example.com 

Use the following to trace the path taken.

 dig mt-example.com +trace

Sources:mediatempleCyberpedia.in

 

error: Content is protected !!

Notice: Undefined offset: 1 in /home/cyrageco/cyberpratibha.com/wp-includes/functions.php on line 827