DNSSEC CH6: Advanced Concepts in DNS Security

Most DNS attacks work because a resolver accepts a false answer too easily. DNSSEC CH6: Advanced Concepts in DNS Security shows how signed DNS data, trust anchors, key rollovers, and denial-of-existence records stop that problem.

DNSSEC doesn't encrypt DNS traffic. It proves that a DNS answer came from the right source and wasn't changed before reaching the resolver. The hard part is managing keys, signatures, time limits, and failures without breaking name lookup.

TL;DR

  • DNSSEC validation checks digital signatures on DNS records and rejects altered or fake answers.
  • KSK, ZSK, DS, and DNSKEY records form a trust chain from the root zone to a signed DNS zone.
  • NSEC and NSEC3 records prove that a requested name or record type doesn't exist.
  • Key rollover, signature timing, algorithm choice, and monitoring decide whether a DNSSEC setup stays safe and available.

DNSSEC CH6: Advanced Concepts in DNS Security

DNSSEC adds proof to DNS answers through digital signatures, public keys, and a chain of trust. A validating resolver checks each part of that chain before returning an answer to an application.

A normal DNS lookup asks, “What address belongs to this name?” A DNSSEC lookup also asks:

  • Who signed the answer?
  • Can the signer be trusted?
  • Has the signature expired?
  • Was the answer changed?
  • Is a missing record being proved honestly?

A valid DNSSEC response normally contains:

  • The requested record, such as an A, AAAA, MX, or TXT record
  • An RRSIG record with the digital signature
  • A DNSKEY record with the public key
  • A DS record that links the child zone to its parent
  • An NSEC or NSEC3 record when the answer proves that something doesn't exist

The system uses public key cryptography. The zone operator signs records with a private key. A resolver uses the matching public key to check the signature.

What DNSSEC protects against

DNSSEC helps stop:

  • DNS cache poisoning
  • Fake address records
  • Forged mail exchange records
  • Altered TXT records used for email checks
  • False “name does not exist” replies
  • Some forms of man-in-the-middle tampering

DNSSEC doesn't hide the name being requested. It also doesn't stop denial-of-service attacks, malicious web content, or attacks against a stolen private signing key.

How the DNSSEC Chain of Trust Works

The DNSSEC chain of trust starts at a configured trust anchor and moves down through signed zones. Each parent zone uses a DS record to point to the trusted key of its child zone.

The chain usually follows this path:

  1. The root zone signs the top-level zone key.
  2. The top-level zone signs the child zone's DS record.
  3. The parent zone publishes the DS record for the child.
  4. The child zone publishes its DNSKEY records.
  5. The resolver hashes the child key and compares it with the DS record.
  6. The child key validates the child zone's RRSIG records.
  7. The resolver accepts or rejects the final answer.

A break in that path can cause a SERVFAIL response. That error often means the resolver found DNSSEC data, but the data failed validation.

DS records and DNSKEY records

The DS record lives in the parent zone. It stores a digest of a child zone's DNSKEY record. The DNSKEY record lives in the child zone and contains the public key used to check signatures.

The DS record doesn't contain the full public key. It contains enough information to link the parent's trusted data to the child's key.

A DS record includes:

  • Key tag
  • Algorithm number
  • Digest type
  • Digest value

The digest type tells the resolver how the DS digest was made. Modern deployments should follow current guidance from the Internet Engineering Task Force instead of copying old examples.

The IETF DNSSEC standards page describes the basic DNSSEC security model, including authentication of DNS data and authenticated denial of existence.

KSK and ZSK: Why Two Key Types Exist

DNSSEC commonly uses two signing keys: a key-signing key, called a KSK, and a zone-signing key, called a ZSK.

Key Main job Usually published in DNSKEY? Parent DS points to it?
KSK Signs DNSKEY records Yes Yes
ZSK Signs normal zone records Yes Usually no
CSK Signs both key data and zone data Yes Yes
Trust anchor Starting point for validation Stored by resolver Not always

The KSK changes less often because it connects to the parent DS record. The ZSK can change more often because it signs the main record sets inside the zone.

Some operators use a combined signing key, or CSK. It signs both DNSKEY data and normal records. A CSK can make operations simpler, but a separate KSK and ZSK can reduce the key material used for each job.

Why key separation helps

Key separation limits the damage from a stolen signing key. A ZSK may sign many records, while a KSK controls the key set itself.

A KSK rollover often needs coordination with the parent zone because the DS record may need to change. A ZSK rollover usually happens inside the child zone and doesn't need a parent update.

The right choice depends on the zone's size, the software in use, and how much manual control the operator wants.

Key Rollover Methods

Key rollover means replacing an old DNSSEC key with a new one before the old key expires or is retired. A safe rollover keeps both keys available long enough for caches to learn the new data.

The two common methods are:

Double-signature rollover

A double-signature rollover publishes the old and new keys at the same time. The zone signs records with both keys during the change.

A typical sequence looks like this:

  1. Publish the new key.
  2. Wait for the old DNSKEY TTL to pass.
  3. Sign records with both keys.
  4. Update the parent DS record if the KSK changed.
  5. Wait for parent and resolver caches to update.
  6. Stop using the old key.
  7. Remove the old key after all old data should have expired.

This method uses more signatures for a short period, but it's easy to inspect and tends to be safe.

Pre-publish rollover

A pre-publish rollover adds the new key before it signs records. After caches learn the new key, the operator starts using it for signatures.

This method can lower the chance of a resolver seeing a signature without the matching public key. It still needs careful timing.

For parent DS changes, the IANA DNSSEC practice documents provide useful background on trust anchors and signed DNS operations.

Signature Timing and Clock Problems

RRSIG records include an inception time and an expiration time. A resolver accepts a signature only when the current time falls within that window.

Operators must account for:

  • Clock drift on authoritative servers
  • Clock drift on validating resolvers
  • Signature refresh jobs
  • Record TTL values
  • Delays at parent zones
  • Stale copies held by recursive resolvers

A server with the wrong clock can publish signatures that are already expired or not valid yet. Network Time Protocol, or NTP, is therefore part of DNSSEC operations.

Short signature lifetimes reduce the time an old signature remains useful. They also leave less room for failed signing jobs. Longer lifetimes give more recovery time, but they keep old signatures valid for longer.

A practical setup needs alerts for:

  • RRSIG records close to expiration
  • Failed signing jobs
  • Missing DS records
  • DNSKEY mismatches
  • SERVFAIL increases
  • Time differences between signing servers

NSEC and NSEC3 Authenticated Denial

NSEC and NSEC3 prove that a DNS name or record type doesn't exist. This matters because a forgedno such name” reply can redirect users, break email checks, or hide real records.

NSEC records

NSEC records list the next existing name in DNS order. A resolver can use that range to prove that the requested name is absent.

NSEC is simple and fast to validate. Its main weakness is zone walking. Someone can follow NSEC links and learn many names in a zone.

NSEC3 records

NSEC3 uses hashed names instead of showing the names directly. It makes casual zone walking harder, but it doesn't make names secret. Weak names can still be guessed and hashed.

NSEC3 adds more work for authoritative servers and validating resolvers. It's useful for some zones, but it's not a privacy tool.

Feature NSEC NSEC3
Proves missing names Yes Yes
Hides names from simple walking No Partly
Validation cost Lower Higher
Helps with privacy Very little Small amount
Operational setup Simpler More involved

For a normal public zone, NSEC is often the simpler choice. NSEC3 may fit a policy that calls for less direct name exposure, but operators shouldn't treat it as encryption.

DNSSEC Algorithm Choices

A DNSSEC algorithm controls how keys and signatures are created. The algorithm must be supported by authoritative software, parent systems, and validating resolvers.

Common choices have included:

  • RSA-based algorithms
  • ECDSA
  • EdDSA, where supported
  • Newer algorithms approved by IETF standards

ECDSA and EdDSA can produce smaller keys or signatures than older RSA settings. Smaller responses help reduce DNS packet size and lower the chance of fallback TCP.

Algorithm choice should follow current IANA DNSSEC algorithm assignments. Don't choose an algorithm just because a sample configuration uses it.

Check these points before changing algorithms:

  • Authoritative server support
  • Registrar support for the DS digest
  • Resolver support
  • Hardware or software signing speed
  • Provider limits on key size and record size
  • Test results from more than one public resolver

DNSSEC and Large DNS Responses

DNSSEC adds RRSIG, DNSKEY, DS, and denial records. Responses can become much larger than unsigned DNS answers.

Large responses may trigger:

  • EDNS buffer issues
  • Fragmented UDP packets
  • Firewalls that block fragments
  • TCP fallback
  • Slow lookups
  • SERVFAIL errors

Operators should test with:

  • dig +dnssec
  • dig +tcp
  • Public resolvers such as Google Public DNS and Cloudflare 1.1.1.1
  • More than one network path
  • Both IPv4 and IPv6

BIND 9, Knot DNS, and PowerDNS Authoritative Server all support DNSSEC, but their commands and signing workflows differ. BIND is common in enterprise and university networks. Knot is known for high-speed authoritative service. PowerDNS fits teams that want database-backed zone management.

Managed services from providers such as Cloudflare, Amazon Route 53, and Google Cloud DNS can reduce manual key work. Pricing and feature limits vary by provider, so check the current plan page before moving a zone.

DNSSEC Validation in Recursive Resolvers

A recursive resolver performs DNSSEC validation for users. It checks signatures, follows the chain of trust, caches valid results, and returns SERVFAIL when signed data fails validation.

Validation has three possible states:

  • Secure: A valid chain of trust exists, and the answer checks out.
  • Insecure: The zone isn't signed, and no DS record says it should be signed.
  • Bogus: DNSSEC data is present, but validation fails.

A bogus result shouldn't be treated as a normal “name does not exist” response. It often points to a broken DS record, expired signature, missing DNSKEY, bad clock, or incomplete key rollover.

Resolvers can use trust anchors for the root zone and for local private zones. A trust anchor must be managed carefully. If it becomes stale, the resolver may reject valid data.

The RFC 5155 guidance on NSEC3 explains how hashed denial records work and how validators process them.

Common DNSSEC Failure Cases

DNSSEC failures usually come from timing or coordination errors, not from broken cryptography.

DS record left behind after signing stops

If a zone is changed back to unsigned DNS but the parent DS record remains, validating resolvers may return SERVFAIL. Remove the DS record first, wait for caches to age out, then remove DNSSEC records from the child zone.

New KSK published without a parent update

A child zone may publish a new KSK, but validators still follow the old DS record. The new key won't be trusted until the parent DS record points to it.

RRSIG expiration

A signing job may stop after a server update, storage failure, or permission change. Once signatures expire, validating resolvers reject the zone.

Broken secondary servers

Every authoritative server must serve matching DNSSEC data. A secondary with old keys or old signatures can cause random failures based on which server answers the query.

Unsupported algorithms

A resolver that can't validate the selected algorithm may treat the answer as bogus. Test from several resolver types before changing algorithms.

Practical DNSSEC Deployment Checklist

Use this checklist before enabling DNSSEC or changing keys:

  1. Confirm the registrar or parent operator supports DS records.
  2. Pick signing software with automatic renewal and key storage controls.
  3. Set up accurate time sync on every authoritative server.
  4. Sign the zone in a test environment first.
  5. Check DNSKEY, DS, RRSIG, NSEC, and NSEC3 records.
  6. Publish the DS record only after the child zone is ready.
  7. Test with at least two validating recursive resolvers.
  8. Set alerts for signature expiry and SERVFAIL.
  9. Document each key, algorithm, rollover date, and owner.
  10. Keep an emergency unsigned recovery plan for the parent DS record.

Frequently Asked Questions

What is DNSSEC?

DNSSEC is a set of DNS extensions that uses digital signatures to prove that DNS answers came from the right signed zone and weren't changed in transit. It doesn't encrypt DNS queries or hide the requested name.

What is the difference between a KSK and a ZSK?

A KSK signs DNSKEY records and connects to the parent DS record. A ZSK signs normal DNS records such as A, AAAA, MX, and TXT records. Some operators use one combined key instead.

What happens when DNSSEC validation fails?

A validating resolver usually returns SERVFAIL instead of an answer. The cause may be an expired RRSIG, a bad DS record, a missing DNSKEY, an unsupported algorithm, or a broken key rollover.

Does DNSSEC stop DNS cache poisoning?

Yes, DNSSEC can stop a resolver from accepting DNS data when validation is active and the zone has a valid chain of trust. It doesn't stop attacks that take control of the authoritative server or its private signing key.

Is NSEC3 more secure than NSEC?

NSEC3 hides names from simple zone walking by using hashes, but it doesn't hide names completely. NSEC is often faster and easier to run, while NSEC3 adds processing work and a small amount of name exposure protection.

Should every DNS zone use DNSSEC?

Public zones that need stronger protection against forged DNS answers should use DNSSEC when they can manage keys and monitoring correctly. A broken DNSSEC setup can cause outages, so testing and alerting must come before activation.

Leave a Reply

Your email address will not be published. Required fields are marked *