Hi Ian,
I can assure you that both PowerDns and OpenDNS are vulnerable. They both use port randomization, which is much, much better than nothing, but it can still be broken in very roughly 5 hours as Mockapetris states, so really cannot be considered fully secure.
This is not a criticism of either, since as I said, every recursor in the world ( except the one I have written! ) is vulnerable. Well, it's possible that someone, somewhere has implemented duplication/repetition without my knowledge, but if so they have kept very quiet about it. It's a small community.
I will give a quick technical outline of the situation:
(1) DNS operates (by-and-large) using UDP connections ( rather than TCP ). A DNS client sends a single UDP packet to a DNS server to obtain data. The packet header has a random 16-bit ID, that is used to validate the response.
(2) An attacker can send "spoof" forged responses, with malicious data. The attacker will need to guess the 16-bit ID value. So after about 2^16 = 65536 attempts he is likely to succeed.
(3) The DNS client can also select a random source port ( generally chosen from the range 1024 - 65535 to avoid clashes ), which means an attacker then needs roughly 2^32 attempts to succeed.
(4) It turns out that an attacker can attack recursive resolvers (my resolver excepted) at a rate limited only by network bandwidth. Even if the resolver is not fully public, attacks are still possible if the attacker can force queries for particular domains at a high rate. This is the Kaminsky attack.
(5) NAT firewalls, by nature of how they work, usually undo any source port randomization. So recursive resolvers relying on port randomization operating behind NAT firewalls are very vulnerable.
(6) Other resolvers are only "somewhat" vulnerable ( they last for about 5 hours, or probably somewhat longer under more realistic network bandwidth constraints ).
(7) Stub clients ( that forward requests to a shared server ) are also somewhat vulnerable, in that stub resolvers don't use port randomisation, so a well timed blind attack has a 1 in 2^16 chance of succeeding. Attacks on stub resolvers are not so well studied, but are still a source of concern.
[ Pretty much everything up to here is in the CERT advisory note, http://www.kb.cert.org/vuls/id/800113 , although it doesn't dwell on the continuing vulnerability of patched servers, for obvious reasons! ]
(8) The (main) way to solve all this is to send 2 or 3 queries, and check that the responses agree. Unfortunately this is more complicated that it seems, because some authoritative servers send non-deterministic responses, which need to be carefully processed to obtain a secure result.
The depressing thing is that all this is quite well known, but no-one can be bothered to do anything about it. Commercially, it's hard to justify the cost of writing some relatively complex software. The "official" view is to wait for DNSSEC to be deployed, but that will take at least 5 to 10 years, and it could be much longer (it may never happen), nobody has any real idea - progress is snail-like.
So the whole world is insecure, and until some really big fraud occurs, we will probably muddle along, with ordinary people being defrauded, their email being intercepted, etc. I'm just trying to do something about it, but on my own (well, some within the DNS community have been helpful, especially Nicholas Weaver of ICSI Berkeley), it's a pretty uphill battle.
Seriously, it would be of great assistance if a few TMFers could try it. There is normally no performance penalty ( the queries are sent in parallel ), and if I can report some successful, independent users, it adds greatly to the credibility of the project. Some kind of testimonial, whatever, would be really great.
It's especially useful with laptops, where when travelling you may be using untrusted, possibly unpatched, caches that are particularly vulnerable ( although OpenDNS is a valid solution to this problem, but then OpenDNS is a very obvious target for attackers, and you have to trust OpenDNS - not that I'm saying they are untrustworthy ).
The other route I'm thinking about is approaching Microsoft directly. I do have a possible contact who implemented https for Internet explorer, and I gave him some (free!) consultancy many years ago on this ( I used to be quite interested in cryptography, in particular ellliptic curves - google for George Barwood and you will see what I mean - well, err, maybe not - it says too much about me really! ).
Many thanks for you interest, it is very much appreciated. George
|