CPSA ยท Open source information gathering
DNS zone transfers (AXFR and IXFR)
AXFR and IXFR, why unrestricted transfers expose a network and how to restrict them.
Key points
- A zone transfer copies a zone from a primary to a secondary server.
- AXFR sends the whole zone over TCP, bracketed by the SOA record.
- IXFR sends only the changes since the client's serial.
- If a server allows anyone to request AXFR, an outsider gets every host name and address in the zone in one query.
- The fix is to limit transfers to named secondaries, for example with BIND's allow-transfer.
Source: https://www.rfc-editor.org/rfc/rfc5936
Practice questions
Which transport does an AXFR zone transfer use?
- UDP only
- ICMP
- TCP
- Either, chosen randomly
Show answer
Answer: C. TCP
AXFR is defined over TCP only, because a whole zone does not fit in a single UDP datagram and needs a reliable stream. Tools such as dig switch to TCP automatically.
Which data does an unrestricted zone transfer typically expose?
- Every host name defined in the zone
- The IP addresses those names resolve to
- Mail and text records in the zone
- The private keys of the DNS server
- User account passwords
Show answer
Answer: A. Every host name defined in the zone, B. The IP addresses those names resolve to, C. Mail and text records in the zone
A full transfer lists every record in the zone: host names, their addresses and other types such as MX and TXT. It does not include server private keys or user passwords, which are not zone data.
True or false: AXFR requests are sent over UDP like ordinary DNS lookups.
Show answer
Answer: False
AXFR sessions over UDP are not defined; the request is made over TCP. Ordinary small lookups normally use UDP, which is why the statement is a trap.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
