“Do I have to enable DNSSEC?”
“Is it OK to let browsers use DoH inside our company network?”
DNS sits at the entrance of almost every connection, so it is an attractive target for attackers. At the same time, most DNS incidents are not sophisticated attacks. They come from operational gaps such as records nobody remembered to delete, or domains nobody remembered to renew.
In Part 8 we looked at the commands for investigating DNS. In Part 9 we sort out the attacks aimed at DNS and how to defend against them. This part also covers DNSSEC in detail, which was behind the SERVFAIL you saw in Part 8.
▶ This part is also available as a YouTube video (about 22 min) (it is also embedded at the end of this article).
- The threat landscape
- Cache poisoning and the Kaminsky attack
- Defenses against cache poisoning
- How DNSSEC works
- The chain of trust and validation
- Algorithms and key management
- Root KSK rollover (KSK-2024)
- Reflection attacks and open resolvers
- Random subdomain attacks and DNS tunneling
- Subdomain takeover
- Domain expiry and hijacking
- Encrypting DNS (DoT, DoH, DoQ)
- OS and browser support, and bypassing internal DNS
- Protective DNS, RPZ, and DNS firewalls
- Think about it
- Summary
- Watch the video
- The DNS Fundamentals series (12 parts)
The threat landscape
Let’s start with a list of the threats related to DNS.

| Threat | What is targeted | What happens | Main defenses |
|---|---|---|---|
| Cache poisoning | Caching DNS | A fake response is remembered and users are sent to a fake site | Port randomization, DNSSEC validation |
| Eavesdropping and tampering | Between the device and the caching DNS | Where users browse is leaked, or responses are rewritten | DoT / DoH / DoQ |
| Reflection attack | Open resolvers, authoritative DNS | A flood of responses is sent to a third party | Restrict recursion, RRL |
| Random subdomain attack | Authoritative DNS, caching DNS | Overload from floods of queries for nonexistent names | Query rate limits, monitoring |
| DNS tunneling | Internal caching DNS | Data is carried out inside queries | Log monitoring, DNS firewall |
| Subdomain takeover | CNAMEs and similar records in your own zone | Someone else publishes a site under your name | Delete unneeded records, regular inventory |
| Domain expiry or hijacking | Registrar, NS | The whole domain falls under someone else’s control | Auto-renewal, registrar lock, MFA |
| Access to malicious domains | Users’ devices | Malware infection, phishing | Protective DNS, RPZ |
The top three are attacks on the DNS mechanism itself, and the bottom five are operational gaps and abuse of DNS. Many of the latter can be prevented with configuration and regular inventory, which makes them part of day-to-day operations.
Cache poisoning and the Kaminsky attack
Cache poisoning is an attack that makes a caching DNS server remember a fake response.

Between the moment the caching DNS sends a query to an authoritative DNS server and the moment the real response arrives, the attacker sends a fake response that pretends to come from the authoritative DNS. If it is accepted first, the fake data is cached for the TTL, and all users are sent to the fake site. To be accepted, the response must match the query on things like the query ID (16 bits).
In the past, opportunities were limited because “a name that is already cached cannot be targeted.” But the Kaminsky attack, published in 2008, was different.
- It made the resolver query nonexistent names one after another (a001.example.com, a002.example.com…), so the attacker could try as many times as needed
- It included NS records in the fake response to take over the whole domain
Because this was a weakness in the DNS specification itself, all the major products released fixed versions at the same time.
Defenses against cache poisoning

- Source port randomization: Use a random source port every time, which together with the ID (16 bits) makes guessing harder. This was the core of the 2008 fixes, and current products do it by default. However, if a NAT or firewall on the path rewrites ports sequentially, the effect is lost
- 0x20: Randomly mix upper and lower case in the queried name (wWw.ExAmPle.cOm) and check that the response has the same pattern. Some resolvers implement it
- Do not accept unrelated records: Do not cache information about domains unrelated to the query
- Countering SAD DNS (2020): A technique that finds the port by using the OS’s ICMP response rate limit as a clue. It has been addressed by OS and resolver fixes, so keep the OS up to date as well
- DNS Cookies (RFC 7873): Make spoofed responses easier to spot (Part 4)
But all of these make guessing harder and only lower the odds. Only DNSSEC can confirm that the content of a response is genuine.
How DNSSEC works
DNSSEC (DNS Security Extensions) adds digital signatures to responses so that the receiver can confirm they have not been tampered with. It does not encrypt anything.
| Record | Where it lives | Role |
|---|---|---|
| DNSKEY | Signed zone | The zone’s public keys: the KSK (key-signing key, flag 257) and the ZSK (zone-signing key, flag 256) |
| RRSIG | Signed zone | A signature for each set of records with the same name and type (an RRset). Has a validity period |
| DS | Parent zone | A hash of the child’s KSK. Hands trust from parent to child |
| NSEC | Signed zone | Proof that “this name or type does not exist.” Points to the next name |
| NSEC3 | Signed zone | Hashes the names used in NSEC so the names in a zone are harder to enumerate |
| CDS / CDNSKEY | Child zone | Lets the child publish the DS it wants registered in the parent |

The signatures link upward: data → ZSK → KSK → the parent’s DS.
www.example.com. 300 IN RRSIG A 13 3 300 20261009000000 20260925000000 12345 example.com. (signature)
Read from the left, an RRSIG gives the type covered, the algorithm, the label count, the original TTL, the expiration, the inception time, the key tag, and the signer. Once it expires, validation fails, so automatic re-signing is essential.
The chain of trust and validation
A validating resolver (validator) comes with the root zone’s KSK as a trust anchor from the start.

The resolver verifies the root DNSKEY with this anchor, then the DS for com that the root signed, then the DNSKEY of com that matches it, and so on, walking from parent to child, and finally verifies the RRSIG of www.example.com. This is the chain of trust.
- If there is an expired signature or a mismatch between a DS and a key somewhere along the way, the response is judged “possibly fake.” Returning it would defeat the purpose of DNSSEC, so the resolver returns no answer and sends SERVFAIL
- When validation succeeds, the response gets the AD bit, and a client that sets the CD bit can receive the result with validation turned off (
+cdin Part 8) - A zone with no DS in its parent is treated as “unsigned” and resolves as usual
The validating resolver checks the RRSIG expiration and inception times against its own clock. If the resolver’s clock is badly off, even a correctly signed zone is judged expired (or not yet valid) and returns SERVFAIL. The same kind of clock skew also breaks certificate validation, so keep the resolver’s time synchronized (for example, with NTP).
Algorithms and key management
| Item | Current recommendation and trends |
|---|---|
| Algorithm 13 (ECDSA P-256) | Mandatory to implement for both signing and validation. Small signatures; the first choice for new signing |
| Algorithm 15 (Ed25519) | Recommended. Small signatures, but check validator support before using it |
| Algorithm 8 (RSA/SHA-256) | Still usable. Used by the root and many TLDs. Larger responses |
| Algorithms 5 and 7 (RSA/SHA-1) | Deprecated for signing by RFC 9905 (2025). Some OSes have stopped validating SHA-1 |
| KSK and ZSK | The KSK signs the DNSKEY set and connects to the parent through the DS. The ZSK signs the zone’s data |
| Key rollover | A ZSK rollover needs no parent procedure. A KSK rollover requires replacing the DS in the parent and is where incidents are most likely |
| CDS / CDNSKEY | The parent checks the values the child published and updates the DS automatically (RFC 7344 and 8078; support depends on the registry) |
| KeyTrap (2024) | A DoS that inflates validation work with crafted keys and signatures. Fixed in each product; apply updates |
The most incident-prone operation is the KSK rollover.

- Add the new KSK to the DNSKEY set
- Publish CDS → the parent adds the DS (sometimes by hand)
- Wait for the parent DS’s TTL
- Remove the old KSK and the old DS
If you skip step 2 and do step 4, the parent has only the old DS while the child has only the new KSK, so the chain of trust breaks and the whole domain returns SERVFAIL to validating resolvers (EDE 9 in Part 8). The golden rule is to always keep a period where the old and new keys and DS overlap. Also, algorithm recommendations have been managed in an IANA registry since RFC 9904 (2025).
Root KSK rollover (KSK-2024)
The root KSK, the starting point of DNSSEC, is also being rolled over.

| When | What |
|---|---|
| April 2024 | The new KSK (KSK-2024, key tag 38696) is generated |
| January 2025 | KSK-2024 is published in the root zone alongside the current KSK-2017 (key tag 20326) |
| October 11, 2026 | The root signing switches to KSK-2024 |
| January to March 2027 (planned) | KSK-2017 is revoked and removed from the root zone |
When this article was written, on September 25, 2026, the root DNSKEY set contained both 20326 and 38696, and signing was done with 20326. After the switch, a validating resolver that does not trust 38696 returns SERVFAIL for every name.
Check whether your validating resolvers have 38696 in their trust anchors:
- BIND:
rndc managed-keys status - Unbound: the
root.keyfile - Knot Resolver:
root.keys - Windows Server DNS:
Get-DnsServerTrustAnchor -Name .
Many resolvers automatically pick up the new key using the RFC 5011 procedure (they trust a new key after observing it for 30 days). However, if the key store is not writable, or the resolver was started from a VM or image that was stopped for a long time, the key may not have been picked up. Devices that do not use automatic updates must be updated by hand using the trust anchors published by IANA (root-anchors). You can check the current state with dig . DNSKEY +multi (in PowerShell, Resolve-DnsName . -Type DNSKEY).
Reflection attacks and open resolvers
A reflection attack is a DDoS attack that sends floods of small queries with the source IP address forged to be the victim’s to DNS servers, so that the responses go to the victim.

Because responses are much larger than queries, the attack volume is amplified dozens of times. Even if the attacker’s line is thin, amplification times the number of reflectors floods the victim.
- The most common reflectors are open resolvers, which accept recursive queries from anyone. A caching DNS should accept recursion only from inside your organization, and in the cloud should also restrict the source with security groups
- An authoritative DNS has to answer anyone, so it uses RRL (response rate limiting), which stops it from repeating the same response many times in a short period
- Queries of type ANY, which return everything, were abused for amplification, so RFC 8482 (2019) allows servers to answer them minimally. You cannot get all the records with
dig ANY
This is one of the reasons Part 7 said not to combine authoritative and caching roles on one server.
Random subdomain attacks and DNS tunneling

| Random subdomain attack (water torture attack) | DNS tunneling | |
|---|---|---|
| Method | Query floods of nonexistent names such as x7q2k.example.com. The cache is no help, so every query reaches the authoritative DNS | Embed the data to send in a name, and receive data in the response (TXT, etc.) |
| Goal | Overload the authoritative DNS and the caching DNS on the way | Get data out past the firewall, or remotely control malware |
| Signs | A spike of NXDOMAIN for a specific domain, growing waits for responses | Long random names, many queries to a single domain, heavy use of TXT |
| Defenses | Query rate limits on the resolver, more capacity and anycast for the authoritative DNS | Monitor query logs, DNS firewall, forbid direct port 53 traffic to the outside |
Both blend in with normal queries when you look at them one at a time, so keeping query logs and knowing your normal volume is the prerequisite for detection. In zones signed with DNSSEC, the mechanism that uses NSEC to answer nonexistent names from the cache (RFC 8198) helps reduce the load.
Subdomain takeover
From here on, we look at “operational gaps.” Subdomain takeover is a problem where someone else can use your subdomain because a DNS record you no longer needed was left behind.

A typical sequence looks like this:
shop.example.compointed through a CNAME to a cloud service’s name (for example,shop-prod.service.example)- You deleted only the resource on the service side and left the CNAME in place
- An attacker claims the same name on the service and can publish a fake page at
shop.example.com
Because the page appears on your own domain, it can be abused for phishing and cookie theft, and an attacker can even obtain a certificate. The same applies to an A record that points to a released IP address, and to an NS record that points to a deleted zone.
The defenses are to follow the order delete the DNS record before you delete the resource, and to inventory where records point on a regular basis. DNS records are not removed automatically when you delete the resource.
Domain expiry and hijacking

- Expiry from a missed renewal: An expired domain can be registered by a third party, and the website, incoming email, and past links all become someone else’s. Prevent it with auto-renewal, multiple billing and notification contacts, and a ledger of expiration dates
- Expiry of another company’s domain used for NS: If a domain such as
ns1.old-provider.exampleused for NS expires, whoever registers it can decide the zone’s responses freely. Do not leave unused delegations or old NS records in place - Cancelled DNS service at the delegated destination: If NS still points to a DNS service whose contract has ended, someone else may be able to create the same zone on that service. Large-scale abuse of this technique was reported in 2024 as well
- Registrar account takeover: If NS can be rewritten, the whole domain is taken. Set up multi-factor authentication (MFA), limited access, and change notifications
- Registrar lock and registry lock: Locks that block transfers and NS changes. For important domains, also consider a registry lock, which adds human confirmation to changes
To check the status, use WHOIS or RDAP to look at the expiration date and lock status (clientTransferProhibited, etc.) (Part 2). Whichever stage is taken over, the whole domain falls under someone else’s control.
Encrypting DNS (DoT, DoH, DoQ)
| Method | Standard | Transport | Characteristics |
|---|---|---|---|
| DoT (DNS over TLS) | RFC 7858 (2016) | TLS, TCP 853 | Easy to tell apart by its dedicated port and easy to control with a firewall |
| DoH (DNS over HTTPS) | RFC 8484 (2018) | HTTPS, TCP 443 (UDP for HTTP/3) | Blends in with web traffic. Browsers led the way in implementing it |
| DoQ (DNS over QUIC) | RFC 9250 (2022) | QUIC, UDP 853 | Fast connections and less affected by retransmission delays. Support is still spreading |
| DDR (Discovery of Designated Resolvers) | RFC 9462 (2023) | SVCB for _dns.resolver.arpa | Automatically discovers whether the configured DNS server supports encryption |

Encryption mainly protects the path between the device and the caching DNS, and the path between the caching DNS and the authoritative DNS is mostly still plaintext. Encryption also prevents eavesdropping and tampering in transit, but it does not verify that what the authoritative DNS published is correct. That is DNSSEC’s job.
This is the answer to the opening question, “Do I have to enable DNSSEC?” Encryption protects the path and DNSSEC protects the content. Neither one alone is enough, and they complement each other.
DoT and DoH rely on the same TLS mechanism (the handshake and the server certificate) that secures HTTPS.
OS and browser support, and bypassing internal DNS
| Target | Support for encrypted DNS | Enterprise control |
|---|---|---|
| Windows 11, Windows Server 2022 and later | The DNS client supports DoH (add the server to the list of known servers to use it) | Group Policy “Configure DNS over HTTPS (DoH) name resolution” |
| Windows Server 2025 DNS server | Since the June 2026 update (KB5094125), it can accept DoH from clients | Traffic to forwarders and zone transfers are not encrypted |
| macOS 11 and later | DoH and DoT through configuration profiles. macOS 13 and later also support DDR | Distribute profiles with MDM (device management) |
| Chrome and Edge | “Secure DNS.” Switches automatically if the OS’s DNS server supports DoH | The DnsOverHttpsMode policy (off / automatic / secure). On managed devices, DoH is not used if the policy is unset |
| Firefox | DoH by default in the US, Canada, and some other countries | The DNSOverHTTPS policy, canary domain |

This is the other question from the beginning. If a browser uses an external DoH server directly, it bypasses your internal DNS, and the following problems occur:
- Internal names cannot be resolved
- Split horizon does not work
- Filters and logs are bypassed
DoH uses port 443, the same as the web, so it is hard to stop by port. Control it with device settings instead. Set it explicitly by policy, and for Firefox, return NXDOMAIN for use-application-dns.net (this works only when DoH is enabled by default).
Protective DNS, RPZ, and DNS firewalls
Finally, let’s look at using DNS as a “defensive tool.” Because DNS is used at the start of almost every connection, you can stop connections to malicious domains right there.

- Protective DNS: A caching DNS service that answers queries for domains known as malware distribution sources, phishing sites, or command-and-control servers with NXDOMAIN or the IP address of a block page
- RPZ (Response Policy Zone): A mechanism for doing the same thing on your own caching DNS. You write the names to block and the action to take as a zone and distribute it by zone transfer. BIND, Unbound, and others support it
- DNS firewall: The form in which this is offered in the cloud (Route 53 Resolver DNS Firewall, Part 10)
Because it stops at the name lookup, the connection never even starts. Query logs can also help you find infected devices. However, DoH and direct connections pass through, so combine this with restrictions on outbound traffic to ports 53 and 853.
Think about it
- How can you check whether your organization’s validating caching DNS has kept up with the root KSK rollover? What would happen if it had not?
- You are going to delete a test cloud environment. What do you check on the DNS side before and after the deletion?
- You find that browsers on internal devices are using an external DoH server. What problems does this cause, and how do you control it?
Hint: “Root KSK rollover,” “Subdomain takeover,” and “Bypassing internal DNS” in this article lead to the answers.
Summary
- Defenses that make guessing harder only lower the odds. Only DNSSEC can confirm that the content is genuine
- DNSSEC walks from the root KSK, parent to child. If the chain breaks, you get SERVFAIL
- In a KSK rollover, overlap the old and new keys and DS. The root KSK switches to KSK-2024 on October 11, 2026
- A caching DNS allows recursion only from inside. An authoritative DNS uses RRL
- Forgotten CNAMEs and domains nobody renewed are each enough to open the door to a takeover
- Encryption protects the path; DNSSEC protects the content. Control browser DoH by policy
Next time, we look at how DNS is used in the cloud and on corporate networks, including Route 53, AD-integrated DNS, and Kubernetes.
Watch the video
This part is also explained in a YouTube video (about 22 min).
All parts of the series are in the DNS Fundamentals playlist on YouTube.
The DNS Fundamentals series (12 parts)
All 12 parts with a reading guide: DNS Fundamentals
- What Is DNS? How Name Resolution Works and Its Three Key Players
- The domain name hierarchy and delegation
- How name resolution works
- DNS messages and transport
- Resource records, part 1
- Resource records, part 2
- Running authoritative DNS servers
- Investigating with commands
- DNS security (this article)
- DNS in the cloud and on corporate networks
- DNS troubleshooting
- DNS design exercises
This series is the English edition of 【DNS入門】, originally written in Japanese.


コメント