Jeez. Hi, my name is Zero Chaos. Welcome to the Wireless Village. Do I really need an amplifier? I am loud enough on my own. But unfortunately, the man behind me is very shy. He's a little new to the industry. As a matter of fact, he's so new to the world in general that the first time we met, he thought that I was actually Yosemite Sam. We spent a lot of time talking online and he said, you know, I thought you'd look different. I imagine kind of a cartoon man of some kind with a cowboy hat. Fortunately, his weird predilections for cartoon characters do not spill over into the wireless world, so he actually knows a few things about Bluetooth, but we're going to have to give him this microphone because he's so shy. He's so shy. It's really sad. But he's got awesome hair, so here you go, Mike. Thank you, Zero Chaos. Oh, this is weird. Hey, good morning, everybody. Who here likes Bluetooth? I like Bluetooth. Bluetooth is awesome. I know a thing or two about Bluetooth. He wasn't lying. But let's get right into it. Oh, yeah, my name is Mike. I'm a pen tester. I work for iSEC Partners. Anybody from iSEC here? Hey, iSEC Partners. Yay, part of NCC group. So before we get started, my standard note, you're going to hear me say Bluetooth Smart, BLE, maybe Bluetooth Low Energy. They're all interchangeable names for the same thing. So don't get confused. So this is an NSA playset talk. The NSA leaks... sorry. Game face. Okay. So, as everybody here knows, last July, there were some minor leaks, and we got a partial copy of the NSA ant catalog. And that is pretty much a catalog of all their capabilities for attacking targets. And the best thing from the catalog is, of course, the codenames. A couple codenames from the actual catalog. Deity Bounce is a Dell BIOS and RAID controller software implant that allows them to remotely take control. Night Stand is a portable system that wirelessly installs Microsoft Windows exploits from a distance of up to 8 miles. A very remarkably specific distance. And so these are some of the tools that the NSA uses in their SIGINT work to attack targets. Well, the NSA, they're not magical. They're not privy to any technology that we're not privy to. So we thought it would be a great idea to reimplement some of their capabilities and maybe introduce a few capabilities of our own. So here are a couple other playset... other codenames from the NSA playset. These are created and released by humans, just like you and me. So Twilight Vegetable, that's a GSM interceptor. I think it's like a Kali image that you just boot up and plug in a hack RF and boom, you can intercept GSM. And Slot Screamer, which is a tool for accessing memory on exposed buses. So like Thunderbolt exposed on Mac, you can get into PCI Express, that sort of thing. So fundamentally, the playset is about... well, fundamentally the Ant Catalog and the playset are about capabilities. And before we dig into new material, I actually wanted to talk about the capabilities that we already have in tools that already exist today. You can plug them in and use them. So here are kind of the tools of the trade when it comes to Bluetooth and BLE exploitation. You've got Ubertooth, you've got Crackle, and you've got BlueZ, the standard Linux Bluetooth stack. So Ubertooth 1 is a great device made by this guy up in the front row who's tweeting instead of paying attention. It is capable of some pretty cool stuff, like discovering undiscoverable devices. So even if your Bluetooth is on, even if you're undiscoverable, in a lot of cases, we can still find you. Undiscoverability is not a security mitigation. It can do some rudimentary BR sniffing. I don't think I'm telling a lie. And it has very robust BLE sniffing capabilities, which I've spent the last year and a half talking about. So I'm not going to talk about them today. And actually right now I'm working on some work in progress of having a complete Bluetooth dongle on the Ubertooth. So stay tuned for that. You buy an Ubertooth today, you can do at least the top three right out of the box. That's right, Dominic, right? Rudimentary BR sniffing? Rudimentary. He says it's fair. So ruling on the field. Crackle is something I talked about a lot last year. This cracks the BLE key exchange. And once you have the key, it doesn't matter that they're using really good crypto, because once you've got the key, whatever, if you've got the best lock in the world on your door, somebody with a key can still open it. And on top of that, it can also decrypt data if you give it the key. It's not that useful on its own. It needs to be paired with some kind of a sniffer. It works great with Ubertooth. If you've got a fancier, more expensive sniffer, it will work with that, too. So again, today, you go out, you download Crackle, shove some data into it, you can do all this stuff. And then finally, Blue Z. That's not their actual logo. That's a logo from some club in L.A. But they don't have a real logo, so I thought this was good. So Blue Z is actually the best Bluetooth stack in existence, in my opinion. It's better than anything else. And it is fully functional, basic rate, BLE, and it's able to act as a BLE master and a slave, which is kind of cool. You think of a laptop as a BLE master, like, oh, you're going to use the laptop to connect to some peripheral device. But that's not actually the only thing you can do. You can actually use a regular Linux laptop as a BLE peripheral. You can, say, pretend to be, like, a smartwatch or a Fitbit or anything. And that's all built into Blue Z. You have to write a little bit of code, but it's all there. So that's awesome. And it also comes with some multipurpose utilities for... they're intended to do things like debugging and, you know, general Bluetooth stuff, but it turns out they're great for doing recon. And if you want to learn more about that, you should check out my blog or Josh Wright's got a book coming out this year, which is excellent. I highly recommend it. So that's it for existing capabilities. Zero effort. You can do all this stuff today, which is really cool. But moving back on to the Ant Catalog, what kind of Bluetooth capabilities does the NSA have today? Well, it turns out they don't have any, at least according to the Ant Catalog that we have, which might lead you to think that even the NSA doesn't care about Bluetooth. But that's what's called wishful thinking. I'm pretty sure they've got some pretty nasty Bluetooth capabilities, partially because we probably don't have the full catalog. We didn't get a complete copy with the leaks. And also the catalog that we have is really old. It's from like 2008, I want to say. And that's like, you know, it's like internet years. It's crazy. And one of the main reasons I think that this is the case is because there's a company called Ellasys, and they make pretty much the Cadillac of Bluetooth sniffers. It can sniff basic grade, it can sniff EDR, it can sniff basically anything. It's got built-in capabilities for cracking pins and decrypting audio from headsets. So the fact that this is available commercially, I'm pretty sure the NSA's got like ten of these. The only problem for you and me is they cost like $30,000. So, you know, more like Ellasys, right? See what I did there? So we're in kind of a unique position. One sec. Everybody look at me while I swallow. So we're in a unique situation where we kind of have to guess at what the NSA can do based on the capabilities that they have in other areas and what they're likely to do. So actually, it's kind of a fun exercise. So I'm guessing they probably have the ability to intercept headsets. Like if you've got a Bluetooth headset paired with your phone, they can probably listen into your audio that way. And it's probably easier than trying to listen in on it through a GSM network, because Bluetooth is pretty simple, even VR Bluetooth. They probably do some surveillance, some movement, just tracking you based on Bluetooth. I'm going to assume they do some stack exploitation and remote code execution. And if you're interested in that at all, check out my handset talk where I did some of that on Android's Bluetooth stack. Remote keystroke surveillance jumps out at me as something they probably do, because a lot of people use Bluetooth keyboards. You type a lot of sensitive information in on Bluetooth keyboards. They can probably do something with that. And as long as they're doing surveillance, it's probably true that they're doing some injection too. So let's kind of focus on keyboards and mice, because they're one of the more common Bluetooth peripherals out there. I'm sure a lot of people in this room use a Bluetooth keyboard or a Bluetooth mouse. So the protocol they use is HID. It's pretty much the exact same protocol as HID over USB. It's just adapted to work over Bluetooth. And in fact, the specs for it constantly refer back to the USB HID spec. So it's basically the same thing. And when you do it over BLE, it's called HID over GAT. So if you see H-O-G-P or HID over GAT, that's all HID over BLE. So again, keystroke surveillance, if you can capture the Bluetooth packets that contain these HID reports, you can tell what people are typing. And furthermore, if you have any Bluetooth injection capabilities, it's pretty easy to inject HID reports and pretend that you're a keyboard, which is kind of like a rubber ducky, like a USB rubber ducky, except a blue ducky. So, the next question that you should be asking is, do BLE keyboards actually exist? And the answer is, no, not yet. There are some companies producing prototypes that you can get that work with certain OSs, but there are no commercially available ones that I've been able to find yet. But these guys are going to exist very soon. Because BLE is cheaper, it's lower power and it has longer battery life. And the thing is, BLE might totally exist. Like, this is a commercial BLE mouse that I got off of Amazon and works with any OS that has BLE capabilities and also comes with a little dongle in case your OS doesn't support it. It speaks BLE and then turns that into USB HID for the OS. And the pretty amazing thing about this is that this thing runs off of two AAA batteries for six months. That kind of power consumption is not possible with classic Bluetooth. And these chips are cheap enough that they give you a Bluetooth chip inside a dongle that you might not even need to use. It's like $2. So, from my perspective, BLE keyboards are an inevitability. I mean, the classic Bluetooth keyboards are going to die out. Everything is going to be BLE. And the thing about HID is that HID is HID is HID. It doesn't matter if you're a mouse. It doesn't matter if you're a keyboard. From the OS's perspective, if you speak HID, even if you're just a mouse, it's likely that you can act like a keyboard. So despite the fact that BLE keyboards don't yet exist, there's still a lot of possibility in this space. So, let's talk about targets. If you're trying to attack BLE keyboards and do surveillance and injection, you have to have an OS that supports HID over GAT. Or you have to deal with one of these little dongles that comes with it. But this is less interesting. The OS's that actually have support for this are Android 4.4, BlueDroid. I tested that. You compare this BLE mouse with an Android tablet, and you get a mouse pointer on the screen. And it's really weird. I've never seen anything quite like it. iOS 7, only on the iPad. Kind of an odd limitation. All iOS 7 devices are running pretty much the same OS with pretty much the same hardware. But only the iPad has keyboard and mouse support. Because, you know, Mac OS 10.9, native BLE mouse support. You can pair this guy with Mac OS 10.9 and use it as a mouse. You don't have to use a little dongle. Linux, BlueZ5. So Fedora 20, Arch Linux, not Ubuntu. These guys all have native BLE over GAT support, or HID over GAT support. And Windows 8 and Windows Phone 8. Blackberry 10 and Android less than 4.4 don't have support. So we've got five major OSs that could be used as targets for this type of attack. And these five major OSs pretty much represent the next couple years of computing, in my opinion. The one thing about HID is that the HID spec requires encryption. For obvious reasons. You don't want your keystrokes sent over in plain text, and you need authentication as well. And the link layer in BLE provides authenticated encryption. Not just encryption, but actual authentication. And I wanted to take a moment to talk about pairing versus encryption, because this is a really common confusion point. Pairing and encryption are not the same thing. Not in classic Bluetooth, and certainly not in BLE. You can have a link layer connection between two BLE devices, no encryption whatsoever, no authentication. They can just talk to each other and speak at. Now, if the device is properly secured, it will reject most requests unless the encryption is enabled. But it's totally possible to have an unencrypted connection pretty much between any two devices. Now, if you want to have a secured connection between two devices, the first thing you have to do is pair the devices, which is a fancy term for doing a key exchange process. Once you've done that pairing and you've got a shared key between the two devices, then after two devices establish a link layer connection, either end of the conversation can say, let's start doing encryption now. And then at that point, they both provide their secret keys and they do all sorts of little magic. And then since it's authenticated encryption, they can tell that both ends are using the same key, both ends are encrypted, and that part of the process is actually pretty secure. The pairing process, as I've discussed in the past, totally broken, totally crackable. Check out Crackle if you're interested in that. But the main takeaway is you can have BLE connections without encryption, you can have encrypted connections after you've paired, but pairing and encryption are not the same thing. Is that clear? Anybody confused? This guy shook his head no, gave me a thumbs up. Excellent. I like the feedback. So here's the life cycle of a typical HID device. Say this mouse, you're talking about this mouse. So a user pairs the HID device with a host. There's a special button sequence that you can press with this guy that puts it into pairing mode. Then on your host, you search for devices, you click the mouse, you pair with it, and at that point a key exchange occurs and the host and the mouse both have the same shared key. There's an authentication step that, depending on your device's capabilities, you may or may not be able to do more advanced authentication. Like if you've got a display and a keypad, you can do a numeric comparison to make sure nobody's man-in-the-middle view. This mouse is not capable of that. It only uses the just works pairing method, which pretty much provides no man-in-the-middle protection even in the best case. Sorry, tangent. Then after that, the host will connect to the HID device. It'll make a link layer connection, which is unencrypted. Then the host attempts to start encryption. It says, hey, let's start encryption. The devices set their controllers to do encryption. They set the key. And once that encrypted, authenticated connection is established, the HID device sends HID reports. The HID device will not send HID reports unless the connection is encrypted. There are a couple attack techniques that exploit weaknesses either in BLE or the host OS or other things. And I'll talk about all three of those in detail right now. So the first technique, you sniff the pairing and you crack the key. That's nothing new. That's just using uber teeth to sniff the pairing, using crackle to crack the key. Once you do that, you can impersonate the mouse and do all sorts of nasty stuff. Exploiting OS weaknesses is cool. And I'll explain that after I do a little diagram of the first one. And finally, forcing on pairing, which a lot of people have been asking me about. It's totally possible. It's pretty cool. So first, sniffing the pairing. You've got your laptop. You've got a BLE keyboard. I'm using keyboards and mice kind of interchangeably here. Just go with it. They establish a connection and they do their pairing and they do a key exchange and everything's golden. Meanwhile, the NSA is listening in with an uber tooth or an ELISA sniffer and they feed that data into crackle, which gives them, so at this point the NSA knows the Bluetooth address of the keyboard. They know the key that's used to secure the connection. Then an evil keyboard comes in, uses the same Bluetooth address, and the same key, and is able to talk to the host device. At this point, the host device can't tell that it's not talking to the original keyboard. And the NSA, or whoever is using this play set tool, can inject keystrokes into the host OS. This is all something that you can do today with stuff that exists. You don't have to write any code to do this. This is the least invasive technique. You cannot distinguish the fake keyboard from the real keyboard. The downside is that you must observe the pairing, and normally that only happens once. And furthermore, even if you do observe the pairing, it's pretty likely that you're going to miss one of the packets that gets transmitted during pairing, and if you don't have every single packet from pairing, you can't crack it. However, as a bonus, you get keystroke surveillance for free. All the data is encrypted with that same key that is exchanged during the pairing. So if you're the NSA and you want to passively observe people, this is the way to do it. So the second technique is OS exploitation. You've got your keyboard and your laptop, they're talking to each other, the NSA did not observe the pairing, everything is hunky-dory. The regular keyboard goes to sleep because you haven't typed on it in a long time. Meanwhile, an evil keyboard comes along, purporting to be this keyboard by using the same Bluetooth address, and it's about as hard to spoof a Bluetooth address as it is to spoof a Mac address, which is, say, trivial. So this guy claims to be this keyboard, and establishes a link layer connection with the host OS. The host OS, the first thing it's going to do is say, hey, let's start encryption. Meanwhile, the keyboard says, sorry, I don't have that encryption key. A properly behaved host OS at this point should disconnect the connection and say, fuck off, we're not friends. Certain host OSes say, nah, don't worry about it, we'll just do unencrypted, unauthenticated communication. And the evil keyboard can inject keystrokes into such a host OS. So this is more invasive. It's distinguished, the evil keyboard is distinguishable from a legitimate keyboard in that it doesn't have the key. So if you're trying to detect this attack, it's actually possible. And it also relies on OS bugs. So it's not universally applicable, but there are two major OSes on that list of targets that have this weakness. And unfortunately I can't name names at this point because disclosures are still in process, but, yeah, it's kind of nasty. And then finally, the last attack is the unpairing attack. This is the hardest attack to do, because most devices don't support unpairing, but some devices do. So you've got your keyboard and your host, they've got a Bluetooth connection going on, evil keyboard comes along, jams the connection, and then forces the devices to unpair by establishing a link layer connection with the host and saying, I don't have that key. Well, certain hosts in this situation will not try to do an unencrypted connection, will not say buzz off, they'll say, you don't have the key? Let's pair again. The only host I've found that has this problem is the little dongle that comes with a mouse, but if you're using a little dongle that comes with a mouse, you've got this problem. This is the most invasive attack. You can totally detect it because you're pairing with some wrong person. You just paired with the NSA, which is bad times. It's also the least broadly applicable. Like I said, this is the only device that I've found that this works with. So the user could notice that this is happening. Do you think the user is more likely to blame the NSA or their shitty Bluetooth keyboard? So that brings us to Tiny Alamo, my entry into the NSA play set. And because every NSA play set thing needs to have a sweet code name, I came up with mine. It actually handles all three scenarios. So I've got keystroke injection working in all three of the scenarios that I just described, and I even implemented DuckyScript from the USB rubber ducky, so you can reuse all of your favorite USB rubber ducky scripts. And now that brings us to the demo. So I have a victim laptop up here, very nicely provided by Dominic. So I'm going to switch the projector over to that keyboard, and I'm going to plug in the dongle that came with this Bluetooth mouse. And yeah, that works. So what's going to happen here is, so this mouse is paired with the dongle that he's plugging in right now. What I'm going to do from this laptop here is do the last attack, the forced unpairing attack that I just described. So I'm going to run some code on this laptop. It's going to impersonate this mouse using its Bluetooth address, and it's going to say, hey, I'm not just a mouse, I'm actually a keyboard, and try to inject keystrokes. So let's see if that works. So this is all pretty much turn key. It takes about 15 seconds right now. And oh, there it's connected, there it's sent the key. So yeah. So yeah. Yeah, can you just switch it back? Yeah. The code's not available yet. We're working on it. Thank you, Dominic. Great. This is the best projector I've ever used. So I can't name any names right now. I really wish I could tell you which host OSes are broken, but we just got the disclosures out to them. I'm probably going to get in trouble for demonstrating as much as I have, but I'll take that risk. So these are the ingredients that made that attack possible. It took one regular Bluetooth dongle, a Linux kernel capability called HCI user socket, SCAPI, some new code called PyBT, a little bit of Python glue, and optionally you can use an Ubertooth. And before I go on, the neat thing about this is you can use, you could actually implement this attack on a phone. It doesn't require any specialized hardware. All it needs is a regular Bluetooth dongle. So this is a pretty nasty attack. So HCI and HCI user socket are kind of key to this. HCI is the language that all Bluetooth dongles speak. It's sort of a high level language for telling the Bluetooth dongle to do things like set the Bluetooth address, enable advertising, try to connect to this guy, that sort of thing. It's all high level operations. They all speak pretty much the same language. And you can actually sniff this using a recent version of Wireshark. You can fire up Wireshark and see all the HCI commands that your Bluetooth stack is sending out to your dongle. So you can also send totally illegal stuff this way. And if you're interested in that, check out my CanSecWest talk where I use this to fuzz some Android stacks and actually implement an attack using it. HCI user socket is the magic that makes it easy. Normally the kernel does a lot of HCI for you on Linux and it kind of gets in the way if you're trying to break the rules. So HCI user socket is a capability that just tells the kernel, get out of the way. I will handle all the details of talking HCI. I don't need you. And this is something that a guy named Marcel Holtman, the BlueZ maintainer, implemented about eight months ago and it's finally made it into the main line Linux kernel. So if you're running a recent Linux distro, you have this. You can just with a Linux 3.15, which is available on Ubuntu 14.04 and Fedora 20 and Arch Linux, you can use HCI user socket to do low-level Bluetooth attacks. I will note that Kali is still using 3.14, so you're not going to have this capability there. And this is actually a screenshot of Wireshark sniffing some of the HCI that's going into the controller. So you can see it's writing some extended inquiry requests and setting BLE scan parameters and stuff like that. So if you're interested in playing with HCI and doing these low-level attacks, fire up Wireshark and see if you've got an interface like Bluetooth zero and just start sniffing it and you'll learn a heck of a lot about it. And if you don't have a recent enough Wireshark, you can use HCI dump, which comes with BlueZ since like ten years ago. And that'll produce capture files that Wireshark can open. The next ingredient is SCAPI. Who here has used SCAPI before? If you didn't raise your hand, get out of this room. No, but seriously, check it out. SCAPI is really, really, really good for not just Bluetooth stuff. It's actually really good for any kind of IP packet construction. It makes it really easy to construct both valid and totally invalid packets. So definitely check it out. It actually had some Bluetooth capabilities before, but I added a whole ton of crap to really flesh it out and make all this possible. So before, it had some rudimentary HCI and L2 cap support. I added tons of commands. I added support for the security manager protocol, which is how you do BLE pairing, and ADD and GATT, which are the high-level Bluetooth protocols. And I also added support for the Bluetooth user socket. So if you want to use HCI user socket, that's how much code it takes. It's super, super awesome. So I pushed the Bluetooth stuff to those guys in a pull request, and I think eventually it will make it into their main branch. But if you want to check this out, just talk to me after the talk. Or be patient. And then the other ingredient that makes this work is some software that I haven't released yet called PyBT. So in the process of doing this, I was just kind of hacking on Scappy and adding HCI commands and stuff, and it turns out I accidentally had a Bluetooth stack. So PyBT is pretty much a pure Python Bluetooth stack that uses Scappy for constructing packets and sends them off to HCI user socket. And this guy supports... right now it only supports BLE, but it has full pairing and key management support. It has a rudimentary GATT server. And this software is coming soon, once the disclosures get cleared up. It will probably be on my company's GitHub, but I'll tweet about it when it's available. But this is... so BlueZ is already a really good, really hackable Bluetooth stack, but it's too well behaved. It tries to handle all the edge cases in a way that won't cause your system to crash, instead of making it super hackable. So having this all available in Python makes that a lot easier. So check this out once this is available. And some people were asking about unpairing attacks earlier. This is where I've done all my implementations of BLE unpairing attacks. So you can try doing it in BlueZ. I don't recommend it. Hack on PyBT instead. And then the last thing is Ubertooth, which is an optional component that makes it really, really a lot easier. So what Ubertooth can do is pull addresses out of the air. It's not always necessary. A lot of times you can get away with just doing a regular BLE scan using HCI tool, which comes with BlueZ, but that will miss a lot of addresses that are otherwise right for the picking. So I recommend using an Ubertooth, because nobody uses BLE private addresses correctly. There are some super awesome privacy features that are a part of BLE, but literally nobody is using them properly. So you can just pull addresses out of thin air, which makes it super, super easy to impersonate devices. So kind of wrapping it all up and putting it all together to do the attack that I just demonstrated, use an Ubertooth to grab the Bluetooth address out of the air. I didn't do that because I just know this mouse's Bluetooth address. I kind of cheated. But there are enough moving parts. You launch PyBT, and that will talk to your legitimate Bluetooth dongle via HCI user socket that builds up all the packets using Scappy, and it pretty much acts like a regular Bluetooth stack up until this point. It's like, oh, set my advertising parameters, set my Bluetooth address, all that sort of stuff. And then it starts to advertise with the address of the mouse. You just send a couple of HCI commands and it will do that. You wait for the connection from the host, and then when the host says, hey, let's start doing encryption, you say, you send a message that says, sorry, I don't have the key. At that point, you start sending key strokes and you profit. That clear? Any steps that you need more explanation on, please let me know. I had like eight pieces of sushi for lunch, so I'm not firing on all eight cylinders. Okay. Yeah. That's a really good question. So the question was, if the other mouse is active, do you have to wait for that connection to die or kick it off or what? So, yes. The other mouse cannot be connected when you're trying to do this attack, but there are two ways you can get around that. The first is that these guys tend to put themselves to sleep after there hasn't been movement for a little while to save battery life. And the other thing is, I've got some pretty robust jamming code that I haven't published yet, but it's pretty easy to jam a Bluetooth connection or BLE connection, rather. That was a really fast presentation. I'm wrapping it up. So these are some URLs that you should check out. We've got Ubertooth, we've got Crackle, we've got Scaffy, we've got Blues, and I'm going to give a tweet for PyBT as soon as that's available, which will probably be not too long from now. I don't know. I was trying to send out disclosures during the week where everyone is at Black Hat and doesn't have their word computer, so maybe next time I should start a little bit earlier. I see lots of cameras, so I'm going to sit on this slide for a little while. I see more Isaac people show up. Hey Isaac! Question? A full MAC address is 6 bytes. So the question was, does Ubertooth get you the full MAC address or only the upper portion and the lower portion? That's only in classic Bluetooth. Since we're talking about BLE, you get all 6 bytes of the Bluetooth address. Yeah. BLE doesn't have the same UIP and LAP that classic Bluetooth does. Okay. That's actually pretty much it. I just want to give a lot of people thanks before we clap. Marcel Holtman is awesome. He's the best Bluetooth maintainer in the world and just totally added HCI user socket when I asked him to. Obviously need to thank Mike Osman, Dominic Spill, and the rest of the Ubertooth team for being awesome. I want to thank Marcel Holtman again because he really, without him this would not have been possible. Of course, thank you Zero Chaos and the DEF CON Wireless Village. I forgot to add thanks to Isaac Partners because they actually funded a ton of this stuff. And thank you. And that's it. So this time slot has about 20 minutes left in it. So if anyone wants to beat box, just come on up. Any questions? More from the back. So the question was, does BLE have the same channel hopping problems that classic Bluetooth had? And no, it's way, way, way easier to sniff. Way simpler channel hopping, way easier to sniff, like Ubertooth is a turnkey BLE sniffer, more or less. Mike Osman. So if you crack and spoof the first attack using Ubertooth and Crackle, can you inject keys while the original device is active? No, you can't. You have to either wait for it to go to sleep due to inactivity or jam the connection. More questions. More comments. Have I tried porting any of the existing Bluesey tools over to Pi BT? The other Bluetooth hacking tools, like BT pin crack and stuff from the Stone Age? I haven't tried implementing any other attacks on top of this, but I'm interested in it. So if you come up with a list of capabilities, shoot them my way. I wasn't planning on doing it, but I can try to sniff a pairing conversation since I've got some time to kill here. Unless... Okay. Show off some Ubertooth and Wireshark. Sorry? I've got... So up here I've got three Ubertooth, because in a BLE there are three advertising channels, so a connection can start on any one of those three. You need at minimum three Ubertooth to capture a given connection, under the assumption that these guys can capture every single packet. Which they can't, but this is better. So I'm going to go ahead and plug these guys in. Is Wireshark coming? Okay, so I've got Wireshark set up over here, and I've actually got it capturing from pipes right now, which you can kind of see down here. Wow, this is really hard. I use a track point most of the time, so this touchpad sucks. So Wireshark can capture from pipes, so if you've got anything that produces PCAP files, you can plug it into Wireshark directly, just by having it use pipes. The next version of Wireshark should actually have an interface that simplifies this a whole bunch. It's something I worked on with Mike Hershaw, but that still hasn't made it into the main branch yet. So I'm going to start these guys capturing. Give me one second. Okay, so what you're looking at now are just tons of Bluetooth packets that are flying by, from BLE advertising packets from devices that are in the room. I could put up some Wall of Sheep stuff if you want. So I just turned on this mouse, and I'm going to put it into advertising mode. And you'll see some packets just start screaming by in a second. They're not screaming, but... oh yeah, they are. You just can't see it. So I'm going to plug this into Dominic's laptop. And now, if we're lucky, we'll actually see a connection. I don't know if we caught it this time. I don't think it's actually paired yet. I know it's thrilling watching packets come by in Wireshark. Okay, so it paired. I don't think we caught the conversation. So Wireshark 1.12 has BLE support built in. So you can actually expand this and look at what the actual BLE packet looks like. And you can see somebody's... oh, this looks like somebody's tracking beacon. I mean, Fitbit. Okay, so right now I'm filtering on the pairing protocol for BLE, and that's not working. So I didn't catch an actual connection. So I'll try this again. So, Ubertooth is a pretty robust BLE sniffer, but it's not as good as a dedicated device. So I'll try that one more time before giving it up. So these guys should be pairing now. I got a pairing request, but it's not all the packets. So if this works, we should see about ten packets come by that are all the pairing packets. I don't think this is working right now, because we're only seeing the one. Try one last time. One more try. Third time's the charm, right? Kill this. Kill this. But I highly recommend anybody who wants to do some BLE sniffing, you should get not one, but three Ubertooth. And by the way, Mike, I'll be accepting beers later. Yeah, if you really want to go overboard, you could get 79 Ubertooth. I highly encourage everyone to get 79 Ubertooth. Yeah, and call Dominic. What's your day rate, Dominic? More than 79 Ubertooth. 79 Ubertooth, one laptop. That sounds like a shock site. Okay. If anybody has like a lucky rabbit's foot or something, throw it at me. A lucky rabbit's foot? Lucky beer bottle? Maybe something a little bit less solid. Actually, I'd also appreciate it if somebody played Yackety Sax right now. We got every packet that we needed, except for one. So a full pairing conversation consists of a pairing request, a pairing response, two pairing confirms, and two pairing randoms. And unless we get all of those packets, we cannot actually decrypt the key. But what I can show you is what the actual unencrypted and encrypted data looks like. .dataheader.length greater than zero. Oh, that's not what I want to do. So you can see all the packets that we've captured here. These are the non-zero length packets. Long story. So this is the encryption request that we get immediately following the pairing conversation. And then these unknown packets, unknown data, these are the encrypted L2CAP packets. So if we had that one missing packet, we could crack the key and decrypt all these guys. And Crackle does that totally automatically. It's pretty nice. So I gave it three tries. If you guys want to see it again, we should sit down somewhere where I don't have a microphone, and we can try this until it works. But yeah, I'm done. Thank you very much. .