Dubbed NXNSAttack, the flaw [PDF] can be abused to pull off a classic amplification attack: you send a small amount of specially crafted data to a DNS server, which responds by sending a lot of data to a victim’s server. If you have an army of hacked PCs or devices – a botnet – at your command, and can find a DNS service that’s vulnerable, you can theoretically generate enough network traffic to overwhelm a victim’s system and knock it offline for all users.
Although denial-of-service attacks are a little 1990s, blasting a business off the web can lead to a loss of sales, reputation damage, and so on.
Lior Shafir and Yehuda Afek of Tel Aviv University, along with Anat Bremler-Barr of the Interdisciplinary Center, also in Israel, found the vulnerability which is illustrated below. APNIC, which oversees IP address allocation among other duties for the Asia-Pacific region, has a deep dive here.
How does it work?
Here’s a summary. You, as the attacker, need to set up a domain name like
badperson.com. You want to take down
victim.com‘s DNS servers. You connect to a recursive DNS server on the internet – such as one provided by your ISP or a cloud platform – and you ask it to resolve, say,
i.am.a.badperson.cominto an IP address. The recursive server contacts your DNS server for your dot.com for that information.
Your name server tells the recursive server it needs to look up
fashion.victim.com, and so on, to get the answer it seeks. This message neglects to include any glue records containing IP addresses. So the recursive server – key word recursive – connects to the DNS server for
victim.comand asks for the records on all those sub-domains, and the
victim.comDNS server replies with error messages for the non-existent sub-domains.
As you can see, you’ve turned that one request into a small storm of data exchanged between the recursive and the
victim.comname servers. If you get a botnet to do this many times a second or minute, you can flood both of those name servers with packets, preventing legit look-ups from getting through from netizens, and the systems will appear down. According to the academics, you can perform double amplification of network traffic by extending the attack recursively. If the servers start to cache their look ups, and do not send any further packets, simply specify new and unique sub-domains.
To mitigate the problem, the researchers suggest name servers implement an algorithm they devised dubbed Max1Fetch that reduces the storm of traffic between the DNS components involved.
The trio said they responsibly disclosed the hole well in advance of going public, and various DNS software makers have already patched, or are in the process of patching, the vulnerability – at least some of which using the Max1Fetch method. We’re told the following software suppliers and service providers have fixed up their vulnerable DNS server software:
ISC BIND (CVE-2020-8616), NLnet labs Unbound (CVE-2020-12662), PowerDNS (CVE-2020-10995), CZ.NIC Knot Resolver (CVE-2020-12667), Cloudflare, Google, Amazon, Microsoft, Oracle (DYN), Verisign, IBM Quad9, and ICANN.
You should check for updates for your DNS server installation, and install them to avoid being blown over by a distributed denial-of-service attack. “If you operate your own DNS resolver, no matter what brand it is, please upgrade to the latest version now,” APNIC urged