Skip to main content
cd ../config-traps
risk/register/legacy-axfr-flags-survive-windows-dns-upgrades.html
Active Directory DNS Securityhigh severityWindows Server AD DNS

Legacy AXFR Flags Survive Windows DNS Upgrades

Severity
high
Reviewed
27 Jul 2026
Remediation
~20 minutes
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

Unsafe setting
Zone-level SecureSecondaries property set to TransferAnyServer on an AD-integrated primary zone.
Failure trigger
An in-place DNS role upgrade or domain controller migration inherits the legacy zone transfer flag from the source server.
Blast radius
Any host on the internal network can AXFR the full zone, exposing every domain controller role, host record and internal service name without authentication.
Recommended control
Set SecureSecondaries to TransferToSecureServers with an explicit secondary server list and verify with an external AXFR test.

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

Fresh Windows Server DNS installations default new AD-integrated primary zones to TransferToSecureServers, restricting transfers to name servers listed in the zone’s NS records. That default is only applied at zone creation. When a domain is migrated via demote-and-repromote, or when an old Windows Server 2008 or 2012 DNS role is upgraded in place rather than rebuilt, the zone object inherits whatever SecureSecondaries value existed on the source server. 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 no error is logged.

The Blast Radius

Any device with line-of-sight to UDP/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 in one response: every host record, every _ldap._tcp, _kerberos._tcp and _gc._tcp SRV record identifying which domain controllers hold the PDC emulator, Global Catalog and RID master roles, plus CNAME and A records for internal application tiers, backup servers and jump boxes. No credential is required and no authentication event is generated, because AXFR is served by the DNS process independently of Kerberos or NTLM. 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, without triggering a single alert tied to logon activity.

The Lead Mechanic Fix

Audit every zone with Get-DnsServerZoneTransferPolicy or by reviewing dnscmd /zoneinfo <zone> /allowedxfr output line by line across all domain controllers, since the setting is stored per zone, not per server. Correct any zone showing TransferAnyServer with:
Set-DnsServerPrimaryZone -Name "corp.internal" -SecureSecondaries "TransferToSecureServers"
and explicitly enumerate legitimate secondaries where required using -SecondaryServers. Confirm remediation by re-running the AXFR query externally and verifying REFUSED, then bake a scheduled compliance check into your build pipeline so re-promoted or upgraded domain controllers cannot silently reintroduce the flag.

03

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-DnsServerZoneTransferPolicy
dnscmd /zoneinfo <zone> /allowedxfr
Set-DnsServerPrimaryZone -Name "corp.internal" -SecureSecondaries "TransferToSecureServers"
04

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.

After remediation

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