What's up, guys? Yo. Holy crap. Another year, another DEF CON. And you know what? It's another DNS talk. Damn straight I got a drink. So, man, can't say I really knew what I was getting myself into with that whole break DNS thing. But the DNS root is signed and people keep blaming me for it. More importantly, it turns out that this whole DNS root signing, I got to level with you guys. I pretty much was convinced any kind of DNS stuff was way too much work for pretty much no benefit whatsoever. No, it's actually kind of awesome. And this talk is about why. Let me show you something kind of cool. By any chance, was anyone in this room ever seen a DNS root at like my way, way back in the day SSH talk? Yes. You guys are the old school. So check it out. It's not like I ever stopped playing with SSH. It's a really common thing when you're managing networks like in the real world. You're often managing some customer's network. So here's me trying to log into, you know, root at some customer.org. And what does it do? It asks me for a password. Oh, man, I got to like find this customer's password, call him up, notepad. Wouldn't it be great if I could just say, look, dude, I'm Dan at remote support.org. I'm trying to log into you, root at some customer.org. Yeah, it's multiple organizations. Yeah, it's federation. Yeah, it's something we as a security community have been trying to build for a decade. Oh, wait. That just worked. Yes. And what did I have to do server-wise? Server-side? Hey, server, you allow Dan at remote support.org. Done. DNSSEC is a lot more interesting than I gave it credit for. We've been trying to do authentication and federation across domain boundaries for years. And with DNSSEC, with the root signed, we implemented it in about four hours. This is kind of cool. So we basically coined something called DKI, the domain key infrastructure. It's basically a way for you to basically PKI, but this time it actually works. We can't do DKI. We can't do DNSSEC if it is, in fact, as some people have been saying, oh, my God, this is going to be a horrible pain to deploy. It's going to take hundreds of thousands of hours and hundreds of millions of dollars. We can't do what I just did if it's going to cost that much. But I get ahead of myself. There are four audiences for this talk. Four groups that I think are in here. The user, the buyer, the builder, and the breaker. If you are a user, if you are someone who just wants your computer to work right and you're here because you're interested in what that means, I think the entire security community owes you an apology. We have been promising so many things for so many years. When you receive an e-mail from the bank, maybe it's just me. Maybe it's just me. Maybe you should actually know it came from the bank. Telnetting into port 25 still works. This sucks. So I apologize. We failed you. We ask you too many questions. We make too many demands upon your memory. And we blame you. I was in a session earlier today where all I heard about was how users require education as if it was their fault. No. We have failed to give you what you need. And it's not because we are the ones who need it. We are the ones who need it. We're lazy or stupid. It's because we haven't had the foundational tools required to deliver a more secure experience. If you are a buyer, and don't be offended if you're not a buyer for the market terms, but let me give you the bottom line. Budgets are going to go up because this stuff actually works. Ten years ago, we tried as a community to deploy public key infrastructure. There was a whole bunch of hype about how this technology would finally free us from passwords. It's ten years later. Passwords ain't gone away. It's 10 years later. Now, our stuff from ten years ago did not work. But it's not like we have any less need for strong authentication. Our belief, our hope, is that DNSSEC through DKI is the way that we're finally going to achieve all the promises of PKI. Now, if you are a builder, if you are someone who makes security products, we are all tired of your crap that doesn't scale. How much stuff have you sold that sits on shelves because it worked in the lab, it worked enough for the initial sale, and you ever notice how, like, six months later, the customer doesn't call you back and talk to you ever again? Yeah. Yeah. That's kind of been the story of the last decade, hasn't it? A lot of crappy products have been shipped. A lot of devices have shipped with no authentication whatsoever. A lot of sacrifices have been made. You know, one of the things you find with SSL certificates is the browser's care and everyone else just says, wow, this is hard. I'm going to turn that off. Half of all certificates on the Internet don't even pretend to offer security. There's only about a million certs on the net, period. So it's like all the possible Internet endpoints, we're running out of four billion IP addresses, we don't even have a half million secure endpoints. This is a failure. However, it's also an opportunity. It means we can do better. But the most important group here, and I'm thinking actually the majority of the people here, are breakers. You know, most people in technology believe code is secure until proven otherwise. Yeah. You all know better. By default, software is pretty much generally going to be broken. You're the community that looked at my demo earlier and said, did he just make DNSSEC pre-auth in open SSH? Is Dan crazy? I'm not. Thank you for noticing. I think it's time we get some work done. There's about to be some huge bets put on DNSSEC. And I'm going to level with you. I don't want to wait 25 years for the next DNS bug. So you know what? We're actually pushing a radical transparency model. Started a company called Recursion Ventures. We're actually playing in this space. Yeah. So we are going to be backing an aggressive and public and open audit of all DNSSEC and DKI technologies. If you're familiar with Justin Ferguson, he is one of the probably top five code auditors that I've ever met in my career. He is auditing LDNS, which is the best DNSSEC library on the planet. We are releasing the pen test report publicly. And not someday in the distant future. We are releasing it September 1st, 2010. This should be an excellent starting point for anyone else who wants to bash. We're going to be working on it. We're going to be working on it with the DSTX. We're going to be working on have a few plans. We're forcing in either DNSSEC or the LDNS library in particular. The authors of the library, NLnet labs are fully onboard. We there may very well be a problem found in DNSSEC. But we're not going to guess. We're not going to hope. We're going to bash on it until we're happy. Now some ground rules to doing some DNSSEC work, we don't care about noninvented here. We can't have religion. We can't afford it. We We have a problem that's bigger than any one person, any one organization, any one community or any one country. We don't care about style. Skype's law is basically you know what? We security people really bungled up the internet in 2001. We kind of froze it in time. You get HTTP and you get HTTPS and deal with it. I like elegance. I like theory. But I like stuff that actually works. Not just barely. Systems that barely work are barely deployed. There's a corollary. We can't care about historical precedent. You know why? Because it's not like it's actually been working particularly well. We're going to have to do things differently or we can just keep failing for the next 15 years. We do care about operations. We do care about that IT guy that actually has to wake up at 3 in the morning if this stuff fails. We are not going to secure the internet. We are not going to secure the internet. We are not going to secure the internet by calling people lazy or stupid. To be fair, that does define us as intelligent and industrious. Great for our egos. Crappy for the internet. We are not going to win through moralization. Wag your finger at someone and think it's going to change anything. You're really not going to win through regulation. Because let me tell you, without naming names, I've seen a lot of certifications and I've seen a lot of compliance programs. And I haven't seen a lot of certifications. And I haven't seen a lot of competence in any of them. We're going to win this. We're going to win this the old-fashioned way. We are going to deliver a better product that works better, works cheaper, works faster, works easier. This is not like the status quo security is exactly inexpensive. There is better that can be done by actual genuine people want to run it. What if it's not, what if you don't think of security as something you bash people over the head with? What if you don't think of security as, man, this is actually kind of awesome. That is the goal of this talk, to show you DNSSEC for all the hype, wait a second, I can build something with this. So some timelines. 18 months ago, everyone pretty much knew all of DNSSEC was crap. From an implementation side. But 18 months ago, we basically said, okay, yes, it's crap. But this protocol that's gone through ITF for 15 years is actually not bad. It can be done safely, securely, easily. Well, we live in the future. We look at what we have. And not just what work we're doing. We have three open source servers that are pretty good. We have three commercial servers that are pretty good. And pretty much any company in DNS is basically saying, man, don't worry about it at all. Just tell us what you want and we'll do it for you. This is good. From a market perspective, this means lots of people are in this space. This is a stable technology. I'm just here to tell you all. They can do this. This is a stable technology. They can do what they're doing. This is where it's going. So first off, let me explain DNSSEC to you. It's not actually that complicated. In normal DNS, you ask a question, you get an answer. Or you ask a question, you get a referral. So you ask Alice, hey, what's Jenny's number? And she says, I'll ask Travis. Travis says, good, Travis. Hey, Travis, what's Jenny's number? She says, ask Charlie. You ask Charlie and get apparently the wrong number for Jenny. What is Jenny's actual number? She keeps giving me the wrong one. So with DNSSEC, it's really quite similar. You ask a question, you get an answer and a signature. Or you ask a question, you get a referral and a signature. Now, is it really that simple? Mostly. Referrals now contain new keys. Before, you were just told where Travis was. Oh, you know, go ask Travis. He's down by the water fountain. Now you're told how to recognize him. Oh, yeah, he's the skinny, white dude in dreadlocks who's, you know, now the new chief hardware officer of Recursion Ventures. So welcome, Travis Goodspeed. Computers can make stronger identifiers than people can. So we use cryptography. But it's just the same. You know, everyone always says I don't understand public key cryptography. Look, it's really easy to recognize a face. It's really hard to smash your face to look like someone. That's asymmetric public key cryptography. Done. Is that it? Yeah, pretty much. Okay. There's some magic here and there with, you know, Jenny has no number. Lies. Records can expire and keys can lead to other keys. But a lot of the magic is optional, more than you'd think. And all of the magic can be implemented in an easily deployable manner. Now, yes, the easiest thing to do is to call up some managed service provider and just say, hey, go do it. But if you don't have the code, you can't do it. But, you know, failing that, I have heard estimates that deploying DNSSEC could take 100 hours of consultant time per domain. Let's me show you how we would have ‑‑ okay, I'm not doing a live demo in the middle of DEF CON. Hook up to this network. Are you joking? But this is what it would look ‑‑ you're just going to have to believe me. This is DNSSEC made so easy to deploy. You could do it on stage at a conference. So, first thing that we have, and I apologize that the text is small, first thing we have is your standard little name server. It's got, you know, 10 or 11 domains. You know, they're very small and not very simple. Kind of thing anyone might have. Okay. Step one, change the port on the DNS server from 53 to 50,053. Step two, launch freeware. So, if you don't have DNSSEC, you can do this. This is a hybrid. The recursion ventures DNSSEC server. Note the lack of options or configurations or anything. You just run it. Step three, there is no step three. You're done. You know, once upon a time, web servers were very simple things. They ran static documents. You had a file system, everything you wanted to do, it had to be through there. And if you wanted to do anything dynamic, okay, you ran processes with CGI. You know what? Web services evolved. So are name servers. This thing goes ahead. It dynamically generates the signature. It will dynamically generate the key material. Now, we're not entirely done. We do need to go ahead and tell, in this case, .org, hey, we actually exist. This is where we are. So, this is how it looks. You go to go. Yeah, let me talk about something else. I'm going to go to go daddy. I got remote support.org here. You go to name servers. You hit manage DNSSEC. You paste in this little record. You do a simple lookup. It comes back against the free bird server, gives you the hash to put in. You say, go ahead and do it. You got to wait 30 seconds. You're done. So, you go to go And then you're done. And then it's live. And then it's working. And then you can run end to end authenticated queries against remote support.org 30 seconds later. This is actually kind of cool. So why does this work? Freebird is an online key signer. Like SSH, SSL and IPSec it depends on a signing key being available whenever requests come in. There's an alternative where a magic key sits in a vault and you truck it out every once in a while you alter things in DNS. In our real world networks we're changing stuff in DNS all the time. Freebird for performance reasons actually has a cache. So when it applies signatures to some records. So a record might be this IP address is you know the IP address for foo.com is 1.2.3.4 or I don't know the certificate for foo.com has a hash of AABBCCDD. Freebird will see responses come back and will sign them so that a thousand requests for the same name will not cause a thousand hits to the encryption engine. Now DNSec was designed to allow offline key signing and that is awesome. The two reasons why this is the case are first DNSec is old. I mean DNSec was started in the 90s where high speed processors and cryptographic accelerators simply weren't the best. So we didn't have the kind of things that were available. Also DNSec needs to operate at scale. So it needs to be able to simultaneously support the smallest of the smallest name server to the root operations that have a maximum security requirement to com which is just enormous. But you know not every server should be run like the root. It's a big deal that everyone can be but that doesn't mean should be. Because the reality is the biggest thing that made DNSec so powerful is such a miserably complicated thing to deploy was having to do some massive precomputation phase. When you have some massive preload happen it turns out empirically protocols get orders of magnitude more complicated. And the best example actually is PGP or GPG. The amount of work that those code bases go into to managing their key rings are literally 95% of what's going on in there with the other 5% being encryption, decryption, signing and validation. It's enormous and by going online you get rid of the complexity. Now there's some precedent here. We did not invent online key signing. I mean look at all those other protocols. DNSec has been quietly including support for this design strategy for years. Ben Laurie is the guy behind it. Behind at least some of it. There's even another DNSec server that does this sort of lazy signing. That'd be Power DNSec by Bert Huber. What Freebird has is kind of interesting is that it uses the existing DNS framework whatever it may be and enhances it with DNSec responses. So it's just a proxy. It sits in front of your systems like a lump in the wire and it signs. That means there's no operational impact. You manage your DNS just like you always have. There's no configuration. There's enough information in a DNSec request reply pair to figure out everything that's going on in your system. So it's just a thing that is needed in terms of the signatures involved. I wasn't sure it was going to end up that beautiful but it turns out, yeah, it totally does. And it always returns the right answers. So you can have the world's most complicated name server that is like trying to return video over DNS and I'll still sign it. No problem. Implementation notes. Today it's a UDP port forwarder. You've got to change the DNS port. If you don't even want to do that, sometimes you're going to have to change the DNS port. I'm going to implement what's called Linux mingle table support. The name server will think it's sending an unsigned response but something magic will happen in the kernel and it will be like DNSec on, DNSec off, DNSec on. So this stuff is fast. Look at me. I just wrote a few lines of code. The Linux kernel developers and lib event developers are awesome. Neils Provost is a badass. With a few hundred lines of code, you can today write a name server that will support 60,000 queries per second on stock hardware. Now if you want to understand how fast 60,000 queries per second is, only a few years ago, that was all the queries that .com received in the world. So on one box with this API approach, you're able to do what com was doing a few years back. It's actually quite impressive. Now we're not going to be that fast because we've got a back end to talk to. We've got a lot of code. We've got to manage crypto. We've got to manage caching. But the experimental evidence suggests we are by leaps and bounds fast enough for all but the absolute biggest thing and we haven't even tried to optimize. Freebird is open source because you're just going to implement it anyway. We should have code out today, but we wanted to get all the demos done. So if you want a preview of what probably has some horrifying remote code execution flaws, feel free to send us a message. And by probably, I mean, like, man. That's not a good use of P open. Seriously. Send an e-mail to info at recursion and you can make fun of me all night. Code should be out within the next couple of weeks. I am actually planning, you guys heard about these pixel chi displays by any chance? Fully sunlight capable. I actually got one out of Makership. I'm going to show you a picture of a pixel chi display. All I want to do in life is sit by the pool at the palms, get a pina colada, bust out the netbook and hack. Like, yes. So that should actually dramatically accelerate development of the Freebird packaging. As a note, this stuff really is the, you know, 6 to 18 month timeline. So your mileage may vary in terms of deployments. This is purely so you can understand, wait, this technology is pretty cool. Now, Freebird's doing a whole bunch of stuff I don't understand. I'm going to have time to tell you about today. I'd be going on for a couple hours if I did. There's a bunch of obscura, there's a bunch of things people have kind of wrung their fingers about about DNSSEC. Questions like how do you handle non-existent records dynamically? How do you tunnel records to the registry.org when, say, your registrar doesn't give you a web interface to be able to put what are called DS records in? What about time? How do you manage rollover and expiration? How do you keep clocks in? How do you keep things in sync? There's some very interesting problems in DNSSEC around what do you do about time since everything has an absolute time. What I can't, do you have time to tell you now is this. All these problems are pretty easily managed. They took some work, they took some effort, but we've got fixes for all of them. And online the recursion.com site, the answers will be posted. But I want to focus this talk on, hey, this technology is going to be awesome. For your applications. So, okay. Towards the domain key infrastructure. Perhaps DNSSEC is easy to deploy, but is it, in fact, useful? Distributed authentication is only interesting if it provides end-to-end semantics. My desktop to your server. Or my phone to your phone. And so on. You might say, but Dan, I know a little bit about this stuff. I heard that all DNSSEC does is secure the link between these name servers that I speak to. But not like me and the actual end server. So what's going on here? Well, it turns out, that was the original model of DNSSEC. They actually figured your name server would do all the hard work, and then it would set you, send you a little bit called AD. And AD stands for, nah, it's cool, I checked it for you. Doesn't actually stand for that, but it really does. Look. I like Starbucks. I've known people who work for Starbucks. I like their customers. I've known people who work for Starbucks. I've known people who work for coffee. I'm not trusting Starbucks to tell me whether it validated the certificate for Bank of America. Not going to happen. There's no application on earth that's going to alter the user experience based on this little bit of context. Give me the proof or go away. So we have some normal end-to-end modes. First mode is called chasing. When you ask for www.foo.com, you can set a bit called CD, called checking disabled. You can set a bit called CD, called and what you will get back is the answer and a signature saying www.foo.com was signed by foo.com. And then what do you do? Well, go back to foo.com. You say, well, what were you signed by? And it says, well, I was signed by com. And you say, well, what about you, com? What were you signed by? And it will say, well, I was signed by the root. And then at that point, you have a chain from www.foo.com to the root. And in this model, you only talk to your local name server. Now there are two problems with this model. It works about 90% of the time, but that's not enough. A one out of ten failure is still operationally too expensive. The first problem is, is that it might get blocked by your local resolver. It, you know, the deal is, in DNS, it's a lot of work to bounce around the internet to go from root servers to com servers to com servers to yahoo.com servers. I mean, it takes some complexity. And DNS was designed in 1983, when such complexity was unimaginable to have on every single computer. So what they did is they said, okay, we'll take this hard work and we'll put them in these magic boxes called name servers. And these magic name servers, they'll go ahead and do all the run arounds. Well, what is happening in this situation is the box that's doing the run around, not only might we not be willing to trust it to go ahead and do DNS validation, but it's not going to be able to do it. It may not know how to send us back a little bit of extra information about the key material so that we can do it. In other words, it ain't doing it and we ain't doing it, so it ain't getting done. And so that's kind of a problem. The other thing that might be a problem is round trips. If I have to keep going back and forth and back and forth with my local name server, that's actually a lot of round trips and it can be slow. And as we know from experience, if you make a web browser, depending on too many things, that's going to take a lot of time. So if you're going to make a round trip that are slow, it will just not do what you ask it to. So in general, almost all web browsers don't go ahead and check to see if a certificate has been revoked. Someone's checking if certs are revoked because apparently there's a couple billion checks a day, but your average web browser is not one of them. Revocation is a bit of a lie in X509. What we're doing about round trip fixing in DNSSEC, and this is a project of Paul Vixie and mine, it's called superchase. In superchase, when you ask for the, when you say, hey, give me some signing information for www.foo.com, in superchase, it gives you the path all the way back to the root. Why? Because it has to know it anyway. If it was going to do the validation, it knows the chain. I'm just saying, hey, give it to me as well. And so we figured out how to make that happen and it's pretty straightforward. Doing it's about ten lines of code in LDNS. Part of the Freebird release is going to include sample code. You just say chaser, you're going to get the code, you're going to get the data. You enter spookey.navy.mil.org, and you in fact get a path all the way back to root. Done. End to end. Another method is called tracing. Instead of chasing where you go up, tracing you go down. You're basically taking your, that magic box that does the running around the Internet, you're embedding that in random applications with what's called lib unbound. Lib unbound is the name server built upon lib DNS, LDNS, and it itself is about, it takes about three lines of code to of code in lib unbound to do a secure resolve. It's super straightforward and easy. There are some issues. Chief among them, if you have a situation where every device is going straight to the root, you'll cause the root to melt down in a pile of flames. What might make that acceptable or at least make things better is if the devices are actually caching information for serious periods of time and only updating the information when it changes. The root information doesn't change much, com information doesn't change much and so on. This, by the way, was the problem with DNS curve. Dan Bernstein's brilliant. You guys have no idea how much time I spent arguing that people should do his stuff. However, if Dan Bernstein's approach, the only way to get end to end trust was to bypass local caches all the time, always go to the root, always go to the com servers, they would have melted down. And, of course, those middle boxes, there's nothing worse than hotel networking. When you're at a hotel, be glad you can go to Google. It's surprising. Hotel boxes will still mess with tracing operations. So HTTP is the universal tunneling protocol. You can actually do DNS over HTTP. DNS over HTTP basically involves doing get requests with DNS in the actual URL that is requested. Freebird does implement this. Obviously you can tunnel stuff over DNS, over HTTP, because everyone tunnels stuff over HTTP. The only question is what's the performance impact? So what do you guys think? You think, you know, tunneling everything over HTTP is going to have like a 10 percent hit, a 50 percent hit, an 80 percent hit. Yeah, well, for whatever reason, it seems to be faster. What? 3200 queries per second with UDP and 4,000 with TCP. Paul Bixey thinks I'm wrong, thinks there must be something wrong with my tests, and that's okay. You know, the quote goes, being wrong just means the world is more interesting than you thought it was. But even with a significant penalty, super chasing over HTTP should be a, if all else fails, game over. So get me this information approach that we need. And so we're actually going to go ahead and start running a DNS over HTTP endpoint on the Internet within the next couple of weeks, so that the libraries that are out there, if all else fails, can always get stuff resolved. Because that's the only way we're going to get to, you know, 100 percents. Wrapping. So I talked about chasing. I've talked about tracing. I've talked about chasing, tracing, packing. This is wrapping. And wrapping is an idea of this crazy Kiwi by the name of Brett Watson. And what Brett said to me is, you have to be willing to separate the content of DNS from the transport of DNS. Now, this was a fairly profound point, and it led to an interesting concept. If you look at X509, X509 certificates always contain, hi, this is a certificate for www.foo.com. Foo.com, it's signed by Bear-a-Sign or Thought or GoDaddy or whoever. There's a chain back from where you are all the way up to some trusted certificate authority. X509 can also contain the DNS sec chain. SL is already moving X509, so we do DNS over X509 over SSL. You know what totally passes through hotel miniboxes? SSL. Also, we get really high performance because it's delivered in line without any kind of external query having to happen. Now, to implement this, we're going to need to have a lot of work. So, you have to do this. What you have to do is you have to do just like Super Chase, you have to extract all of the keys necessary in order to resolve a zone, and then you have to shove it into an X509 certificate and validate it during the actual certificate validation. Now, this would have been a lot of work for me. So, Adam Langley at Google may very well have sent me a private unofficial build of Chrome. Yes. That is getting HTTPS. It's got the lock, but when you look inside, that certificate has a DNS sec chain enabled, full DNS sec inside of Chrome. What's up? So, I want to be clear. This was private. This was unofficial. This does not at all represent a commitment by Google to DNS sec, DKI, or X509 certificate embedding. This is just Adam and I. This is just a seeing what was possible. So, that I think it's a good idea to start talking about actual applications. Where do we implement DKI? What I showed you at the beginning of this talk was SSH, especially, a federated identity system for open SSH. It's based on the idea that end nodes should authorize and validate identities and not public keys. You are not P times Q. You are P times P. You are a range You are a unique, unique decision, and you have to have that least an email address. Today the way that this works on the server is you go to the authorized keys file and you provide a list of email addresses that are allowed to log in. When someone tries to log in, they have a special syntax that they use for their username. That syntax is parsed and if the declared user is actually someone who could potentially log in on that account, then DNSSEC is queried to say, Dan at remote support wants in. Dan at remote support .org, if he had the right private key on his system, yeah, we'd let him in. Let's go to DNS to find out what public key to validate. That's what it is today. Tomorrow it's going to be an actual LDAP backend, sort of like this fed SSH package out there. You'll be able to say let everyone in the support. vendor.com group log into the machines at, you know, the some customer.org. This is going to be very, very nice. Now I'd like to go a little bit philosophical into why this is a big deal. People have been selling what's called federation for years. Federation being the ability to authenticate users outside of your organization. All of the stuff has been terrible. The reason why is we have a couple of choices. Our first choice is end to end complexity. That means every company that wants to authenticate someone else has a deal with every other company that wants to authenticate someone else. It is end to end complexity that gives us things like on Gmail, if you receive mail from eBay or PayPal, then you get special user interface. Why was it one e-mail provider and two possible senders? Because the management load of getting more done was too high. Then there's the problem of risk of the king maker. You always have a situation where one group says all of you, why don't you do this? Why don't you do this? Why don't you do that? You just trust us. Everyone trusts us and we declare who is who and it's great and wonderful and it turns whoever is in that position of the centrally trusted person into a monster. It happens every time. And so the final approach, and this is what we see in the existing certificate authority system is key bleed. No one wants there to be a God so you end up with everybody's God. It's not any better. What is interesting with the fact that the kind of thinking that DNSSEC is that the DNS root is run by ICANN. And for all the controversy of ICANN, this is a group that is massively constrained. They are constrained by a technology that delegates as soon as possible. They are constrained by politics of the worldwide nature that you cannot imagine. ICANN getting things done is a tremendous amount of work. That is not a bug. That is a feature. That means you have a neutral overseer. Net neutrality began with ICANN of all places. It's kind of crazy. So what do you end up with? DKI gives us federation that actually works. Because you have the trusted root that the technology needs, but you have the controlled root, the managed root, the governed root that the politics require. So what do we do? Are we going to go ahead and manage this? Are we going to go ahead and manage this? Are we going to go ahead and manually hack in LDNS or lib unbound into each package one by one by one? Well, you know, maybe. That might be useful for some things. It's definitely a way to get the best application integration. But you know, Linux and Unix, everything is using OpenSSL. Specifically, the OpenSSL call X509 underscore verify underscore cert. This is a nice and self-contained library call. What could we possibly do with that? So another thing we're releasing is called freeload. Freeload adds DNSSEC transparently to existing applications. If it validates a certificate, we will make it validate a certificate successfully using DNSSEC. There is some prior work. LibVal Shim from Rust Monday at Sparta will actually go ahead and it also transparently applies itself to applications. But it does so at the DNS layer. It makes sure that applications are valid. It makes sure that applications are valid. Applications get the right IP address. That's nice. There's a million ways to attack IP. I'm sorry. That's just how it is. The other thing that Rust Monday's code does is it assumes that if you're validating for www.foo.com, obviously you have the foo.com certificate. Because when this code was written, the root wasn't signed. With freeload, freeload is operating at a different layer. It's saying, look, let's take the software out there that is actually trying to do this. It's trying to be secure. It's actually trying to make an encrypted end-to-end safe link. Let's take its validation layer, which already has handlers for errors if validation fails. Let's take the validation layer and replace or augment it with the authentication layer of DNSSEC. So for example, you ever gone ahead and used these command line web tools and said curl some address and you get back, you know, this big error. And the last line, of course, is if you'd like to turn off curl's verification of the certificate, use the dash K or dash dash insecure option. Now think about what this means. At some point they said the dash K option and people missed it. So they have two points in the documentation where they say here's how you turn off the security. That is a system that has failed. Now we're going to go ahead, we're going to LD freeload, freeload.so and bam, this is a story all about how my system has failed. Now we're going to go ahead and try to fix this. My life got twisted upside down. Works glorious. If we go ahead and we turn on debugging, we say export DNSSEC debug equals one, what we see is a lookup happened to what we call the deliberately incorrect schema. We lookup scell absolute dot www.hospitalink.org. It has returned this hash 5E0905B and so on and that is actually the correct hash of the certificate seen at that address and validation occurred. So we have the occurs just fine. So that's all that's happening. You have this silly little value in DNS. It's wrong. We're working on the right way to do it. If you go ahead and you change the value, you make the hash incorrect, poof, curl doesn't work anymore. It's not enough for it to do a DNSSEC resolution. The hashes have to match. We set the information back. We go ahead and we can use curl. We can use wget. The same code, the same configuration works for all the protocols. Now, all OpenSSL apps means all OpenSSL apps. So you've got Postfix as a mail server set up, Postgres as a database, MySQL as a database, Apache. Now, why would it be interesting to alter certificate validation in Apache, which is a web server? We've had the capability in web browsers to do certificate client certificate validation, meaning it's not just the server that has a cert. The client has a cert. But today, we're going to do a certificate which is really getting a certificate issued by one site or a smart card issued by one company to work anywhere else. Yeah. Good luck with that. With DNSSEC, it's trivial. You get a smart card. You get a request. It claims to be an email address. You go ahead and find out, so what is the public key associated with this user? And the group that issued the smart card is the group that hosts the public key. And now that public key works on every server on the globe. Works like a on. Welcome to domain key infrastructure. But I'd like to go ahead and stay focused on browsers. Open SSL is great but browsers don't use it. Internet Explorer uses crypto API and Firefox and Chrome use NSS. Also there is no LD preload on Windows. There's just no way to go ahead and hack an API in Windows. So what are you going to do? HTTPS proxy. This is kind of neat actually. I had no idea this was there. It's based on the work of Andres and Dave. And basically the web browser has since the beginning had what's called the SSL proxy or secure proxy. And what that does is it says every time an SSL connection is attempted to be made, please do connect www.site.com.443. Now this is actually very nice. I mean, this is actually a channel by which I can see what the browser wants without having to push any code in there. I should really build a proxy. So we built a proxy. It's called foxy. It is a remote validation proxy for production browsers. Basically what you do is you provide the browser a custom root certificate. So the browser knows okay, I'm going to trust whatever this random piece of code tells tells me. When the connect line comes in, we know the domain the browser is expecting to authenticate to. It's pre- declared to us. So we basically gin up a certificate at that point. We allow the connection to come in, and then we hook it up to an SSL connection of our own out to the internet. Now here's the thing. We are still going to, we are not actually going to, uh, certificate validate the cert out there. So we don't want to make these connections unless they're good. We're outsourcing certificate validation. We're not disabling it entirely. However, since we're outsourcing certificate validation to open SSL and open SSL is running freeload, we inherit DNSSEC for fun, uh, for nothing. And just so you see what this means, there's the browser lock from DNSSEC in internet explorer. There's the browser lock from DNSSEC in Firefox from DNSSEC. There's the browser lock in Chrome. No private build. It just works. Done. Move on. Now here's a neat trick. This, this is a bad idea of old style. Um, there's something very interesting we can do once we've outsourced validation. We can do a lot of things. We can do a lot of things. It doesn't involve DNSSEC. Barely even involves DNS. Wouldn't it be nice if we could bootstrap trust only with a domain name? What if we put the hash in the URL? Yeah, that's not a good idea. But it is actually something that works. So basically what we have here is HTTPS, SSL hash, big hash dot www dot PBA dot org. If you can go ahead, you can actually even extend this to, you can actually go ahead and you can put a hash in front of an IP address and the server will say, well, I connected to that IP. Here is the hash of that IP. I will let it through. There are lots of reasons why this is bad. But if you really, really need to bootstrap something and you don't have any other way of declaring what certificate you want to use, this is actually not the worst way, uh, way to go. Now, what's funny is this was actually inspired by this old file system called the self-certifying file system. Someone else made this link. It's called SFSHTTP, securing the web with self-certifying URLs. It was done by some guy, Michael Kaminski. Michael is my middle name. It was done in 99. Um, there are some scalability issues. What do you do if the, uh, the certificate is lost? But, like I said, there are some situations where I think it will actually be really useful to be able to say please bootstrap your initial, initial connectivity. Here is the URL. This And, by the way, the URL contains the hash of the identity you're speaking to. And, hey, it doesn't have to be a good idea. Sometimes it can just be cool. So around this point, you might be thinking, now is the time to get rid of the certificate authorities. No. The CAs are, in fact, more critical than ever. There are domains, www.bankofamerica.com, proctorandgamble.com, and so on. And there are brands, Proctor and Gamble, Yahoo Incorporated. Domains and brands are not the same thing. If you go ahead and you look at what the CAs have done to actually offer value, they have gone ahead and done a program called extended validation where they will say, this isn't just bankofamerica.com, this is the Bank of America Corporation. That's great because that is something DNS is not going to be able to do. Extended validation has some problems. I can't go into. If you want to know more, look at Mike Zussman and Alexander Zodorov's SSL rebinding attacks from Black Hat last year. And the basic problem is EV only protects you against phishing attacks if the attacker doesn't have a non-EV cert as well. So a bad guy who goes to lend the certificate check and gets a certificate for www.bankofamerica.com, he can go ahead and interfere with green bar communication. That's just the nature of the technology. But DKI fixes this. DKI has what we call the exclusionary property. When your DNS domain is registered through enum, GoDaddy cannot interfere with it. When your X509 certificate comes from VeriSign, GoDaddy can. It's because there's no actual link, no actual forcing function saying, when VeriSign's got a cert, GoDaddy can't. But you do have that in DNS. So what you can do is, what you can do under DKI systems is, you can say, the only canonical certificate for www.bankofamerica.com is the extended validation certificate issued by VeriSign. And any other certificate, I don't care who it's signed by, that cert's not valid. That ends the EV attacks. And while, yes, there are attacks under EV where there are, say, invisible subdomains, things from content distribution networks that load stuff, we can go ahead and we can use this. Same stuff. It is, in fact, cheaper to deploy a DNS record with those sub-machines' SSL certs than it is to go ahead and get SSL set up on them normally. So exclusion works there, too. Before we finish, I do believe that we promised users we would do something about email. Now, I don't know about you guys, but I am sick and tired of trying to find people's PGP, and worse, just sort of assuming that what I get back from the key server is valid. Wouldn't it be great if you could securely retrieve them via DNSSEC? Well, we've begun a project. It's called FreeGP, and it actually is porting end-to-end DNSSEC lookups to GPG. You might notice this is a little hideous. I've had to type echo foo GPG, no default keyring, keyring temp GPG, random random, encrypt, armor, auto keylocate PKI, dash R, test that. PBA.org. It's so user-friendly. GPG really does not want to be patched to do this. It has a bunch of DNS code in it. It's only present on the encryption side. The amount of rework that's going to be necessary to make this happen, effectively this work needs to be done inside of Enigmail. It's hideous. But, all right, I started it a little. Then I went ahead and looked at something. Anything else? DKIM. DKIM is a scheme for retrieving public keys, not certificates, for domains outside of DNS. It is pretty trivial to get end-to-end validation out of it, for in terms of, ah, ah, ah, ah, ah. So its goal is this mail server and that mail server want to know, okay, Google wants to know it's getting mail from the Bank of America server. The Bank of America server signs all of its mail with a particular private key. Google looks up the public keys. The public key in DNS validates the mail, only delivers it if it validates. That's cool. That's nice. There's no real user experience designed into it. Right now it's mostly an anti-spam system. Super trivial to do DNSSEC with it, and IETF is looking at making that happen. But I'm not really a fan. I want there to be a user experience. And the best user experiences out there, and that ain't saying much, is, um, is from S-MIME. S-MIME is the email encryption and decryption buttons you see inside of Outlook and inside of Thunderbird. There claims to be a plug-in for Gmail. It doesn't verify. It's dead to me. S-MIME has some key management problems. This is an understatement, but of course it has key management problems. It's based on certificates. Even if you have the greatest enterprise CA in the world. Meaning you have wonderful systems for sending email and getting everyone in your organization to have certificates, S-MIME has a problem. Which is some cheap little shop on the internet has root certs and they will go ahead and ship a cert for any email address if DNS tells them they're supposed to. And you know nothing could go wrong with DNS. So can we fix this? Actually, can we? We are able to hijack OpenSSL. We are able to hijack the browsers because of secure proxy. How are we supposed to hijack crypto API? The only sensibility point inside of Windows that we could find lets you reject certificates but not allow them. It doesn't let you say accept a certificate that's self-signed. We could write an Outlook plug-in, but who wants to do that? There's another trick, but you have to get me really smashed. Like one beer is not going to do it. So I guess we're hosed, right? Raise your hand if you recognize what this code does. Anyone? I'm just going to hope that it's, you know, byte temp jump size equals OXE9, OX90, OX90, OX90, OXC3, mem copy jump, temp jump size. There's some virtual protect in there. All right. So. Okay. So API hooking is not just for World of Warcraft anymore. Yeah, yeah. Most people use these tricks to hack World of Warcraft or we're going to hit crypto API in Outlook because damn it, I wanted it to work that bad. It is possible to inject code into any process to alter how it works. We've built FreeCappy. Which is DNS validation for Microsoft crypto API. Crypto API has a function called cert get certificate chain. If it returns true, the chain is valid. The call receives all sorts of interesting context about the certificate being validated. I'm not that much of a binary hacking guy. So imagine my surprise to find out when you inject a function with full symbols into a closed source application like Outlook. You get full debugging symbols at that particular point. So here's the certificate in the middle of Outlook with all of its debugging information valid. Awesome. So, what are we going to do? So we have this sign email here from Dan at the bank motto. Not exactly the most compelling image. You know look at 16 pixels throwing the Mark of award validation. Um. What? What we're going to do is we're going to add a checker. This is remote-dll.exe. It's not like I could have written this manually, but I thought if I'm going to use the World of Warcraft approach, I might as well use the World of Warcraft toolkit. Also, the website is securityexploded.com, and I'm pretty sure this is going to security-explode this guy's head. I was in what slides? So we're going to go ahead and we're going to inject our own cert-get certificate chain into Outlook. And when we do this, well, first off, we haven't done anything with DNS. Certificate validation is attempted. It's a totally valid certificate, but there are problems with the signature. Check the signature button. So we get this big red line. Look at that user experience. Awesome. Now what we do is, we go ahead and we take the fingerprint of the canonical certificate, the thing that is going to be used to sign mail from danatthebank.org, and it's, you know, 460C1BE3. We are going to shove that into DNS. 460C1BE3. Now, this next time we validate the certificate, this value is going to be securely extracted from the DNS. It is going to match the certificate used to sign that email, and, the email will now come back signed. This is now the only certificate in the world from any certificate authority that can be used to sign mail from the bank. That's actually not something we've been able to do before. Never been possible. Now, you shouldn't be that impressed, because it's 16 pixels! Who cares? What user is going to give a crap about that? You ever wonder why they're giving you so little visual information? Let me tell you. Under the normal S-MIME model, we have had so little assurance, so little validation, that what we're seeing is legitimate. So what we have is, when the certificate validates, we put a few pixels on. And when it's bad, we're like, eh. We can do better. We can strongly identify email senders now. We can strongly identify the brands. What if that certificate, that the DNSSEC was validating, what if that certificate wasn't even validating? What if you weren't just getting mail from dan at the bank dot org? What if you were getting mail from dan at the bank incorporated, and the green bar experience from the browser actually showed up in email? We would be able to tell users, legitimately, when you receive an email from the bank, someday soon, you will know it came from the bank. Conclusion. Oh, go ahead. So, DKI is coming. Get on board or don't, but here's what we're delivering for you to see. We have shown you that DNSSEC can be deployed in two minutes. We have shown you that we can achieve end-to-end security no matter how messed up the hotel network happens to be. We have shown you federation for probably good federation for the first time in your career. We have shown you how every OpenSSL application can use this technology using a simple LD preload. We have shown how real browsers are going to have real useful experiences with this tech. And we've shown you how certificate authorities and extended validation are going to combine with DNSSEC to finally give us secure email. That is what I've got. Get to work building. Get to work breaking. Thank you.