Should we start the talk now? Yeah, sure. Okay. Go ahead. One, two, three. Not it. Damn it. All right. Good morning, evening, afternoon. I don't even know what freaking day it is. Happy Tuesday. Yes. Welcome to Saturday. Oh. All right. We are the Wireless Village. Literally. I am Rick, and he is Rick, so we are Rick. And we do shit and have fun with it. We love to give you guys the capability to play this game, to listen to the talks, and we love the fact that you guys come back every year and listen to us. I wouldn't listen to us this long, so I don't know why the hell you guys have, but thank you very much for it. Today we have a little bit something special, I guess we could say, special, maybe. I feel special. I feel special, too. This is a tool that has not been released yet. This is a tool that is doing things that other tools can't do, and it kind of came up under a funny story, which you'll have to endure, so I'm sorry about that. You're not. So, Rick, go ahead. What's this? Bluetooth stuff, other than, like, you know, pardon anybody from Kentucky. I don't mean to be totally rude, but... Named after King Harold the Bluetooth, who ate lots of blueberries, apparently. Bluetooth is a ubiquitous networking technology for people too lazy to plug in cables. Is that the whole slide? Pan, yep. Yeah, that's it. That's it. Hey, it is fancy IEEE 802.11, 802.15.1. Yeah, yeah. And there is no oversight. There is a guidance group. Cool. You missed a bunch of shit. Anyway. People can read. Can you all read? Cool. I'm not reading the slides. Here's why we care about Bluetooth, though. Who has, on or off, a Bluetooth device on you right now? If there's anybody with your hand down, you're a liar. And if you're not, prove it. Strip search. Where's TSA? In their house? Okay. Bluetooth is everywhere. It's on your watch. It's on your phone. It's on your headsets. It's on your laptops. And it's on a lot of your laptops. I mean, Jan, Joe, Bob, Jimmy, we see you. We do. And we see you from, like, the time you walk down the steps to the time you get here. So we like playing with Bluetooth, but we like playing with Bluetooth for really, really, really good reasons. It's everywhere, and it's exploitable. And then comes along this crazy thing. But you can challenge your friends to see who gets the highest step count at DEF CON. Yay, Fitbit. Bluetooth, low energy. Come on. Be technical. Bluetooth, low energy is a low energy protocol for people too lazy to plug in cables. But seriously, Bluetooth, low energy has the same transmit power as regular Bluetooth, which, you know, you'd think low energy. Obviously, it's going to be weak and go less distance. Actually, that's not true at all. It just has to do with how deep the power saving cycles are. So it'll basically turn completely off, do absolutely nothing, and then wake up and send, like, a packet and then shut up for, like, a quarter of a second, which is a really long time when you're a radio. Trust me, it is. So, like, four wake-ups a second is really, really, really good power saving. It's like keeping Rick quiet for, like, five minutes. It doesn't happen. Yeah, Fitbits are, you know, a couple of days of battery life. But when you're talking about some of these Bluetooth beacons and things like that, they're actually sending out, like, a signal every couple of, you know, four times a second. And these batteries on, you know, AA's are, like, two years to have a Bluetooth beacon for your marketing project. So it really is pretty low energy. So last year, was it last year? It was last year. Two years. Two years ago. Yeah. Rick was up on stage on a delayed talk because of dongles. Dongles suck. God, dongles suck. But they released a tool called Blue Hydra, and we all thought, wow, Blue Hydra is absolutely awesome. Who in the room has heard of Blue Hydra? Oh, awesome. Wow, there's, like, wireless people here in the wireless village. That's neat. That is neat. Blue Hydra tells you what's in the airspace like Aerodump does. And Blue Hydra does a really, really good job of enumerating out things. It does such a good job that it tells you the difference between Bluetooth low energy and Bluetooth classic. We'll get to that in a minute while that's super important. But the amount of data that comes out of that is phenomenal, and they did a great job on this. Now, that being said, Bluetooth has some weird quirks to it. Masters and slaves. So masters and slaves, discoverable and not discoverable. Bluetooth is a really, really weird thing. I see a lot of, you know, Bluetooth security requirements, which are literally Wi-Fi security requirements. But some jerk did a fine interruption. He replaced on Wi-Fi and changed it to Bluetooth. I've also seen the same with WiMAX and all kinds of other crap. But that's just not how things work. For instance, Bluetooth doesn't even transmit the whole MAC address in the air. It only transmits the last three octets of the MAC address. That's the last half. And when you have Wi-Fi, for example, you have a BSSID for the access point. You have the transmitting MAC address, which is, you know, either the client or the access point. Depending on direction. And then you have the receiver, which again, client or access point, depending on direction. You have three MAC addresses, at least, in every single packet. Full MAC addresses, unencrypted, all the time. Bluetooth, there's one half of one MAC address for a communications group. So you can have multiple devices talking to your phone, and they'll all basically share half of a MAC address. And the only way they know who's talking to who is because they're not the one transmitting. So it must be to them. It's a really, really frustrating protocol because of things like that. So building BlueHydra was entertaining when you're looking for raw monitoring of things. Ubertooth is a really great tool, but there are limitations to Bluetooth that a lot of people just don't know about. So that's my favorite one. It's lots of fun. So we asked the question last year. How many people in the room do RF or wireless pen testing as all of or part of their daily job? Okay, seven people out of, I can't count that high. That's not very many. But the people that do that, Bluetooth is a pain in the ass because you can't track things as properly as you'd like to. Because if I'm trying to follow the CEO home, and I want to know where he lives or what he's doing or how he's doing it, I have massive options of doing it, except his phone's not pairing, his phone's not trying to pair, and all I have is a master or a slave, I don't know which it is, I don't know if it's him or her. So that's a big problem. So flip that to security. From defense, you have a better opportunity of not getting caught with Bluetooth prior to today than you would with your wireless radios. And everybody knows, I should turn my wireless off. But as soon as you get on a plane, get on a train, get in a cab, you turn on your Bluetooth, you put your headphones in your ears, you start talking to somebody because, you know, wires are so, you know, 2017. It gets tangled. I don't like it. You need to have the ability. You need the ability to be, you know, mobile and walking around or just, you know, looking cool. Walk through San Francisco, everybody has these weird earrings. They're white, they kind of stick down a little bit, they kind of dangle. They're really cute. But they're also Bluetooth. And Bluetooth is very difficult to track, sort of. Talk about the different hardware. Was very difficult to track. Talk about different hardware. Yeah, cool. So Bluetooth is great. Again, comparing it to Wi-Fi. With Wi-Fi, you just take a card. And you get a good driver. And then you flip it in monitor mode. And you monitor everything. And it gives you full packet headers that are unencrypted all the time. And that's awesome. The target price for a Bluetooth radio is $0.05. And because of that, they're very, very, very minimal. They're very low power. They're very weak. They're very crappy. And things like monitor mode just basically don't exist. So you end up getting a Bluetooth sniffer. In this case, this is an Ubertooth 1 from Great Scott Gadgets. It's a Bluetooth speaker. It's a great little device for finding classic mode devices. And a whole bunch of Bluetooth low energy stuff in the latest release has been vastly improved. So these are really great for monitor mode. But as it turns out, they're not Bluetooth dongles at all. They don't actually support using them as regular Bluetooth devices. So to interact with a Bluetooth device, you still need a Bluetooth device. So if you want to poll something and say, what's your name? Or tell me about yourself. What firmware revision are you? You still need a real Bluetooth dongle. So Blue Hydra specifically pairs these two things together to find the most devices and to extract the most information from those devices. How much do those two devices cost? Yeah. So this not being $0.05 like the one built into most laptops, this is a Sena UD100. And these are about $50 or $60 depending on where you buy them. The Ubertooth 1s I think are like $100 or something. Yeah, something in that general vicinity, $100, $120. These are definitely available in the vendor area. I have no idea if the Senas are. But these are really decent devices. And again, they're like $100-ish. But that's expensive. Yes. And not everybody has a budget for $100 pieces of equipment that sit on your shelf. So again, real quick, for those that have it, Blue Hydra. You type in Blue Hydra into Pentoo or another device that you have added Blue Hydra onto. Which I think there's good instructions for Kali. Yeah, there are. There are good install instructions for Kali because the developer is a nice guy. And it breaks it down for you. So it gives you Classic, it gives you Classic 4.0, Bluetooth Low Energy and Low Energy 4.1. It gives you the ability to see the difference between the types of radios that you're dealing with. Blue Hydra is cool. And it's cool enough that we're going to say, hey, let's show you guys. So those of you who haven't seen Blue Hydra yet, I love live demos because they always fail. Yeah, speaker sucks. Get them out of the way. This is always fun too. Let's see. Did I type it right? Yay. Okay. So there's that screen you just saw. They give you a really nice output. Here's how it works. Here's what it does. Here's what's important about it. And you run it. And when you run it, it starts to enumerate all of the Bluetooth that you're going to see. It also gives names. Anybody see their device up there? Don't be embarrassed. They're all up there. It's okay. It really is. Yeah. And it just shows you. Now, what's really cool, if we watch this for a second or two, and I'm trying to see it from here. When an Apple device shows up, it actually enumerates the host name. It gives us a little bit of a distance vector. It gives us a little bit of a power vector. Rick, why don't you explain RSSI? Received signal strength indicator? Yes, that one. This is actually more like signal level kind of, yeah. So this is basically telling you about how far away something is based on the signal strength. So the signal strength is a typically negative number, which is going to tell you how strong it is coming in. So negative 100 being really, really weak. Negative 40 being pretty decent. And everywhere in between. Negative numbers work exactly the way they should when you learn them in, like, second grade math class. So negative 40 is good. Negative 100 is bad. It's not hard. All right. So we've got some capabilities here. We have some enumeration. We have the ability to see things. Problem is, I'm wearing a Bluetooth device. Apple Watch. Happens to be one of the least talkative devices that exist out there. So when I hold this near where the Bluetooth is, it's not working. It's not popping up. It's not showing you anything on the screen. So I was, let's see if this works. Yay, it worked. So Blue Hydra with the Fox, we have the ability to speed that system up a little bit. So those of you that are playing, Blue Hydra, tac, tac, no info, no tac info, gives you the ability to see things with a much faster refresh rate. That faster refresh rate gives you better fidelity on the targets you're looking for. It also gives you better signal-to-noise ratio in terms of what you see on the screen versus what you're seeing on the screen. It also gives you better signal-to-noise ratio in terms of what you see on the screen versus what you're seeing on the screen. What you're in bounds of. In most cases, it's 300 seconds timeout. In most cases the problem is that it goes and it takes time out to interrogate each device that it sees. So let's say you're running through the casino chasing people. You're going to pick up a bunch of devices, be nowhere near them, and then try to info scan all of them, which takes huge amounts of time out of your discovery window. So no info just says, don't info scan anybody, just keep discovering all the time. Gives you much better fidelity. So we do that. Can I type blind? Maybe? Yes! Much, much, much faster scanning. They stay green longer because they've been seen sooner, and it keeps rolling through. Now, as you watch through this, this is literally the Bluetooth devices that are in this area that this internal radio inside my laptop is looking for. Not using the UD100, not using the Ubertooth, which, by the way, is an amazing tool. It does give you better fidelity. But I can do all this sitting down with my laptop, nothing else. This is the crappy XPS 13 that Rick was talking about with the Qualcomm chip burned into it. This is the internal radio on a regular Dell XPS. So it's not giving you amazing performance, but it is giving you some really interesting information. Now, occasionally, if you watch this range, and I saw one come through, so maybe it'll come back again, it's going to give range of a device based on how far it thinks it is based on a predefined OUI. Brilliance on developer's part, Rick in Grimlock? Ranolox. Whatever. Weird name. Noob. Anyway, there you go. 0.89 meters, 15.85 meters. Who is Blue Iniga? That's not the name, is it? Blue Giga. That's the test flag. Oh, that's wonderful. And the Amacor is one of ours, too, and it's 15 meters away. See, Eric, raise your hand. 15.85 meters, wow. It's sitting where Eric's sitting. That's about 45 feet. Yeah. Eh, give or take. Not too bad. So it does a really good job of that. Now, this is helpful, but it's not quick fidelity. It's not, I want to track you. I want to track you. This gives us the ability to just kind of see things. Let me kill that first. That'll screw it up for the next time. We do have the ability with that to, eh, woo-hoo, hox mode. Are you there yet? Find your hox mode. Oh, there we go. Change your own damn slides. There you go. There you go. So, filters. All right, so, neat idea. Yeah, we started running Blue Hydra in Wireless Village Capture the Flag, and the real problem is, is most people were actually building, like, little Raspberry Pis with, like, five-inch screens and battery packs, and nine lines of text or ten lines of text on their display. Otherwise, it was unreadable. And we realized that it sees an enormous number of devices because everyone turns on their Bluetooth and nobody turns it off, and thanks, Apple. So, when you're trying to track a specific device, it became nearly worthless. So, I added in the filtering ability. So, that you could, just on the UI side, filter out. So, it's still tracking everything in the background. But you could say, I want to filter for this device. It has a couple of modes. One mode is called Highlight, where it'll just highlight it on the screen. The other mode is called Exclusive, where it's only going to show you the things that you're filtering for. There's an example of filtering my MAC address here. There's an example of filtering for proximity, UUID, major and minor number, which are Bluetooth low energy, iBeacon. That would be helpful for the hide-and-seek, I think. For the Bluetooth hide-and-seek. That might be helpful for the hard hide-and-seek. The hard hide-and-seek, especially. The hard hide-and-seek that hasn't been found yet? That's correct, yes, the one that hasn't been found yet. Okay, just checking. So, those features, yes, probably a lot of points, too. Those features were built specifically for fox hunting and finding things. Or, if you wanted to track. For example, I know every time my mother-in-law pulls into the driveway, because I've got a little screen running Blue Hydra, and she's set in the filter list. And before she knocks on the door, I know that I'm not home. All right, so, now you have the back story. So, I was driving down the road, because my kids swim, and I drive down the road a lot. He's a nice car, though, so it's okay. Yeah, and I was thinking of things, and, you know, as you do when you're driving down the road. And I called Rick, and I said, hey, listen, I'm going to train some folks that need to find people. And they're going to track things, and they're going to do things, and it's really, really neat, blah, blah, blah. What if we were able to say, hmm, track a Bluetooth device that was not accurate, that was just sitting in somebody's pocket? That's like crazy talk, because, you know, if Bluetooth isn't connecting, it's not beaking. It's not trying to talk to anybody. It's not being loud. It's just sitting there on the device. Most people are pretty okay with their Bluetooth device in their pocket. Who turns Bluetooth off when they leave their house? For real? Every time you leave your house, you turn Bluetooth off. No, no, hold on. Wait. Ask this question in reverse. What the hell do you use Bluetooth for at your house? Seriously. I mean, I use my hands. I use my headset when I'm on the road, not when I'm sitting at my desk. I use my watch that I don't miss phone calls when I'm, like, out and about doing things like this. Going to be like, oh, that one's not important. Like, what do you use Bluetooth for at home? No one. Okay, cool. That's what I thought. Speakers. Speakers. Get wired speakers at home. They sound better. You don't bring the speakers with you? Oh, man. All right. So I'm driving down the road, and I said, hey, can we do this? He goes, nope. Yup. Well, halt. It was a weird conversation. It was a whole lot of us both saying, like, one word. Maybe. Why? So there's this thing called Layer 2. Layer 2 is an interesting protocol set. Go ahead. Layer 2 is all I'm good at. Definitely read my code. You'll know that I'm telling the truth. I can't do that. But Layer 2, I understand. So Bluetooth is a really fabulous spec. Yeah, Layer 2 is really, really open. So there's this thing called an L2 ping, which is basically like ARP ping would be, which is, you know, here's a MAC address. Ping it, and it just responds to anybody all the time, no matter what. So once you know somebody's Bluetooth MAC address, you can just kind of ping it, and they will respond to you all the time. Or ping flood them and slowly drain their battery. So the very last line on this, BD address, BD underscore adder. L2 ping is on most of your Linux boxes. You can run L2 ping. You can ping things. Okay, neat. So now we can ping something. Cool. Big deal. So we decided to use Layer 2 to our advantage. And I said, Rick, you can do something with this. And about an hour and a half later, he called me back. Yeah. So Bluetooth is special in a lot of ways. The MAC address method, the MAC address issues I was talking about earlier come into full force here. If you're sniffing and you catch a Bluetooth address, you only get the last three octets. Ubertooth tools have the ability to discover the four, I don't know, three octets. So the Bluetooth address is divided up into three sections. Network address part, which is the first two, which are used for crypto exclusively. Then there's the upper address part, which is one octet. And then there's the last three octets, which is called the lower address part. The lower address part is what you get for free. Ubertooth tools actually can recover if there's a decent amount of data. The upper address part. What's really cool is that is all the device cares about. You can ping ZZZZ. Correct MAC address. And it will respond. You can ping FFFF. Correct MAC address. And it will respond. It does not care at all about those first two. They are not used in any communications that aren't encrypted. L2 pings being completely unencrypted. So with the Ubertooth or with device that is once in discoverable mode that we have caught and captured that MAC address, we have enough of the MAC address to ping you forever and we'll be able to tell if you come back in range. The most fun part of that is I can say something silly like, do you know what your Bluetooth MAC address is? And half the people here in the next hour are going to look at their phone and try to figure that out. And when you open up the Bluetooth menu, you're discoverable that whole time. You know, because what would you do if you couldn't get a device to pair? You'd open the Bluetooth settings. So it's going to automatically set it to discoverable mode for you. Or maybe you're just going to reboot your phone because it's like Windows 95 and reboots fix everything. Well, that turns your Bluetooth into discoverable mode as well. What about when you're on the airplane and you turn it off because, well, I guess you're living two years ago when they told you you had to turn it off. But when you turn it back on, you're in discoverable mode again because, you know, that's when things pair. So obviously you need to be in discoverable mode because you turned on your Bluetooth. So it's pretty easy to capture it once you capture it. Oh, my God, don't touch that. Thank you. It was humming really bad. You didn't hear that? You're old. All right. So, again, I'm driving down the road, get to where I'm going. He calls me up. He goes, hey, try this. So I said, huh, okay. I'll try the code you just sent me just blindly because that's fun. So we have the old version of Bluetooth. This is pinging a watch that happens to be on my wrist. So if I put it close, you notice if you look really, really, really closely, the RSSI return value is zero. Yeah. It's not on the screen. It's on my screen. I can see. You can't see his screen? Come on. Come up here. That's even funnier. Where's my damn mouse? Sorry. It's his first time presenting. It is. This hour. There we go. All right. Cool. So see that RSSI return value? It's like zero. Now it's like 7, 10, 21 as it's moving away. Okay. We are now tracking a non-beaconing device. But that view sucks and it's really slow and we don't really like it. But I wrote it in like 20 minutes. Which isn't bad. But, you know, it could be better. Proved it worked. So it was tough to read. It was hard to track. So therefore I said, hey, let's do some other shit. Russ jumped in and said, hey, what if you do this? I get this. Hey, call me back in 20 minutes. Cool. So. Stop the one. Yeah. Mounting sideways sucks. Yeah. Mirrored screens are nice. They are. Should try it sometime. Should. All right. So in comes new version. Oh, look at that. Wee. Come back. Moves away. Red line gets bigger. Red line gets smaller. If I get rid of this one. Make the window full screen. I am. Yeah. Projector resolution. Woo. Let me get bigger. Close this. Does that say close somewhere? No. I am. I can't see upside down. I can close the window from here. There we go. Wee. There you go. There we go. So my watch is close to where my Bluetooth radio is. And when it moves away. And when it gets closer. It moves away. This is the peak of my graphical user development. I hope you all like this GUI. what we see with this is very important. And I would like to put Majestic 12 on the spot because they actually were the first to use this tool and in about, what, 3 or 4 hours, they found a completely standard Samsung Galaxy S, I don't know, 7 or something, not connected, not open, locked, sitting on a desk. Or was it on somebody? I don't even know where it was. What? It was at the info booth. Oh, there we go. So Movix didn't go very far. Good for him. They were able to track this in all of this space by bottlenecking and or doing whatever tactics they do because they're actually really good at fox hunting and we applaud them and they'll probably give a talk next year on it. But that being said, think about the possibilities of sitting outside of a parking lot, sitting outside of a building, sitting near a neighborhood and waiting for something or someone to come into play. Now, by saying something, this is a car's Bluetooth. This is a car's Bluetooth. This is a car's Bluetooth. This is a car's Bluetooth. This is a car's Bluetooth. This is a car's Bluetooth. This is a watch. This is a phone. This is roughly what we've been seeing roughly 15, 20 to 30 meters with internal radios. So completely not looking like a hacker with wires and antennas and all that crap. Literally the internal radio on these devices beaconing this information back to you. Now, how do you get the Mac address, you say? Huh, interesting. Was anybody here for Wasabi and Rick's talk earlier where they talked about enumeration, discovery and all that kind of fun stuff? Like the building blocks of what we actually do? I was here too. I listened, it was good. But when you do discovery, when do you do discovery? You do it in the morning, you do it at night, you do it at lunch, you do it at the coffee shop, you do it at the airplane, you do it at the train. All places where people are connecting and disconnecting from things and looking at their phones. Who rides a train occasionally? Subway or train? Do you ever see anybody's face? You see tops of their heads. They're on their phones, right? They're listening to headphones, they're on their phones. Most people nowadays, it's cool to not have wires coming out of their headphones. Well, because of that, at some point they have to pair. At some point they have to open things. I pick up so many things. The reason that I asked for this tool to exist, I was sitting in a coffee shop waiting for my wife to get finished doing something, you know, the owner of my company, so it was probably important. Your boss. Let's just go with your boss. My boss. There we go. And this guy walks in. Well, the guy happened to be the guy running for governor for the first time in a long time. And he was like, I'm going to be the governor for the state of Maryland. He happened to have a Tesla. How do I know this? Because he was beaconing blah blah's Tesla. He had a Bluetooth device that was called blah blah's iPhone and he had on that laptop with him that was called blah blah's Mac or blah blah's whatever. That being said, I went up to him and I said, sir, you realize I know who you are, where you are, when you are and why you are and what you're doing. And he looked at me kind of cock-eyed and I was like, here's this, here's this, here's this, and I'm guessing you're licensed place is this. And he goes, are you stalking me? I said, no. You just gave me all that information by walking into Starbucks. I happened to look outside. There were two Teslas in the parking lot. One happened to say blah blah for governor. Tough guess, right? And after all this, all he got was a button that says vote blah blah. I did. I got the button. And I didn't. But anyway, there's a real problem here, folks. And the real problem is the fact that all these devices are made for a government. They're made for a government. They're made for a government. They're made for our convenience. But they're all beaconing, they're all yelling, they're all screaming. For years, the wireless village, prior known as the Wi-Fi village, thank you, Mr. Kelly, in the back. By the way, John Kelly, raise your hand. John actually started this shit like a billion years ago and I took it from him because he got too lazy to run it anymore or too successful, I'm not sure which. Too smart. He was too smart to run it anymore. Too smart to run it anymore. But this all kind of started with him. So, you know, hey. Thanks. Thanks, John. He slowly backs out the door. But we were all worried about Wi-Fi. Turn off your Wi-Fi radios, turn off this. Turn off this. Well, I'm here to say, guys, if you have Bluetooth, it exists and we can find it. So, you're saying, hey, this sucks. I have to turn all my shit off. No, you don't. Because we're the wireless village and we care. So the defense against this and we're still working on it a little bit. But the defense against this is we're trying to keep it is to actually attack yourself with the same attack. If you've got enough devices pinging your device, it doesn't allow other devices to ping it. Now, I have some ideas why. I actually can explain this one now finally. Yes. Good. I've been waiting for this. So he posited this to me like three days ago and I'm like, fuck, I don't know. And yeah, turns out Android specifically I know has a default now where it can only connect to five devices at once. But you can change that default to only connect to four, three, two, or one. So if, for example, I'm the kind of idiot that has to have a watch and extra radios that connect via radio to me, I can set my phone to only connect to two Bluetooth devices at once and then as long as I turn off my Gotenna before I try to use my headset, I'm good to go and I'm completely immune to somebody pinging me to death. So yes. Okay. Thanks for adding that in Android 9, Google, or Alphabet Corp, or whoever you are now. But thank you. Again, this isn't an ideal situation, but neither is being able to be tracked. So if you've got clients that you don't want to be tracked, building a little Raspberry Pi set up, PiW even, that just runs a script when it boots that pings their phone with two or three terminals, one or two radios, you're actually doing okay to block against this. It's not ideal. But again, like I said, neither is this attack and neither is this tracking. You see how effective it is. It is within feet that you can get to someone if you're really looking hard. That's kind of creepy. Now, let's write security because, you know, we have to write slides. But let's talk real world here. Let's say you've got a target, pen test, you're an assassin, I don't care what you do, but you've got a target inside of a building. And you know that you don't know who that target is, but you know that they have a phone. And you get 15 or 20 phones. You've got a picture and that's all you got. Well, you wait until they come out. You wait for that to start pinging. You've got a, you know, four or five different people that may have come out at the same time to know who that is. You can then pick up additional digital information about these people. Law enforcement, military, counter surveillance, any type of security work. Who does security work in here? Which means you're probably protecting something. Or you're the adversary and you're attacking something. There's two sides to this story. We want to make sure we're covering both because, shit, we do both things. We're in the black world, we're in the white world, we're in both. But in doing so, we want to make sure everybody's well aware. This sucks. This really sucks. I was thrilled that he wrote it. But then when it started, it's like, shit. Now we've got to figure out a way to talk to people about how this works. So finding and tracking is a big deal. When it makes sense. You know, they already did it. These folks literally, we told them there was a tool called Blue Sonar. They used it. They found that phone relatively quickly. So tomorrow's the good news. You can go to GitHub and install it on Kali all by themselves, too. That was pretty impressive. Yeah. Now, plug, quick plug. It's already in Pentoo. If you download Pentoo, it's already there. You type sudo blue sonar. You've got it. All you need is the Mac address. Mac address is the harder thing. But we showed with Hydra and with other Bluetooth tools, you can get that data. Wireshark will get that data with Ubertooth beautifully with a socket. There's a lot of ways to get this data. But understand, you're very vulnerable to it. For the fox hunters out there, this is a really cool tool. You can get this data with a socket. You can get this data with a socket. This is a tool that could get you a lot of points this weekend. For those of you that are doing security, this is a tool that could go a long way at a minimum in showing the people that you're trying to protect, hey, turn your shit off if you don't need it. We've been talking about turning stuff off if you don't need it for years. Here's another good reason to show why. I want to do another plug. This is not even a pet project. This is some garbage BS that I wrote as a pock because Rick said, I wonder if this is possible. And I said, well, I'm pretty sure it is. Let's find out together. Try things. Try things and then put them up places for other people to try them and be entertained by it. I maintain that my code is good enough that a real coder can look at it and say, oh, is that what you wanted? And then they go in there, take the tool, and they rewrite it, and they make it way better than I ever could. But the point is this stuff's not hard. L2 ping is just built into Linux, and I've got a shitty shell script that's parsing the output from it. And polling for RSSI. Like, yay, threaded bash scripts. This is not impressive. This is not cool. The impressive part is that it actually worked. And it's kind of neat because nobody else wrote like 20 minutes worth of shell to do this particular thing before. And so it turns out to be really useful. But these are the kinds of things that you do for fun, and you check to see if it worked, and then it works. And then you talk about it on stage. But really, I want to stress just how silly this was. I mean, this was literally a phone call between him and I after my kids went to bed while he was driving home from swim meet. Like, this is, okay, I guess we're weird, but this is what we discuss when we're on the phone. And, you know, yeah, then I wrote 20 minutes of shell script and made the first version of this. So please, do things, try them, put them on GitHub even if you think they suck. My code, all sucks. Lots of it's on GitHub. Like, half, maybe more of those people are running a bunch of my code as root. I don't know why, but they are, and they all trust me. So you know. At least if you're on my distro, you trust me. But like, the guys installing my shit on Cali, I'm going to add a U name check in there next. I didn't say that. Anyway, thanks for coming. So if you have any questions. Yeah. . . . Android 9, the question was where is the setting to limit the number of Bluetooth devices. In Android 9 it is an option under developer settings, just regular developer settings, no like rooting or anything weird like that. Yeah. So the question is what about privacy when the MAC address is constantly changing? And the answer is what world do you live in? LE privacy extensions are a bitch and this is a classic mode tool where none of the MAC addresses ever change like that because the protocols don't support it. Bluetooth low energy for the most part also doesn't implement that yet. A lot of tools, headphones and things like that don't implement the MAC address privacy. Very, very, very few devices do. One of the exceptions being the Bluetooth low energy on Apple watches actually seems to implement it. And a couple of the marketing beacons that I've seen implement it. Basically so you can't spoof their marketing campaign which is like the coolest thing I've ever seen come out of a marketing product. Random MAC addresses four times a second. Not that we would be using anything like that for our challenges. But that being said, there are the prox UUID doesn't change. So in a lot of cases there are other things that are there. MAC address doesn't but other things don't. Blue Hydra implements all that and it pulls it all out for you. So that's the question. So even if it is changing hint, hint on the hide and seek Bluetooth you can find it by prox UUID. So the question is what are the packets. And the answer is it's a packet literally called L2 ping for Bluetooth. So it would be equivalent to an ARP ping if you're talking about like a TCP IP network. It's just a layer 2 ping and mac address to mac address. And that's all it does. It's just really, really simple. It literally creates an unencrypted connection between you and the device. It says yo and you say yo and I say cool, RSSI. And it's phenomenal security on Bluetooth because there's all kinds of Bluetooth IDSs and Bluetooth monitors and Bluetooth, you know, SIM. You've been drinking too much. I have. Yes? Oh, question. Sorry. Next question. Go ahead, Woody. Yeah. So the question is when you're using Blue Sonar, are you passive or active? Active. You are totally active. You are sending a ping. You are getting a response. Again, who here has a Bluetooth IDS? Yep. That's the number of hands that should go up. This is not something that's reported to you by the phone. If you remember, like, a million years ago when they were first started implementing, like, the really nasty harassment over Bluetooth in, like, football stadiums and stuff, you'd get, like, a pairing request. You don't get any of that. It's completely invisible to the user. It's an unencrypted connection, no pairing, and it just sends a ping back and forth and then disconnects or, in my case, I keep the connection open. But it's dead silent to the user, but it is absolutely being transmitted. And we haven't noticed a whole lot of battery degradation on it either unless you totally flood it. Second row. Are there legitimate devices that are using, like, a constant ping over Bluetooth? Are there legitimate devices that are using a constant ping over Bluetooth? Lacking a Bluetooth IDS system of my own, I legitimately have no idea. I don't think that makes any sense. I think that this is, you know, there are uses for this, but I don't think anything would be doing, like, a constant ping like I'm doing. So, yeah, like, three or four pings inside of a minute would probably be a dead giveaway for a tool. So, if anyone's writing a Bluetooth IDS, there's your first rule. First rule. How fast can you send those packets? Can you scan them? So, how fast can you send the packets is the question. I've got a, basically, a sleep in there to control, like, okay, I want to do four a second or I want to do one a second or whatever. L2 ping has a dash F flood ping option, which will send them really, really fast. There you go. The difference being, you know, if you're using a Bluetooth IDS system, if you're using a Bluetooth IDS system, that's going to hit one MAC address at a time. The MAC address space is huge. So, if you were to rewrite that tool to ping a different MAC address every time in flood mode, I, slow. Really slow. You could legitimately ping every address in the airspace. The problem is it would take years. There's actually a tool out there called Red Fang, I believe, that does brute forcing of Bluetooth MAC addresses, and the chances of finding one is approximately winning the lottery. Yeah. Yeah. Finding something with an uber tooth or whatnot is much more reliable. Much more reliable. It's four bytes that you have to find to successfully ping something. What if you know the . You know the . So, what if you know the . The manufacturer. So, trying to limit the space, the manufacturer is actually the part that's cut off and doesn't matter for the most part. So, limiting the address space is really, really hard. Yeah. It's definitely a tough thing. In the back. What does the specification say about L2 ping handling? Is it a plus, but should ? What does the specification say about L2 ping handling? I have no idea. We have tested this against any number of phones, watches, headsets. And the reliability seems extremely high. Some things do go to sleep after a while, having nothing to do with this. Like if it's a pair of cheap headphones or good headphones, sometimes they'll say, I'm not connected to a phone, and they'll kind of go into a really low power mode where they don't respond to these pings. iPhone 4s go to sleep in about 20 minutes. Yeah. By and large, they will respond, assuming they're responding to anything. And everything new stays up forever. Yeah. Have you used Blue Hydra with BLE what? With the Adafruit tool. Oh, with the Adafruit tool. No. No, I have not. And it wasn't really written to do that, was it? Well, so the Adafruit Bluetooth sniffer is a Bluetooth low energy sniffer similar to an Ubertooth one. I have an Ubertooth one, quite a few of them, honestly. And so I used what I had sitting at my desk. We also, I was developing it for a customer who wanted to use Ubertooth one, so that that's what I did. There's no reason that it couldn't be added to Blue Hydra to support an Adafruit tool. Right now, I'm actually not doing any passive Bluetooth low energy stuff at all in Blue Hydra, because BLE is pretty chatty to start with. I want to add that, but then I go and write 20 line shell scripts that turn into talks at DEF CON, so I'll get there, honest, or I will accept your pull request. One of those two. Yeah. Glasses. So you're saying that the low power, is that like Bluetooth LE, or is that something different with the low power? So Bluetooth low energy isn't, it's low power as in the CPU can power down for long periods of time, the radio can power down for long periods of time without, you know, breaking the connection or breaking whatever it's doing. The actual, like, transmit power is roughly the same. It's class 1, class 2, class 3. They're not like weaker, they're not shorter range. It's talking about the sleep cycles and the power down states that they're able to maintain, and that's what makes it Bluetooth smart, or Bluetooth low energy. I will tell you. Or just Bluetooth 4. The one thing that scares me a bit about Bluetooth, and I just threw this back up. If I get your BSS ID. This is the number of you that didn't turn off your Bluetooth. Yeah. If I get your wireless BSS ID, your MAC address, I have a MAC address. I know by OUI look up that it might be a Dell or an Apple or a, you know, Huawei. With this, I'm looking at you guys. I mean, I'm literally pulling your name, your phone, your Fitbit, your information. And unfortunately, I haven't found a way, and I'm sure there may be a way in the underlying capabilities, but watches, I have a Samsung S3, I've got the Apple watch, I've got a couple. You can't change the name. It's based on the user name of the account that you set it up with. So Rick's Apple watch comes up whenever Rick's Apple watch is around. And that bugs the crap out of me because of exactly this screen. This is a security conference. Now, granted, I don't think we're supposed to use the term muggles anymore. But there's a lot of muggles here that have no idea what security is, and they're here because it's really cool to be at DEF CON. Tourists. Tourists, muggles, whatever you want to call them. But that being said, there's a lot of shit going up on the, oh, going up on that screen that's extremely personal in terms of security. Information. That scares me a hell of a lot more than a BSS ID of you knowing I have a Dell laptop. Yeah, me and 45 other people in the room. Yeah, the database on this tool is pretty fun, too, but this isn't a Blue Hydra talk. Yeah? So you said that you have to have four of the pairs there. Since most people's Mac address, their Bluetooth and their Mac are almost the same except for the last character, did you have four sets that aren't the last character? Right. So the question is, because a lot of phones have sequential Mac addresses across Bluetooth and Wi-Fi, could you use that to figure out things? And the answer is, hell yes. And the answer is, I've been begging for somebody who can actually code to make that a Kismet plug-in for a long time, because Kismet actually can see the Wi-Fi stuff, and then it can see the Bluetooth stuff, but it's only going to see, like, what's in discoverable mode and whatnot. But if you wrote a tool that literally saw, okay, Wi-Fi Mac address, this is a client device, I'm going to ping one up and one down just for the sake of argument and see if I find a Bluetooth device, that's a totally legitimate thing to do, and it's great. The one caveat there is the Mac addresses for Wi-Fi are kind of starting to get random. This isn't a Wi-Fi talk, but that is a thing. Right now, everyone, everyone, everyone, I don't care what your marketing department says, crapple, is bad at this. Okay? Apple specifically adds an extra element to each one of their packets that has a randomized Mac address that tells you what the original Mac address was. Good fucking design. And Android has this supported, except for it also has to be supported by the chipset, and almost none of them are. I think last time somebody did a poll of which Android phone support it was, the answer was, like, one. So we're slowly moving towards that. Actually, if you want it, Windows 10 and Network Manager in Linux do a great job of randomizing the Mac address, and that is the exhaustive list. So be embarrassed, but you're going to be surprised because Windows beat us to the punch on good security. Actually, seriously, that's pretty cool. But yeah, you can, if you catch a legitimate Mac address, do the one up, one down thing. It's getting harder, but it is definitely still a thing. Second row. Is that the last octet? Usually the last octet is the one that is changing. Again, not every phone has exactly serialized Mac addresses. Some of them have completely different ones. A lot of companies just don't re-burn the Mac addresses. Apple for a long time was famous for re-burning them to be serialized, and apparently the new ones aren't. No, they're not. So what you're going to get out of that may or may not be amazing, but it's still a whole lot better than not trying, as this tool proves. Try. Don't just say it's not possible. Try. Sometimes you come up with something that's crap and it's funny. There is no try. There is no try. Do. Do and see if it works. If you want to play with these tools. Please feel free to do so. Install Pentoo. Install Pentoo. Hey, what's the passphrase to the open network for the CTF? It's down. If it were up, what would it be? Install Pentoo. It's down. It's down. The passphrase is install Pentoo. Maybe the knock team can help me set it up again. I don't know. I'm pretty stupid. Yeah, he is. I am. It's true. Well, thank you for sitting through our dravel. Thank you. Thank you for sitting through our dravel. Appreciate it.