DNS Enumeration
The Domain Name System (DNS) is on of the most critical systems on the Internet and is a distributed database responsible for translating user-friendly domain names into IP addresses.
Last updated
Was this helpful?
The Domain Name System (DNS) is on of the most critical systems on the Internet and is a distributed database responsible for translating user-friendly domain names into IP addresses.
Last updated
Was this helpful?
DNS queries produce listintgs calles Resource Records. This is a representation of Resource Records:
A DNS lookup is the simplest query a DNS server can receive. Its asks the DNS to resolve a given hostname.
Once we retrieved all the IP addresses corresponding to the domains, we need to consider two things:
Is this IP address hosting only that given domain?
It is possible that more than one domain is configured on the same IP address, even if a PTR record is not set. This is also typical in corporate networks where multiple subdomains run on the same web server. First thing to try is reverse lookup and the second is search on google or bing:
Who does this IP address belongs to?
To search the owner of an IP address we can use whois.arin.net or one of the WHOIS tools seen earlier
In order to collect the highest number of domains and subdomain related to the target organization, we can use different techniques:
DNS Lookup
MX Lookup
Zone transfers
With Reverse DNS Lookup, we will recieve the IP address associated to a given domain name. This process queries for DNS pointer records (PTR).
or use online tools:
With MX(Mail Exchange) lookup, we retrieve a list of servers responsible for delivering emails for that domain:
or use online tools:
Zone transfers are usually a misconfiguration of the remote DNS server. They should be enabled only for trusted IP addresses. Whe zone transfers are enabled, we can enumerate the entire DNS record for that zone. This includes all the sub domains (A records).
There are usually two name servers. Take note of both of them an run the next command to show all A records:
Another technique to discover A records if Zone transfers are well configured is to bruteforce them with a most common subdomain names: