A Case Against DNSSEC, Count 1: Solves A Non-Problem
Thomas Ptacek | April 3rd, 2007 | Filed Under: Bitching About Protocols, Uncategorized
1.
Alice and Bob want to talk.

Mallory wants to get in on the action.

With unprotected IP and HTTP, Mallory can do that. In fact, it’s really easy; Mallory doesn’t even have to be in the middle. We’ve idealized Alice and Bob. But Alice needs to use the DNS to find Bob.

If Mallory can spoof the DNS, she can get between Alice and Bob. Mean ‘ol Mallory!

Alice is my mom. Bob is Bank of America. Mallory is the Russian Mafia. I care a lot about this attack.
2.
So does everyone else, since, like, 1994, when someone installed SunSniff on a machine plugged into a colo Ethernet link that was part of the Internet backbone and sniffed everyone’s passwords. So, before Bank of America got on the Internet, everyone solved this problem:

This is SSL/TLS. SSL/TLS is one solution to the problem of eavesdroppers and man-in-the-middle attackers. It relies on certificate authorities.
Alice is using a browser pre-configured with the public keys of several trusted third parties. These public keys are “trust anchors”. Bob arranges with one of these third parties to get “certificate”, which says, “I’m really Bob, and here’s my public key”. Bob’s server presents this certificate to Alice when she connects, as part of the TLS handshake. Alice and Bob use their public and private keys to agree on an ephemeral AES session key, which protects all future communication between them.
This is a really, really nice protocol.
You don’t know it just to look at it, though. It relies on X.509, which is an ASN.1 protocol. ASN.1 is to the Internet what Pravda is to the GOP. SSL/TLS has its own record layer. Ew! It has a really complicated handshake. Lots of negotiation. And the certificates are hard to configure. And you have to talk to creepy Certificate Authority companies who want you to pay for the privilege.
On the other hand, Mallory is clever and has a lot of ways to attack a crypto protocol. And SSL/TLS accounts for all of them. Mallory will fake messages try to get Alice and Bob to agree to an insecure version of the protocol. She can’t; the handshake has a built-in integrity check. Mallory will try to replay messages. Nope. Mallory will break MD5 AND SHA1. Still no luck! The protocol uses both!
SSL/TLS says, as long as you can trust one trusted third party, who’s only job is to protect cryptographic secrets, and who will certainly go out of business if they are completely compromised, you’re safe. (Well, OK, you have to trust your ability to read, and your browser, too). And if you don’t want to trust a third party, you can set up your own certificate authority.
SSL/TLS protects virtually all secure web transactions.
3.
Don’t like SSL/TLS? Ok, you have another option:

This is PGP/GPG. Alice and Bob can directly swap public keys. They can use their private keys to generate messages that only they can read, and that can only come from them. The difference is, instead of trusting a certificate authority, they trust a file format. This is web of trust, although that’s kind of an overblown name for “I can read you a fingerprint of my public key over the phone so you know you got the right one, and I know I have your key because my best friend gave it to me”.
PGP/GPG protects virtually all secure email. We use GPG. Our secret messages are decidedly worth intercepting. It works well.
4.
Don’t like PGP/GPG? Ok, you have another option:

This is SSH. Alice and Bob can trade public keys the first time they talk to each other. They can use their private keys to generate session keys that protect all future communications between them, just like SSL/TLS. They know they have the right keys because they remember the first time they kissed; if Mallory comes between them, her key will necessarilly be different. This is called key continuity.
SSH protects virtually all secure Unix and router administration. Like everyone else, we use SSH.
Note that in all three cases, I made no mention of the DNS. In all three cases, Mallory continued to own the DNS. In fact, I put Mallory right in the middle between Alice and Bob. That’s better than owning the DNS. I gave Mallory the pipe. And Mallory still can’t win. Alice and Bob have end-to-end protection.
5.
Mallory can still mess with Alice and Bob though. She can drop their packets on the floor. Or worse! She can redirect their DNS messages! This keeps Alice and Bob from talking to each other. Denial of service!
This really skeeves the IETF DNS people out. DNS is involved, in some way, in almost every transaction on the Internet. People should be able to talk to each other, and trust that they’re talking to who they think they are. Even if they don’t want to use TLS or GPG:

This is DNSSEC. Sort of. It protects the DNS sort of the same way TLS protects the web: Alice and Bob have “trust anchors” that let them verify public keys from DNS servers. Alice can trust results from the DNS. Alice can find Bob, and Mallory can’t trick her.
At least, not that way. Please note the obvious problem here. Securing the DNS protects DNS lookups. But Alice and Bob still need another layer of security, because Mallory owns the pipe and can see their packets. In practical terms, Mallory can grab Alice’s HTTP cookies, log into the bank right after she does, and the idempotent HTTP application on the bank’s server won’t do anything to stop her.
7.
This sucks! But it gets worse. Note the trust relationships in TLS, GPG, and SSH:
In TLS, you have a trust a Certificate Authority, who gets paid to protect your secrets.
In GPG, you have to trust your friends.
In SSH, you have to trust your memory.
But, going back to DNS 101, there isn’t just one DNS authority. DNS is distributed. A lot. Each portion of the namespace is governed by a different entity. You have to trust all of them.

And the people who manage domain namespace aren’t (typically) security people.
In fact, DNS spoofing is pretty rare (there are much, much easier attacks that are way more effective). But most of the time, when it happens, it’s not because Mallory played packet tricks with Alice’s DNS requests. Nope:

Mallory lived through the late ’90s and learned, from software like BIND, how exploit scripts work. My browser trusts tens of Certificate Authorities, and presumably they’re all reasonably hard to crack. But there are tens of thousands of DNS servers, all responsible for their own DNSSEC security. Mallory’s just gonna go own one of them up.
Now, DNSSEC is not retarded. Mallory can’t bust up Southern Illinois University’s authority servers and spoof Bank of America. But there are way more DNS servers than GPG and SSH keys. There may be more of them than there are current TLS certificates. And a compromised DNS server is more powerful than a single compromised certificate; it lets you synthesize arbitrary names under the authority of the server.
DNSSEC does nothing to account for this attack, which is the most likely vector Mallory will use to subvert the DNS.
Another attack DNSSEC does nothing to account for is Denial of Service. Like I pointed out, if you’re using TLS, there’s nothing Mallory can do to you except keep you from talking. But even if Mallory doesn’t own the pipe, she can still mess with you by saturating your DNS servers with requests (for instance, by making them walk absurd and ambiguous chains of keys). DNSSEC is not a lightweight protocol, and its authors explicitly exempted DOS from the problems it contemplates. A confession: this isn’t my argument; it’s Christian Huitema’s.
And DNS isn’t the only infrastructure protocol that connects Alice to Bob. Even if you secure the DNS, Mallory can still go after:
DHCP
ARP
Anycast Routing
VLAN trunking protocols
IGPs like RIP and OSPF
EGPs (meaning, BGP4)
Successful attacks on any of these protocols —- which have actually happened in the real world —- give Mallory the pipe again. Alice’s DNS requests are secure, but her messages to Bob aren’t. In theory, we should secure all of these protocols, too. But it took over 13 years to agree on how to secure the DNS, and the DNS is simpler than some of these protocols.
Finally, and to my mind most importantly, DNSSEC does nothing to address the problem of insecure implementations. There’s some basic remedial math my readers are pretty familiar with —- as is anyone who read Schneier’s “Practical Cryptography”: more code = more complexity = more bugs.
Look at the BIND security page; bugs that involve SIG, or EDNS, or OpenSSL, or “validation”, or TSIG —- those are vulnerabilities caused by DNSSEC code.
Alex Bligh made this point for me on the Namedroppers list:
I would suggest this [the DNS is already secure] is a minority view. Else we’d have spent the past 15 years fixing implementations as opposed to protocols.
Well, I know how I spent the last 15 (well, 13) years. And I guess I know how Alex Bligh thinks he spent the last 15 years. You tell me which was more important.


Add New Comment
Viewing 33 Comments
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Add New Comment
Trackbacks