What is a DNS attack?
A DNS attack is an exploit in which an attacker takes advantage of vulnerabilities in the domain name system (DNS).
What is a domain name system and how does it work?
To understand how DNS attacks work, it is important to first understand how the domain name system works. DNS is a protocol that translates a user-friendly domain name, like WhatIs.com, into the computer-friendly IP address 188.8.131.52.
When an end user types the people-friendly domain name WhatIs.com into a client's browser, a program in the client's operating system (OS) called a DNS resolver looks up WhatIs.com's numerical IP address.
First, the DNS resolver checks its own local cache to see if it already has the IP address for WhatIs.com. If it doesn't have the address, the resolver then queries a DNS server to see if it knows the correct IP address for WhatIs.com. DNS servers are recursive, which simply means they can query each other to either find another DNS server that knows the correct IP address or find the authoritative DNS server that stores the canonical mapping of the WhatIs.com domain name to its IP address.
As soon as the resolver locates the IP address, it returns the IP address to the requesting program and caches the address for future use.
How do DNS attacks work?
Although the DNS is quite robust, it was designed for usability, not security. The types of DNS attacks in use today are numerous and complex, taking advantage of the communication back and forth between clients and servers.
Attackers typically take advantage of the plaintext communication between clients and the three types of DNS servers. Another popular attack strategy is to log in to a DNS provider's website with stolen credentials and redirect DNS records.
How to prevent DNS attacks
To lessen the chance of a DNS attack, server administrators should:
- use the latest version of DNS software
- consistently monitor traffic
- configure servers to duplicate, separate and isolate the various DNS functions
To defend against DNS attacks, experts recommend implementing multifactor authentication when making changes to the organization's DNS infrastructure.
Operations personnel should also monitor for any changes publicly associated with their DNS records or any digital certificates associated with their organization. Another strategy is to deploy Domain Name System Security Extensions (DNSSEC), which strengthens authentication in DNS by using digital signatures based on public key cryptography.
DNS attack vectors
Types of DNS attacks include:
- Zero-day attack. The attacker exploits a previously unknown vulnerability in the DNS protocol stack or DNS server software.
- Cache poisoning. The attacker corrupts a DNS server by replacing a legitimate IP address in the server's cache with that of a rogue address to redirect traffic to a malicious website, collect information or initiate another attack. Cache poisoning are also referred to as DNS poisoning.
- Denial of service (DOS). An attack in which a malicious bot sends send more traffic to a targeted IP address than the programmers who planned its data buffers anticipated someone might send. The target becomes unable to resolve legitimate requests.
- Distributed Denial of Service (DDoS). The attacker uses a botnet to generate massive amounts of resolution requests to a targeted IP address.
- DNS amplification. The attacker takes advantage of a DNS server that permits recursive lookups and uses recursion to spread their attack to other DNS servers.
- Fast-flux DNS. The attacker swaps DNS records in and out with extreme frequency in order redirect DNS requests and avoid detection.