Skip to main content

Legacy AXFR Flags Survive Windows DNS Upgrades

High severityWindows Server AD DNS About 20 minutes to fixGenerated 27 Jul 2026

Overview

An in-place upgraded Windows DNS Server can retain a zone-level TransferAnyServer flag from a decommissioned Windows Server 2008 secondary, letting any host on the internal network pull a full AXFR of the AD-integrated zone. Firewall rules and Kerberos authentication never see the query, because zone transfer authorisation is checked entirely inside the DNS service.

At a glance

Symptom
An in-place DNS role upgrade or domain controller migration inherits the legacy zone transfer flag from the source server.
Likely cause
Zone-level SecureSecondaries property set to TransferAnyServer on an AD-integrated primary zone.
Impact
Any host on the internal network can AXFR the full zone, exposing every domain controller role, host record and internal service name without authentication.
Verification signal
Re-run the detection test and a controlled negative-path test.
Safe correction
Set SecureSecondaries to TransferToSecureServers with an explicit secondary server list and verify with an external AXFR test.
Rollback or recovery
Restore the exported configuration if the new control blocks required production traffic, then narrow the policy before redeployment.

The Trap

The AXFR zone transfer flag on an Active Directory-integrated DNS zone, specifically the SecureSecondaries property, remaining set to TransferAnyServer after a domain controller migration or in-place operating system upgrade.

The Default State

The SecureSecondaries property controls who may request a zone transfer. The documented values are TransferAnyServer, TransferToZoneNameServer (servers in the zone’s NS records), TransferToSecureServers (only servers listed in -SecondaryServers) and NoTransfer. The Name Servers tab restricts transfers only when ‘Only to servers listed on the Name Servers tab’ (TransferToZoneNameServer) is selected. Many legacy builds shipped or were manually configured with TransferAnyServer to support third-party secondary resolvers that no longer exist. Nobody revisits the Zone Transfer tab after the migration, because the zone still resolves correctly and nothing prompts anyone to look.

The Blast Radius

Any device with line-of-sight to TCP 53 on a domain controller can run dig axfr corp.internal @10.0.0.10 or an equivalent nslookup ls -d session and receive the entire zone: every host record, the SRV records that reveal domain controllers, Global Catalog servers, Kerberos KDCs and the PDC emulator, plus CNAME and A records for internal application tiers, backup servers and jump boxes. No credential is required and no logon event is generated, because AXFR is served by the DNS service rather than through a Kerberos or NTLM logon. DNS analytic or debug logging can record zone transfer requests, but it is often not enabled. An attacker who has landed on a single unprivileged workstation now has a prioritised target list for DCSync attempts, Kerberoasting against service accounts, and lateral movement, and may not trigger any alert tied to logon activity.

The Lead Mechanic Fix

First, audit read-only and record the current values. Run Get-DnsServerZone | Select ZoneName, SecureSecondaries or review dnscmd /zoneinfo <zone> output, and save the results. Zone transfer settings are stored in each DNS server’s registry, not in Active Directory, so they do not replicate even for AD-integrated zones: check every DNS server that hosts the zone (Get-DnsServerZone -ComputerName <dc>) rather than assuming the setting is consistent. Before changing anything, confirm which secondaries legitimately pull transfers. Correct any zone showing TransferAnyServer, piloting on one non-critical zone first:
Set-DnsServerPrimaryZone -Name "corp.internal" -SecureSecondaries "TransferToZoneNameServer"
or, where specific secondaries are required, list them explicitly with -SecureSecondaries "TransferToSecureServers" -SecondaryServers <IP addresses>. Use NoTransfer if no secondaries exist. To undo, set the recorded original value back. Confirm remediation by re-running the AXFR query from a non-DC host and verifying the transfer is refused, then bake a scheduled compliance check into your build pipeline so re-promoted or upgraded domain controllers cannot silently reintroduce the flag.

Read-only check

Check your environment (read-only)

Show who each zone on a Windows DNS server will send zone transfers to

Based on vendor documentation; not run by KBY in a test tenant

What it shows: Each zone's zone transfer setting and, where transfers are limited to named servers, the list of those servers.

PowerShell
# Replace <dns-server> with a DNS server name, or omit -ComputerName to query the local server.
Get-DnsServerZone -ComputerName <dns-server> |
  Select-Object ZoneName, ZoneType, IsDsIntegrated, SecureSecondaries, SecondaryServers

How to read the result

  • TransferAnyServer: zone transfers are allowed to any DNS server. This is the setting this trap describes.
  • TransferToZoneNameServer: transfers only to servers in the zone's NS records.
  • TransferToSecureServers: transfers only to the secondary servers listed in SecondaryServers.
  • NoTransfer: zone transfers are not allowed for the zone.

You need

  • DnsServer PowerShell module.
  • An account that can read the DNS server's configuration.

Vendor documentation used

The check only reads configuration. Plan any change it points to through your normal change process.

3

Apply the safer control

Before you change production

Confirm the affected scope, export the current configuration, and test the replacement control in a non-production environment first.

Fix commands and configuration

Get-DnsServerZone | Select ZoneName, SecureSecondaries
dnscmd /zoneinfo <zone>
Get-DnsServerZone -ComputerName <dc>
4

Verify, roll back or escalate

Verify

Re-run the detection test and a controlled negative-path test. Confirm the unsafe behaviour is blocked while approved traffic still succeeds.

Rollback

Restore the exported configuration if the new control blocks required production traffic, then narrow the policy before redeployment.

Escalate

Escalate when the blast radius is uncertain, the control cannot be tested safely, or remediation requires an outage or security exception.

The KBY Brief

Fixed? Get the next one before it hits you: The KBY Brief

Practical fixes for the systems you run, by email about twice a week. Unsubscribe at any time.

About this page

Credited to

Dates

Published

Last updated

Corrections

  • : A sentence about how DNS zone transfer settings replicate was wrong and was corrected. Details
  • : Corrected during a review of published articles. Details

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

After remediation

Further reading stays below the corrective workflow and is selected by platform, category and shared technical keywords.

Discover more

Connected KBY resources

Legacy AXFR Flags Survive Windows DNS Upgrades