So we're, like I said, I'm David Maynard and this is John Cash. We're going to be talking about device driver security. You may or may not have heard something about our presentation at Black Hat, but we're basically doing the same presentation. In the end we're going to have some specific questions we've gotten from the Mac community that we're going to be answering about the stuff we did. So we're going to start off with Nifty. I'd like to point out this presentation is being done on a Mac. Yes, my wireless is off. Wireless is off. So we're going to be talking a little bit, like I said, about device driver security. It's a very great topic now. So as I've told other people this week, the way we feel about it is we're going to be talking a little bit about device driver security. It's a very great topic now. So as I've told other people this week, the way we feel about it is we're going to be talking a little bit about device driver security. It's a very great topic now. So as I've told other people this week, the way we feel about this is operating system vendors like Microsoft, like Apple, Linux distributions, FreeBSD, OpenBSD, these operating system vendors are getting much better at actually hardening their operating system. And you're not seeing as many default attacks. I mean, for instance, the Zotab attack you saw last year wasn't nearly as bad as like MyDint or any of the other ones before it. They're actually getting better at hardening the operating system. So as an attacker, and I'm assuming there's no attackers in this room because, you know, that'd be bad, but as an attacker, I'm assuming there's no attackers in this room because, you know, that'd be bad, but as an attacker, you have two choices. You can either go up to the application layer, which, you know, would be like SQL injection attacks, PHP file include attacks, or you just send somebody a file that's like, this is a virus, please open it. You know, that would be going up. Now, going down is something that we've been talking about for a little while, but now it's only becoming more applicable. Device drivers actually, unbeknownst to a lot of people, handle a lot of unchecked remote data. So if you actually go and look at what device drivers on your systems do, you have device drivers for, you know, USB and FireWire. You have device drivers for your networking stack. You have device drivers for your networking cards and stuff. You have device drivers for your wireless cards. You have device drivers all over the place that will allow people to take basically untrusted input. So what are the problems with some of this device driver stuff? Speed to market is so important. Does anybody in here have an 802.11 Android? Do you have an 802.11 card yet? One guy. Oh, I have one too, but it's for a wholly different reason. So, you know, say again? No, all right, never mind. So one of the things about 802.11 Ns, you'll notice now you can buy things like 802.11 N draft cards. So basically what that means is the spec's not quite finalized, so you're able now to buy something that, you know, is conforming to what the spec currently is, and if they change the spec, later you'll have to, you know, flash the firmware on your card to get, you know, new stuff. And people are doing stuff like this because there's a long-held belief in the computer industry, first to market wins. So speed to market is very important. So in your rush to get things out the door and be the market winner, some things just don't get tested properly. And that's where we come in. We were, you know, most of the testing and most of the stuff we found has been tested using fuzzing techniques and things like that. And there's a lot of already good tools available for that. For instance, SCAPI is a great packet creation library. It's got a fuzzer built in. You can actually write SCAPI scripts that will automatically fuzz stuff. And you can do raw wireless packet injection with it. It's pretty cool. And new hardware and committee design protocols are especially susceptible. We're not big fans of things that are done by committee. I mean, could you imagine having to go to the bathroom and it be approved by a committee? Do you really have to go? Are you sure you have to go? How are you going to go? Please hold your hand, you know, like this while you're going. So, you know, the problem is that, you know, the committee design stuff, a lot of stuff gets left out. Like security is not a large part of most committee stuff. So although what we're talking about, you know, primarily is going to be like 802.11a, b, and g stuff, the thought process, and that's one of the most important things, and that kind of got drowned out in a lot of stuff we were doing this week, the thought process and how you find these problems, how you fix them, can be applied to a lot of different things like Bluetooth, new 802.11 specs. Like 802.11n, and new wireless data stuff like ed, GVDO, and HSTPA. I myself am a HSTPA user. So have device drivers had problems in the past? Why, yes, they have. Here's three good examples. I used to be with a company called Internet Security Systems, and a gentleman there named Neil Meda actually found an off-by-one in a TCPIP.sys. That's a pretty heavily used device driver. I don't know how anyone else feels about it, but, you know, I feel it's pretty heavily used. And it's also pretty heavily audited, you know, the last ten years. So, you know, for somebody, you know, last year to find, you know, a new off-by-one in IP options, that's just showing that the ground is pretty fertile. You know, just earlier in the month of Microsoft's Super Tuesday, there was a server.sys vulnerability that was a Super Tuesday that came out. And this was actually also in the device driver. And, strange enough, there's also the free BSD Wi-Fi integer overflow. It's actually in Wi-Fi, which is kind of weird, because it's kind of makes it relevant to this talk. But, you know, there have been. There's a flag on the top of it. Yay! Awesome! Can I shake your hand later? That's pretty cool. Have you tested that on any other systems? Have you tested that on any other systems, besides free BSD? Right. All right. So, have, has, has, you know, any other systems? Yeah, the, the free BSD Wi-Fi integer overflow been tested on any other systems. It was kind of a joke, but apparently I was the only one that got it, so. Say again? Oh, net BSD was also vulnerable. So, if there's any free BSD diehards, don't, don't feel like I'm explicitly pointing out a free BSD problem. It, it was, it was a, you know, it was a more wide-scroll problem. So, yeah, okay, there have been device driver problems in the past. And if you, if you think there haven't been, you know, do, do some research. We've, we've done a lot of research. Google is your friend. Don't, don't ever believe anything I say for, you know, go Google stuff. So, strangely enough, Intel on, you know, this past weekend released a lot of, a lot of driver patches for just, go ahead. Okay. 130 megs worth of patches. Is that a patch? I mean, how big is a compiled Linux kernel? I remember when I downloaded the Slackware for the first time, it was smaller than that. But, you know, they, they fixed a lot of problems in remote code execution. That's, that's it right there. So, you know, these, these kind of problems in wireless drivers, you know, they, they are real. They, they happen. So, now, this is where John starts talking. I'm going to go to, back to text messaging people. Oh, you have to switch me mics. Okay. So, so Dave here is the really brilliant kernel level ring zero payload ninja exploit guy. And I'm the 802.11. I, I, if I hadn't met Dave, the demo would have been, here's a Windows box. I blue screened it with EIP. Now, now what the hell do I do? I, no idea. So, I'm going to talk about. Yeah. Somebody called us a fantastically hacking duo in a blog. That was great. Anyway, so I'm going to talk about 802.11 and why 802.11 in particular is susceptible to these things lately. The biggest reason it's so susceptible is it's just so complicated. So, I'm going to talk about why it's so complicated and maybe what we could do to fix it. And the direct consequences of it being so complex is that A, you can fingerprint it and then B, you can exploit it. So, so why is it so complicated? My friend Warlord I think said this though. Somebody else might correct me. He says, fear leads to anger. Anger leads to hate. And hate leads to protocols designed by committee. Or maybe it's protocols designed by committee lead to hate. It's, it's just, it's too complicated to get a bunch of guys in the room and have them do it right. Maybe the guys could get together and elect the smartest guy. But you don't want more than like two people doing this, I think. So, so why is 802.11 so complicated? Well, partly it's too ambitious. Partly it's attempting to deal with the generate problems. Things that wireless networks have to deal with that wired ones don't are obviously hidden nodes, unreliable links and other networks on the same channel. I mean, those happen all the time. It's just the nature of, of wireless. And so, so that adds legitimate complexity of the problem they're trying to solve. And so, so that's, you know, they have to put stuff in there for that. But yeah. There's a lot of extra fluff. So, can we fix it? I say yes. All it costs is standards compliance. Basically, I, I feel like you should have the option at least to ignore management frames. Management frames are the ones that everybody uses to kick you off a network and crack it. So, how, here's a good question. If, if it's your home network, you know, you got a little access point. How often is your network gonna legitimately kick you off? When, when is that a feature? It does do it. It does it when it reboots. So, every time you reboot your router, like, cleanly shut it down, not just pull the power, it'll probably de-auth you. Is that really a useful feature? So, I think the number of management frames used to, like, break things versus actually accomplish stuff is, it's not worth it. You should be able to ignore them. There's some control frames that can cause problems. These are harder to ignore. They're more low level and they're related to keeping networks on the same channel from interfering with each other. And remove the extras. And here comes the extras later. Subtitles by the Amara.org community So, so why is all that interesting? Because complexity is a hacker's best friend. If there's, if it's not complex, then somebody didn't mess up. And if somebody didn't mess up, we've got no bugs to exploit. And 802.11 is not lacking in complexity. So just for a, a quick comparison, I'm gonna compare 802.11 to Ethernet. Ethernet has three fields, source, destination, and type. I'm willing to bet if I put 14 bytes up there and said it's an Ethernet header, a lot of people in the room could parse it. 802.11, has a version, a type, a subtype, eight flags, one, two, three, or four addresses in different spots. Fragment number, a sequence number, and that's in the header. After that, we've got stuff that's not in the header but just as important. You've got positive acknowledgement, 11 management frames, six control frames, lots of subtypes for each of them. And then as soon as you turn on encryption, it adds more fields, initialization vectors, mix, etc. And so there's still more stuff thrown in there. But, but, but, but, but, but, but, but, but, but, but, but, but, but, but. Yeah, in Herrmann's expecting something to win. There's a lot more stuff going on here. So that may not be, I don't know, monetization. It's them having more free time. PowerPoint is pretty much what biased freedom toward, you know. essentially turn themselves off and say, I'm going to turn my card back on in, you know, 10 seconds. Well, smaller time frame than that, but you got the idea, so the card can tell access point. I want to sleep. I'll be back in 10 seconds. Store any packets for me, and I'll pick them up later. So that adds some complexity, but it's at least accomplishing something useful. Saves your battery. Two types of media access control, PCF versus DCF. PCF stands for point coordination function. DCF is distributed. Basically DCF is Ethernet, and over wireless is the easiest way to think about it, and if DCF is Ethernet, then PCF is token ring. You can bet people are really rushing out the door to push token ring over wireless, right? I mean, this isn't part of, you don't have to actually implement that to get certified, but it's still in the standard, taking up a ton of pages, and it actually takes up some management frames, too, so those bits are forever used for something that I don't think anybody implemented ever. 11E, quality of service. That's so you can do video conference conferencing over your access point. Now, I gotta ask you, so you've got quality of service on your access point, so your teleconference gets ahead of your FTP session or whatever, but what happens when it hits the back end wired connection and it goes out your Ethernet jack? Does IP or Ethernet care about those quality of service bits? No. So if you're trying to video conference with somebody on the same access point, you're probably doing well, but they're like 100 feet from you. So I, and I'm pretty sure that's going into the standard, and that adds a lot of complexity right there. And finally, just to show you what these crazy standards guys are thinking of, this isn't gonna make it in, I really hope, and I'm not on the committee by the way. You could probably guess that, but somebody told me they were at an 802.11 committee meeting, and somebody proposed geolocating, so this is the layer two of your network card, basically trying to tell the access point where you are or the access point to have it figure out like your coordinates, either GPS or some other coordinate system, so you know where you are relative to other users in the network. What does that have to do with getting packets from A to B? Absolutely nothing. But that's what these people are thinking. So what do you get if you remove all the extras? I call this 802.11 minus minus. Dave here came up with a much more marketing-friendly term, Wi-Fi Lite. So let's call this Wi-Fi Lite. If you remove all the extras, you get a Nintendo DS. It has no Wi-Fi certification. It is nowhere near 802.11 compliant. It ignores DIAF and disassociate frames. It looks like it ignores a lot of other control packets as well. Works great. Yeah, and Nintendo doesn't pay me. In fact, my wife was annoyed that I had spent $120 on a DS for research. I tried the same thing on an Xbox because they have wireless cards, right? And she was like, no. Anyway. So this works great, but it probably doesn't roam very well. Who cares? How many people roam on wireless networks? Let's have another hand-raising thing. How many people have a network that they roam on? OK. Something like 10 people in the room. So a lot of the complexity in these protocols are there for the 10 people in the room who want to roam and the five people in the room who have ad hoc networks. And I'm not saying that you shouldn't have the ability to do it, but you should have the ability to turn it off because that's where most of the bugs are and things that you don't do every day. I mean, think about it. Everybody here is on wireless networks, and your boxes don't get crashed and owned, right? So your boxes are capable of moving data packets and getting you online. So if you could just take that bit of code that's doing that and strip out all the extra crap they threw in, your boxes would not get crashed or owned. So if you could just turn those things off, that would be great. Can't do it, though. So anyway, onto fingerprinting 802.11. Why bother? Obviously, if you've got a pocketful of wireless ODA, you could target your exploits. Wireless ODA. IDSs could use this to monitor chipset and driver use. So for example, a good scenario is you refer a company. They issue a laptop, and they say, OK, you can only use our hardware, not your home laptop, because you've got all sorts of crap installed on it, and it's already owned. OK. They can't really enforce it. At least most people can't. So this will let you go, OK, fingerprint the box they give you, keep track of it whenever you associate, and if it's changed, then they just don't let you on. That's obviously not foolproof. An attacker could just go, OK, they got an Atheros card. This driver. I'm going to put it in my laptop, and it'll get on the network. But it's a start. And finally, you could use it to refine OS fingerprints if you were having trouble. So why is this cool? Well, I think it's cool because I don't know of any other linked layer protocol fingerprints. You can't fingerprint Ethernet, right? It's just three bytes or three fields. So why is this possible? Well, like I've been saying, it's because of the complexity of the protocol. So when I first started trying to fingerprint these, it was like, well, how far down could you go? What do you do? The easiest thing to do is get the chipset or the chipset family. So this is Atheros, Broadcom, Centrino. And then after that, there's different chipsets. There's an Atheros 5212 versus a Atheros 5211. And then there's distinct drivers for the chipsets. This has a Broadcom card in it. So do Windows boxes sometimes. So they've got different drivers, obviously. And then finally, can you tell different versions of the same driver? Now, if you could tell different versions of the same driver, that is really what you want if you're going to be targeting exploits. Because your return address might change, or you're going to overwrite something else. And you really need to know that. So that would be ideal if you want to own something. And then finally, maybe you could fingerprint firmware. I didn't really look into it, because people are just not putting much in firmware anymore. So I came up with three specific types of fingerprints. Two work, one doesn't. I talked about them at Black Hat, and I don't have time to do it here, unfortunately. I'll show you the one that is cool and works. And I gave a live demo at Black Hat. You can ask people. It did work. I'm very proud of that. The reason it worked is because I had an hour and a half of lunch before my talk to come set up everything and debug the hell out of it. And I didn't have that today. And we're short on time, so I can't do a live one. But I'll show you how it works. And basically, the duration stuff I'm going to show you, lets you get down to the device driver version in some cases. That's really cool. So duration analysis. Totally passive, very accurate, and easy to automate. In fact, it's already automated and works. So to understand this. Basically, I've got to tell you what a duration is. It's a 16-bit field in every 802.11 data packet and lots of other packets if you don't have it. Those are weird ones. Anyway, the duration is a 16-bit field that says, how long do I need the error after this packet? Because by the time you read this, you've already seen the packet. You've got this packet. And the intent is, OK, so I've obeyed the rules of the media access control. I've won the random back off. And I got the error. Now I'm going to send a packet to my buddy Dave over here. Right? And. And. It's probably. It's probably a data packet. And 802.11 data packets are acknowledged. And you don't want Dave to have to win the battle for access control. So I'm going to send a packet to Dave. You guys are not going to get on the air. And he's going to acknowledge it back. And then somebody else can try to get the media. So that's the major motivation for this. And so there's a couple of obvious values for this. The time would be zero for packets that aren't acknowledged, broadcast packets, for example. And it would be however long it takes Dave to acknowledge me back. That would be another likely one. So there's really only a few discrete values for this that you would likely see, 16, 20 or so. So what influences this? Well, obviously, the rate that you transmit packets at is very important. If Dave talks faster, then it doesn't take as long. Also, along the long road of standards compliance, a few optimizations have been built in. Short slot time and short preamble. It's not too important. It just affects the duration. So if you want to fingerprint somebody on an access point, you've got to know the rate, the slot time, and the short preamble. So I'm going to get into an example of atheros fingerprint right here. So atheros cards, I like them. They seem to follow the standard pretty well. What this shows you is the association request row, for example, says that an association request packet from an atheros card says that it's going to use the duration value of 314 100% of the time. Per requests are 0, 97% of the time, and 314, 3%. Why? I have no idea. That seems really strange to me. I think they seem to be terministic enough that it always uses the same value, or maybe it alternates for some reason. But 97% in 3. And there's a couple of others that's the same idea. Here's a PRISM one. PRISM cards are older, if you didn't know. People are still struggling to implement the standard. And it's really obvious here. In the authentication packets, you see the duration value of 53389. That's a really long time. In fact, that's an illegally long time. Any duration value within 32.767 is supposed to be ignored. So this card sends numbers that are absolutely wrong. And so if I gave you a packet capture and I said, oh, it has these numbers or these numbers, is it an atheros or is it a PRISM? You could probably tell. Similarly, I wrote a program. It does the same thing. It can tell. Here's an example. I can't stay on these slides for too long, because I'm short on time. So here's a realistic example. I know it's kind of small, but I couldn't fit it. So I'll try to talk over it pretty well. This is me telling a . . . Telling my program I'm looking at a PCAP from address 000A95. I pass it the path to the PCAP, and then I tell it the print database. So I had to tell it, OK, this came from an access point with this rate and this slot time and so on and so forth. And you can see that the first card listed is a Broadcom mini PCI. Well, this actually came from my PowerBook, so the Broadcom mini PCI is not the right card. But you'll notice that the top three cards all have Broadcom chipsets. So it's on the right path. And in fact, the score for the Broadcom mini PCI was 79, and the score for the airport was 78. So they were very, very close. So if you were to repeat this and note that the airport extreme card is one deep in the list, across all the cards I have on a database with three different samples from each one, you would get numbers that look like this. S1, S2, and S3 correspond to three unique PCAP samples from a given card. And what a zero in that column means is the card was on top. A one means that the card was one deep in the list. So the row with a five in the left is actually the PCAP I just showed you, the airport extreme one, and it was one deep. And basically, that's getting it right an awful lot of time, which is good. So how's it work? I have five algorithms. I'll briefly go over one. They're kind of boring, I suspect, to most people. Basically, you look at the duration values you see, treat them as a set. Take the intersection. Subtract the probability of seeing them from each other, and return one minus that. This basically says, card A uses duration value, say, the legal one was at 52269 or whatever. A lot of the time, actually 100% of the time, an authentication package. And this other one uses it never. OK, so those don't even make it in this. But if they use them 100% of the time and 1% of the time, this still would be close to zero. And if you do that, you do 10 times better than random. If you take into account the packet types for the same ratios, it's 21 times better than random. At this point, you're well past chipset level resolution, and you're probably getting device drivers. And finally, at this level, you get to do 23 times better than time. This is if you combine the two techniques. And that's good. You're getting the right chipset and device driver in probably the version. Oh, just a quick real time demo of this. So here's a program. I'm going to try to match a PCAP. I captured previously of a vulnerable Intel chip driver, the one they patched three days ago with 130 megs. So yeah, that's a patch. Anyway, so here's the PCAP from an Intel vulnerable driver. And you can see, or maybe you can't, because I can't make the font big enough, but I tried, is that up on top, it's the driver from Intel that's vulnerable. Now, if I was to run this program again on a patched version of the driver, the patched driver comes out on top. So this is an example of the program actually being able to distinguish different, same chipset, same device driver, different version. And that's exactly what you want if you're going to exploit something. So with that out of the way, I'm going to hand it over to Dave and talk all about his Ring Zero. I just not going to be that much. But we're going to be talking about ways to find bugs, just a little bit. I mean, this is all centered. This is all centered. I'm going to take a little bit of it. But I'm going to be talking about the data collection tool that we use to go through this kind of stuff. And what we do is we look at that data collection tool. can be frustrating. A bug can be triggered by something eight packet chains ago. It's really hard to track down stuff in kernel space. If you've ever had to track down why something crashed in the kernel, it's not all that easy sometimes. You'll find an exception handler or something like that that's been tripped, but sometimes finding it, especially if you do an overwrite, you destroy most of your stack information. That's somewhat hard to track down. So this is actually John's. John and I each wrote a fuzzer, and this is John's fuzzer. Yeah, mine is not nearly as smart as his, but I'll talk about it very briefly. Basically, the fuzzing laptop has three interfaces in it. It's got an Ethernet interface and two wireless. One wireless interface is out there fuzzing, obviously, and the other one is sitting there just monitoring the air. Basically, the way it works is that it pings a host that you're trying to fuzz on the wire. The wired side says, is this up? Great, I'm going to fuzz the hell out of it. Hopefully, and then okay, fuzz, fuzz, fuzz, ping the wired side. Is it still up? Yeah, damn, okay, I'm going to go fuzz something else, and eventually it'll ping something, fuzz it, ping it again, and it's down. You're like, great, I just crashed it. So then it's going to take all the packets that it logged on the passive monitoring interface, write them out to a PCAP file, and put an entry in a log file. And the packets it's sending are not smart at all. In fact, the fuzzing program has very little grasp of the 802.11 protocol. Basically, it's putting on a header that knows where it's going, and that's it. There's just random bytes after it of a random link. So it's not very smart. This is not something you run, you go get a coffee and you come back and you blue screen. This is something you run before you go to bed, you wake up, and you have a room full of crashed laptops, hopefully. So that's how this one works. It's not as smart as Dave's. Oh yeah, and here's a myriad of command line options, which I don't even remember. This is actually notes for myself. So I'm going to go back to run it later. I wrote wisebuzz, whereas John worked specifically on trying to manipulate individual packets and things like that. The fuzzer I wrote not only will manipulate the individual packets, but will actually chain bad packets together or send things in an out of order or an unusual request cycle. I was trying to find, you know, it's not just a single packet that's going to cause some of these crashes. It's actually what we call a packet chain or a long chain of packets. It's a long chain of events that will lead up to it. So that leads us to shellcode. Shellcode is most, so most times when you write shellcodes you're looking for, you know, what we call like the connect back shell or return, you know, the return shell or something like that. So actually a lot of these things is you're attacking something that's not necessarily on a network with you or something like that. One of the things that people are looking at, one of the things that's hard to do is actually get the connect back shell because you don't have an IP address and you're going to need an IP address to do bi-directional communications. So most of you start with a build and you get the initial shellcode for Rng0 buttons like this or you're going to drop off a bot or something like that and let that run and then at the next convenient time phone home. Shellcode executes to the kernel level. Most generic overflow protection tools like, you know, checking to see if a shellcode page is readable or writeable. And the third party tools from companies like Cisco and Intercept and things like that, most of these don't cover kernel space that well because they take a huge performance hit. And so, you know, that leads to request. be able to execute things pretty well, although you have to be careful of a lot of things, especially like NX protection when you try to execute things in user land. So that leads us to a demo and our demo is actually a video. Has anyone seen this video yet? One person? Two people. Oh, one of them is my boss. It's my mommy likes it. So I have to hold the microphone up to the... Oh, we have audio? Never mind. I don't have to illustrate this one, comment over this one. No, I don't want to narrate. John has apple food. It's a very wet sound. Hi, my name is David Maynor. I'm a member of the research team here at SecureWorks and on behalf of myself and my co-presenter, Johnny Cash, I'd like to take a minute and show you a demo of something that we wish we could be doing live in Vegas, but due to security reasons, we can't really. So what I'm going to be doing is I'm going to be using this machine as an attacker and I'm going to be bringing in another machine that we will be using as the victim. Okay. And don't think, however, just because we're attacking an apple, the flaw itself is in an apple. We're actually using a third-party wireless card. That's a USB wire card, by the way. So normally for this attack to work, you do not have to have the victim associated to an access point or authenticated in any way. But for the ease of this demo, this machine will, this Dell will be acting as a wireless access point with the address of 192.168. 1.1, and this machine will have an address of 192.168.1.50. The attack will be launched from here. It will affect, it will manipulate buggy code and device driver on this apple. This apple will connect back to the attacker with the shell, at which time I'll have complete interactive access. So there's a couple steps required in setting this up. The first point part is turning this laptop into an access point. That's actually not my Porsche, by the way. I do that with a file setup.sh. This will actually create an access point called sw-apple-demo. And we'll make this a wireless access point, and then we will connect the apple to it. So let's run that script. And we connect to sw-apple-demo. And we have an IP address of 192.168.1.50. Now what we do is we run the exploit called bad seed. This is actually what it looks like. This is the help screen for it. And now we will run it against the target machine. It takes a minute or two to run. It's preparing the shell code for return. It's getting the connection information for this laptop. It's not sending the attack. Waiting for a response. It got a shell. Now I am interactively logged into this machine. Split screen action is awesome. I'm looking at the files in that home directory. So what I'm going to do first is create a file on the desktop called owned. O-W-N-E-D dot text. As you can see, it was created right there. And now I want to delete it. Further proof. It's gone. We can open a shell. And we can go into the desktop. We can create a file called password. And in the file I'm putting this is a secret password. Exclamation point. I like to use exclamation points as it's actually a secret. There it is created on the desktop. Coming back over here. There it is. Cat password. This is a secret password. And now we will delete it. And it's gone. Where did it go? This includes our presentation. But if you are still not convinced. Geez, I'm fat. You know, after this I decided I should take a couple laps around the table. There are no wires attaching the two devices. I just created a file on the desktop called I walked around dot text. Then I walked around more. And I just deleted it. The thing to keep in mind here is although we attacked an apple, the flaw is not specifically in the apple operating system as we used third party hardware. This type of a flaw will be systemic across all operating systems and hardware. And the only way to prevent it is proper testing. Although this flaw is and can lead to a remotely exploitable condition. It's not as trivial as a generic buffer overflow. On behalf of Johnny Cash, myself, David Maynor, and Skelet's research team, thank you for watching. So I don't know if you guys know this or not, but Mac users love their Macs. So I am a Mac user. This is my power book. And I love it. In fact, anybody who knows me knows that all my code gets written here. And if you're lucky, port it to Linux. So as soon as that demo got run on the Washington Post blog, we got some hate mail. I mean, did we ever. We got some serious hate mail. And we got asked a whole lot of questions by people that were like, oh, this is completely fake. And this is why it's fake. So now we have a couple of slides that will answer some of the most popular questions. And before I answer these, I'd like to give people in the audience a chance to respond to why is this a bad question. The most commonly given question is, did you get root? Does anybody here know why that's a bad question? That's a terrible answer. Exactly. So you're running in a kernel. And from the kernel, we get root. And by root, we mean super user access. Root's a generic term. Actually, I hear people talking about getting root on Windows 10. I don't know if you use those machines all the time. It's actually an administrator account. But if you compromise something that's running in the kernel, you have the ability to do whatever you want on the machine. So that was actually the most common question we got. Second most, oh, wait, never mind. Okay. Is this one still on? No. Whatever. I guess somebody wanted to hear me talk about fingerprinting anymore. All right. So here's a bastardization of the OSI network layer model 101. Because a lot of people didn't seem to get this. The 802.11 device driver has an arrow next to it. We are here. Your firewall is a little bit further down the stack. It doesn't get these packets until we've already dealt with them. So, I mean, think about it. A packet comes in off the air into your card on its antenna. You can think of it as needing to get from the card to the rest of your computer. The device driver gets it there. Your firewall cannot see this packet until we've already given it to it. So if the bug's in the driver, your firewall can't help. And finally, some people seem to think that antivirus will help. Your antivirus is like light years away. So I don't even know what to say about that, except it doesn't. The second question was what services are running. Given the awesome charts that were made by Mr. Johnny Cash and OmniGraph just a few minutes ago, would anybody like to tell me why this is not a good question? There you go. This attack happens at the network link layer. No IAPF packets were required for this attack. Question three. I'll pay you $10, $100, even $1,000 for a live demo. I got to tell you. Okay, well, first of all, why is this a bad question? All right. For the grammar Nazis, this actually isn't a question. So aside from that, why is this a bad statement then? Well, actually, that is funny. H.G. Moore gets offered $40,000 to $120,000 for unreleased bugs, and we're getting offered $1,000. Wow. Come on, guys. This is insulting. You should know it. Never. I won't knock iDefense. I'm sorry. So this is actually a bad idea because by doing a live demo for you, and somebody wanted us to package up a demo and ship it to them, why would I start distributing copies of something that hasn't been patched yet? That just doesn't seem like a good idea to me. And that's actually the answer to this question. Question four. Why was it a video? Does anyone know why? How many sniffers are there in this room right now? Because we asked this question to Black Hat, and one guy raised his hand, and I really want to give him a copy of the exploit, just because he was being honest. But if you do this demo live on stage, now we're not the only people doing it. You all are doing it, too. And that just doesn't seem to be a good idea right now. And that's the answer. Anyone with a sniffer will have a copy of the exploit. And the fifth question. How did you use a third-party card as there are no PCMCI or Express card slots on your MacBook? This is actually my favorite one. Does anyone want to know the answer to this? Does anyone know? USB. USB. So in addition to that, I actually have to make a dynamic, a gigantic apology to the Mac user base. As I was quoted as saying, I would like to stick Mac users in the eye with a lit cigarette. Although this was an accurate quote, I actually did say that. I would like to say that I don't mean all Mac users. I just mean the people that send me emails that say, fuck you, I'm going to kill you and your dog, too. I don't even have a dog. Yeah, I don't even have a dog, so. In general, though, you know, wrapping up, you know, people kind of lost sight of what we were talking about here because there was a Mac involved. And what we were talking about here wasn't that, you know, we can break into a Mac and, you know, we're badasses and whatnot. The thing we were talking about was that these kind of problems are systemic across all operating systems. You know, you'll find problems like this in Windows. You'll find problems like this in Linux. You'll find problems like this in FreePSD. Problems like this exist everywhere. The fact that we were using a Mac actually is somewhat complimentary to Macs because we figured if we could break into a Mac, then everybody would just assume everybody else could be broken into, too. So, you know, that's our, you know, that's the message that kind of got lost in a lot of the drama that happened this week is we're not focusing on Macs. Specifically, we did show a demo on a Mac. But specifically, this is something that happens systemically, you know, all throughout people who write device drivers. It's not just Wi-Fi device drivers. There's Bluetooth device. I mean, has anyone, like, ever run a Bluetooth fuzzer here and seen stuff crash? No one? Dude, go Google stuff. Oh, wait. One gentleman in the front. So, you can actually go get, you know, off-the-shelf, one off-the-shelf, you know, downloadable Bluetooth fuzzers now. Run them against your phone. Run them against your computer. Run them against your friend's computer. That's even funnier. So, you know, the thing we want people to take away from this, you know, is these problems have got to be fixed before, you know, you're measuring the range of Wi-Fi in kilometers and not meters. I guess you only have a few minutes for questions, but if there's something we haven't covered already, feel free. Yeah, other than what card was it? Next. I'm sorry. Repeat the question. Step up to the mic. Uh-oh. Someone just jacked your mic privileges. Man in the middle. Hey. Could you briefly go through the methodology for finding this exploit? Like, was it, did you start with a fuzzer and then move on from there or what? No, I'm actually not the biggest fan of the world of fuzzing, actually. It has a great place and because there's a lot of things that happen sometimes, like you can find bad code paths and whatnot, but it's actually hard to exercise them. So, the way I prefer to audit things is you open your binary and you start looking for specific, you know, bad code patterns and things like that. And then once you have those marked, then you develop your fuzzer to try to exercise those specific code paths. And once you're exercising those specific code paths, then modify your fuzzer to start doing, like, fault injection or, like, bad data injection. So, it's actually kind of a hybrid approach. Yes, sir. In the Washington Post article, you said that the reason you used the third-party card was because you were pressured by Apple not to do the exploit on the native airport card. But then in the follow-up article, you said that the reason you used the third-party card was because you were pressured by Apple not to do the exploit on the native airport card. So, the question then becomes, why not just do the video demo without a third-party card? Well, one of the things we're doing now is I've been in communication with Apple this week. And actually, Apple has a bit of a holdup with fixing this problem as I've been incredibly busy and haven't had the chance to get them all of the data they need. But after this talk, I'll be working on that exclusively. One of the things that I'm waiting on now is, you know, confirmation from Apple for effective platforms. I realize this isn't a real solution, but are you familiar with Tannenbaum's work on isolating device drivers? I'm sorry, your question is about isolating device drivers? Yeah, I know Tannenbaum worked on it. Right. I'm probably not saying his name right. You're talking about Andrew Tannenbaum? Yeah. Yeah. Would this have helped at all? Well, so, you know, one of the things that seemed to confuse people a lot is, and that's, of course, why we got the You Got Root question, is they don't quite understand that device drivers run in the kernel. Once you compromise the kernel, you can do whatever you want. So offloading things like those kind of device drivers to user land, although they would fix the problem, you know, I'm not an OS architect, so I don't know what kind of performance hit you would take on something like that. Although... Actually, trying to push this code away from the kernel is very difficult because there are a lot of very real problems. There are a lot of real-time constraints in the 802.11 standard. It is actually... You know, originally the first cards that came out, like Prism, did everything in hardware because it was too hard, or I think it was too hard just to do it in software in the kernel. The real-time constraints are just too high. So to actually take it from kernel to user land, I mean, I suspect it's probably impractical for 802.11. Other things, though, yeah, it's possible. So maybe do more of it in the firmware of the card? I'm sorry, what was that? So maybe you should be doing more of it in the firmware of the card and updating that... Yeah, you know what? If they put these bugs in the hardware, I don't know what happened, but I seriously doubt we'd be popping a shell. That would probably help. All right, well, we're out of time. Thanks for all the questions.