324 words
2 minutes
DIGGING DNS

DIGGING DNS#

DNS Tools#

DNS reconnaissance involve utilizing specialized tools designed to query DNS server and extract valuable information.

ToolWhat It DoesWhen to Use
digVersatile DNS query tool with detailed outputManual lookups, record analysis, troubleshooting
nslookupSimple DNS lookup toolQuick checks for A, AAAA, MX records
hostStreamlined DNS queriesFast A, AAAA, MX lookups
dnsenumAutomated subdomain and DNS enumeration with dictionary & brute forceDiscovering subdomains, zone transfers (if allowed)
fierceDNS recon with wildcard detection and recursive searchMapping subdomains, scanning DNS infrastructure
dnsreconCombines multiple recon techniques, supports output formatsIn-depth DNS recon, exportable results
theHarvesterGathers DNS, emails, and more from public sourcesOSINT, finding emails/domains related to a company
Online ToolsWeb-based interfaces for DNS queriesQuick checks when terminal access isn’t available

The Domain Information Groper#

dig command (Domain Information Groper) a versatile tool used to query DNS server and retrieving various type of record

Common dig Commands#

CommandWhat It DoesWhen to Use
dig domain.comBasic DNS lookup (A record)To get IPv4 address of a domain
dig domain.com AQueries only A (IPv4) recordWhen specifically checking IPv4 address
dig domain.com AAAAQueries AAAA (IPv6) recordWhen checking IPv6 support
dig domain.com MXQueries mail exchange recordsTo find mail servers
dig domain.com NSQueries authoritative name serversTo see which DNS servers manage the domain
dig domain.com TXTGets text recordsUseful for SPF, DKIM, and verification strings
dig domain.com CNAMEFinds canonical name alias recordsTo check if a domain is an alias
dig domain.com SOAGets Start of Authority recordTo see domain’s primary DNS and serial info
dig @1.1.1.1 domain.comUses a specific DNS server (1.1.1.1 in this case)When testing DNS resolution from different NS
dig +trace domain.comTraces DNS path from root to domainFor understanding full DNS resolution path
dig -x <IP>Reverse DNS lookup (IP → Domain)To find domain name from an IP address
dig +short domain.comReturns just the IP(s) or value(s) of the recordClean, script-friendly output
dig +noall +answer domain.comShows only the answer sectionTo reduce noise and focus on results
dig domain.com ANYRequests all available recordsUse with caution – may be blocked by servers

Caution: Some servers can detect and block excessive DNS queries. Use caution and respect rate limits. Always obtain permission before performing extensive DNS reconnaissance on a target.