All right, so I guess I'm ready to get started. Anybody who attended my presentation yesterday knows that we are off to a terrific start because the actual PowerPoint presentation has come up there, or the open office presentation. Yesterday I spent 10 minutes getting that done, so yes. Yay to not fail. Okay, so I am, my presentation is Breaking Bluetooth by Being Bored. My name is Ronan, and this is DEF CON 2010 slash 18. So the title comes from, my research, I'm a graduate student, I'll talk about that in just a second, but the title comes from, I feel like my best ideas, hacking-wise, almost always come when I'm incredibly bored. So like, math class is awesome, long drives are great, airplane rides, I actually developed one of these tools last year on the flight. It's called 2DEFCON, because what are you going to do in the air? So, yeah, so that's the reason behind the title. About me, I'm a graduate student at Virginia Tech. My thesis is actually on Bluetooth security. So these are a couple tools I've developed while doing my research, but it's a much broader scope of things. And my website, where all this stuff is going to be posted, is hackfromacave.com. I'm graduating soon, looking for a job, I had to do that plug, I'm sorry, shameless plug. So, if this, if this goes well, which I already started off well, see me afterward. Moving on to the important stuff. Bluetooth. I'm going to give just a brief overview. I'm sure most people here know if you're in this talk because you're interested in Bluetooth. But, Bluetooth is a short-range technology, so Wi-Fi generates a lot of power. Bluetooth is supposed to be, basically they call it a cable replacement. It's low power, designed perfectly for smart, for like smartphones or PDAs. It creates a lot of power. It creates an ad hoc PicoNet. So, while most of us end up pairing just two devices, you can actually pair more than that in the little PicoNet and have devices communicate with each other. But most of the time you're pairing a headset to a single, like a smartphone or something like that. But it can do more. And it's a very highly growing technology. The Bluetooth website, and this was a couple of years ago actually, I think 2006, posted that there are over one billion Bluetooth devices in the world right now. Or Bluetooth-enabled devices. So, that's a little bit of Bluetooth. Now we're going to the fun stuff. So, part of how Bluetooth communicates is they have a Bluetooth profile. You're probably very familiar with it through the access point side of things. Wi-Fi access points have a very similar style where you have a device address, which is the Mac address. You have a device class, in this case, which describes what the device is. So, you have a device class, so it tells you if it's a phone, or if it's a phone slash smartphone. It gives you a little bit of information about the device. And the device name can be anything you want it to be. So, cloning that information is doable. And this isn't something that I created. This has been done years in the past. But all you have to do is, the first two, the class and the name, easy to do. The other one, the device address, you have to have some certain chipsets. The CSR chipsets are great. You scan for a device, you get it, you can clone it. Or you could change your profile. It's the same as, like, Mac spoofing. So, if you ever do Mac spoofing, you do the same thing where you generate a new Bluetooth profile, and now you've obfuscated who you are or what your device is. So, previously, the method for doing this was just manual. So, you'd have to scan for a device, you'd have to manually change settings. So, I'd created SpoofTube as a way to automatically do a lot of these things. And it does a little bit more. So, it's great for obfuscation. Or impersonations. You can actually pretend to be somebody else. Or something I didn't really intend when I wrote it was actually to observe devices in range and actually log that. So, I'm going to go through a couple of different modes that SpoofTube has right now. The first one is a basic scan. So, what it's doing is it's using the dash eye. It's like a WLAN for everybody who's Linux-y and does IF config. This is HCI config and it's got the same kind of thing. So, that's the interface. And it's scanning and dumping it to the log. So, basically just scanning the local area and dumping everything to the log. I should have mentioned this before. I forgot to. Bluetooth has two modes. Discoverable and non-discoverable mode. It will function in both. And this is the key for securing it. You want to have it in non-discoverable mode. The only reason to have it in discoverable is for initial pairing. So, you want the two devices to connect and once they know about each other they have the information. They don't need to scan for each other after that. So, then you turn the device into non-discoverable. So, this only finds devices in discoverable mode. It's not like if you might be familiar with the tool Red Fang if you're a big Bluetooth hacker which tries to find devices that are in non-discoverable mode. This is only for discoverable mode devices. Okay, so moving on to mode two. This is actually just a randomly generated profile. So, you really want to obfuscate and you don't want to actually have to think about anything. You just type the dash R flag and it creates you an entirely new profile for your device. An Easter egg that I didn't actually put in the documentation kind of on purpose because I wanted to release something at DEF CON. If you change from the dash lower case R to dash upper case R I have a list of all kinds of science fiction names instead of normal names. The previous one took the common the top 100 first and last names and generates it from that. This will take your favorite science fiction characters so you can be Yoda's phone or Malcolm Reynolds peripheral or Bender bending Rodriguez's audio video device. So now you know. Mode three. Oh, this mode is where you actually get to specify the information you want to change your device information to. Mode four is more the manual side of things. So new name, the device address and the device class. Not all, you can't just put anything for the device class. I mean you could and it will just say unknown. So if you're going to put something in there you know a little bit how the device class works which I'm not really going to go into too much today. Mode four is Oh, it's a load previously logged scan. So if you want to scan save for later, log it in make one of the selections and then clone that device later on you can do that. And the last one is for is the incognito mode. You can have a spoof to randomly generate a profile every X number of seconds. So if you don't want to be seen you can keep changing your profile. This will mess up persistent connections. So don't think you're going to be connected to something and keep changing that. It will mess it up. But if you're just running these scans or whatever it will change your information. Yeah, every this one is set to 10 every 10 seconds. So this is what the interface looks like. Pretty straight forward. It will run the scan it pops up with this menu. It will list all the devices there. I'm not that great with the interface programming so far. So instead of having nice little it's similar to how Kismet the menu interface is for Kismet except I know a lot less. Nice little arrows and stuff. You have to type in characters so sorry about that. Maybe in a future version it will be a little more slicker interface. So yeah, that's showing you four of the scans. You can see there's a couple pages at the bottom. So you just previous, next and it will show the rest of the scans which I have obfuscated people's names and the classes or sorry the address in this slide. But we'll show you real quick a live demo of who's in this room. All right. Can you guys hear me clicking? Is that really loud out there? It sounds really loud up here. Okay. This is actually I don't know if it's going to pick up it might pick up stuff up here. Because actually I'm not hooking it up to a long range device. So Bluetooth has three different classes. Yeah, okay. Popped up, done. So I'll go for the class first. The class of devices, there's three different ones. One meter, 10 meter, 100 meter. Those are somewhat accurate numbers. So if you're looking to do anything with Bluetooth you want to get class one because that's the longer range. So Bluetooth scanning for this you see that the actually no all these got their names. Sometimes the scans they have an initial scan and then a follow up. So you can see under I think it's four. Yeah, device four. It says unknown. Oh. Sorry. Yeah, sorry. That's going to Is that a little better? I know it's all blur and it's hard to see. I mean it's not It's going to mess up the menu if I do it any bigger. So sorry about that. You can kind of see it's mostly a blur. But if you notice Is it gone now? It was. So you can see the change, the name change from unknown to red team. Man, I'm getting a lot of stuff in here. I figured there'd be more paranoid people. This isn't picking up very far. So the device the scanning for Bluetooth the initial scan detects the device based on the MAC address and then does a follow up scan for the name. So some of the times if you're if you're using this to do something like war driving you will need to be in an area where you're actually going to have a persistent amount of time with the device that you're scanning if you want to capture that information. Because it takes 10 seconds to a minute to complete a scan. The initial scan is actually very, very quick but the follow up scan for the name takes a long time. So if you notice that things change on there or that you're not getting the name that's the reason why. So It's just it only works with discoverable devices. Sorry, he asked if it was just with discoverable devices. This only works with discoverable devices. Through this I've actually started another project called the Bluetooth Profiling Project. It's similar to if anybody's familiar with Josh Wright he's doing a very similar project collecting a lot more information on specific devices I'm only looking at a little bit. So what this project is it's trying to map the MAC address range of Bluetooth devices. So for those who aren't familiar each type of device every manufacturer gets their own I forgot exactly what it's called but basically it's the first six characters in the MAC address are manufacturer specific. And then the rest of them are randomly given to the devices. So if you can figure out and that range is the same on all devices of a particular type so if you can get the range of those by you know you keep scanning and you find that whatever type of phone and you see oh well there's a pattern here I see that all these types of phones have between this and this then you can use something else to it'll help out with other projects actually I'll talk about that in just a minute. So right now I've collected about 1500 devices which is surprising it really is surprising how many devices are out there in discoverable mode because they really shouldn't be. I listed about a thousand of them on my website right now I'll try to get more yeah so actually I just went into this a little bit more than on the previous slide so yeah using Red Fang as I mentioned Red Fang finds devices in non discoverable mode so it has to run through the entire list and it takes forever like you couldn't actually run the whole gambit and I don't know what the number is I don't want to quote it but it's years and years and years so this will help narrow that down if only a thousand models of a certain device are made and you can get that range well then you have a lot higher than whatever the MAC range the possibility of MAC ranges is the other thing is to match the model with the device the address yeah we'll talk about a little more of the research a big part of it that I've discovered is actually the disclosure of sensitive information I feel like a lot of these a lot of people don't realize what's being disclosed by the name of their bluetooth enabled device oh sorry yeah so we went through this just a minute ago the OUI that was the number I was looking for this is the sensitive one so a lot of them are giving out things like the first name the nickname location, device model I've seen things like URLs actually in the name because people name the computer the same name as it's URL so then you can see it that way all kinds of stuff that I'm sure they don't know that that's the name of it or that anybody walking by can just get that information but my findings are about 30% of bluetooth devices that I scanned gave away an individual's first name that's just me scanning through them I might not recognize a name off the bat but that's roughly it about 20% give out last names locations, the device model I consider that sensitive information only for exploitation purposes so if you know what the device is then you can target your attacks so that's but I understand naming it that way I'm not saying don't name the device whatever but it is possibly sensitive information if people are going to try to exploit a particular device you change the name to something else other than as I said the Mac range figuring out that way it makes it very difficult to determine what the device is right off the bat contributing I'd love to have an enormous list of profiles the more people contribute the better things will be there's a couple of caveats to that so I wanted the name the address and the class no more no less I don't care where you got it I don't care how you got it just as long as you post those three things I want to sanitize the information it is publicly available information so there should be no problem with it but just to be nice sanitizing things like the name anything that looks like a name replace it other is for the category this might be sensitive I wonder if I could ask him just replace it with other it's not that important to have the name for everything except for as I said the statistics earlier that's most of the reason why I don't just replace the name right off the bat it could help with some other research down the road so I've created a forum on my website where people can just post the logs that they find and I will update the full list of posts so here's my nice little DEF CON list I thought this would bring point the home I phrased that completely wrong so this is just a couple of them I've been scanning all of DEF CON congratulations people do actually do hacking stuff at DEF CON and if you thought you would turn off your Bluetooth device I see some people in the audience right now that are like yeah wait I think my phone's Bluetooth is off but you know I don't know how many collected I didn't get a list I'm gonna go with about 250 different profiles that I found here this wasn't like an effort I made I didn't try to get every room or go all around it's mostly been sitting in the hackers or charity booth so if you went to the vendor area you probably got scanned there or walking around a little bit so this is just a couple of them I liked fail phone clever naming I removed the star star star is actually people's real names give those out this is yeah as I said just a couple so you know be aware that whatever you name it if you don't know what you've named it it's probably giving something out I mean if it you know if you rename it to fail phone then you're like okay well obviously you took the effort and you know it's gonna be named if you don't know what it's named you might want to check that out and I meant to say this list was inspired by the wall of sheep guys so I'm gonna be posting some of this stuff with them later on so this is a short list if you want to see that you were scanned you might want to check out the wall of sheep a little later so that's the obfuscation side that's the you know data collection and everything like that now we'll get into the offensive side of things so a vcard so this is one of the tools that I've been working on called vcard blaster a vcard is a virtual business card essentially you probably have used them before a lot of places have them for download or information on people it syncs up with like outlook it creates the profile for your contact list and it's heavily used in bluetooth a lot of the bluetooth enabled phones will be able to share things over vcards which makes things a lot easier instead of all the business cards going around you just sync up your devices send it over and life is good but some of them that allow it sometimes it'll come up with a prompt that says would you like to allow this vcard and you're like oh yeah sure I just met that guy or we need to pair before you can send that over some of them however don't do that for this particular feature and I can understand why in the development of it they decided oh well obviously if you're just going to send a vcard over there's nothing bad about it but there could be what vcard blaster does is it allows you to send a constant stream of vcards to a particular device or to all devices in range one a couple of different things yeah a couple of different things this can do one is potentially fill up the disk drive vcards while they can just contain email or your name or your phone number they can actually contain a lot more than that like images so if you could send a constant stream of vcards with very large file types you could fill up the disk of something that's a very small PDA with a very low amount of memory or if it's partition memory the other thing is you can add contacts to people's devices so that could be interesting just to see what you want to add the other thing is actually if you want to add a ton of random names in there you've officially made it very hard for them to make a phone call because if the contact list had 100 people and now it's got 10,000 people in it you're never going to find mom where is it down there and I don't know of any quick way to remove new contacts most of the time I'm pretty sure it's a manual process so unless they have some sort of backup of their contact list they have to go in and manually remove all of it something I'm going to be working on is actually the random name generation so that's not in there right now but I'm going to be adding that so it will randomly generate a name you can't have the same name because a lot of times they'll get angry about that and say are you sure you want to replace this and you don't want to make the user aware that this attack is going on so I will have it so it randomly generates and doesn't double up on the name so you can fill it up that way and they look like legitimate ones because right now I just have a random character of strings so they can pretty much tell that it's not legit so this is what the attack looks like I can demo it no I don't have the demo one sorry it's dead my bad but this is exactly what it would look like so the flags up there can you guys you can't really see it that well so I'll describe what it is it has a JASG flag for generating a dash I 20 to say run it 20 times instead of 10,000 times the dash T it's running it has to do with the threading to see if it times out a lot of these things will just continue to work there's a time out option in there and then just the director you can either select a specific vCard or vCard Blaster will generate one for you and then send that information on so that's pretty much what's going on here I have a string that I gave it big brother and it's randomly generating text after that so that it won't prompt the user to replace the current contact so this one I wish I could show how quick it runs once they initially connect it's you know milliseconds to copy these over so you can fill up a contact list pretty darn quick yeah the live demo thing not going to happen Blooper is actually a very similar type of program it's exactly the same except for it's not vCards it's any type of other file so the process for sending these files is exactly the same however when it gets on the PDA side they know that vCards are supposed to be interpreted this way and the rest of them are like for download so it's basically the same principle except not to single you out or anything I'll just hold on here so it's the same principle but it has a different kind of denial of service well I guess it's similar as the first one I mentioned what it does is I found on specific devices um actually this specific device that what happened is normally when you want to transfer a file and some of you might have done this through Bluetooth before you say you either need to make a connection so somebody wants to connect and then you connect and then it says okay now I want to transfer a file or it says you know Bob is transferring a file to you do you accept? when you click accept it starts downloading it I found on a particular device that what it actually did was it would cache the file and then prompt the user for the download which is very difficult and I haven't actually found how it caches it or where it caches it but it caches it nonetheless and that's before it prompts the user that the interaction is going on that's assuming a couple things like it allows anonymous connections so this is only one specific device that I've tested it on it might work on a lot of others I really just haven't had any funding to test a whole list of things and people don't like giving me their phones anymore for some reason you can fill up a disk of a device with a low disk space and this one works a lot better because the vCard one you might have 20 lines of text you're sending this one you can actually generate you can generate a file of whatever size you want and send that so you can send a specific file if you want which is fine by me but I thought I would just offer to randomly generate a file because what's important here isn't the file but the disk space so you can generate a file of 10 kilobytes or 5 gig if you really wanted to 5 gig over bluetooth would take forever bluetooth is not designed for heavy use you don't want to pass an ISO over bluetooth that generally would not go very well it's a very low data rate compared to wifi it's 2 megabits slash 3ish megabits and that's theoretical max stuff so it does take a while but one caveat of this thing of this attack is you really have to be next to somebody for a very very long time this isn't going to be very effective at a coffee shop you're going to have to if you're going to be performing this attack it's got to be a device that's around for an extended period of time hours, maybe a day depending on how much disk space there is and if the attack is effective oh yeah I put that it can cause it to crash so when I was testing this once I accidentally hit ok I sent a bunch of files at once you can send one file or a lot of files however if you want to test it with the device to see what's more effective so I started caching the files and then it says do you want to reject them do you want to say ok for this file or do you want to download them all and I just happened to accidentally click accept all and so long story short it took what was in this memory which was almost full and it tried to write it over into the real file system so we completely ran out of disk space and I don't know if it ran into the memory because a lot of these devices actually their hard drive space and their RAM are actually the same actual physical chip flash or something like that so what happened is it actually completely fried the device and I had to do a factory reset which was fun it took me forever to figure out what was going on and bringing it back up it would not boot so I actually had to do the manual factory reset to get that to work so that's a nice little attack when you completely break the system and it has to do a total factory reset so this is what it looks like I can attempt a demo over here yeah actually I'll do the demo and then come back to see what this looks like ... ... ... ... ... ... ... ... ... Thank you. Thank you, whoever out there. It's hard to see. It says Ronan's mom. Fanboy. Thank you. Okay. So I'm sure people have been pounding on this thing because it's a Bluetooth lock and I enabled Bluetooth on this. So we're going to try to run this. Let's see. So let's see if I can boost this up a little bit. That didn't do anything. It's a little better. One more. Yeah, okay. So that's the command I'm going to run against my Dell Axiom up here. And should have just copied and pasted that. I could just do that. If I had just copied and pasted, it would have been faster. No. Oh. I should. I'm actually trying to upload a file that doesn't exist. Evil file. Wait. Oh. That's not good. Okay. Well, that didn't work at all. I don't know. I know why I haven't updated this system. I apologize for that. But the attack would have looked exactly like this. So that's actually the system's fault. The program should work fine. I guess I should mention that a lot of these are actually generating a script internally. So that's why actually that failed because I didn't include some of the code. I actually just ended up bundling it into a script. The new versions that I'm working on right now will have everything in it so you don't have to install some of these tools, some of these additional packages. And that's the reason that failed right now. But anyway, so what I have here that's hard to see is it's going through 500 iterations and it's using a file that I'm generating of size 10,000. And you can select the file name, the current file name, and you can ‑‑ oh, wait. Oh, yeah. Then you can tell it what the file name should be on the other end. Yeah. You adding a new one. You're not going to have to use the same So it doesn't have to be the same. So you just have to say that this is some sort of whatever file, maybe someone would accept it, actually, or something that looks nonchalant. And then target the device and you can kind of see the iterations, it's like five lines each of it. It finds the device, it's sending the file, and then it's done. But it does take quite a while for a size. This probably took ten minutes to send the size of a 10,000K. So yeah, it will take a little bit of time. And then on the other end, you can kind of see it has a little popup. That popup, you can either save all in the bottom left, that's what I clicked, and that was the downfall of the device. So this pops up there, and I imagine a user would probably notice if I send a file that says evil file. So it actually generates a counter, too, you have that option. So the files can look differently, and that's just how I knew how many were up there. If you're testing, it makes it a lot easier. Because another sort of denial. Denial of service in this, and this kind of falls into both of them. Popup menu, denial of service. If you're sending a constant stream of files that are very small, this is another option, and they click no, it pops right back up. You click no, it pops right back up. So unless they get away from you, they can't actually disable Bluetooth unless there's some hardware setting, because they can't get the start menu, because they click start menu and that popup is, you know, a higher priority than the start menu. So all you do, and this happened to me, and I was like, no, stop, no. Crap, I got to go to the other side, because it kept popping up, and I couldn't actually do anything on the device because of the popup menus. So I'm sure there's all kinds of other things that can utilize that sort of an attack. But that did happen, and so if you really want to just annoy somebody, that's a good way to do it. Another tool I've been working on is Pwn Tooth. This is an attack suite, essentially. I've tried to bundle together some common Bluetooth attacks, other than the ones I mentioned here here. None of these are mine. But I figured I'd make a little bit of an easier way for certain people to do pen testing. There's a really good actual suite in Backtrack that's, you know, if you're a first-time user, you want to go that route. It steps you through things. Mine does not do a step through. What this is is it basically allows you to run a script, and it will scan for everything and only run the attacks once against it. So it's a binary file, but it could have been a script file. But it only runs the attack list once. You provide the list of attacks you want to launch through the tools. So there's no point in click or anything, or you're not just selection. You make this config file whatever you want, and, you know, you run those attacks against the devices. You can say one specific device. You can say all devices in range, and it will run all of those against it at a time. I don't do any report generation. I probably won't do any report generation. I'm not sure. Maybe. Possibly. So all you get is the output of the actual attack. It's not going to tell you. I'm not going to provide the information that says this succeeded, this failed, whatever. But it's mostly there to make ‑‑ I worked on a project where I had to run a lot of attacks ‑‑ excuse me ‑‑ I had to run attacks a lot of times against a device, and then have to type in the Mac every time, and it got to be a little bit of a pain. So this is more just the automatic way to do things. Yeah. So here's the config file. The configuration file uses a star as a wild card, and that's where it inserts the Mac address. So a lot of them will tell you this is where, you know, the Mac address should be when you're running the command. That's basically all it really does, other than it could just be a bash script except for that it scans and only runs it once. This is the default area where the file is installed, and it will ‑‑ you can run it multiple times through. So you can say I want to actually run it multiple times. If you want to actually run this script as many times as you want, then it will do the attacks for you. And that's just an example of the specific log file that you want to log the information out to, and just scanning it ten times. So you can specify a different configuration file if you want. But this just makes your life a little bit easier if you're going to be running lots of attacks against a single device or in an area of devices, if you're going to be pen testing at your business and you want to see what vulnerabilities are out there and you're walking around with it. This might help you out a little bit. Example. So pound is to keep it from being read in. So the list comes with examples. It's got some default ones. And I tried to put some in there, some of the commands, because I know some of these tools, while awesome, are not as widely used, so there's not a whole lot of documentation and examples of things, so I tried to include examples of how to use them in a way that I would normally use them. So that should help you out if you are new to this in getting started. So I provided a couple of examples. You can add whatever you want, Bluetooth related, as long as you use the wild card, it will insert the address in there and run whatever you want. Here's a couple of project pages for the different things. And I'm up for Q&A. So anybody? Yeah. This is something I started years ago. I just decided to put it up there and ever since every presentation I do has a bunny. So yeah. We have any questions? You know what time it is. Good. Any questions? Nobody cares? All right. . So I can take that back. Yeah. You have to find it when it's non-discoverable and that's a big pain. There is actually some presentations, I think they did a presentation last year at DEF CON and then at SMUCON using a US SRP to monitor the bandwidth ‑‑ sorry, monitor the frequencies and getting it that way. But that's frequency analysis. So you can discover devices there and you might be able to pull out the Mac and it's very complicated and long. But Red Fang is a great option to find non‑discoverable devices but it takes so long it's not terribly practical. Yeah, actually we've got some Hackers for Charity free swag here if anybody wants it. You can come on up and throw some, too. People want this stuff? All right, I'm going to see how far I can get out. Almost to the back. Deflected. All right, I'm going to be in room 114. If you have questions about that. Or maybe about this.