DOS attack on DNS: DNS Root Query Amplification

Translation of the original in Catalan. Read it in: CatalàCastellano

On the 26th one of the servers I administer was the victim of a DNS attack, in fact, at this point we're still victims of the attack even though right now we've already taken containment measures so that it doesn't affect us. The point is that this attack overloaded the activity of our DNS server to such an extent that DNS requests took a long time to resolve since the work piled up and they took longer and longer to resolve. This, collaterally, caused problems in other services, even reaching the point of collapsing them and bringing one of the servers down.

The attack in question is perfectly described by SANS:

A possible solution and also a description of the problem was found by Lluís on this blog:

To sum up a bit what you notice is that we receive a huge number of resolution requests for the '.' domain, which gives our DNS server a lot of work and ends up generating a large response traffic for a small request that a zombie can perfectly launch without suffering any overload on its bandwidth, whereas the target of the DOS attack can be affected by a huge number of unsolicited packets from various origins, turning the simple DOS attack into a complicated DDOS attack that is difficult to stop for the final destination of the attack.

A good graph to understand the attack is this one:

dns-amplification-attack-small
dns-amplification-attack-small

This graph I've taken from the article DNS Amplification Attack on the blog Security News & Tips. Which also has a good article explaining the attack in detail.

If we're simply used to launch this attack, as was the case I explain, thanks to tools like fail2ban it isn't complicated to stop, since we can tell it to watch our log file and launch filtering rules that stop the DNS requests that repeat too much from the same origin. For a more complete detail of how to implement this I refer you to the article: DNS Root Query Amplification.

NOTE about PowerDNS: The software we use to manage the DNS is PowerDNS which has a web interface to control the statistics of the service, in case of suffering an attack of this type through this web page it will be very easy for you to identify which IPs are launching the attack and also to verify that the attack is the type I've described.