https://youtu.be/6BJSqJtDq2Y?si=28Wgtrhm3wzyyt6b

A DNS Zone Transfer is the process of copying all DNS records from a primary DNS server to a secondary DNS server to keep DNS data synchronized.

How a Zone Transfer Works

  1. The secondary DNS server sends an **AXFR** request -Full Zone Transfer Request, to the primary server.
  2. The primary server sends the ‣
  3. The primary server transfers all DNS records (A, AAAA, MX, NS, CNAME, TXT, etc.).
  4. Zone Transfer Complete: Once all records have been transmitted, the primary server signals the end of the zone transfer. This notification informs the secondary server that it has received a complete copy of the zone data.
  5. The transfer completes, and the secondary server sends an acknowledgement (ACK).

Security Risk

If a DNS server is misconfigured, an attacker may be able to perform an unauthorized zone transfer and obtain the entire DNS zone file.

Information exposed may include:

Because of this, modern DNS servers restrict AXFR requests to authorized secondary DNS servers only.

Testing for Zone Transfers

First, identify the authoritative name server:

dig example.com NS