easm.chUnderstanding your external attack surface

DNS and DNSSEC

The internet's phone book: how DNSSEC prevents forged answers, what CAA is for and why dangling records are dangerous.

1 min read · in plain words and for experts

Diagram
  1. Question: where is www?
  2. Signed answer
  3. Resolver checks
  4. Forgery detected

What eam.ch checks

CheckSeverityType
DNSSEC broken (validation fails, domain unreachable for validating resolvers)highpassive
Dangling subdomain (CNAME to an unclaimed resource, “subdomain takeover”)highpassive
Zone transfer (AXFR) allowed for everyonehighactive
DNSSEC not enabled (no DS in the parent zone)lowpassive
Name servers not distributed for resiliencelowpassive
No CAA recordinfopassive

DNSSEC

The zone is signed (RRSIG, DNSKEY); the hash of the key (DS) is stored in the parent zone – for .ch at SWITCH, entered via the registrar. The number one source of errors is a change of provider without replacing the DS record – the domain then becomes unreachable for validating resolvers (e.g. Quad9, many ISPs). Check: dig +dnssec example.ch SOA, delv example.ch, DNSViz.

CAA

example.ch.  CAA 0 issue "letsencrypt.org"
example.ch.  CAA 0 iodef "mailto:security@example.ch"

Certificate authorities have been required to check CAA since 2017 (CA/Browser Forum, RFC 8659).

Dangling records and zone transfer

  • When shutting down a service, remove the DNS record first, then the resource.
  • Allow AXFR only to your own secondary name servers (BIND: allow-transfer; Plesk: Tools & Settings → DNS Template → Transfer Restrictions).

In short

  • DNS is the internet's phone book – forged records redirect visitors.
  • DNSSEC seals the records; take the DS record along when changing provider.
  • Delete dangling records before strangers take them over.
  • CAA specifies who may issue certificates.

Check it yourself

Commands to verify on Linux or macOS. Replace ihre-domain.ch with your domain and only check your own systems.

dig +dnssec ihre-domain.ch SOA @9.9.9.9 | grep -E 'flags|RRSIG'
dig +short CAA ihre-domain.ch