{"id":218,"date":"2008-04-19T22:51:17","date_gmt":"2008-04-19T21:51:17","guid":{"rendered":"http:\/\/lendl.priv.at\/blog\/2008\/04\/19\/dns-what-to-do-if-the-sky-is-falling\/"},"modified":"2026-01-26T12:16:55","modified_gmt":"2026-01-26T11:16:55","slug":"dns-what-to-do-if-the-sky-is-falling","status":"publish","type":"post","link":"https:\/\/lendl.priv.at\/blog\/2008\/04\/19\/dns-what-to-do-if-the-sky-is-falling\/","title":{"rendered":"DNS: What to do if the sky is falling?"},"content":{"rendered":"<p>Having been treated to another iteration of &#8220;we need to deploy DNSSEC, otherwise DNS will fall apart due to rampant forgeries&#8221; talk recently, I started to think what other options resolvers have to protect themselves. See also <a href=\"http:\/\/www.ietf.org\/internet-drafts\/draft-ietf-dnsext-forgery-resilience-03.txt\">bert&#8217;s draft<\/a>.<\/p>\n<p>First of all, is it possible to implement a successful forgery attack without the client noticing that anything is wrong? IMHO not. Most scenarios assume that the attacker sends a burst of forged replies to the recursor in the hope of hitting the right query-ID before the real answer arrives. So, even with a successful attack a lot of answers with mis-matched ID will arrive (and be rejected) before the forgery actually succeeds.<\/p>\n<p>This spike in ID mismatches towards a query should tell the recursor that something fishy is going on. <strong>TODO:<\/strong> Instrument bind\/powerdns\/&#8230; to actually log such ID mismatches.<\/p>\n<p><strong>If<\/strong> this works, then the 99.9999% percent of normal DNS lookups which are not targetted by a forgery attack can continue without modification. The only question now is: what can a resolver do if he has a clear suspicion that he is the target of a DNS forgery attack?<\/p>\n<p>There is a trivial solution: Redo the query a few times, preferably utilizing all authoritative servers.<\/p>\n<p>Let&#8217;s do some simple math: assume that the forger has a 1% chance of a successful spoofing attack. What are his chances if the recursor only accepts the answer if he got the same data from <em>n<\/em> queries?<\/p>\n<p>n = 2: 0.01 % chance<br \/>\nn = 3: 0.0001 % chance<br \/>\n&#8230;<\/p>\n<p>That doesn&#8217;t sound so bad, does it? The downsides sound rather minimal: no impact on queries which are not target of an attack, a few more requests during an attack and a slight delay (sequentially querying! You can&#8217;t do that in parallel.) before answering back to the client.<\/p>\n<p>A few optimizations come to mind: Bert&#8217;s draft mentions a few other options, e.g. source port (or even IP address) variability.  These come with some added cost, so perhaps they could be utilized just for these cases.<\/p>\n<p>What did I miss?<\/p>\n<p>[Update: 2008\/04\/22]<\/p>\n<p>After a chat with Klaus and Alex, two new thoughts on this:<\/p>\n<ul>\n<li>There might be legitimate cases where multiple queries might give varying results. E.g. global load-balancing like Akamai or www.google.com. This might break the &#8220;ask multiple times and check for consistency&#8221; idea.<\/li>\n<li>Another option is the following: if a forgery attack is detected, simply switch to TCP for this query \/ target nameserver.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Having been treated to another iteration of &#8220;we need to deploy DNSSEC, otherwise DNS will fall apart due to rampant forgeries&#8221; talk recently, I started to think what other options resolvers have to protect themselves. See also bert&#8217;s draft. First of all, is it possible to implement a successful forgery attack without the client noticing [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-218","post","type-post","status-publish","format-standard","hentry","category-ietf"],"_links":{"self":[{"href":"https:\/\/lendl.priv.at\/blog\/wp-json\/wp\/v2\/posts\/218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lendl.priv.at\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lendl.priv.at\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lendl.priv.at\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lendl.priv.at\/blog\/wp-json\/wp\/v2\/comments?post=218"}],"version-history":[{"count":1,"href":"https:\/\/lendl.priv.at\/blog\/wp-json\/wp\/v2\/posts\/218\/revisions"}],"predecessor-version":[{"id":1052,"href":"https:\/\/lendl.priv.at\/blog\/wp-json\/wp\/v2\/posts\/218\/revisions\/1052"}],"wp:attachment":[{"href":"https:\/\/lendl.priv.at\/blog\/wp-json\/wp\/v2\/media?parent=218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lendl.priv.at\/blog\/wp-json\/wp\/v2\/categories?post=218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lendl.priv.at\/blog\/wp-json\/wp\/v2\/tags?post=218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}