Site AI Auditvon Internet Solutions

DNS Zone Transfers (AXFR): Do Not Leak Your Whole DNS

31. Oktober 20268 Min. LesezeitSicherheit & SSL
DNS Zone Transfers (AXFR): Do Not Leak Your Whole DNS

Short answer: A DNS zone transfer, called AXFR, copies all the records of a domain from one name server to another. It is meant for your own secondary servers. If the primary server answers the request for anybody on the internet, the requester receives your complete list of hostnames and addresses, including test sites, internal tools and mail servers. Test your own domain, and if the transfer works for strangers, restrict it to named server addresses, add authentication with TSIG or turn it off.

What a zone transfer is

The Domain Name System is the address book of the internet. For each domain, the records are kept in a zone file on an authoritative name server. For reliability, most domains use at least two name servers. When the main one changes, the other must receive the update. One standard way is a zone transfer: the secondary server asks the primary for a full copy of the zone. The full request is called AXFR, and a related incremental request, IXFR, asks only for changes.

This is normal and useful. The problem arises only when the primary answers such requests for anyone, not just for its partners.

Why an open transfer is a problem

Normally, someone who wants to learn your DNS records must ask for each name, one by one. They can guess common ones such as www, mail or shop, but they cannot be sure that they know all of them. An open zone transfer removes that guesswork. One request returns everything at once.

The transfer does not by itself break into anything. It is reconnaissance. But reconnaissance saves attackers time and shows them where to aim, which is why security reviews treat open transfers as a finding.

How common is it?

Large managed DNS providers block public zone transfers by default, so most small business domains hosted with them are safe. Open transfers are more often found where an organisation runs its own name servers, uses an older control panel or a default configuration, or when a migration left a test server running with permissive settings. It can also appear on a secondary server that is configured differently from the primary. For that reason, check every name server that is listed for your domain, not only the main one.

How to test your own domain

Test only domains that you own or manage. Asking for transfers from other people’s servers can be seen as hostile.

  1. Find your name servers. A DNS lookup of the NS records of your domain lists them.
  2. Request a transfer from each one. A command-line DNS tool such as dig lets you ask a specific server for the AXFR of your domain. Run it against every listed name server.
  3. Read the answer. If the server responds with “transfer failed”, “refused” or a timeout, the result is good. If it prints a long list of records, the transfer is open.
  4. Repeat from a different network. Some servers allow transfers from addresses inside your own network but refuse the outside world. Test from outside, for example from a mobile connection or a hosted server.
  5. Record the result. Note the date, the servers and the outcome, and repeat the test after DNS changes or migrations.

Many online security scanners also include a zone transfer check for the domain that you enter.

How to fix an open transfer

After you change the settings, repeat the test from outside and confirm that every name server now refuses the request. Also confirm that your secondary servers still receive updates: change a harmless record, wait for the refresh time and check that all servers return the new value. A lockdown that breaks replication can leave one server serving old data, which causes confusing, intermittent problems for visitors and for mail delivery.

If you depend on a hosting company or an agency for DNS, send them a short, clear request: ask whether zone transfers are restricted to named secondary servers, whether TSIG is used and how often the setting is reviewed. A good provider can answer in one message. If they cannot answer at all, that tells you something about how carefully your records are managed, and it may be a reason to move the zone to a service that publishes its security practices.

Keep in mind that a fix on the DNS side should be paired with good hygiene elsewhere. If an old record points to a server that no longer exists, remove it, because a forgotten name can be claimed by someone else. If a record exposes an internal service that should never be reachable from the internet, move that service behind a VPN instead of hiding its name.

A note on zone walking

Even without AXFR, some zones can be enumerated in another way. A signed zone that uses the older NSEC records links each name to the next one, so a person can follow the chain and list all names. The newer NSEC3 records hash the names to make this harder, although they do not make it impossible. If you sign your zone, ask your provider which method it uses. The basics of signing are in DNSSEC explained for website owners. Treat names as discoverable in the long run, and never rely on an unusual hostname as a security measure.

Good habits for DNS

  1. Use a reputable managed DNS service unless you have the skills and time to run your own.
  2. Control who can edit the zone. Use strong sign-in with a second factor for the DNS account, and keep a record of changes.
  3. Do not put secrets in records. Text records are public. Do not store passwords, keys or private notes in them.
  4. Plan DNS migrations. When you switch providers, as in changing DNS provider without breaking e-mail, make sure that the old servers are retired and no stale servers remain.
  5. Monitor changes. Alert on unexpected record changes and on new name servers.
  6. Retest regularly. Once or twice a year, repeat the transfer test.

How Site AI Audit helps

Site AI Audit does not run zone transfer tests, so use the steps above for your name servers. It does check the e-mail authentication records in your DNS, such as SPF, DKIM and DMARC, together with SSL, HTTPS redirects, security headers and the health of your pages, explained in plain words and ranked by impact. The first check is free, covers up to 50 pages and needs no sign-up. You can run a free check of your website or see the plans for regular monitoring.

Related reading

The bottom line

Zone transfers are a normal tool between your own name servers and a gift to strangers if left open. Test each name server for your domain, allow transfers only to named secondary servers with TSIG authentication, block the rest at the firewall and keep your DNS account and records tidy. The check takes minutes, and a closed transfer removes an easy way of mapping your systems.

FAQ

Is a zone transfer the same as a DNS lookup?

No. A lookup asks for one record, such as the address of a single name. A zone transfer asks for the whole list of records in a domain.

Can anyone download my DNS records if I use a big DNS provider?

Usually not, because large providers block public transfers. Test anyway, particularly if your domain uses additional or older name servers.

Does DNSSEC stop zone transfers?

No. DNSSEC protects the integrity of answers, not who may ask for a transfer. You still need to restrict transfers on the servers.

Is it legal to test a transfer?

Test your own domains only. Running such tests against other people’s name servers without permission can be treated as hostile and may breach their rules.

What is TSIG?

It is a method that uses a shared secret key to authenticate DNS messages between servers, so only trusted servers can request or accept transfers.

#DNS#Web vulnerabilities#Website security
Prüfen Sie Ihre eigene Website — kostenlos.Was Sie auf Ihrer Website beheben sollten — und wo Sie anfangen.
Kostenlos starten

Mehr aus dem Blog

Alle Artikel →
Internet Solutions

Mehr von unserem Team

Entwickelt von Internet Solutions. Probieren Sie auch unsere anderen Produkte aus — jedes spart Ihnen auf seine eigene Weise Zeit.

internet-solutions.net ↗