The leash I have today is only, actually I go all the way off the edge of the stage, so it's enough rope to hang myself, that's good. Alright, I think we're going to go ahead and try to get started, modulo two hours, but I think we're ready to go. Let's see, lots of ground rules. I'm Bruce Potter, I'll have an intro slide later, it's obligatory, you have to do it so people know who the random guy on the stage is. I gave this talk at Black Hat, basically the same talk a couple days ago, so if anyone here was at Black Hat, I apologize now, and you can go see another talk, because this will largely be me just screaming and ranting like before, and not saying anything of value. The one thing that was, I think, kind of shocking to me is that this talk should have, well, it was received very well, and it shouldn't have been. I should have been lynched. Last year I gave a talk at DEF CON that was about why you should use Windows if you care about security, rather than using Linux. And I lived, so this year I've tackled something. I hope to be equally as confrontational, and prove that I can indeed at least drink the crappy beer and live to tell about it. So, I was going to dress up as church lady, but when I started to pass that idea around to people, and say, could it be Satan? And people didn't know who the church lady was, they thought I was a little crazy, so Dana Carvey, and, you know, church lady, I mean, I assume most of you hands that know who the church, all right, so clearly I should have dressed up as church lady, but it's your loss, so I apologize. Well, on the other hand, maybe you'll see me dressed up like church lady on Saturday. Other odds and ends, not really. First off, don't believe anything I'm about to tell you, it's my obligatory slide. For those that know, where did I get this quote from? Liquor store, I heard it, someone said liquor store, wow, someone's actually seen this before. I was at a liquor store, buying some $5 whiskey, and there was Buddha staring at me, rubbed his belly, and he told me this. You know, it's interesting. I used to come to DEFCON and black hat and conferences like that, and listen to people talk, and they would say the most random crap that wasn't technologically sound, that wasn't based in reality, and I think it was largely due to the fact that we don't have a lot of discipline in what we do in this particular community. We kind of shoot from the hip and say, hey, look at the cool stuff we can do. Note, I didn't say shit, I'm trying to avoid swearing, because some GCN reporter actually quoted me saying, god damn it, at my black hat talk the other day, in the same sentence as my employer was used. So... . . There's no F-bombs at all. None. Zero. Anyway, so there used to be this problem with people kind of saying random stuff that wasn't necessarily true, we have a different problem now. We have a problem where the security community is very big. There's a lot of money in it, it turns out. There's a lot of money in offensive and defensive capabilities. We used to have this dialogue about full disclosure, right? And it was this huge naval contemplation of, do you tell the vendor now, or do you inform the users first, or do you tell everybody at once, or what do you do? and Microsoft and at stake and all these people got together and formed this thing called the organization for internet safety they drafted this thing that was a counterpoint to the RF policy about full disclosure and everyone debated this like it was profound and interesting and whatever a couple years later turns out that is the wrong argument to have because now we're all selling our exploits we're selling them to companies no nothing against uh 3com and and the other companies are out there that are buying the exploits but we have a different debate on our hands you know we're not exercising full disclosure in the same way that we used to and that really can change the motivation of the people that you see up here on stage I have my motivations I'm biased clearly I'm giving a talk pro-trusting computing at DEF CON I clearly have a bias and potentially a chemical imbalance but we really have to pay attention who's on stage and why are they telling me this you know why are they ranting about these things and and you got to ask yourself when you see all these talks what's that person trying to what's he trying to do what's he trying to get accomplished so I encourage you use your brain be cynical right we're cynical about code we're cynical about firewall rule sets we're cynical about routing protocols but when it comes to idiots on stage we believe them like mice so just think about it throw crap at me disagree I encourage you to be as confrontational as possible within reason simple's up here to defend me if it gets too thank you thank you there I'll move along um actually real quick anyone know what a volvo 1800 is all right I have a a volvo 1872 volvo 1800 on blocks it's in my garage though it's not my yard so it's not quite as redneck got a big hole on the floorboard and it's the swedish car I was restoring so anyway two things to accomplish today and what's becoming a shorter amount of time one I'm going to make the case of trusted computing hopefully or at least I'll try to make the case of why there's good in this whole world of evil that people seem to see on it I'll also demonstrate TPM running on this macbook pro right here and we'll release some code and it'll be all wonderful so I'll just say thank you for watching and I'll see you next time. um sprinkling some good arguments some beer etc here's my anecdotal history of what we've accomplished in the last 40 years of infosec it's not complicated okay we've been solving problems and we've been doing a reasonable job at it but the problem keeps getting more complicated how many people in here review code for a living handful of people got a few people review code is it easy is it easy to find bugs yeah it's easy to find bugs okay it's a this is not my cell phone that is ringing hello no this is not Richard actually this is Richard's cell phone hold on one second and there you go I thought I was going to take the red pill and anyway so the problem keeps getting more complex um you know reviewing code is hard reviewing code in an embedded system that we could have divide design 15 years ago is a hard problem reviewing code in an enterprise service oriented architecture is currently an impossible problem okay we can't write secured device drivers as was demonstrated by who was Johnny Cash and David Maynor or Black Hat we but you know let alone at an enterprise level understand what security looks like in these massively complex systems okay and the problem keeps getting more complex okay but yet that's the buzzword go buy computer world or go buy some current contemporary magazine and this is what we're talking about we're talking about solving big enterprise security problems and we don't have our hands of the stuff that's 15 years old so you know we have a sustainable profitable industry where we're chasing an impossible dream this is fantastic you know that means we'll all get paid very well now while that's all well and good it's not actually making anything you know better that line you know these lines should at some point intersect or at least get closer but they're not really this is this is founded in data I have thousands of data points to back up these two lines if you want to see it later so in infosec trends defense in depth so the core problem is currently unsolvable okay we can't build provably secure systems oh there's a dirty word provably secure systems so let's throw a bunch of band-aids on it right let's go ahead and we'll slap on firewalls and IDS's and IPS's and execution control mechanisms and all kinds of stuff and hope that we all get to the point where we're able to build our systems back to the point where we're able to build our systems back to the point where we're able to stay in front of the wily hacker because the wily hacker apparently is an idiot and doesn't learn right wrong okay so you know with phrases like defense and death we sound like we're being responsible no sure it's the best practice is what we got going today this is the best idea we got but we need to think about how are we going to solve these core problems that we're facing an infosec things like if you access the system directly you win okay physical access to a system with a backtrack boot disk wins the day period right there are very few situations where that doesn't work and this is a very important issue I think we need to, so how can we do this right now to get you everything you need. And even Hikari and crew have gone and malicious slayed devices plugged into things, auto-routing stuff. If you can touch the device, poof, there you go. What else is there? And then transactions are trusted at a network level. End-to-end device-to-device security only really exists in controlled and highly, well, controlled, I couldn't think of another word, I failed miserably, highly controlled environments. So this is the kind of situation today. You know, I'm being really cynical today, I apologize, but this is the third time I've talked about this in like a week, so I'm kind of down on it. How did we get here? It's a paper from 1971. Butler Lampson, he wrote a paper called Protection. He actually wrote a lot of papers around this period. I'll give you a couple seconds to read through this. Can you read it in the back? Nods, good. So, you know, is this any less true today? Is this any less true of what we're trying to do with system stay, be it your cell phone, or be it your enterprise web server, or your SOA gateway? This is the same damn problem, right? His paper goes on to describe, in a nutshell, multi-level security, MLS, basically object level separation enforced by the kernel, keeping things really secure, and you know, the idea is you can keep multiple classifications of data away from each other in a military environment, but in general, you can keep the good data from the bad data. The need for hardware security to enforce this data separation, and this object-based access control. 1971, okay, 2006, for reference, in case your calendar broke, we haven't gotten real far. Hey, it's a blank slide. No, it's PowerPoint, foo. Ha ha ha ha, this is all as good as it's gonna get, folks. I'll give you a few minutes to read these quotes. All right, any guesses when this was written? Yesterday. Yesterday. Another guess. Seventy-two. Seventy, someone. Seventy-four. Someone saw the talk. 1972, actually, 68, right? It was a long time ago, again. This was from a computer security technology planning study, October 1972, published by the Air Force. Okay, hey, smells like the same thing we're doing today. Right, if you go through this paper, and you redact all the specific systems and networks, and random network topologies that I've never heard of, it's exactly the same problem. Wow, we've done a fantastic job at building this industry. All right. So, I'm not gonna be employed by the end of this. The road is littered with corpses. MLS, people have been searching for MLS, trying to do this for years. Turns out, it's really hard, right? We try to do provable, secure operating systems with formal methods and all kinds of stuff, and that hurts. It hurts a lot, okay? And complex operating systems, when you try to build one, the formal methods and everything go out the window the moment the fingers touch the keyboard. Soon as a developer and a human gets involved, it's no longer provably secure at a reasonable scale. I hate to say it, but we're not arming our developers the best that we could, you know? It's like going off in the streets of some inner city, and having a Nerf gun, and walking up to people, and smacking them on the head, and picking a fight. It's not the greatest idea, but that's about what our developers are armed like these days. They don't learn security when they're in college. They might be able to go to a conference, and learn how to audit code. And maybe learn how to write some good code. But it's not a pervasive thing. There's not armies of millions of developers out there who can write uber-secure code. This is a problem. This is something that academics have to address, and they're getting better. But operating systems are complicated. Software developers don't have the tools, don't have the knowledge, don't have the time to write secure code. So the best you can do in that situation is layer on other protection mechanisms that developers aren't involved with, like firewalls and execution systems. So what's the thing... GRsec. GRsec, no, the Immunix... StatGuard. StatGuard, thank you. All right, trucking right along, because my memory's failing me. All right, fast forward. 2000. DRM emerges on the scene. Woohoo! Man, everyone was making money. It was 1999, and everybody was getting rich. And then it crashed. DRM stayed around, though, as it turns out. Content was king. AOL Time Warner was going to be the biggest, corporation in the world. Didn't work out so well. DRM, though, was a key part of how the content evolution, revolution kind of came about. Content providers had a mode where they were used to selling their stuff and getting money for it. And as much as Napster and Crew were allowing you to download it for free, there had to be a sustaining business model that was developed, and digital rights management fit it pretty well. Microsoft even has DRM-like capability in Office now, where you can control where files get sent. It's not perfect, right? Like DVD John, he proved that DVD encryption, not perfect. Not rocket science, there was a static key. You get the key, you can rip down DVDs. How many people have ripped DVDs on a PC? It sucks, doesn't it? It really hurts. How many people have ripped DVDs on a Mac? Is it easy? Yeah. Handbrake, baby. There's a great program out there called Handbrake. You hit one button. I was offended when I tried to do it on a PC, how bad it was. You download 15 different little codecs and widgets, and then nothing works together. And blue screens of death that I hadn't seen in forever, pop it into my Mac, my Mac's like, oh, there it is. Oh, and I have two cores, so I can do anything else while we're doing this too, because I'm badass. I might not be a Mac fan, but I probably am. So DRM can be subverted. If I'm really interested in overcoming the copy protection mechanisms in an Office document, I'm gonna just type it into another document, right? It's not gonna keep the evil people from doing evil stuff. If I wanna take, you know, an MP3 or AAC file that is, you know, protected by DRM, I'm just gonna transcode it in MP3, right? This is not rocket science, you know? There's nothing stopping me from doing this. DRM's gonna keep legitimate people legitimate. So we all hate it, right? It's all evil, lose control of my content, blah, blah, blah, blah, blah. Guess what? It's cool. Go ask any college student. Apparently iPods are cooler than beer. This is not the college I went to. I don't know where they took it. I don't know where they took this question from. But, anyway, it's all just mind numbing to me. So, ultimately, there's some transitivity here. So let's follow the path. iPod, you know, one of the big things that made iPods successful is existence of the iTunes Music Store. iTunes Music Store could exist because there's a DRM mechanism that Apple came up with that was tenable to the content providers. So the content providers could put content on iTunes Music Store. Apple could sell it for a buck. You could buy it. You could get the Britney Spears song you haven't heard in years and download it to your iPod and no one had to know it because you didn't even have to go into a store. It's like buying porn, you know? Dirty little secret. I buy porn and Britney Spears albums online. February 2006, one billion songs sold on the iTunes Music Store. Now, Budweiser, they sell a lot of beer. One billion songs sold on that thing? That's actually a lot of songs. That officially probably puts them in the realm of cool. So, transitivity, Apple made DRM cool. Nobody even realized it. It was sexy. It was useful. It was something the users wanted and they put up with it. You know? If you had an argument on the face of it of, hey, it violates your privacy and whatever, people would probably get upset about it. When you say, hey, but it's a dollar, oh, your eyes get real big and they just kind of wander off into space like, ooh, a dollar. So, it, it, it, it, it, okay, trusted hardware. What does this have to do with Apple? So, Apple's doing the same thing with trusted hardware. I hate to tell you. I hate to tell you this, but they're gonna, they're gonna, they're gonna have the same effect. MacBook Pro runs on an Intel, okay? Apple, six, seven years ago, decided they're gonna get away from allowing people to sell cloned Apple products. And so, they got another, they got Stranglehold back on their, on their hardware platform again. And the models worked out well for them. Apple's growing, you know, their stock's going great, making a lot of money. IBM relationship isn't working out so well. So, they moved to Intel. And Apple wants to maintain this kind of, not Stranglehold, but certainly a good, strong grip on the hardware market around their software. Knowing, though, that they're walking into the x86 market, which, how many people in the room own an x86-based PC? All right, good. I'm just, so we're clear. I thought there might be a few of us. You know, that, that's a bit of a threat. Because OS X's actually kind of cool. I mean, all, all things aside, like, it's a Unix that runs Word. All right? So, you can go own a box and write a letter to your mom and fax it all at the same time, and you don't have to use, you know, open office and play around with print drivers. It all just freaking works. It's fantastic. So, when they made the switch, you know, there were certain bits of proprietary things they wanted to protect. I need to caveat with this by saying, this is my crystal ball. I've shaken it up. I've looked into it. And this is what it looks like to me. I don't have any inside information from Apple. This is what I've read on the net, what I've been able to synthesize based on looking at these machines. But what they, what they want to do is keep this grip on this hardware. So, one thing that was really interesting when they made the migration is, they have, oh, I don't know, 20 years of legacy PowerPC code, actually I guess 10, 10 years of legacy PowerPC code, and they want to be able to run that on the x86 platform. So, they could do the nonsense they did with Classic, which is where you instantiate a whole virtual machine, suck up a bunch of memory, and you run slower than death. Or you can actually just do the translation in real time. So, I think they actually acquired a company. They've named the product Rosetta, and it does real-time translations of PPC opcodes to x86 opcodes. Neat. This is their differentiator. This allows them the seamless transition. To the Intel platform. This is the little bit of thing that they don't want running on every PC so that people just don't start running OS 10. So, what they do is they put a TPM in this thing, and then when Rosetta instantiates itself, it checks to see, hey, is this really a MacBook? And if it is, okay, it'll run. If it doesn't, you can't run your PowerPC stuff. Pretty neat. There's a Russian hacker by the name of Maxis who repeatedly bypassed this protection. Apple lawyers are repeatedly beating him about the head and face. I challenge you to go find it right now. Google. I'll give you 10 minutes. I'll give you a t-shirt if you can find me a Maxis patch. They're really hard to find right now. They're really hard to find. And all he was really doing, though, was going into binaries and sniping out the calls that made the call to TPM and just said, yep, everything's fine, whoop, and the thing would start. Software. So the problem was, clearly there's an architectural problem there. It was still subvertible via software, but there's long-term solutions that, and I'll get into it in a minute, that would actually make that very difficult and not impossible to bypass. So backing up a step. I used an acronym on the previous page that I didn't explain, which in consulting foo is bad. I'm not having a good logical step. So backing up a step because I didn't feel like re-running the slide. Trusted Computing Group used to be the TCPA. This is an industry group. It's not the IETF. This is not like an open forum that you can just go to Zurich and hang out for a week and talk about the direction this thing is going. You have to buy your way into this thing. They're setting up standards for trusted computing systems and architectures. It used to be solely focused on the development of standards around the trusted computing module, a chip that gets embedded on the motherboard. Now they've branched out. They realize just building the chip isn't going to make anything happen. So what we need to do is focus on, hey, let's talk about infrastructure, mobile devices, PC clients, servers, trusted network connect storage, software stack, how you access this thing. That's kind of important. And tie it all together. So there's all these documents and there's all these specifications that you can get to try to help you build this. That's what the trusted computing group is. If you read their charter, at no point does it say, be evil. Be the counterpoint to Google. Don't be evil. Be evil. Ha, ha, ha. That was funny in my head. So anyway, thank you, thank you. Try to be evil. I'm done. All right. So it strikes me that people think this is inherently evil. And I think the ultimate anecdote for that is the really angry doll in The Simpsons is trying to kill Homer. And the guy comes over and is like, oh, you have it set to evil. Click. And oh, it serves him food and everything's fine. This thing doesn't have that property one way or the other, all right? It's going to be what we make of it. So let's talk about privacy for a minute. First of all, I need to tell you up front, full disclosure, I have fully bought into the church of McNeely. If you have a family that says you have no privacy, get over it, OK? McNeely said that many moons ago at some Sun event, and I believe him to be fully correct. I know other people in this audience disagree with me vehemently, and that's cool. So let's talk about privacy a little bit. First of all, previous versions of the TCG or the TPM spec actually were pretty bad when it came to privacy stuff and would allow for the content providers to really grab hold of your machine and shake it vigorously without allowing you to do anything. And I think that's a good thing. And there was a lot of pushback, understandably so. There were also a lot of pushback to things. Remember the Intel serial number issue, when they put serial numbers on the chips? There was no end user benefit there. That wasn't sexy and cool, right? Again, DRM, iPod, sexy, cool, serial number on the Pentium, profit. There was nothing in the middle, right? It was bad. So the new specification allows for a couple things. One. Personalization. Note. Owner. Not administrator. Not the guy in front of the computer. But the owner. Okay? In an enterprise, when you're using a laptop given to you by the company that you work for, you have no expectation of privacy on it, period. I'm sorry. I know that there's laws that allow workplace privacy and things like that. But by and large, you should not assume that anything you do in that box is subject to your own little private whims. It can all be controlled and monitored by your employer. So the owner in that case is probably the company. When you buy your own laptop and take it home, you're the owner. You can do anything you want with it. You can take over the chip. You can turn it off. You can turn it on. You can reset it. You can do anything you want to. The private personalization information is never exposed, and the keys are encrypted. I mean, I'll get into all this kind of nonsense. In a nutshell, there are keys that can be bound to the TPM, and there are keys that you can export off the TPM. The original spec just had keys that were bound to it, which is pretty evil. Because then if your box dies, all the data that was encrypted with that chip is gone. On the flip side, nothing really got ever made with that particular specification, so you don't need to worry about it much. Anyway, that was a rambling, horrible slide. I'm going to shoot it. Trusted platform module. Chips are manufactured by a bunch of folks at a high level. They got three things they can do. One, assured cryptographic operations. When I say assured, it means someone looked at their implementation and said, yeah, this thing's okay. Not like it's uber cool or whatever. It's going to do the same thing every time. You can't change it. Right? You can't download a new library version and break it. It's just going to do RSA correctly every time. It serves as a trusted key store. It's on a little chip. It's inside the chip. Without a lot of high-end gear, you're not going to be able to extract it. It'll also make integrity statements, basically say, I'm okay. Everything's a-okay, or at least it's not okay, but it'll cryptographically sign those messages and say that it's not okay. The TPM on its own doesn't do anything. It sits there. When you boot the box, it's kind of a mess. It kind of hangs out. It doesn't set the evil flag, doesn't do IP over avian carrier. All it does is sit there. I boot this Mac running Linux right now, TPM wasn't even activated, didn't get in the way of anything. Higher-level systems must use the TPM to do something, right? They can't just expect it's going to intermediate. Again, it is not magical. There's no magical property about this. Magic's not real. That's what my son says to me. I'm sorry. How'd you do it? I say it's magic. Magic's not real. He's disenfranchised at eight already. It's great. The TPM spec says the user must have the ability to turn off the turn of the TPM chip. That's off, O-F-F, the TPM chip. That means the user always has control of the device. Again, though, if you have software that needs it, that means the software might not work. There's a trade-off here. Who in the what now? Like the operating system, particularly. Let's talk about that. There's a lot more, but I've paid some hecklers in the room, particularly ones that look like pirates. Arr. Truly, there may be things that you want to use that if you don't want them to access the TPM in your system, they're not going to work. Now here's the thing. One user isn't important. Same thing I tell people when I talk about wireless security. Nobody cares about you as an individual. They care about you as a group of people. They care about getting 100 million credit card numbers from a VA laptop. They don't care about getting one credit card number. You find the identity theft that's sitting around sniffing someone's home network looking for credit card information, I'll show you the dumbest man in the world. There's market pressures involved, though, with massive amounts of people rebelling against something. If your operating system doesn't boot because it requires some piece of trusted hardware that nobody wants to use, the market's going to adapt. People will use other systems to get their job done, and people will stop making it that fascist. Okay? Or maybe the law will get involved and EFF or ACLU or somebody will sue to make that change. Okay? This is a cultural issue. Right? And this is the evil side. And clearly that's a battle that has to be fought. I'm not arguing that. I'm not arguing that at all. We're going to fight that battle. And there'll be people up here talking next year about the evils of TPM and some legal battle that's going on or something they're doing with some vendor. Fantastic. More power to them. You know what? There's a lot of good. Remember that graph I showed? Two lines. Same slope. Same slope. Not making any progress. Well, let's focus on that part and assume the cultural bits because we all like to moan and groan and complain about the cultural bits. That problem will work itself out. Let's talk about the technology. So to you, the pirate. It was a very piratey response. I think if pirates stood on the bow of the ship, they probably got blown off with a cannon. Here's the inside of a TPM chip in swank little PowerPoint rounded bits. Go on. Point around the horn. You've got IO in the middle. NVRAM. Platform configuration registers. The PCRs. This is basically a set of information that can uniquely identify your system. It's going to have manufacturer information, serial numbers, peripheral information. This can be used to basically form a hash that uniquely identifies your system in a given state. Okay? Again, good and evil. We can all think about ways this can be used for good and bad. Adversation identity key. This is basically the key that's used to identify and authenticate the chip. To off-chip entities. So if the chip needs to talk to the rest of the operating system or talk to something on the network, this is the key that gets involved. Program code. This is where it does, you know, programming stuff. Very descriptive. RNG. It's somewhere between a really good RNG and a PRNG. Note, it won't give you the same answer every time, thanks Dev Random. But it's not necessarily 100% great. SHA-1 engine. Yes, we can debate how good SHA-1 is, but come on now. Key generation. Because it does need to generate keys on its own for internal and external use. RSA. State management. Is it turned on? Is it turned off? That kind of thing. And the exec engine basically executes the program code. That's your kind of processor. So here's how you interact with it. Looks a lot like a smart card. So I was told the other day that there's a reason for that. If you look at the chip model numbers for some of these vendors, there are precisely one model number off or just a letter modifier from the smart card chip from the same manufacturer. So for those that do smart card work, this looks very, it's command response. You send something to it, a bunch of hex. You get something back, a bunch of hex. There's an application. It makes a library socket call. This particular datagram, this is the startup datagram. It's actually one that's a real pain in my butt. The first line is the type of datagram. The second line is the size. The third is a specific command, in this case start. And the fourth is a modifier. 01 is a start. It's a fresh start. It's a system up and running from the get-go. Note, when a TPM chip comes online, there's two things that happen, or two things that need to happen. The first is init, and that's a device-specific thing. That's basically when it powers an eye, click, turns on the switch. The second is startup, when you have to send it this thing. All the tools I found under Linux pre-assume the startup command had been given. So I'm running all these programs, and none of the programs are working. They're all cratering with errors like chip not activated. I'm like, oh, this isn't good. And all kinds of crazy crap. This is about, I don't know, four days before I'm flying out here. So I'm really not happy at this point. And then I discover, oh, I haven't turned it on yet. So I do the startup, and everything starts working magically. So I'll do a demo here in a minute of how that doesn't work. High-level breakdown of TPM commands, administration stuff, opt-in ownership, key management crypto, you can all read. Probably what's most interesting here is the crypto stuff. I'm a little imprecise here. When you bind, you're encrypting a chunk of information. Okay? Okay. So what you can do is use either these exportable keys or non-exportable keys. Non-exportable keys, if you bind something with it, you're just encrypting it with a key that you could save off to software. So it's not really that secure. If you encrypt something with a non-exportable key, well, now you've bound it specifically to that TPM chip. But God bless you if that TPM chip goes away, because cracking RSA is still kind of a hard problem, and you may not be able to do it today. You can sign things. No shock. Seal. This is where you're binding. But you're also hashing it in with a PCR data. Okay? So this is where you have the data that not just uniquely identifies your computer, but then you use a specific key, you squish it all together, and now you've got a signed and sealed, or excuse me, a sealed thing. And then you can also sign that if you want to. So this is where you can really get interesting things, where you bind specific pieces of information actually to the chip that runs on your device. Upgrades or session management, et cetera, et cetera. So all Intel-based Macs have these TPMs. So at least I surmise when I started doing this, one night I actually flipped out because I hadn't yet written code successfully to access it, and I flipped and spent the entire night just proving to myself there was a TPM in there and discovered the guts of the internals of the advanced controller and power interface, or whatever, ACPI, and dumped all the crap off the motherboard through the ACPI commands and actually discovered it. It was there. I went and had a few beers. I was very excited. Never fear. We've got some code to examine it. Because there's no interface from Apple. Okay? I'm not saying this to ding Apple. There just isn't any. If you ever tried to do Bluetooth coding on a Mac, up until 10.4 was released, the only way, like you wanted to go scan for a device, it wasn't like it was on Linux if you're using BlueZ or using somebody else's stack on Windows. You called a wizard. Okay? You said, I want to find a Bluetooth device. I'll call the Bluetooth device discovery wizard. And you waited for it to return, and the user had a little thing pop up, and boop, boop, boop, boop, then boop. And then you got the Mac address and all the information about it. When you're trying to write like actual real Bluetooth software, that may not be the most robust way of doing things. But it worked. Wi-Fi similarly on a Mac, there wasn't really a good interface of that. So if you want to do war driving, somebody went and reverse engineered the header file so you could actually compile code that ran against the Apple 802.11 libraries. They're getting better. But Apple's not really in the market to make some of this stuff extensible. That's kind of Microsoft's rant in the world. Anyway, they didn't give any interface for this. So we ended up having to use Linux. Linux to make it happen. Hopefully we'll have some Apple code running at some point. Not sure if someone's giggling at me or, anyway, Ubuntu, how many Ubuntu users? Wow. How many FreeBSD users? If you're near the Ubuntu users, punch them. FreeBSD, just if you haven't heard, is God's operating system. It's the greatest thing ever. I felt really dirty when I used Ubuntu. Like I had to go talk to my FreeBSD install disk. I'm sorry. It was only a one-night thing. Then I went back and recompiled the kernel and didn't tell them about it. So there's two ways to access a TPM on a Mac. You can use custom applications and access it through, like, LibTPM. It's a legacy thing written by IBM, and it just talks to the TPM chip like any other device. There's this other thing called Trousers open source program. There's a daemon called TCSD, basically grabs the device by the face, doesn't let anything else talk to it. And if you want to talk to the TPM... You have to do it through that. That's Guido. Okay? So TCSD is Guido, and then you do socket calls across to TCSD to access the TPM. In particular, the TPM is the Infineon IFX0101, which is version 1.1b. Here's a quick demo, or what I hope to be a quick demo. It may actually be a complete goat rope. So here's the top of my scroll buffer. Is that big enough for folks to see? Is contrast all right? It's lousy and... Well, it's a terminal. It's Courier. Come on, now. This TPM demo, the green things up here are the default utilities that come with LibTPM. TPM demo, in theory, goes through and does all kinds of cool stuff to the chip to show you that it's working. This is what you get when you don't start the chip up, okay? It just says error code 38, which if you flip through all the documentation and the header files, you eventually realize that it thinks that, oh, it's not turned on. So... There actually was no utility to turn it on, so I had to use my immense C coding foo to write a five-line program called TPM Startup. Trust me. If you've ever seen me code, that was actually an adventure, okay? I was debugging something for the Hacker Arcade at ShmooCon, and Praveer, one of the guys in Kenshoda that helps run the capture of the flag, he was debugging it for me. And he's like, dude, you've declared a function inside a conditional. Like... The function doesn't exist because your conditional didn't match, and so the rest of your code doesn't run. I'm like... That's not normal? So... Me trying to make this thing and then get, like, the makefiles all set up, makefile.in and .am, my god, I was like, you know, peyote trip, whoo, it was a lot of fun. So anyway, we do a TPM startup, and, you know, you get this incredibly verbose message that says it's been successfully started, and now we'll attempt fate and see if it was true. Oh, now a bunch of crap scrolls by. Demos are great when all they show is hex, right? So a few... Some applause. This is actually where Caesar's Challenge is going to be, if anyone wants to take that down. Let's see. Scrolling up to the top. All we're doing is basically getting the capabilities information, you know, what can this chip do. It's a lot of hex. I'm not going to dive through it. There's a few interesting bits. One, we're getting PCR registers here. These PCR05. Yeah. PCR05. PCR06. PCR07. These are different registers that, in theory, could contain specific information or hash information about configuration on my machine. Serial numbers, manufacturers, that kind of thing. Right now, what's interesting is, by default, there's actually nothing in them. We scroll down, and at some point, they start turning into Fs. So we get the higher level PCR registers. There's nothing there. Now we get all the way down to the bottom, and there's two big blobs of data. These are the public keys that uniquely identify this TPM. Okay? These are kind of secret, kind of not public keys. They're not something you should really let off your box, but if you're really crazy, you can take a picture of this and then try to own my TPM on my machine. More power to you. Again, has anyone managed to Google and find Maxis' patches? See? That's just not cool. I was hoping somebody would have, because largely, I haven't found them. I'm very curious, too. Anyway, these are the keys that uniquely identify my system. They'll export it, and so if I want to interact with it, if I want to sign things, put new keys on there, export keys, this is the key that I have to use to do that. I can reset the whole system and make a generated new key, but that's going to screw up previous transactions that I already had. Anyway, that's the demo. There's a few things that were interesting about getting this whole thing working, and we actually have code now that will run and do this automatically. First of all, this thing doesn't use a BIOS. I think a lot of you probably already know that. It uses EFI. EFI is a pretty neat little bootloading thingamabob, but it's a real pain in the butt to build live CDs and make things work on it. They made this thing called Boot Camp that emulates a BIOS. I didn't want to actually touch my hard drive. I wanted to boot something to an external USB disk. So after some wrestling, I actually managed to take the live CD of Ubuntu that booted, put it onto a USB disk, upgrade it, get a new kernel on it, make all the TPM stuff work, get the configuration right, and then I tried to burn a live CD. I made about $100. I made about 40 coasters and decided at that point I was done, and all I did was upload a gigantic tarball up onto the website. So there's like a 680-meg tarball, which is just basically a file system, nothing more glamorous than that. You download it, you drop it on a USB disk, and then you plug it in, and you can boot Ubuntu and play with the TPM on your Mac. And actually, it's kind of nice just to have an external Mac disk or an external whoosie-whatsit Linux disk to be able to boot on your PowerBook. So I saved you all the hassle in figuring out how to do that. You can just download it and do it. Hopefully I'll make a live CD once my brain recovers. Trusted Network Connect. So network access control, network access protection, these are neat little buzzwords these days. We're trying to protect access to our enterprise networks more and more. Rather than solving the entire MLS signed object trusted boot problem all at one shot, something that TCG is doing is it has this thing called Trusted Network Connect. The idea here is that it's a formal... It's a specification to control how systems connect to the network. For all intents and purposes, it's 802.1X back-ended into a TPM chip. It's doing authentication of the device with a device-specific key. There's a key, it comes off the TPM, goes through the authentication process. Now the device, not the user, the device is authenticated on the network. You can do all the typical quarantine and patching and everything that you want to do under the guise of TNC. Juniper has a solution that's TNC compliant. It's called TNC-compliant. Cisco has a competing solution that is not TNC-compliant. They've got their own thing. Microsoft has their own way of doing it. No one's bought into the church of TNC really heavily yet, but there are options. You can actually go and deploy them if you desire. Here's a really bad diagram I lifted from a website that just has arrows and boxes that describes the TNC. Anyway, phenomenally useful slide. Other capabilities. Now that we've talked about the low-level bits, like, hey, you can encrypt data. You can sign data. That's awesome. We could do that anyway. What else can you do? Well, higher-level issues. Data at rest security, right? You want to secure a hard drive or something like that. Vista has the ability to use TPM for key storage and an eCure container. Oh, my God. I didn't copy and edit this at all. It's this thing called BitLocker. This is kind of a funny one. How many people actually use encrypted drives or encrypted volumes for what they do? That's not bad. In the general population, it's a lot. The number of hands that go up are far fewer. And it strikes me that at an enterprise level, it's a real pain in the butt to do that. And after this VA laptop thing got stolen, first of all, every laptop on every desk at every corporation is a liability to that corporation. If it goes out the door, you're going to notify somebody of some identity theft threat. It's a fact of life. There's just stuff on everyone's hard drives that shouldn't leave the organization. And I don't know how CIOs sleep at night knowing that they've got people. I've seen people completely untrained in InfoSec and OpSec running around with these little laptops. Just, oh, I left it in my car and the car door was open. Now it's gone. Oops. 40 million social security numbers go away. You read these websites. Reporters write about this. Oh, you want to comment. Someone's like, oh, this all could have been solved with drive encryption. All right. Give me a break. It's not that easy. It's not like you snap your fingers and you have enterprise drive encryption for 10,000 users. Maybe a few people do, but it's certainly not the norm. There aren't a lot of tools out there to do that. BitLocker, technology-wise, is really cool, but it's not really, there's no handle on how do you operate, how do you maintain this in the enterprise. Microsoft's trying to get that together, but it's not, no one's really deployed this yet. We don't know what the ramifications of having globally encrypted disks with hardware keys that you have to export and track the key material and all this crap. Nobody knows how that's going to work. Soapbox, exit stage left. Crypto API. No confusion. No confusion if an algorithm is implemented correctly anymore, because it's all in the hardware, and assuming you trust the hardware, then everything's okay. Note, there's an OpenSSL library available on the Trousers website that's been compiled against the TPM, so you can basically use OpenSSL back into the TPM for the crypto capabilities and key storage. Kind of cool. Remote attestation. This is where you can tell a remote device, hey, I'm okay, or hey, I'm not okay. Trusted boot. This is really the kick in the pants, right? I got a TPM. I got a secure bootloader. Trusted. Proveably secure. Little bits of code. Now I can load a signed kernel. Signed does not mean secure, but it means it's at least the kernel I intended to load. And then I can load signed drivers, signed applications, and at least I know what I meant to do happened. Okay? It wasn't a root kit. It wasn't something else. Everything that I intended to have happen happened. Now it still could be chock full of holes and the worst smelling crap in the world, but at least I know I had a good start at it. This is a really neat capability. You can't really do this easily today. I mean, you can try, but this will, you know, Microsoft and Linux and these other vendors are all working toward a solution that will allow us to do this. Hey, can you imagine being able to boot your box and know definitively, at least right now I know there's no root kits running without having any other security software running, no anti-virus, no anti-spyware, nothing. It's kind of neat. It's a neat little future that we can think about. I like to call it fairy world. Types of attestation. I only got five minutes, so I got to drop the hammer here. Attestation by the TPM. This basically says I'm a TPM and I'm here. Nothing more complicated. Attestation to the platform. This basically says I'm here and I'm okay. You can trust me to tell you things. Attestation of the platform is this is where you say, and the entire operating system is screwed up. Okay. So if you've gone through number one and number two, you can at least trust the answer of is the whole operating system okay? They'll say no. Oh God, no. You're owned. You got that Sony root kit, man. Rocks. Woo. Yeah. Got it. Woo. For the Sony root kit up front. Hi. You work for Sony, sir? Oh, no. He's got the RSA barcode shirt on. That's pretty hot. Talk to me later. And authentication of the platform. This is device authentication. Hey, nothing. It's not rocket science. I mean, I hope I bored you in the last 20 minutes because this is not rocket science, right? Nor is it evil. But it's pretty cool. Like this is really neat stuff to be able to do and say, hey, this is actually grounded in this little hardware thing that's really hard to subvert. Okay? We don't have to layer a bunch of crap on top of it and then hope for the best. We can actually have a pretty reasonable proof that this thing is doing what it's supposed to do. Again, we're not solving the assurance problem. We're solving the integrity problem here. Again, I haven't said that yet, but I said it like you were all internalizing that whole statement. So first, the bad. Opportunities abound for loss of control of content stored in a computer. Yeah. Okay. We get it. Failed hardware is an issue. Users aren't used to thinking about key management. Right? Like how many people back up their SSH keys? How many people wish they had backed up their SSH keys? There you go. And we're all smart computer security folks, you know? When my mom calls me up and says, hey, I have to back up my TPM keys and I'm not sure how to do it, it's a bad day. It's going to be a really bad day. Operating system vendors may get territorial. I mean, honest to God. Like, you know, it was pointed out by the pirate. Windows Generative Advantage could decide, hey, you've got Mozilla? I don't like Mozilla. I'm not going to give you a security update. I'm not saying Microsoft's going to do that. But the potential exists. This is where technology ends and legal and market pressures begin. Okay? Let's continue to make that distinction. I'm talking about the technology and the good that can become of it. The bad, clearly, bad things can become of it. That will be solved differently. If you try to make technology solve the problem of not having bad things happen, you've lost. Okay? You can't make privacy privacy because you made really cool stuff and you built an Uber secure multi-node network that people can't trace crap through. People are just going to come steal the computer. Okay? You know, you can't solve all these problems with technology. You can't solve privacy all the way with technology. There's market and legal issues that are going to step in. So you just kind of need to take the red pill and accept it. The good, trusted boot can make a big dent in controlling malicious code in the enterprise. Integrity of your boot process is a really cool thing. Trusted network access, we're already, the train's already left the station. We're doing 1X. We're doing NAC, NAP, all that kind of stuff. Now we can tighten the hardware and even more assurance of the device's connection to the network. We have the ability to protect mobile media and other data at rest situations. The ugly, we're all distrustful, angry, drunken people and this represents a big shift for our world. It really does. It changes everything we know about InfoSec for the last 40 years. This defense in depth idea changes because now we start talking about this bottom up provable security, at least at a lower level. And it really, when you think and you look at MLS and you look at all these signed objects running around, this is not how we think about systems. This is not how we build systems today. And it really is going to cause us to have to change how we look at this stuff. Vista has a TPM support, but you have to have a 1.2 version TPM, which there aren't a lot of them out there. This one's 1.1. Most of the ones in the ThinkPads that are out there are 1.1 as well. The Vista TPM developer support largely consists of documents that have function calls and then documentation to be written later underneath the function call. So there's really not a lot there. Where trusted computing is going? I don't know. Many systems have TPMs. Not a shock. Huge capability. End rant. A couple other points I want to make before I end this thing. One, ShmooCon 3. How many people went to ShmooCon? Woo! All right. Well, I hope that got the attention in another room. So someone actually said, I've been to all three ShmooCons. They were all great. There's actually only been two. That guy had a really good time in one of them, apparently. ShmooCon 3 will be March 23rd to 25th, 2016. In 2007, people may ask, why so late? If you didn't in January last year, it's because I didn't get to go see my folks over Christmas time because me and my wife and everybody else were getting ready for ShmooCon. So I'm being selfish with my family, and we're going to go see our folks, and then we're going to have ShmooCon in March. Same place, Warman Park Marriott. Very nice venue. Slight change in structure. The highlights. We're going to do 20-minute sessions in the afternoon on Friday, which will be kind of cool. Kind of turbo talky, but it's just going to be one big track. Everybody's going to be in it. And then we're going to do... How many people remember the NetWorld Live? The old network they used to build? It was a NetWorld or Interop? NetWorld Interop? Interop. Yeah, the big Interop network, and they got all these hotshots and vendors together, and they plugged a bunch of stuff in. They made the network, and they ran. And then it became more commercial, and then it got relegated to the labs, and then it just kind of went away. What we're going to try to do is the same type of thing for ShmooCon. We're going to get in vendors. We're going to get in smart people. We're going to get in people that want to learn, and we're going to build an enterprise class security network to run the con, or else we're just going to use Twisted Pair and lay it on the floor if it doesn't all work out. So one guy will be tagged with bringing like 4,000 feet of cable and crimpers, and the rest of us will go build a secure network. So anyway, we hope to have some fun with that. So that's kind of the few days beforehand. We're still going to have contests, Hacker Arcade, all that kind of stuff. CFP will be out next week. Tickets on sale next month. One last item. I know I'm going to get bum-rushed here off the stage. We were given the opportunity to mentor four projects under the Google Summer of Code. I wanted to mention them really quick. If you go to code.google.com slash SOC, you'll learn more about Summer of Code. I don't have time to explain it. Four projects. First one's Firekeeper. This is a browser-level intrusion detection, looking for cross-site scripting, phishing sites, all that kind of stuff on the browser side, and blocking them from causing anything bad to you. It's pretty neat. Firekeeper.mosdev.org for more information on that. GPG Grease Monkey, client-side mail encryption, now via a Firefox extension. We were originally trying to do it via Grease Monkey, which is basically JavaScript rewriting the pages on the fly to do neat stuff. The problem with JavaScript is there's this little security thing that doesn't allow you to access local binaries on the machine, like, say, GPG. The student came to me one day and said, I think I'm going to have to write GPG in JavaScript. Is that okay? No. No. I don't think that's a good idea. I don't want to see you on the news at the top of a bell tower. Ah! Des, des, es, ah! Rather than do that, we went to a Firefox extension. It doesn't have the security concerns. We currently have an implementation for Gmail and Yahoo. There's the SVN information if you want to go get this version stuff. This will all be on my website later. This is a screenshot that's so tiny that you have no choice but to believe that it works. There are little GPG encrypt and sign things there. It's kind of funny. Johnny Long was giving his Hack in Hollywood talk, and he had all these Gmail screens that had all this extra functionality, and he thought he did it all with Grease Monkey. So when we started this project, me and the student asked, we said, Johnny, why don't you do that? And he says, oh, I just Photoshopped that. Oh. So we've now fixed that problem. Two other things. Online rainbow table lookup focused largely on increasing the speed of how fast you can look up hashes. There's a DNS interface, so if you're actually at a site where they can send out hashes in the clear and get passwords in the clear on port 53, you probably have no security policy problems whatsoever. Anyway. We've got basic search capabilities completed, et cetera. Open security framework. Pub's running this one. It's basically a framework to supply network security analysis. When I asked him for a synopsis, he says, well, you know, it's got a master client slave architecture. That was what he had. Like, what does it do? He's like, oh, you could. Master can tell the clients and stuff. The client sells slaves, and the slaves do whatever you want. So there you go. Anyway. I'm out of time. Go to ShmooCon. If you have questions, come track me down outside. Thanks, y'all. 1 Thank you very much.