Recon
Resolve bulk DNS lookups across many record types
zdns is a high-speed DNS resolver and command-line utility written in Go for performing large-scale DNS measurements, with its own recursive resolution code and cache underneath.
installgit clone https://github.com/zmap/zdns.git
v2.0.5 on Trickest · Go · Apache-2.0 license
Free plan: 1 user, 3 execution slots, no card.
overview
What zdns does
zdns resolves DNS from the command line against a list of names. Built by the ZMap team, it queries with many lightweight goroutines and supports a wide range of record types (A, AAAA, MX, NS, TXT, CAA, and more) selected by a module argument. It resolves names; it does not discover them.
Beyond recursive lookups, --iterative walks the delegation chain itself. --tls and --https use encrypted transport. --dnssec requests DNSSEC records. --name-servers pins resolvers. --threads, --retries, and --timeout balance throughput against completeness for the job.
Trickest runs it as a managed Recon node that reads a name list and writes FILE and FOLDER results. Place it after subdomain discovery so candidate names resolve to IPs before port scanning and probing. For active wordlist brute-force with wildcard filtering, prefer puredns.
source github.com/zmap/zdns · v2.0.5 on Trickest
image quay.io/trickest/zdns:v2.0.5
use cases
zdns use cases
Resolve a large name list fast
Feed thousands of discovered subdomains into zdns and tune --threads to resolve them to A and AAAA records in one quick pass.
Query specific record types
Select a module such as MX, NS, TXT, or CAA to pull exactly the records you need for mail, delegation, or policy mapping across a domain set.
Run iterative resolution
Use --iterative so zdns walks the delegation chain itself instead of trusting a recursive resolver, which gives authoritative answers for a survey.
Resolve over encrypted transport
Query with --tls or --https and verify the server certificate to test how a name resolves through a private or hardened resolver.
reference
zdns inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| module | STRING | · | Record type or lookup module to run (A, AAAA, MX, NS, TXT, CAA, and many more). |
| input-file | FILE | · | Input file of names to resolve. |
| name-servers | STRING | --name-servers | Comma-delimited list of DNS servers to use. |
| threads | STRING | --threads | Number of lightweight goroutines (default 1000). |
| iterative | BOOLEAN | --iterative | Perform own iteration instead of using a recursive resolver. |
| dnssec | BOOLEAN | --dnssec | Request DNSSEC records by setting the DO bit. |
| tls | BOOLEAN | --tls | Use DNS over TLS for lookups. |
| timeout | STRING | --timeout | Timeout for resolving an individual name (default 20). |
Showing key inputs. zdns exposes 47 inputs in total.
Full flag reference (47 inputs)
| Name | Type | Flag | Description |
|---|---|---|---|
| tls | BOOLEAN | --tls | Use DNS over TLS for lookups, mutually exclusive with --udp-only, --iterative, and --https |
| nsid | BOOLEAN | --nsid | Request NSID. |
| alexa | BOOLEAN | --alexa | is input file from Alexa Top Million download |
| class | STRING | --class | DNS class to query. Options: INET, CSNET, CHAOS, HESIOD, NONE, ANY. (default: INET) |
| https | BOOLEAN | --https | Use DNS over HTTPS for lookups, mutually exclusive with --udp-only, --iterative, and --tls |
| input | STRING | · | Input target |
| quiet | BOOLEAN | --quiet | do not print status updates |
| dnssec | BOOLEAN | --dnssec | Requests DNSSEC records by setting the DNSSEC OK (DO) bit |
| module | STRING | · | module (one command of: A, AAAA, AFSDB, ALOOKUP, AMTRELAY, ANY, APL, ATMA, AVC, AXFR, BINDVERSION, CAA, CDNSKEY, CDS, CERT, CNAME, CSYNC, DHCID, DMARC, DNAME, DNSKEY, DS, EID, EUI48, EUI64, GID, GPOS, HINFO, HIP, HTTPS, IPSECKEY, ISDN, KEY, KX, L32, L64, LOC, LP, MB, MD, MF, MG, MINFO, MR, MULTIPLE, MX, MXLOOKUP, NAPTR, NID, NIMLOC, NINFO, NONE, NS, NSAPPTR, NSEC, NSEC3, NSEC3PARAM, NSLOOKUP, NULL, NXNAME, NXT, OPENPGPKEY, OPT, PTR, PX, RKEY, RP, RRSIG, RT, SIG, SMIMEA, SOA, SPF, SPF, SRV, SSHFP, SVCB, TALINK, TKEY, TLSA, TXT, UID, UINFO, UNSPEC, URI, X25 or ZONEMD) |
| prefix | STRING | --prefix | name to be prepended to what's passed in (e.g., www.) |
| retries | STRING | --retries | how many times should zdns retry query if timeout or temporary failure (default 3) |
| threads | STRING | --threads | number of lightweight go threads (default 1000) |
| timeout | STRING | --timeout | timeout for resolving an individual name (default 20) |
| tcp-only | BOOLEAN | --tcp-only | Only perform lookups over TCP |
| udp-only | BOOLEAN | --udp-only | Only perform lookups over UDP |
| conf-file | FILE | --conf-file | config file for DNS servers (default "/etc/resolv.conf") |
| iterative | BOOLEAN | --iterative | Perform own iteration instead of relying on recursive resolver |
| max-depth | STRING | --max-depth | how deep should we recurse when performing iterative lookups (default 10) |
| verbosity | STRING | --verbosity | log verbosity: 1 (lowest)--5 (highest) (default 3) |
| cache-size | STRING | --cache-size | how many items can be stored in internal recursive cache (default 10000) |
| input-file | FILE | · | Input file |
| local-addr | STRING | --local-addr | comma-delimited list of local addresses to use, serve as the source IP for outbound queries |
| nanoseconds | BOOLEAN | --nanoseconds | Use nanosecond resolution timestamps |
| go-processes | STRING | --go-processes | number of OS processes to use, GOMAXPROCS if 0 (default: 0) |
| name-servers | STRING | --name-servers | List of DNS servers to use. Can be passed as comma-delimited string. If no port is specified, defaults to 53. If not provided, defaults to either the default root servers in --iterative or the recursive resolvers specified in /etc/resolv.conf or OS equivalent. |
| client-subnet | STRING | --client-subnet | Client subnet in CIDR format for EDNS0. |
| override-name | STRING | --override-name | name overrides all passed in names. Commonly used with --name-server-mode. |
| root-cas-file | FILE | --root-cas-file | Path to a file containing PEM-encoded root CAs to use for verifying server certificates, required for --verify-server-cert |
| blacklist-file | FILE | --blacklist-file | blacklist file for servers to exclude from lookups |
| include-fields | STRING | --include-fields | Comma separated list of fields to additionally output beyond result verbosity. Options: class, protocol, ttl, resolver, flags, dnssec |
| ipv4-transport | BOOLEAN | --4 | utilize IPv4 query transport only, incompatible with --6 |
| ipv6-transport | BOOLEAN | --6 | utilize IPv6 query transport only, incompatible with --4 |
| all-nameservers | BOOLEAN | --all-nameservers | Behavior is dependent on --iterative. In --iterative, --all-name-servers will query all root servers, then all gtld servers, etc. recording the responses at each layer. In non-iterative mode, the query will be sent to all external resolvers specified in --name-servers. |
| local-interface | STRING | --local-interface | local interface to use |
| network-timeout | STRING | --network-timeout | timeout for round trip network operations, in seconds (default 2) |
| validate-dnssec | BOOLEAN | --validate-dnssec | Validate DNSSEC records, only applicable with --iterative |
| name-server-mode | BOOLEAN | --name-server-mode | Treats input as nameservers to query with a static query rather than queries to send to a static name server |
| no-follow-cnames | BOOLEAN | --no-follow-cnames | do not follow CNAMEs/DNAMEs in the lookup process |
| result-verbosity | STRING | --result-verbosity | Sets verbosity of each output record. Options: short, normal, long, trace (default: normal) |
| checking-disabled | BOOLEAN | --checking-disabled | Sends DNS packets with the CD bit set |
| iteration-timeout | STRING | --iteration-timeout | timeout for a single iterative step in an iterative query, in seconds. Only applicable with --iterative (default: 8) |
| multi-config-file | FILE | --multi-config-file | config file path for multiple module configurations |
| no-recycle-sockets | BOOLEAN | --no-recycle-sockets | do not create long-lived unbound UDP socket for each thread at launch and reuse for all (UDP) queries |
| verify-server-cert | BOOLEAN | --verify-server-cert | Verify the server's certificate when using DNS over TLS or DNS over HTTPS |
| metadata-passthrough | BOOLEAN | --metadata-passthrough | if input records have the form 'name,METADATA', METADATA will be propagated to the output |
| prefer-ipv4-iteration | BOOLEAN | --prefer-ipv4-iteration | Prefer IPv4/A record lookups during iterative resolution. Ignored unless used with both IPv4 and IPv6 query transport |
| prefer-ipv6-iteration | BOOLEAN | --prefer-ipv6-iteration | Prefer IPv6/AAAA record lookups during iterative resolution. Ignored unless used with both IPv4 and IPv6 query transport |
example
zdns command examples
# A lookup with high concurrency against a recursive resolver
zdns A --threads 1000 --timeout 20 --retries 3 --name-servers 198.51.100.53 --quiet example.com{"name":"api.example.com","status":"NOERROR","data":{"answers":[{"ttl":300,"type":"A","class":"IN","answer":"198.51.100.10"}]}}
{"name":"app.example.com","status":"NOERROR","data":{"answers":[{"ttl":300,"type":"A","class":"IN","answer":"198.51.100.20"}]}}
{"name":"mail.example.com","status":"NOERROR","data":{"answers":[{"ttl":300,"type":"A","class":"IN","answer":"203.0.113.5"}]}}
{"name":"vpn.example.com","status":"NOERROR","data":{"answers":[{"ttl":60,"type":"A","class":"IN","answer":"203.0.113.8"}]}}
{"name":"staging.example.com","status":"NOERROR","data":{"answers":[{"ttl":300,"type":"A","class":"IN","answer":"198.51.100.30"}]}}
{"name":"cdn.example.com","status":"NOERROR","data":{"answers":[{"ttl":60,"type":"A","class":"IN","answer":"198.51.100.40"}]}}
{"name":"dev.example.com","status":"NXDOMAIN","data":{}}
{"name":"www.example.com","status":"NOERROR","data":{"answers":[{"ttl":300,"type":"A","class":"IN","answer":"198.51.100.1"}]}}guidance
zdns vs alternatives
Use zdns to resolve many names with control over record type, transport, and iteration. Feed it subdomain output from a discovery tool such as subfinder. For active brute-force resolving of a wordlist with wildcard filtering, pair or prefer puredns.
faq
zdns FAQ
related
More Recon tools
amass-intel
OWASP Amass intel: map an organization's root domains and ranges.
bbot
Modular OSINT recon that chains modules from a seed target.
cloud-enum
Multi-cloud public name enumeration for AWS, Azure, and GCP.
findmytakeover
Multi-cloud dangling DNS detection via zone-to-inventory diff, not wordlists.
findomain
Passive subdomain enumeration with optional resolve and HTTP checks.
gobuster-dns
DNS subdomain brute force with wildcard handling.
Run zdns yourself
A domain feeds subfinder, which discovers subdomains and passes them to zdns so only names that resolve land as a queryable output.
Facts on this page come from the live Trickest tool library.