dnsx
dnsx is a fast and multi-purpose DNS toolkit that performs multiple DNS queries using the retryabledns library with user-supplied resolvers. It supports DNS wildcard filtering and various record types like A, AAAA, CNAME, PTR, NS, MX, TXT, and SOA.
Description
dnsx is designed as a simple utility for querying DNS records and running multiple probes efficiently. It enables users to resolve lists of subdomains or hosts, bruteforce domains with wordlists, and filter results based on DNS status codes or response types. This tool is particularly useful in reconnaissance phases for discovering valid DNS records, tracing DNS paths, and identifying CDN or ASN information associated with hosts.
Use cases include DNS enumeration during security assessments, validating subdomain existence, and handling wildcard subdomains automatically to avoid false positives. It integrates well with other tools via stdin/stdout support, making it suitable for piping into or from other Kali Linux utilities in automated workflows.
The toolkit supports advanced features like rate limiting, retries, and proxy usage, ensuring reliable performance even with large input lists. Automatic update checks and health diagnostics further enhance its usability in production environments.
How It Works
dnsx operates using the retryabledns library to send concurrent DNS queries to specified resolvers, supporting multiple record types (A, AAAA, CNAME, NS, MX, TXT, SOA, SRV, PTR). It performs probes with configurable threads and retries, applies wildcard filtering by tracking response thresholds for specified domains, and handles DNS tracing with recursion limits. Filters process responses by status codes, types, or content, while optimizations like streaming mode and timeouts manage large-scale scans. Output can be formatted as JSONL with optional raw response omission, and CDN/ASN probing fetches additional host metadata.
Installation
sudo apt install dnsxFlags
Examples
dnsx -hdnsx -l hosts.txt -adnsx -d domains.txt -w wordlist.txtdnsx -d example.com -aaaa -cnamednsx -l subdomains.txt -ns -mx -txtdnsx -l hosts.txt -cdn -asn -o results.txtdnsx -l input.txt -trace -j