dnsx logo

dnsx

Resolve and inspect DNS records at scale in a pipeline: A/AAAA/CNAME lookups, wildcard filtering and custom resolvers. Free, open source, Go.

Overview

dnsx is a DNS toolkit from ProjectDiscovery that supports resolving hostnames and querying record types in reconnaissance pipelines. It can help validate candidate subdomains and enrich an asset inventory with DNS information.

Key features

DNS resolution; record-type queries; list input; machine-readable output.

Install & first run


# Go tool - put the Go bin directory on your PATH first
go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@latest
export PATH="$PATH:$(go env GOPATH)/bin"

# Docker alternative
docker run --rm projectdiscovery/dnsx:latest -h

# Resolve A records and show the response
echo example.com | dnsx -a -resp

# Chain it: subdomains -> only the ones that actually resolve
subfinder -d example.com -silent | dnsx -silent -a -resp

-wd drops wildcard DNS answers, which otherwise look like thousands of real subdomains. Docs: https://docs.projectdiscovery.io/tools/dnsx/overview

Real-world example

Resolve a reviewed list of in-scope subdomains and record which names map to addresses before service discovery.

Common questions

Does DNS resolution prove a service is vulnerable?

No. It only provides DNS evidence; assess services separately.

How is it different from dig?

dnsx takes a list on stdin and returns one line per host, which makes it pipeline-friendly. dig answers one query at a time for humans.

Why do some hosts return nothing?

No A/AAAA record, or the resolver timed out. Raise -retry and -t, and use -wd to drop wildcard answers that would otherwise look like hits.

Does it resolve through my own resolver?

Yes - pass -r resolvers.txt to use a specific list, which is how you spot resolver-based split-horizon differences.

httpx

Turn a host list into live HTTP services: status codes, titles, TLS details, headers and detected tech in one fast pass. Free, Go CLI.

Katana

Crawl web applications for URLs and endpoints, parsing JavaScript and known files so you see the routes a user can really reach. Free, Go CLI.

OWASP Amass

Map an organisation's external attack surface with passive DNS, certificate and WHOIS correlation. Free, open source, an OWASP project.


Keep exploring: browse every assessment phase in the Pentest Hub.

Authorized testing only — only ever test systems you own or have explicit written permission to assess.