5 ms·
"""Let's say that you leave your recursive server open to the internet. Now not only can you ask your DNS server for information about other DNS servers on the
by sciurus 14y ago
"""Let's say that you leave your recursive server open to the internet. Now not only can you ask your DNS server for information about other DNS servers on the internet, so can anyone else. If someone asks your server "where is www.google.com" a whole bunch of times then your server starts flooding google.com's DNS servers. For every 1 byte of data sent to your DNS server 50 bytes of traffic end up directed at the target."""
This explanation is skipping a key component of a DNS reflection attack. When the attacker makes a DNS request, they spoof their source address so it is the address of the host they want to attack. Thus they send a small request to your DNS server, and your DNS server returns a large response not to them, but to the host they're attacking.
- laumars 14y agoI think that was implied. However you're right that the author should have made that a little more clear.
- bradleyjg 14y agoWhy does it need to be recursive then? Couldn't you perform the same attack by querying a whole bunch of authoritative name servers for zones they serve with forged source addresses?
- entropy_ 14y agoThe attack as specified by the article would be pretty ineffective as recursive DNS servers tend to have a cache. So only the first request would hit the target DNS server. Also, you can definitely do this with authoritative servers only, which is why only egress filtering by ISPs is a permanent solution to the problem. However, there are way fewer authoritative DNS servers out there than there are open recursors and they are better managed. So an attack would never grow to the scale this one has grown to using only authoritative servers.
- ricardobeat 14y agoYou got me confused for a minute. So I assume in an actual attack you'll rotate the domains being requested?
- entropy_ 14y agoNo, the attack does not work by overloading target DNS servers. There is no benefit in asking a recursive DNS server to make a DNS request for you to overload another DNS server, you could just make that request yourself(or with whatever botnet you're using). The attack works by sending a recursive DNS server a request with a spoofed source IP. Namely, you make the recursive DNS server think your target is making the request. While a typical DNS query consists of a 64byte UDP packet, a reply can be much much lengthier(it can go well over 1KB). So say you have a botnet with a total bandwidth of 1Gb/s. Each request you make(64bytes) will result in, say, 1KB being sent by the DNS server to your target although the server thinks it is sending it to you. That results in a 16x amplification of the amount of data you are sending the target's way. So instead of flooding your target with 1Gb/s of data, you are flooding it with 16Gb/s of DNS replies. The only permanent solution to this problem(though it is discussed elsewhere in this thread why this is impractical) is for all(or almost all) ISPs to have egress filtering. That is, that they would drop all packets sent from their networks with a source IP that is not on their networks. This would make it impossible to fool a recursive DNS server into sending the reply to the wrong IP. Since this is very hard to do(ISPs have zero incentive to do egress filtering, and we can't even locate the ones from whose networks these attacks are originating to shame them into doing it) the pursued solution is the easier one of locating and closing publicly open DNS recursors. This would still allow DNS amplification attacks using authoritative servers, but they would be much more limited in scope.
- bradleyjg 14y agoThanks for the great explanation. So if I understand correctly, the problems with the DNS amplification attack using only authoritative nameservers are: a) You have to keep track of which name to request from which server b) You can't optimize for a particularly large response c) Operators of authoritative name servers are likely to be more sophisticated and therefore have egress filtering. d) There aren't as many authoritative nameservers as open recursive servers (?)
- spc476 14y agoI'm not so sure about that. Even with recursion turned off, the server still responds with an error packet. While the error pack is small compared to an actual answer, hit enough DNS servers (authoritative or not) and you can still generate quite a bit of traffic.
- marshray 14y agoI don't think egress filtering is either practical or the only solution to this problem. I believe are other solutions, better ones that don't involve traffic filtering and threatening the open nature of the internet.
- Anderkent 14y agoYou'd have to ask for different domain names for every DNS server, while when they're recursive you can ask every machine for the same name, one chosen for particularly large result.
- dsl 14y agoYou should also note that DNSSEC is just as much of a problem as open resolvers. A normal A record lookup results in 1-2x amplification $ dig www.ripe.net. in a | grep SIZE ;; MSG SIZE rcvd: 46 Asking for DNSSEC records specifically yields a 10x+ amplification $ dig www.ripe.net. in RRSIG | grep SIZE ;; MSG SIZE rcvd: 534 According to research by DJB[1] over 2000 DNSSEC enabled zones provide >30x amplification for incoming UDP queries. 1. cr.yp.to/talks/2012.06.04/slides.pdf
- lambda 14y agoBut you can easily force regular DNS to give you high amplification. Just query a domain which gives you a larger response, such as multiple A records, MXes, SPF records, and so on. For example: $ dig google.com. ANY | grep SIZE ;; MSG SIZE rcvd: 546 If you want more amplification than that gives, just host one yourself. The recursive resolver will hit your DNS server once, then send out replies based on the cache. There seems to be lots of fearmongering about DNSSEC amplification, but you can get just the same amount of amplification out of regular DNS, so it seems that fixing DNS amplification in other ways would be more effective than trying to avoid adopting DNSSEC.
- dsl 14y ago> There seems to be lots of fearmongering about DNSSEC amplification There is also a 300+ Gbps DDoS attack making use of it right now. This was foreseen as a huge amplification vector in a stateless protocol during the design phase, but was ignored. Now we get to reap the benefits of that decision. Normal DNS responses don't often grow to the size of google.com/IN/ANY. You have a very limited number of authoritative sources to use (and hosting yourself creates a bottleneck as well as a path back to you). With widespread DNSSEC adoption every zone becomes a good amplification source, which nullifies the current best practices for mitigation (rate limiting responses per zone/source). If DNSSEC adoption becomes the norm, open recursive resolvers no longer become the problem and direct to authoritative becomes a viable attack vector.
- pyre 14y ago
- matt_heimer 14y agoThanks, I was wondering about their explanation. Every DNS server I setup will temporary cache the results of its recursive lookups so I didn't get how this was going to work.