Just One Bad Packet Can Bring Down A Vulnerable DNS Server Thanks To DNSSEC
Updated A single packet can exhaust the processing capacity of a vulnerable DNS server, effectively disabling the machine, by exploiting a 20-plus-year-old design flaw in the DNSSEC specification.
That would make it trivial to take down a DNSSEC-validating DNS resolver that has yet to be patched, upsetting all the clients relying on that service and make it seem as though websites and apps were offline.
The academics who found this flaw – associated with the German National Research Center for Applied Cybersecurity (ATHENE) in Darmstadt – claimed DNS server software makers briefed about the vulnerability described it as "the worst attack on DNS ever discovered."
Identified by Professor Haya Schulmann and Niklas Vogel of the Goethe University Frankfurt; Elias Heftrig of Fraunhofer SIT; and Professor Michael Waidner at the Technical University of Darmstadt and Fraunhofer SIT, the security hole has been named KeyTrap, designated CVE-2023-50387, and assigned a CVSS severity rating of 7.5 out of 10.
As of December 2023, approximately 31 percent of web clients worldwide used DNSSEC-validating DNS resolvers and, like other applications relying on those systems, would feel the effects of a KeyTrap attack: With those DNS servers taken out by the flaw, clients relying on them would be unable to resolve domain and host names to IP addresses to use, resulting in a loss of connectivity.
The researchers said lone DNS packets exploiting KeyTrap could stall public DNSSEC-validated DNS services, such as those provided by Google and Cloudflare, by making them do calculations that overtax server CPU cores.
This disruption of DNS could not only deny people's access to content but could also interfere with other systems, including spam defenses, cryptographic defenses (PKI), and inter-domain routing security (RPKI), the researchers assert.
"Exploitation of this attack would have severe consequences for any application using the Internet including unavailability of technologies such as web-browsing, e-mail, and instant messaging," they claimed. "With KeyTrap, an attacker could completely disable large parts of the worldwide internet."
A non-public technical paper on the vulnerability provided to The Register, titled, "The KeyTrap Denial-of-Service Algorithmic Complexity Attacks on DNS," describes how an assault would be carried out. It basically involves asking a vulnerable DNSSEC-validating DNS resolver to look up an address that causes the server to contact a malicious nameserver that sends a reply that causes the resolver to consume most or all of its own CPU resources.
With KeyTrap, an attacker could completely disable large parts of the worldwide Internet
"To initiate the attacks our adversary causes the victim resolver to look up a record in its malicious domain," the due-to-be-published paper states. "The attacker’s nameserver responds to the DNS queries with a malicious record set (RRset), according to the specific attack vector and zone configuration."
The attack works, the paper explains, because the DNSSEC spec follows Postel’s Law: "The nameservers should send all the available cryptographic material, and the resolvers should use any of the cryptographic material they receive until the validation is successful."
This requirement, to ensure availability, means DNSSEC-validating DNS resolvers can be forced to do a lot of work if presented with colliding key-tags and colliding keys that must be validated.
"Our complexity attacks are triggered by feeding the DNS resolvers with specially crafted DNSSEC records, which are constructed in a way that exploits validation vulnerabilities in cryptographic validation logic," the paper explains.
"When the DNS resolvers attempt to validate the DNSSEC records they receive from our nameserver, they get stalled. Our attacks are extremely stealthy, being able to stall resolvers between 170 seconds and 16 hours (depending on the resolver software) with a single DNS response packet."
- If your DNS queries LoOk liKE tHIs, it's not a ransom note, it's a security improvement
- Internet's safe-keepers forced to postpone crucial DNSSEC root key signing ceremony – no, not a hacker attack, but because they can't open a safe
- Is DNSSEC causing more problems than it solves?
- ICANN proposes creating .INTERNAL domain to do the same job as 192.168.x.x
The ATHENE boffins said they worked with all relevant vendors and major public DNS providers to privately disclose the vulnerability so a coordinated patch release would be possible. The last patch was finished today.
"We are aware of this vulnerability and rolled out a fix in coordination with the reporting researchers," a Google spokesperson told The Register. "There is no evidence of exploitation and no action required by users at this time."
Network research lab NLnet Labs published a patch for its Unbound DNS software, addressing two vulnerabilities, one of which is KeyTrap. The other bug fixed, CVE-2023-50868, referred to as the NSEC3 vulnerability, also allows denial of service through CPU exhaustion.
"The KeyTrap vulnerability works by using a combination of keys (also colliding keys), signatures and number of RRSETs on a malicious zone," NLnet Labs wrote. "Answers from that zone can force a DNSSEC validator down a very CPU intensive and time costly validation path."
PowerDNS, meanwhile, has an update here to thwart KeyTrap exploitation.
"An attacker can publish a zone that contains crafted DNSSEC related records. While validating results from queries to that zone using the RFC mandated algorithms, the Recursor’s resource usage can become so high that processing of other queries is impacted, resulting in a denial of service," the team wrote. "Note that any resolver following the RFCs can be impacted, this is not a problem of this particular implementation."
The fix for CVE-2023-50387 is just one of six vulnerabilities addressed in Internet Systems Consortium's BIND 9 DNS software. The others include:
- CVE-2023-4408: Parsing large DNS messages may cause excessive CPU load;
- CVE-2023-5517: Querying RFC 1918 reverse zones may cause an assertion failure when "nxdomain-redirect" is enabled;
- CVE-2023-5679: Enabling both DNS64 and serve-stale may cause an assertion failure during recursive resolution;
- CVE-2023-6516: Specific recursive query patterns may lead to an out-of-memory condition;
- CVE-2023-50868: Preparing an NSEC3 closest encloser proof can exhaust CPU resources.
The requirements for the KeyTrap vulnerability date all the way back to 1999 from the now obsolete RFC 2535, according to the research team that identified it. And by 2012, these elements appeared in RFC 6781 and RFC 6840, the implementation requirements for DNSSEC validation.
One packet suffices. You don't have to do more than that to disconnect an entire network
Since at least August 2000 – more than 23 years ago – KeyTrap has been present in the BIND 9 DNS resolver, and it surfaced seven years later in the Unbound DNS resolver.
Dr Haya Shulman, a professor of computer science and one of the academics behind the KeyTrap research, told The Register in a phone interview the attack is simple and can be carried out by encoding it in a zone file.
"The vulnerability is actually something that's recommended in the DNSSEC standard," Prof Shulman explained. "One packet suffices. You don't have to do more than that to disconnect an entire network."
Prof Shulman said the patches that have been issued by various vendors break the standard. "The problem is this attack is not easy to solve," she said. "If we launch it against a patched resolver, we still get 100 percent CPU usage but it can still respond."
The ATHENE team observed that while the flaw remained undetected for decades, its obscurity isn't surprising because DNSSEC validation requirements are so complicated. So too is mitigating the vulnerability and completely eliminating it will require a revision of the DNSSEC standard. ®
Updated to add on February 16
You can now download the technical paper here as a PDF.
Also, Akamai exec Sven Dummer thanked the research team for not only discovering the flaw but also working with DNS providers and software makers to coordinate the patching and redeployment of systems to avoid mass exploitation.
"You might not know it, but the global internet dodged a bullet: KeyTrap is a vulnerability in key infrastructure that is needed for the internet to function — and one of the worst ever discovered," he opined.
"With KeyTrap, an attacker could completely disable large parts of the worldwide internet."
From Chip War To Cloud War: The Next Frontier In Global Tech Competition
The global chip war, characterized by intense competition among nations and corporations for supremacy in semiconductor ... Read more
The High Stakes Of Tech Regulation: Security Risks And Market Dynamics
The influence of tech giants in the global economy continues to grow, raising crucial questions about how to balance sec... Read more
The Tyranny Of Instagram Interiors: Why It's Time To Break Free From Algorithm-Driven Aesthetics
Instagram has become a dominant force in shaping interior design trends, offering a seemingly endless stream of inspirat... Read more
The Data Crunch In AI: Strategies For Sustainability
Exploring solutions to the imminent exhaustion of internet data for AI training.As the artificial intelligence (AI) indu... Read more
Google Abandons Four-Year Effort To Remove Cookies From Chrome Browser
After four years of dedicated effort, Google has decided to abandon its plan to remove third-party cookies from its Chro... Read more
LinkedIn Embraces AI And Gamification To Drive User Engagement And Revenue
In an effort to tackle slowing revenue growth and enhance user engagement, LinkedIn is turning to artificial intelligenc... Read more