Recent Posts
Archives
@ChrisJohnRiley
- RT @mubix: Metasploit Fan? You should watch this pull request. period. http://t.co/uOBUhe1B Amazing work by @corelanc0d3r 1 hour ago
- RT @iiamit: Red-Team at @SOURCEConf: http://t.co/Xh4ZgTK1 - make sure to book your training and travel ASAP as room is running out! Pls RT 1 hour ago
- RT @LaNMaSteR53: Could someone else try this shell code exec technique on a fully patched OS X Lion box? Need a 2nd opinion. Thx. http:/ ... 6 hours ago
- Nothing worse than finding out a project you've been working on for 6 months has just been released by another company! #Argggggg 10 hours ago
- RT @Brav0Hax: #Ettercap is calling all C coders. As we move to a major release we're gonna need some help. All are welcome, tell your fr ... 12 hours ago
- [SuggestedReading] Mini-PoC for PHP RCE (CVE-2012-0830) http://t.co/35ITAxwq 1 day ago
Flickr Photos
|
Links
Disclaimer
The contents of this personal blog are solely my own opinions and comments, as such they do not reflect the opinions of my employer(s) past, present or future. No legal liability is accepted for anything you do, think, or consider fact as the basis of articles and links posted on this blog.
"Three to one...two...one...probability factor of one to one...we have normality, I repeat we have normality. Anything you still can’t cope with is therefore your own problem."
Note: A large portion of content I post on my blog comes from "live blogging" of security conferences. These posts are in notes form and are written live during a talk. As such errors and emissions are expected. I'm only human after all!
A little history. Djbdns (Daniel J. Bernstein’s DNS) was immune to the 2008 Cache Poisoning attacks from Dan Kaminsky as it already implemented the UDP Port randomisation that was marketed as the (temporary) solution to the issue. Although port randomisation doesn’t solve the problem 100%, it makes the attack considerably harder (read longer) to complete. The theory is, that you’ll see an attacker hammering your DNS serer with UDP packets for hours or days before they manage to poison the cache. That is if you’re paying attention to your DNS server. Anyway, a discussion of the 2008 attack vectors isn’t the point here. There are many sources of this already on the interwebs.



Just to be clear, the SOA is an accelerant, that allows cached records to be poisoned. But the actual bug is the lack of birthday protection.
Well there are a number of bugs here. Lack of birthday protection seems to be a common flaw in the architecture of DNS. After all it was never meant to be a secure transaction. DNSSEC to the rescue ??? maybe in 2012 or beyond.
The flaws that make djbdns’s cache vulnerable appear to be the lack of SOA caching, ability to queue multiple (read 200+) identical requests, and the dropping of older queries when the buffer is full and a new request is received. If any one of these flaws was fixed then djbdns would be no more vulnerable than the other offerings (i.e. 1 in 4 billion chance of cache poisoning).
Some fixes would be more effective than others obviously. Refusing to drop old requests when the maximum number was reached could cause various Denial of Service issues (users can no longer request resolution, or the server could be overloaded with thousands of requests). Caching the SOA seems to make sense, but as you said this is only an accelerant. With the other flaws left unpatched the server would never receive a valid response (the older queries would drop off the queue and the response from the nameserver would be ignored). SOA caching coupled with prevention of multiple identical requests seems to make sense from my standpoint (not a DNS expert by any means). Although what process is used to match the new request could be another issue altogether. I’d like to see what overhead Kevin’s unofficial patch for this puts on the server under load.
I’d appreciate your opinions if I’m seeing something wrong here. As I said, I’m no DNS expert
, I just hack stuff.
There’s lots and lots of partial fixes. The bar I set is that if you don’t protect all names equally, you’re not doing enough. Kevin’s SOA trick works OK but you can just mix his birthday paradox stuff with sibling names from my talk and the attack works essentially just as well.