All DDoS Definitions
DDoS Testing Definition

KeyTrap

KeyTrap turns a single DNS answer into an enormous amount of cryptographic work for the DNSSEC-validating resolver that receives it, with no traffic volume involved. It is a denial-of-service attack on DNS resolvers, tracked as CVE-2023-50387 and disclosed in February 2024 by the ATHENE research centre, and a resolver weakness that belongs in the scope of a DDoS test, flood or no flood. The researchers reported that a single crafted response stalled resolvers for between about 1 minute and 16 hours, depending on the software.

KeyTrap: one DNSSEC answer, hours of validation work One lookup a name in the attacker's zone Attacker's zone many keys share one tag signatures that never verify sent as one valid answer Validating resolver signatures keys every key tried against every signature work grows as keys times signatures Validation stalls about 1 minute to 16 hours per answer, as reported Real users' lookups new names wait behind the stalled validation Every record is valid DNSSEC, so nothing is malformed: the cost sits in validation, not in the packet. CVE-2023-50387, disclosed February 2024 by ATHENE. Patched resolvers cap the work one answer may cause. BlackNeuron™
KeyTrap: a client asks a validating resolver for a name in a zone the attacker controls, the zone returns one crafted DNSSEC response carrying many keys and signatures, and the resolver tries every key against every signature, so its CPU is busy for minutes to hours and real lookups from users queue behind it

How KeyTrap works

DNSSEC lets a resolver check that an answer was signed by the zone's key. Each signature carries a short key tag that says which key made it, and the tag is not unique: several keys can share one.

The standards tell validators to be forgiving. If a signature does not verify with one candidate key, try the next, and if one signature fails, try another. The aim was to keep validation working through key rollovers and other ordinary mistakes.

KeyTrap is what that forgiveness costs when the zone is hostile. The attacker runs the authoritative server for a domain of its own, publishes many keys that share tags and many signatures that never verify, and gets a resolver to ask about a name in it. The validator then checks every key against every signature. Signature checks are expensive, and the number of combinations grows as keys times signatures, so one response becomes a huge amount of work.

Nothing in the packet is malformed. Every record is valid DNSSEC syntax, which is why parsers and firewalls pass it untouched.

Why it matters under attack

One packet does the work of a flood. A DNS flood needs volume, and a cache-defeating variant such as NXNSAttack needs many queries amplified. KeyTrap needs one question about the attacker's domain, repeated now and then to keep the resolver busy. Volumetric defences never see it.

The victim is everyone behind the resolver. While validation threads are busy, cached answers may still flow, but every new lookup waits. For an organisation running its own validating resolvers, that means internal services, outbound API calls and email delivery all stall together.

The fault is in the design, not one product. Resolver software has been patched to cap how much validation work one answer may cause. The root cause, a protocol that asks validators to keep trying, needs a change to the standard itself, so the limits are a mitigation rather than a cure.

KeyTrap: one DNSSEC answer stalls the validator ordinary signed answers one crafted DNSSEC answer Validating resolver keys times signatures CPU busy, lookups wait Lookups stall Every record is valid DNSSEC: the denial of service comes from validation work, not from volume BlackNeuron™
Animation of KeyTrap: ordinary DNS answers pass through a validating resolver quickly, then one crafted DNSSEC answer with colliding keys and signatures arrives and the resolver's validation stalls while real lookups wait

Hardening, and what a DDoS test measures

Patch every validating resolver you run, including the ones nobody thinks of: resolvers inside appliances, container clusters and branch offices. An unpatched validator reachable by any client that can make it look up an arbitrary name is the exposure.

Know which resolvers your services depend on. Many applications use a cloud provider's or a public resolver, and the question there is what your service does when lookups stop answering for minutes: does it keep serving from cache, retry sensibly, or fail every request that needs a fresh name?

A test does not reproduce KeyTrap against anyone's production resolver. In an authorised staging copy, it confirms that the resolver version enforces a validation-work limit, and it measures the second question directly: hold resolution unavailable for a set period and record which service fails first and how long it takes to come back once answers return.

How to test authoritative and recursive DNS separately, including the self-inflicted DNSSEC failures that need no attacker at all, is covered in DNS DDoS testing.