ENUM^:Enumeration

dig

Query DNS records, validate zone transfers, and distinguish DNS discovery from HTTP virtual hosts.

intermediateupdated 2026-10-12dig

dig

dig asks a DNS server for records. A zone transfer can reveal hostnames in bulk when the server permits it. The supplied Red Block report uses this; a denied transfer is a normal access-control result.

Query deliberately

dig @192.0.2.10 example.test SOA +noall +answer
dig @192.0.2.10 example.test NS +noall +answer
dig @192.0.2.10 app.example.test A +noall +answer
dig @192.0.2.10 example.test AXFR +time=3 +tries=1

@ selects the server, the next argument selects the name, and the final type selects the question. AXFR normally uses TCP: UDP DNS reachability does not establish that a transfer will work. Use the authoritative server and the exact zone, including a delegated child zone if one exists.

Interpret and validate

A completed AXFR contains the zone’s records and opening/closing SOA entries. REFUSED, an interrupted response, or a single ordinary lookup is not a completed transfer. Keep names with their record type and source. An A record is a discovery lead, not evidence of a vulnerable web application.

Success: an unauthorised client receives the intended zone contents. Restrict transfers to approved secondaries, preferably authenticated with TSIG. HTTP Host routing is a separate check: continue with wfuzz.

Record types worth asking for

TypeWhat it helps establishFollow-up
SOAZone authority, serial and timingCompare the same zone on each authoritative server
NSServers responsible for a zoneResolve each server and test it directly
A / AAAAIPv4 / IPv6 addressesKeep both families in the service inventory
CNAMEAlias to another nameFollow the canonical name without assuming ownership
MXMail routingRecord priority and resolve the destination
TXTText such as SPF and verification recordsTreat text as configuration evidence
SRVService name, port, priority and weightUseful for AD DC and Kerberos discovery
PTRReverse name for an addressCompare with forward resolution
dig @192.0.2.10 example.test MX +noall +answer
dig @192.0.2.10 example.test TXT +noall +answer
dig @192.0.2.10 app.example.test AAAA +noall +answer
dig @192.0.2.10 _ldap._tcp.dc._msdcs.example.test SRV +noall +answer
dig @192.0.2.10 -x 192.0.2.20 +noall +answer

ANY is not a reliable replacement for these queries: servers can return a minimal response. An address or alias found through DNS still needs an in-scope service check.

Work a zone-transfer lead end to end

mkdir -p evidence/dns
dig @192.0.2.10 example.test SOA > evidence/dns/soa.txt
dig @192.0.2.10 example.test NS > evidence/dns/ns.txt
dig @192.0.2.10 example.test AXFR +time=3 +tries=1 \
  > evidence/dns/axfr.txt 2>&1

Use the full output for evidence; +short hides the status, server and authority details needed to explain a failure. Check whether the transfer starts and ends with the same SOA, then resolve selected names against that same server. If a child zone is delegated, query its authority rather than assuming the parent server holds it.

Compare UDP, TCP and recursive answers

dig @192.0.2.10 app.example.test A +time=2 +tries=1
dig @192.0.2.10 app.example.test A +tcp +time=2 +tries=1
dig @192.0.2.10 example.test SOA +norecurse
ObservationInterpretationNext check
NXDOMAINThe queried name does not exist in that DNS viewCheck spelling, suffix and selected server
NOERROR, no answersName can exist without the requested typeInspect authority and query another relevant type
REFUSEDServer policy refused the requestConfirm authority and whether recursion or AXFR was requested
SERVFAILResolution or validation failedCompare direct authoritative lookup and server logs
UDP times out, TCP worksTransport or response-size issueCheck filtering and truncation; retain both probes
Different internal/external answerSplit DNS, caching or different authorityRecord server, timestamp and TTL for each view

+trace follows public delegation and can contact many servers. It is usually unsuitable for private AD zones that exist only on the internal resolver.

Continue from names to services

Validate a discovered web name while keeping Host and TLS SNI aligned:

curl --resolve app.example.test:443:192.0.2.20 \
  --cacert lab-ca.pem -I https://app.example.test/

For AD, feed the DC FQDN and SRV results into LDAP Search; for HTTP catch-all routing use wfuzz. Keep a separate finding for an overly permissive AXFR and for any application issue discovered from its records.

How attacks work. Examples use fictional lab values; replace placeholders only with values from the system you are testing.

On this page

☧ CPTS · ordered posts

Locked

Unlock with your Main_Key through local GPG.

Start the local GPG helper

In your cheatsheet checkout, run:

npm run unlock:helper

Open the link it prints, or paste its pairing code below. Keep the terminal open until GPG finishes.

Import an index you already decrypted

Download the encrypted index, then decrypt with GPG:

gpg --output report-index.json --decrypt report-index.gpg

Your private key stays in GPG. The decrypted index is saved in this browser so you can reopen it after navigation, refreshes and restarts. Lock this browser or clear this site's browser data to remove the saved index. Nothing is uploaded.