DNS Enumeration (original) (raw)

Last Updated : 8 Jun, 2026

DNS Enumeration is the process of discovering and mapping DNS records of a domain to understand its publicly exposed infrastructure. It helps identify subdomains, servers and network endpoints, providing valuable insight during security assessments and reconnaissance.

dns_records

**Example: A user enters www.geeksforgeeks.org in a browser, now the DNS will intercept this request and will fetch the corresponding IP address and connect the user to that IP address.

DNS Enumeration Techniques and Process

There are various tools to do DNS Enumeration, you are free to explore them by doing a simple web search about DNS Enumeration tools, but here we are going to use Nmap as an example:-

1. Passive reconnaissance (start here)

Passive reconnaissance is performed without directly interacting with the target DNS servers. It helps gather preliminary information safely.

2. Basic Active Queries (dig and host)

Active DNS queries are used to directly interact with DNS servers and retrieve record information.

**Example command:

dig +nocmd example.com A +noall +answer

1

**Can also query different record types such as:

3. Zone Transfer Attempt (AXFR)

Zone transfer is used to retrieve the entire DNS zone file if misconfigured.

**Example command:

dig @ns1.example.com example.com AXFR

4. Nmap DNS Scripts

Nmap is a powerful network scanning tool that includes built-in scripts for DNS enumeration. It can be used to discover DNS-related information from a target system.

**Example command:

nmap -sSU -p 53 --script dns-nsec-enum --script-args dns-nsec-enum.domains=example.com

**Common DNS Scripts:

Output:

Enumeration through Nmap

**Note: If no NSEC records are found, other scripts like dns-brute.nse or dns-cache-snoop.nse can be used for deeper enumeration.

5. Amass (Subdomain Discovery Tool)

**Example:

amass enum -passive -d example.com

6. Subdomain Brute Force and Resolution

**Example Command:

amass enum -passive -d www.example.com

**Output:

1

7. Reverse DNS (PTR Enumeration)

**Example:

for ip in (prips10.0.0.0/24);dodig−x(prips 10.0.0.0/24); do dig -x (prips10.0.0.0/24);dodigxip +short; done

8. DNS Record Analysis (TXT Records)

Prevention