Slashdot Mirror


Kaminsky's DNS Attack Disclosed, Then Pulled

An anonymous reader writes "Reverse engineering expert Halver Flake has recently mused on Dan Kaminsky's DNS vulnerability. Apparently his musings were close enough to the mark to cause one of the Matasano team, who apparently already knew of the attack, to publish the details on the Matasano blog in a post entitled 'Reliable DNS Forgery in 2008.' The blog post has since been pulled, but evidence of it exists on Google and elsewhere. It appears only a matter of time now before the full details leak." Reader Time out contributes a link to coverage on ZDNet as well.

28 of 281 comments (clear)

  1. The push for DNSSec by QuantumG · · Score: 4, Interesting

    Kinda makes you wonder what they're getting out of it.

    --
    How we know is more important than what we know.
    1. Re:The push for DNSSec by dintech · · Score: 4, Funny

      Fame? Notorioty? Unstoppable attractiveness to women?

    2. Re:The push for DNSSec by gatekeep · · Score: 4, Insightful

      DNSSec is still the only ultimate patch for this. Source port randomization just makes it difficult to do given currently available processing and bandwidth capacity. Instead of 16 bits of entropy to crack (DNS Transaction ID) we now have rougly 32 (DNS Transaction ID + Source port).

      Given enough bandwidth, we're still vulnerable to poisoning, but it's not feasible today.

      DNSSec is more future proof. No matter how much bandwidth you have, guess a full certificate is orders of magnitude harder.

    3. Re:The push for DNSSec by snowgirl · · Score: 5, Funny

      Fame? Notorioty? Unstoppable attractiveness to women?

      Hey, you all are laughing now, but I tell you, there's a whole throng of us women just waiting for the right guy to secure our DNS!

      --
      WARNING! This girl exceeds the MAXIMUM SAFE standards established by the FDA for BRATTINESS
    4. Re:The push for DNSSec by geekgirlandrea · · Score: 5, Funny

      Whereas us lesbians can secure our own DNS just fine, but would still prefer to have some nice girl do it for us. :)

    5. Re:The push for DNSSec by Yeff · · Score: 5, Funny

      Hottest. Slashdot Thread. Ever!

      --
      "Freedom Through Vigilance"
    6. Re:The push for DNSSec by Element119 · · Score: 4, Funny

      if only i were a female, i'd be a lesbian for sure.

    7. Re:The push for DNSSec by 0xygen · · Score: 4, Interesting

      Not to be paranoid, but the argument of "no-one can do this" is often weak in the light of it being governments or intelligence agencies who are trying to mess with your internet access.

      Is he scared of his government?

      Or concerned about what his government may be doing to others in the world?

      The problem is not necessarily on the "some attacker half way across the world on another AS", but may be much closer to home.

    8. Re:The push for DNSSec by Michael+Hunt · · Score: 4, Insightful

      BGP routes are filtered when they're exchanged between eBGP routers. If you don't filter, you're an idiot. This I agree with.

      You're not talking about BGP route filtering, though; you're talking about some kind of reverse path filtering (making sure that a route to the source address exists on the interface that you received the packet from). In practice, you almost never do this on BGP routers, as RPF makes some (somewhat naive) assumptions about the symmetry of Internetwork traffic.

      Most people who have some kind of RPF deployed have it on a customer-facing device, as you generally only have one route per customer (and can make assertions about traffic NOT coming via that route, AND traffic COMING via that route.)

      That said, not an awful lot of people even have RPF deployed. Certainly nowhere near 100%. And it only takes one (or a handful of machines) that can forge UDP source addresses for this to be an issue.

    9. Re:The push for DNSSec by neomunk · · Score: 5, Informative

      Sorry for the threadjack (thank you for ensuring that 99% of the slashdot crowd is looking intently upon the thread), but here's soem relevant info that should be near the top.

      As of the time of my post, the original text of the article (at least I -THINK- it's the original text) is available here

      Slashdotters may resume the lesbian thread now, thank you for your time (hope I didn't kill anyones chubber).

    10. Re:The push for DNSSec by Anonymous Coward · · Score: 4, Funny

      hope I didn't kill anyones chubber

      On the contrary...

    11. Re:The push for DNSSec by Michael+Hunt · · Score: 4, Informative

      It's a hard call in some cases. There's an argument that most (any?) multihomed customers should be able to send packets asymmetrically. That said, nobody with even half a brain should be running a NAS/LNS with single-homed customers WITHOUT RPF, although the (admittedly, in .au) number of people i've crossed paths with who are doing it wrong is staggering.

      Conversely, if i'm peering with you and six other guys, and happen to be carrying traffic to your network (but not advertising a route back to some of MY peers, for e.g. traffic engineering reasons) across a given link, you have no business dropping that traffic.

      RPF is a good idea, but it kind of breaks one of the more fundamental paradigms of the Internets.

  2. A: Because it breaks the flow of a message by DNS-and-BIND · · Score: 5, Funny

    Q: Why is starting a post in the Subject: line annoying?

    --
    Shutting down free speech with violence isn't fighting fascism. It IS fascism!
    1. Re:A: Because it breaks the flow of a message by Koiu+Lpoi · · Score: 4, Insightful

      Frankly, we should just do away with the subject line entirely. They generally just get filled with "Re:Re:Re:Re:Unoriginal First comment" anyways. It serves no purpose in a system like slashdot's, and causes things like the above.

  3. Doxpara.com also updated. by gatekeep · · Score: 5, Informative

    Doxpara.com, the blog of Dan Kaminsky who first discovered the vulnerability, has also been updated.

    In case of Slashdotting, here's the full update;

    Patch. Today. Now. Yes, stay late. Yes, forward to OpenDNS if you have to. (Theyâ(TM)re ready for your traffic.) Thank you to the many of you who already have.

  4. Re:I got this much by bluefoxlucid · · Score: 5, Informative

    Found this while google screwing. Someone got it!

    http://pastebin.ca/1078776

    1.
    Reliable DNS Forgery in 2008: Kaminskyâ(TM)s Discovery
    2.
    from Matasano Chargen by ecopeland
    3.
    0.
    4.

    5.
    The cat is out of the bag. Yes, Halvar Flake figured out the flaw Dan Kaminsky will announce at Black Hat.
    6.
    1.
    7.

    8.
    Pretend for the moment that you know only the basic function of DNS â" that it translates WWW.VICTIM.COM into 1.2.3.4. The code that does this is called a resolver. Each time the resolver contacts the DNS to translate names to addresses, it creates a packet called a query. The exchange of packets is called a transaction. Since the number of packets flying about on the internet requires scientific notation to express, you can imagine there has to be some way of not mixing them up.
    9.

    10.
    Bob goes to to a deli, to get a sandwich. Bob walks up to the counter, takes a pointy ticket from a round red dispenser. The ticket has a number on it. This will be Bobâ(TM)s unique identifier for his sandwich acquisition transaction. Note that the number will probably be used twice â" once when he is called to the counter to place his order and again when heâ(TM)s called back to get his sandwich. If youâ(TM)re wondering, Bob likes ham on rye with no onions.
    11.

    12.
    If youâ(TM)ve got this, you have the concept of transaction IDs, which are numbers assigned to keep different transactions in order. Conveniently, the first sixteen bits of a DNS packet is just such a unique identifier. Itâ(TM)s called a query id (QID). And with the efficiency of the deli, the QID is used for multiple transactions.
    13.
    2.
    14.

    15.
    Until very recently, there were two basic classes of DNS vulnerabilities. One of them involves mucking about with the QID in DNS packets and the other requires you to know the Deep Magic.
    16.

    17.
    First, QIDs.
    18.

    19.
    Bobâ(TM)s a resolver and Alice is a content DNS server. Bob asks Alice for the address of WWW.VICTIM.COM. The answer is 1.2.3.4. Mallory would like the answer to be 6.6.6.0.
    20.

    21.
    It is a (now not) secret shame of mine that for a great deal of my career, creating and sending packets was, to me, Deep Magic. Then it became part of my job, and I learned that it is surprisingly trivial. So put aside the idea that forging IP packets is the hard part of poisoning DNS. If Iâ(TM)m Mallory and Iâ(TM)m attacking Bob, how can he distinguish my packets from Aliceâ(TM)s? Because I canâ(TM)t see the QID in his request, and the QID in my response wonâ(TM)t match. The QID is the only thing protecting the DNS from Mallory (me).
    22.

    23.
    QID attacks began in the olden days, when BIND simply incremented the QID with every query response. If you can remember 1995, hereâ(TM)s a workable DNS attack. Think fast: 9372 + 1. Did you get 9372, or even miss and get 9373? You win, Alice loses. M

  5. Re:Here's the whole post by Anonymous Coward · · Score: 5, Informative

    Ok, here's the gist: It's difficult to spoof a response for the right domain name, because of the random query IDs. You need too many requests and caching servers don't usually ask for the same name very often. But it's easy to get a caching server to ask for many different names in a subdomain, so do that and send your fake answers. One of them is going to get accepted sooner or later. Include spoofed glue for the real subdomain (www...) in your answers. Because the glue is for the same domain, it is accepted. Tadaa, poisoned DNS.

  6. That's it by krkhan · · Score: 4, Funny

    I've had enough. From now on, /. isn't /. for me. It's 216.34.181.45. I'm updating all my bookmarks. Wait, why is it redirecting? I have a bad feeling about this. Itsatrick.

  7. The significance of the attack... by Rudd-O · · Score: 4, Informative

    ...is not just that you can race legit DNS servers for legit queries, is that you can request recursive resolution for bullshit DNS servers, while submitting fake answers WITH malicious informational records that let you poison second-level domains. So by requesting xxjk3j.google.com while submitting your own coolly crafted answer, you can make the victim DNS use YOUR DNS as authoritative for the future google.com replies.

    THAT is the significance of the attack. THAT is what matasano pulled.

    --
    Rudd-O - http://rudd-o.com/
    1. Re:The significance of the attack... by Rudd-O · · Score: 4, Insightful
      --
      Rudd-O - http://rudd-o.com/
  8. Re:Ridiculous armwaving... by supersat · · Score: 4, Informative

    This isn't even close to the same attack. Newer DNS server have randomized query IDs, so spoofing DNS packets isn't nearly as trivial as it used to be. This attack appears to combine the birthday paradox attack strategy (sending lots of queries and replies so the probability of a spoofed QID matching is much higher) with adding resource records for the actual name you want to poison (under the same domain).

  9. Hottest? by Rudd-O · · Score: 5, Funny

    This is sad.

    --
    Rudd-O - http://rudd-o.com/
    1. Re:Hottest? by Antique+Geekmeister · · Score: 4, Funny

      What's wrong? Doesn't your NNTP server carry alt.sex.bindage anymore?

    2. Re:Hottest? by kpainter · · Score: 4, Funny

      I suspect a lot of Slashdotters have their sexual *ahem* attentions redirected to 127.0.0.1

  10. Re:No details? by NickFitz · · Score: 4, Funny

    ... it ended up with a 404 page. I thought it was a blip on their server, but now I see they retracted the post.

    They fail. If they've removed it with no intention of making it available again it should be 410 Gone, not 404 Not Found. Am I the only person who reads the HTTP spec? It's not exactly hard to understand...

    --
    Using HTML in email is like putting sound effects on your phone calls. Just say <strong>no</strong>.
  11. Better Speculation by logicnazi · · Score: 4, Informative

    Alright, so I'm not even someone who does DNS/networking stuff even for a hobby (just a math grad who skimmed the RFCs once or twice) so if I can figure this out from what's up now then any competent bad guy can as well.

    Anyway my guess is that it involves a combination of the birthday attack and the request for multiple nonexistant nameservers. That is as the attacker you trick poisontarget.com into trying to resolve the following locations.

    AAA.google.com
    AAB.google.com ....
    XXX.google.com

    Now you forge a single response packet that works for all of these requests and send many different copies with different TXIDs. Thus to succeed you need only hit ONE of the TXIDs used in the real requests.

    In these forged responses you also have a forged glue record (as suggested in some of the links) which gives you control of lookups for all of google.com at poisiontarget.com after a single success.

    Then again maybe I missed something basic which means this doesn't work.

    --

    If you liked this thought maybe you would find my blog nice too:

  12. GoogleReader caching FTW by Anonymous Coward · · Score: 5, Informative

    y ecopeland
    0.

    The cat is out of the bag. Yes, Halvar Flake figured out the flaw Dan Kaminsky will announce at Black Hat.
    1.

    Pretend for the moment that you know only the basic function of DNS -- that it translates WWW.VICTIM.COM into 1.2.3.4. The code that does this is called a resolver. Each time the resolver contacts the DNS to translate names to addresses, it creates a packet called a query. The exchange of packets is called a transaction. Since the number of packets flying about on the internet requires scientific notation to express, you can imagine there has to be some way of not mixing them up.

    Bob goes to to a deli, to get a sandwich. Bob walks up to the counter, takes a pointy ticket from a round red dispenser. The ticket has a number on it. This will be Bob's unique identifier for his sandwich acquisition transaction. Note that the number will probably be used twice -- once when he is called to the counter to place his order and again when he's called back to get his sandwich. If you're wondering, Bob likes ham on rye with no onions.

    If you've got this, you have the concept of transaction IDs, which are numbers assigned to keep different transactions in order. Conveniently, the first sixteen bits of a DNS packet is just such a unique identifier. It's called a query id (QID). And with the efficiency of the deli, the QID is used for multiple transactions.
    2.

    Until very recently, there were two basic classes of DNS vulnerabilities. One of them involves mucking about with the QID in DNS packets and the other requires you to know the Deep Magic.

    First, QIDs.

    Bob's a resolver and Alice is a content DNS server. Bob asks Alice for the address of WWW.VICTIM.COM. The answer is 1.2.3.4. Mallory would like the answer to be 6.6.6.0.

    It is a (now not) secret shame of mine that for a great deal of my career, creating and sending packets was, to me, Deep Magic. Then it became part of my job, and I learned that it is surprisingly trivial. So put aside the idea that forging IP packets is the hard part of poisoning DNS. If I'm Mallory and I'm attacking Bob, how can he distinguish my packets from Alice's? Because I can't see the QID in his request, and the QID in my response won't match. The QID is the only thing protecting the DNS from Mallory (me).

    QID attacks began in the olden days, when BIND simply incremented the QID with every query response. If you can remember 1995, here's a workable DNS attack. Think fast: 9372 + 1. Did you get 9372, or even miss and get 9373? You win, Alice loses. Mallory sends a constant stream of DNS responses for WWW.VICTIM.COM. All are quietly discarded --- until Mallory gets Bob to query for WWW.VICTIM.COM. If Mallory's response gets to your computer before the legitimate response arrives from your ISP's name server, you will be redirected where Mallory tells you you're going.

    Obvious fix: you want the QID be randomly generated. Now Alice and Mallory are in a race. Alice sees Bob's request and knows the QID. Mallory has to guess it. The first one to land a packet with the correct QID wins. Randomized QIDs give Alice a big advantage in this race.

    But there's a bunch more problems here:

    *

    If you convince Bob to ask Alice the same question 1000 times all at once, and Bob uses a different QID for each packet, you made the race 1000 times easier for Mallory to win.
    *

    If Bob uses a crappy random number generator, Mallory can get Bob to ask for names she controls, like WWW.EVIL.COM, and watch how the QIDs bounce around; eventually, she'll break the RNG and be able to predict its outputs.
    *

    16 bits just isn't big enough to provide real security at the traffic rates we deal with in 2008.

    Your computer's resolver is probably a stub. Which means it won't really save the response. You

  13. I have the whole thing reasonably well formatted by FoxNSox · · Score: 4, Informative

    See http://thefrozenfire.com/data/dnspoisoning.html for the whole deal, without the pastebin RAW formatting ;)