The Backstory of the Kaminsky Bug
Ant recommends a Wired piece on the background story of the Kaminsky DNS bug and its (temporary) resolution, decreasing the odds of a successful breach from 1 in 2^16 to 1 in 2^32. We've discussed this uber-hole a number of times. Wired follows the story arc from before Kaminsky's discovery of the bug to his public presentation of it in Las Vegas.
The site linked in the article is indeed slashdotted, but the bug in question has been overhyped in the media and, although it must be fixed to prevent future problems, it currently does not present a big obstacle for the current Internet...
"The best way to accelerate a Macintosh is at 9.8m/sec^2" -Marcus Dolengo
For recursive acronym, see message subject. Also see the nearest mirror for an example of assmonkey.
Should we be scrambling to figure this shit out now, or can it wait til everyone else gets the kinks worked out?
So, this is the first I've read in depth about this attack (its been 3 years since I was in IT, and in charge of DNS servers, patches, and all the rest...)
So the attack works by asking for a non-existant domain (ie nothere.domain.com), then blasting the DNS server with response packets that have a RR for www.domain.com, and then the DNS server caches the www RR because it passes the "baliwick" test...
So, uh... why not just turn off caching of everything besides the *ACTUAL* request? What would that break? Seems like that would be a very very easy fix, and would eliminate the problem completely wouldn't it?
Unless what is happening is that the spoofed response packets are actually responses for www.domain.com, and then still why is the DNS server asking for something (nothere.domain.com) and caching a response for something else (www.domain.com)? It really seems stupid to me, and I don't see any reason why DNS should be caching info that it didn't ask for.
Any DNS gurus out there care to explain the rational for that? Or do I have the attack wrong?
I bought the print Wired and read that same article last week. Ho Hum.
Much more exciting was the comic about the robotic poker player and the description of the AI methods it uses to win.
Is it just me, or does Paul Vixie look like the Terminator?
"Destroy science and religion. Science would re-emerge exactly the same; but not religion." - Penn Jillette, paraphrased
yes his attack only involves one dns server, but it is devastating and quick and effective. you can attach yourself vampirically to one dns server, sniff for bank info, redirect google, look at email, or whatever, and then quit shop before anyone raises alarm, and set up shop somewhere else, easily and quickly and invisibly
yes, you won't be able to take over ALL dns servers, but why is doing that the only thing that qualifies in your mind as truly threatening? kaminsky's attack, as described, is a hell of a scary hard core hack. its not hype, its the genuine frightening article. its the creme de la creme of hacks: simple, elegant, and as devastating as they come. any yahoo can move in, take over a dns server, victimize users downstream, and move on unnoticed and set up shop somewhere else. hardcore. devastating. frightening
is it some sort of ego thing? you have to belittle the validity of someone else's discovery? why do people consider this hype?
intellectual property law is philosophically incoherent. it is your moral duty to ignore it or sabotage it
As we can send multiple replies with guessed transaction IDs, we are way off from the original 1 in 2^16. If we send 100 replies we are down to 1/655 and _not_ 1/65535.
Because one of the implications of this bug is that an US state agency can push for taking complete control of the global DNS system for "security".
Something like when a person who sees invasion into Pakistan as a possibility gets elected, the evil Pakistanis cause a major terrorist incident.
Come on. It was really a giant effort to synchronize all the DNS vendors to release patches at the same time. And somehow I don't belive they did that just to boost Kaminsky ego. Give him a credit where credit is due. He discovered a bug that was considered critical by everybody and forced almost everybody on the Internet to upgrade their software. That really is something.
Everyone I knew in IT in 2004 knew how to do it, even showed me how to do it - thats also the year I started taking Linux seriously, and actually learned how vastly interconnected everything is. Nowadays I have an exponentially greater knowledgebase on inter-networking and how all this stuff actually works, and just NOW it's important that "There is a bug in the Internet?" So if I list a bunch of really hush-hush secrets about how screwed up things REALLY are with the internet, will i get credited with exposing the internet as the "butthole of planetary networks?"
Kaminsky, I just think that there are 2 types of flamers out there. One sort is the people who are jealous and wish they had found the bug and the other ones are the type who are angry that it didn't got leaked so fast and they didn't have the chance to use the security hole. I would say that Kaminsky has credit well earned, I cant even imagine what I would have done with that info. "Power tends to corrupt people, and ultimate power tends to corrupt ultimately" don't forget.
It's a shame how they emphasized everything done in secrecy. I'm for open-ness and full disclosure. Also the media gets false stories when people speculate.
I wasn't familiar with the attack, and this article isn't really helping much. I guess I'll just look it up elsewhere. I know its not for a technical audience, but I wish people wouldn't say things that are more or less wrong. Since when is a hostname = a web page? This is so wrong that it makes the article painful to read. (Which is unfortunate, because the personal story is somewhat interesting.) And the article has a few more-technical bits later, so why stoop to being so wrong at the start?
a couple examples from the main article:
... He used a software program called Scapy to fire random queries at the system. He liked to see how it would respond and decided to ask for the location of a series of nonexistent Web pages at a Fortune 500 company. Then he tried to trick his DNS server in San Diego into thinking that he knew the location of the bogus pages.
If I didn't understand DNS and HTTP, I might be thinking this had something to do with HTTP 404 errors. Most people have seen the difference between a bad page on a good server and a server that doesn't exist at all.
Suddenly it worked. The server accepted one of the fake pages as real. But so what? He could now supply fake information for a page nobody would ever visit. Then he realized that the server was willing to accept more information from him. Since he had supplied data about one of the company's Web pages, it believed that he was an authoritative source for general information about the company's domain. The server didn't know that the Web page didn't existâ"it was listening to Kaminsky now, as if it had been hypnotized.
Hypnotized? WTF? This sounds like hollywood-hacking to me. Just a case of misplaced trust. Otherwise this paragraph isn't so bad. (except for saying pages instead of names. He already made a directory assistance analogy, why not continue with DNS = phonebook metaphors. e.g. computers need a number to call another computer, but people like to use names... Or don't people understand that web servers are just computers like their own?)
#define X(x,y) x##y
Peter Cordes ; e-mail: X(peter@cordes ,
"...a complete description of the exploit appeared on the Web site of Ptacek's company.... The DNS community had kept the secret for months. The computer security community couldn't keep it 12 days."
If this were changed the problem would be considerably mitigated: foof.google.com would be compromised, but www.google.com wouldn't.
So why not do this?
I don't get it, why did they increase the key from 16 to 32-bit, if 32-bit attack is still feasible? Why not use 64-bit (long long) key, which makes the attack practically impossible?
Here's Kaminsky's powerpoint given at the Black Hat conference. (106 slides but thorough) This Wired article and the powerpoint is enough to make me panic. He literally broke the internet; unlock any website and spoof any logs. Now I see why there was so much panic in the article.
From the article: "Was the massive patching effort justified, or was Kaminsky just an arrogant, media-hungry braggart?"
Yes and yes.
No kidding it has been overhyped.
From TFA The vulnerability gave him the power to transfer millions out of bank accounts worldwide. How so?! I don't have millions, but I do run djbdns...
Overhyped? are you kidding? "Kaminsky Bug" is going to be a major hit once it hits movie theaters!
Seriously though, The problem is major and we have found a pretty good workaround for it, can we move on? Most sysadmins will patch for it and then wait for the full fix and then install that. With something like blaster, you get a few users that patch and the rest just letting it go. I was doing a packet capture a few months ago (I work for an ISP) and I still see some systems out there that seem to be infected.
It's a bit depressing how nobody takes the security implications of the internet seriously, and acts surprised when they're reminded of them.
Email is not secure. Using SSL for your POP/SMTP/IMAP connections secures your login to the server, but the mail itself is still transmitted in the clear. And people act surprised when you tell them that people can and likely do scan their email?
Then again, given that our financial institutions actively train their users to ignore security indicators (a very exploitable situation), we shouldn't be surprised at that sort of nonsense.
I noticed the following in the article:
It got worse. Most Internet commerce transactions are encrypted. The encryption is provided by companies like VeriSign. Online vendors visit the VeriSign site and buy the encryption; customers can then be confident that their transactions are secure.
But not anymore. Kaminsky's exploit would allow an attacker to redirect VeriSign's Web traffic to an exact functioning replica of the VeriSign site.
I was going to write about how clearly the built-in CA certs in the user's browser would throw up a flag and note that the cert wasn't actually signed by the folks at Verisign or whatever... but then I realized that, hey, given the abysmal state of security compliance, it's probable that nobody would even notice.
And an article on cache poisoning that doesn't even mention that Dan Bernstein had foreseen and fixed the lack of source-port randomization while pointing out that it's still only a stopgap seven years earlier is an article that should have been edited a bit more thoroughly. Kaminsky made the attack much more dangerous, but the possibility should never have existed in the first place.
In a more ideal world, we'd all exchange encrypted and signed email and access any site that involved a login using valid SSL certificates and secure-only cookies. But we're not there.
Laws do not persuade just because they threaten. --Seneca
A few things have changed since my 2003 /. post which I've attached below, but the main difference is that Kaminsky's attack has made people realize that DNSSEC matters, and that it's time to get the ICANN and Department of Commerce to sign the root and have the registries sign .com and other major domains. (It's fun watching the Feds panic about it, because much of it's their fault.) And while widespread IPv6 deployment is closer, IPv6 DNS just uses the same packet format as IPv4 DNS with some new record types, so it has the same vulnerabilities.
=============== Political Problems with DNSSEC =====
Some of the problems with DNSSEC are technical - most of them have to do with making things fit inside 512-byte packets and not breaking too many server implementations. But the big problems have been political, including politics implied by the protocol structure and politics that's separate from it.
Bill Stewart
New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
No bank is going to get a cert from RapidSSL or the like. (At least, I hope not--given the security practices I've seen at banks, I'd be surprised if they didn't
This is, supposedly, what EV certificates provide, apart from a fat new revenue stream for selling those expensive bits (quick, someone explain why wildcard certs cost a single damned penny more than single-domain certs) and making anyone who can't afford them into second-class citizens.
There is, however, an attack which goes around that; as Dan Bernstein proposed in 1999, if you set up your fake server for hugebank.com, and have it serve up redirects to your newly registered (and certified!) hugebank.secure-banking.dom site, then the user will see a validated site that they got to by typing in their bank's address or following an email link.
Given that my current bank requires me to accept javascript served from akamai.net in order for me to pay bills, and other banks use plenty of weird domains for user interaction (see pages 11--13), I don't believe that this would set off any alarms.
I complained to my bank back in August about the site requiring javascript from untrusted domains--I didn't even get to complaining about their use of various domain names. Unfortunately, there's no better alternative where I live, and they seem completely uninterested in responding to me.
Laws do not persuade just because they threaten. --Seneca
DNS has two things that identify a UDP request - the transaction ID and the request's port number. 16 bits of ID seemed like plenty back in 1983, and many DNS versions didn't randomize the port number (since it's easier to just use 53 both ways through your firewall) before Kaminsky forced them to fix it. By requesting lots of bogus subdomains, you can birthday-attack the system, so you need ~256 guesses instead of 65536, and it's a lot easier to win that race against a real query.
But even the port-number fixes don't get you solid protection - they just raise the attack difficulty by a factor of a few thousand, so the attacker has to be a bit more determined. But an attacker doesn't need to be successful on every target or every DNS server to make money - there are lots of banks, and lots of users, and sending a few billion packets costs less than the amount he can steal if he's successful.
Changing the protocol would work just as well as deploying DNSSEC - a 128-bit ID would protect against birthday attacks - but that'd be much harder to get deployed. The port-number-randomization approach is at least a stopgap.
Bill Stewart
New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
Is it just me, or does it seem like Vixie sometimes gets pretty stupid? He can't be a total idiot, considering all that he's accomplished. But insistence on using landlines for discussions of this issue are pretty laughable. It's true that analog cell conversations were open to anybody with the right kind of radio receiver. But by 2002, nobody who lived in an urban area was still using analog. I believe it's actually harder to tap a digital cell than it is a landline. After all, landlines are analog between the phone and the switch. You can, of course, pull digital conversations of the air with a lot of expensive equipment, but anybody with the resources to do that not somebody you can hide from anyway.
I seem to recall other incidents of weird Vixie fixattions, though I can't remember specifics.
Kaminsky wasn't an unknown - he'd spoken at a couple of Codecon conferences, doing increasingly heinous things to DNS. One year it was tunnelling SSH over DNS, which lets you break out of any firewall you're behind (and potentially lets malware do the same.) Another year it was the video-over-DNS hack referred to in the article. Codecon's not a big conference, but it's had a lot of high-quality presentations, and when I saw the announcement that Kaminsky had found a serious problem, it had to be more serious than merely breaking through firewalls...
Bill Stewart
New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
Yes, there were some DNS systems that randomized port numbers already, so they're safe against birthday attacks on the 16-bit ID. DJB's obsessively careful, and at times like this it shows. But the ID's still only 16 bits long, and port numbers only get you another ~16 bits, so a ~2^24 packet attack can still succeed. That's not always going to work, but attackers don't have to win every time to be dangerous - they don't need to attack your account at your bank, as long as they can rip off somebody's account at some bank.
There are two basic approaches to fixing the problem - make the transaction ID enough longer that it can't be spoofed, or add a separate signature mechanism like DNSSEC. The first approach is unrealistic, because you'd need to deploy a new version of the DNS protocol, not just new implementations (even IPv6 keeps the same DNS version and transaction ID, and just adds more record types, which DNS is designed to support) - so good luck with that. The second approach has its difficulties as well, and there are other ways that digital signatures could be added, but DNSSEC is the closest to deployable that we've got.
Bill Stewart
New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
Go read the RFCs for DNS and look at the packet format picures- if you were writing DNS from scratch, that'd be an obvious thing to change (though I'd recommend 128 bits.) But the Transaction ID isn't one of the fields that you get to pick a size for, or one of the record types that you can replace with a newer record type such as IPv6's AAAA records instead of IPv4's A records or the various record types that DNSSEC uses. It's one of the early fields in the packet, always the same size, always 16 bits. Fixing that would require rolling out a whole new version of all the DNS tools in existence, and that's probably harder than getting IPv6 deployed.
What the fixes do is to also use the UDP port number that the query comes from for verification, so your DNS resolver won't accept a response for www.example.com on port 12345 unless it sent the request on that port (many DNS implementations used to send all the requests from UDP 53, and it made firewalling easy.) This was especially easy to implement, because DNS servers already send the response to the port where the request came from, so it only required changing the client end.
The fixes still aren't enough - an attacker now needs to send ~2^24 attack packets, since the transaction ID can still be birthday-attacked, but it's a lot safer the older versions where ~2^8 packets was enough. So we still need something extra, and DNSSEC solves a range of other problems.
Bill Stewart
New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
Why do I subscribe to Wired when they post all their print articles online.....
Regarding EV, https://www.yourbank.com (EV cert) == https://www.yourbank.com (domain validated cert) -- as far as the browser's Same Origin Policy is concerned. So the attacker passes through enough EV for the bar to turn green, then switches over to DV for JS to come in. Not good.
This is, supposedly, what EV certificates provide
The real question is, then, can obtaining an EV cert also prevent RapidSSL from then issuing you another cert? Unless you've thoroughly trained your users to look for that green bar, they could still intercept https://yourbank.com/ using a brand-new RapidSSL cert for that same domain.
if you set up your fake server for hugebank.com, and have it serve up redirects to your newly registered (and certified!) hugebank.secure-banking.dom site, then the user will see a validated site that they got to by typing in their bank's address or following an email link.
There's no reason for a bank to send out a non-https link in an email. I am in the habit of typing https for several sites -- gmail being the main one.
And if it wasn't for the banks (including my current bank) which are Doing It Wrong (sending me to a third-party site for the actual banking), I would be very suspicious seeing anything other than hugebank.com in the URL, validated or not. In fact, the first time this happened, I called them and asked what was going on -- they confirmed that they outsource this stuff.
Don't thank God, thank a doctor!
Since the non-green-bar site has Javascript access to the green-bar site, the green bar doesn't actually mean anything.
Is this true of PayPal, specifically?
Don't thank God, thank a doctor!
He had a lot to be modest about.
Seems to me he earned the right to brag.
Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
But insistence on using landlines for discussions of this issue are pretty laughable. It's true that analog cell conversations were open to anybody with the right kind of radio receiver. But by 2002, nobody who lived in an urban area was still using analog.
Not all "bad guys" are individuals. Some are governments.
We already KNOW the NSA can tap any GSM phone they want, anywhere, from satellites. Any bets on whether the Russians can, to? Or whether the Russian Mafia can get the info from them? Or whether there are other players with the capability.
IMHO Vixie did exactly the right thing. Better to secure against a leak that doesn't really exist (when that security doesn't immobilize you) than not secure against one that does.
Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
Switch to a tcp connection after a few packets with wrong parameters, for the dns querry.
It's everyone with an EV cert.
Green bar is a great marketing ploy, but it really should be an httpsev:// URL handler if we wanted it to be secure. Collin Jackson's done some really good work around this, go google him.