04. DNS Recon
Overview¶
dnsrecon is a powerful DNS enumeration tool used to gather information about DNS records of a target domain.
Basic Command¶
Key Features of dnsrecon¶
- Standard Record Enumeration: Retrieves common DNS records like A, AAAA, CNAME, MX, NS, etc.
- Zone Transfer Testing: Checks if zone transfers (AXFR) are possible, revealing sensitive information.
- Reverse Lookup: Performs PTR record lookups to find associated domain names for IP ranges.
- Brute Forcing: Attempts to find subdomains using wordlists.
- Wildcard Resolution Detection: Identifies wildcard DNS configurations.
Explanation of Results¶
- A Records: Maps domain names to IPv4 addresses.
- AAAA Records: Maps domain names to IPv6 addresses.
- CNAME Records: Canonical names (aliases) for a domain.
- MX Records: Mail exchange servers.
- NS Records: Nameservers managing the domain.
- PTR Records: Reverse DNS lookups.
Example¶
Output:
[+] A Records:
www.example.com -> 192.0.2.1
[+] AAAA Records:
ipv6.example.com -> 2001:db8::1
[+] MX Records:
mail.example.com -> 192.0.2.2
[+] NS Records:
ns1.example.com -> 192.0.2.3
ns2.example.com -> 192.0.2.4
DNSDumpster¶
DNSDumpster is an online tool for passive DNS reconnaissance that provides a graphical overview of DNS records.
Website:¶
Visit DNSDumpster.
Features¶
- DNS Record Enumeration: Similar to
dnsrecon, retrieves A, AAAA, MX, NS, TXT records. - Subdomain Discovery: Lists associated subdomains.
- Reverse DNS Lookups: Identifies domains associated with IP ranges.
- Visual Map: Provides a graphical representation of DNS relationships.
- PTR Records: Offers reverse DNS resolution for IPs.
Explanation of Results¶
- A Records: Maps subdomains to IPs.
- TXT Records: Includes additional information like SPF or DKIM.
- Graphical Map: Visualizes DNS infrastructure, such as servers and IP ranges.
Example Workflow¶
- Enter
example.cominto the DNSDumpster search bar. - Analyze the graphical map and DNS records.
Results Example:
-
Subdomains:
-
MX Records:
-
TXT Records:
Notes Summary¶
| Tool | Key Features | Example Use Case |
|---|---|---|
| DNSRecon | Active DNS enumeration, zone transfer | Find subdomains, test zone transfer vulnerability, retrieve DNS records. |
| DNSDumpster | Passive DNS enumeration, visual mapping | Graphical representation of DNS infrastructure, passive information gathering about DNS records. |
Important Considerations¶
- Always have proper authorization before performing active DNS reconnaissance (e.g., with
dnsrecon). - DNSDumpster is passive and safe for preliminary investigation without interacting directly with the target's DNS servers.