Skip to content

Wildcard DNS Filtering

7 min readRecon Atlas

TL;DR. Isolate synthetic wildcard answers from real names before port scanning. Accepting every answer from dns/resolved.txt floods downstream tools with dead hosts that point to a shared parking address. Filter dns/resolved.txt against baseline addresses collected from random label probes.


This chapter deepens Resolution, IP mapping and CDN filtering.

Light active

When a wildcard DNS record answers for every label under example.com, which lines in dns/resolved.txt are real names?

The tempting wrong answer accepts every DNS NOERROR response as a confirmed asset. An analyst assumes each resolved name marks an intentional deployment.

Your decision hangs on dns/resolved.txt and dns/dnsx.json. You compare each address against the zone baseline.

Four criteria guide your branches:

  1. Synthetic wildcard match: The hostname resolves to the baseline wildcard address with no CNAME. Drop the name.
  2. Distinct address hit: The hostname resolves to an address outside the baseline wildcard set. Keep the name.
  3. Explicit canonical alias: The hostname returns a CNAME record. Keep the name. The CNAME proves deliberate DNS configuration.
  4. Dynamic pool match: The zone rotates addresses for nonexistent names. Match against your multi-canary baseline. Any candidate matching that pool without a unique CNAME is dropped.

This decision carries trade-offs. Dropping names sharing the wildcard IP can discard valid virtual hosts on that server. Retaining them forces scanners to probe one destination repeatedly, producing duplicate findings.

Send validation queries at 100 to 200 packets per second to prevent nameserver throttling.

You generate the primary input during resolution. You pass candidate names from subs/all.txt into dnsx or puredns. The resolver queries authoritative nameservers and records responses.

Query random canary strings that cannot exist in real operations to identify the baseline:

Terminal window
# Query nonexistent canary hostnames to determine the wildcard baseline IP
dig +short randomcanary9812.example.com randomcanary4321.example.com @ns1.example.com

The fields in dns/dnsx.json provide evidence:

  • host: Queried domain name from subs/all.txt.
  • a: Array of IPv4 addresses in the DNS Answer section.
  • cname: Array of canonical name aliases.
  • status_code: DNS response code from the authoritative server, such as NOERROR or NXDOMAIN.
  • resolver: Server address answering the query.
Terminal window
# Resolve candidates while filtering wildcard answers against canary baselines
puredns resolve subs/all.txt -r ~/wordlists/resolvers-trusted.txt --wildcard-tests 5 -w dns/resolved.txt

DNS data cannot contain application layer state. It contains no HTTP response codes, no TLS certificate validation records, and no port availability indicators. A valid A record in dns/dnsx.json proves a nameserver answered. It cannot prove an HTTP server listens on port 80 or 443.

# SAMPLE, invented
{"host":"vpn.example.com","resolver":["1.1.1.1:53"],"a":["203.0.113.50"],"status_code":"NOERROR"}
{"host":"test-internal-dev.example.com","resolver":["1.1.1.1:53"],"a":["203.0.113.10"],"status_code":"NOERROR"}
{"host":"portal.example.com","resolver":["1.1.1.1:53"],"cname":["target-pool.example.com"],"a":["203.0.113.10"],"status_code":"NOERROR"}

Interpret these three records:

Record 1: vpn.example.com

  • What it asserts: The name resolves to 203.0.113.50 with status code NOERROR, outside the wildcard baseline address 203.0.113.10. An administrator defined an explicit A record.
  • What it does not assert: It does not assert that a service listens on port 443 or UDP port 1194. It also does not assert that the IP belongs to internal infrastructure.
  • Next command or drop reason: Retain the hostname. Add vpn.example.com to dns/resolved.txt for HTTP probing and save 203.0.113.50 to dns/ips.txt for port scanning.

Record 2: test-internal-dev.example.com

  • What it asserts: The name resolves to 203.0.113.10 with status code NOERROR, matching the baseline address of nonexistent canary labels.
  • What it does not assert: It does not assert that an environment exists under this name.
  • Next command or drop reason: Drop the record. The response matches the wildcard baseline signature with no CNAME record. Discarding it avoids duplicate scans.

Record 3: portal.example.com

  • What it asserts: The name maps to target-pool.example.com through an explicit CNAME before resolving to 203.0.113.10.
  • What it does not assert: It does not assert that target-pool.example.com hosts an active application, or that the destination is safe from takeover.
  • Next command or drop reason: Retain the hostname. An explicit CNAME chain proves deliberate DNS configuration. Write portal.example.com target-pool.example.com to dns/cnames.txt for takeover checks, and keep portal.example.com in dns/resolved.txt.

During wordlist expansion, your resolver marks admin-console.example.com as live. The record returns status code NOERROR and resolves to 203.0.113.10. An analyst sees admin-console and treats it as a high-value discovery, scheduling immediate scans.

The check that kills this false positive queries random canary labels against the authoritative nameserver:

Terminal window
# Verify whether random canary labels produce the identical address
dig +short rnd-x912a.example.com rnd-k882b.example.com @ns1.example.com

Both queries return 203.0.113.10. An HTTP probe confirms this. You send HTTP GET requests to admin-console.example.com and rnd-x912a.example.com. Both return an identical 404 response body with matching length and hash. The hostname has no independent service.

Write this sentence in your notes: admin-console.example.com matches the zone wildcard baseline on 203.0.113.10 and returns the catch-all HTTP 404 response; confirmed synthetic artifact and dropped from active targets.

This false positive stems from misinterpreting DNS output. Resolving to an address confirms only that the query succeeded. A wildcard record produces that response automatically. Treating every resolved record as a distinct target wastes time on synthetic names routing to an identical server.

DNS wildcard filtering cannot see virtual hosts on the wildcard IP address.

A target often places genuine applications behind the reverse proxy serving the wildcard record. That proxy routes requests based on the HTTP Host header. In DNS, legitimate virtual hosts and nonexistent random labels resolve to the same address 203.0.113.10. Discarding every hostname matching 203.0.113.10 drops those legitimate virtual hosts.

The check that catches these hidden services is virtual host discovery in phase 11. You send HTTP requests directly to the web server on 203.0.113.10 with calibrated Host headers:

Terminal window
# Fuzz virtual host headers against the shared wildcard front-end server
ffuf -u http://203.0.113.10 -H "Host: FUZZ.example.com" -w ~/wordlists/subdomains.txt -ac -silent

This verification belongs to a separate step because it operates at Layer 7. DNS filtering evaluates nameserver records. It cannot send HTTP requests, negotiate TLS handshakes, or inspect response bodies. Evaluating virtual host headers requires active HTTP probing with calibrated response filtering.

Handle candidate names using three paths:

  • Run expensive follow-up: When random canary queries return rotating IP addresses, the zone uses dynamic load balancing. Run a baseline query set of 30 canary names to capture the entire response pool.
  • Drop host: When a candidate hostname resolves to an address in the wildcard baseline pool and lacks a CNAME record, drop the host immediately.
  • Leave host: When a candidate hostname returns an external CNAME or an address outside the wildcard baseline, retain the host in dns/resolved.txt without further filtering.

Adhere to the program query limit. Keep active DNS resolution rates below 200 packets per second. If authoritative nameservers return SERVFAIL or REFUSED codes, pause your queries immediately.

Cap manual inspection at 3 minutes per candidate domain. If you cannot establish whether an address represents a wildcard within 5 minutes, drop the candidate.

In an automated pipeline, configure your parser to fail closed. If baseline canary checks fail to receive authoritative answers, or if queries timeout, the pipeline halts ingestion for that zone. The pipeline quarantines candidate hostnames into dns/wildcard-quarantine.txt and refuses to pass unverified records downstream.

You write your verified names to dns/resolved.txt.

This file contains one fully qualified domain name per line that resolved through an explicit DNS record:

# Verified hostnames with synthetic wildcards removed
api.example.com
portal.example.com
vpn.example.com

The next phase asks one central question: Which of these verified hostnames host active HTTP or HTTPS web services?

You pass dns/resolved.txt directly to Live hosts and screenshots to probe web ports and collect response headers. You also supply unique IP addresses derived from these records to Port scanning to identify accessible network services.

Where Claim Why it is uncertain
Authoritative zone apex The wildcard record covers all subdomains equally across all nesting depths. DNS wildcard synthesis follows RFC 4592 boundaries and stops at explicit subdomain zone delegations or existing intermediate labels.
GeoDNS anycast edges A canary query from a single host uncovers every wildcard IP address. Geographic nameservers return location-dependent IP pools, causing queries from one network vantage point to miss addresses returned elsewhere.
Shared application gateway A hostname resolving to the wildcard IP address serves no active application. Web servers on the wildcard IP address can route traffic based on HTTP Host headers while returning default pages for unrecognized names.
Upstream resolver caches Sequential resolution queries reflect live changes in the authoritative zone. Public resolvers cache positive responses and negative NXDOMAIN responses according to differing local cache policies.
Connections0 backlinks · 3 outgoingFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

Recon AtlasFor authorized testing only. Your scope is the map edge.