1 00:00:00,000 --> 00:00:06,520 Okay, this is Bluetooth Smells Like Chicken, and I am Dominic Spill, and that's me. 2 00:00:07,340 --> 00:00:11,540 I am affiliated with Imperial College London, although they do not know that I'm here. 3 00:00:13,320 --> 00:00:18,100 And so that's the email address in case you want to email me and ask me questions later, 4 00:00:18,180 --> 00:00:20,080 and you don't get a chance at the end of the talk. 5 00:00:21,640 --> 00:00:22,180 How's it going? 6 00:00:24,340 --> 00:00:25,940 I haven't actually tested this yet. 7 00:00:25,940 --> 00:00:33,260 Yeah, I'm Mark. I'm currently unemployed, so no affiliation, thankfully. 8 00:00:34,680 --> 00:00:40,580 And I have just finished my Master's in Computer Science, and that was on Bluetooth. 9 00:00:42,340 --> 00:00:44,360 And that's how I met Dominic and the others. 10 00:00:44,440 --> 00:00:52,280 And I'm Mike. I do wireless communication security research for the United States Department of Commerce 11 00:00:52,280 --> 00:00:54,800 at the Boulder Labs in Colorado. 12 00:01:03,300 --> 00:01:09,000 And I'm required to tell you that the United States government has no official position on any of this. 13 00:01:09,280 --> 00:01:13,660 And in general, what we're describing today is some stuff that has worked for us 14 00:01:13,660 --> 00:01:16,880 and is not necessarily the best solution for any particular problem. 15 00:01:17,240 --> 00:01:19,720 But we think it's cool stuff, and we hope you will, too. 16 00:01:21,300 --> 00:01:23,200 And I guess I'm going to get up to do this. 17 00:01:23,240 --> 00:01:23,540 Take your breath. 18 00:01:26,460 --> 00:01:34,720 So sniffing Bluetooth is hard, and that's why it's an intriguing problem for us. 19 00:01:35,180 --> 00:01:38,220 It is something we're trying to make easier. 20 00:01:40,240 --> 00:01:44,480 Bluetooth, as you guys all know, is a personal area networking technology 21 00:01:44,480 --> 00:01:50,260 that operates in the 2.4 gigahertz band, and it is a frequency-hopping spread-spectrum system. 22 00:01:50,800 --> 00:01:55,900 And it is this frequency-hopping that is the principal reason that sniffing is hard. 23 00:01:56,620 --> 00:02:03,840 There are a lot of different spread-spectrum techniques, like 802.11, for example, uses spread-spectrum. 24 00:02:04,580 --> 00:02:09,140 But the particular type that Bluetooth uses is frequency-hopping, 25 00:02:09,160 --> 00:02:12,460 where it just operates on one relatively narrow band at a time 26 00:02:12,460 --> 00:02:14,360 and then jumps around to all these different bands. 27 00:02:15,480 --> 00:02:18,600 It jumps around through 79 channels. 28 00:02:18,800 --> 00:02:20,800 Each channel is 1 megahertz wide. 29 00:02:22,580 --> 00:02:24,460 And for reference... 30 00:02:24,460 --> 00:02:25,720 So basically... 31 00:02:25,940 --> 00:02:30,340 We have this 79-megahertz band that's carved up into 1 megahertz chunk. 32 00:02:31,140 --> 00:02:37,100 And 802.11b and 802.11g operate in 20 megahertz bands. 33 00:02:37,440 --> 00:02:39,640 So they sort of spread out their entire... 34 00:02:39,640 --> 00:02:45,920 A single packet spreads out across 20 megahertz and uses all of that at once. 35 00:02:47,080 --> 00:02:50,020 But what Bluetooth does is it just uses 1 megahertz at once, 36 00:02:50,140 --> 00:02:55,600 but it jumps around across about four times as much bandwidth as 802.11 does. 37 00:02:55,940 --> 00:02:59,060 So a radio that can receive 802.11 traffic 38 00:02:59,060 --> 00:03:04,640 only has to be able to process and receive 20 megahertz of bandwidth. 39 00:03:04,900 --> 00:03:09,500 A radio that receives Bluetooth has to either hop around 40 00:03:09,500 --> 00:03:12,440 or it has to receive all 79 channels, 41 00:03:12,580 --> 00:03:14,460 which is a lot of bandwidth and difficult to deal with. 42 00:03:16,000 --> 00:03:21,460 The frequency-hopping happens 1,600 times per second in most situations. 43 00:03:21,960 --> 00:03:24,480 And basically... 44 00:03:27,440 --> 00:03:32,620 Every 625 microseconds, a new packet slot occurs. 45 00:03:32,920 --> 00:03:39,160 And that packet, that entire packet, goes all on one packet. 46 00:03:39,380 --> 00:03:40,540 Sorry, on one channel. 47 00:03:40,920 --> 00:03:46,680 And then the next time there's a packet, which may be as soon as 625 microseconds later, 48 00:03:47,360 --> 00:03:48,860 it selects a new channel. 49 00:03:51,280 --> 00:03:54,300 Now, there's a clock that's just a free-running counter. 50 00:03:54,300 --> 00:03:55,840 It's just a counter in every Bluetooth device. 51 00:03:56,080 --> 00:03:59,920 It's just a counter that increments 3,200 times per second. 52 00:04:00,140 --> 00:04:04,380 And the hops happen on every other clock cycle. 53 00:04:04,800 --> 00:04:10,380 The master device in a Bluetooth PicoNet provides the clock for the entire PicoNet. 54 00:04:10,540 --> 00:04:15,200 So when you have, say, a Bluetooth headset connected to a Bluetooth cell phone, 55 00:04:15,920 --> 00:04:20,240 generally the cell phone would be the master and the headset would be the slave. 56 00:04:20,520 --> 00:04:24,280 And once they've synchronized and they're connected, 57 00:04:24,300 --> 00:04:26,060 they are a PicoNet. 58 00:04:26,240 --> 00:04:29,060 And at that point, they're both using the same hopping sequence 59 00:04:29,060 --> 00:04:32,800 because they're both synchronized to the master's clock. 60 00:04:33,440 --> 00:04:35,900 They're also synchronized to the master's address. 61 00:04:36,180 --> 00:04:41,280 The BDADDR is the Bluetooth device address. 62 00:04:41,620 --> 00:04:43,180 And it's a MAC address. 63 00:04:43,500 --> 00:04:46,760 Every Bluetooth device has one of these assigned. 64 00:04:47,080 --> 00:04:50,380 And it's carved up into multiple sections. 65 00:04:50,760 --> 00:04:53,300 The NAP is... 66 00:04:54,300 --> 00:04:56,220 It's called the non-significant address part, 67 00:04:56,420 --> 00:04:59,460 which is a little weird because it's the most significant bits. 68 00:05:01,280 --> 00:05:03,880 But it's non-significant in other ways. 69 00:05:04,460 --> 00:05:07,280 In fact, most of the work that we've been doing, 70 00:05:07,300 --> 00:05:10,300 we've been kind of ignoring the NAP until very recently 71 00:05:11,520 --> 00:05:14,900 because you can do pretty much all the stuff that we're doing 72 00:05:14,900 --> 00:05:17,400 just with knowledge of the LAP and the UAP. 73 00:05:17,680 --> 00:05:22,140 The hopping sequence is derived from the master's LAP and UAP, 74 00:05:22,240 --> 00:05:23,280 but not the NAP. 75 00:05:24,300 --> 00:05:27,260 The NAP is non-significant for the purposes of a lot of stuff. 76 00:05:27,580 --> 00:05:29,360 The UAP is the upper address part, 77 00:05:29,500 --> 00:05:31,100 and the LAP is the lower address part. 78 00:05:31,580 --> 00:05:37,040 So that's just the different portions of the MAC address. 79 00:05:37,780 --> 00:05:40,300 And the LAP is transmitted... 80 00:05:41,020 --> 00:05:42,300 I don't need to go into this. 81 00:05:42,480 --> 00:05:43,560 No, I can cover this. 82 00:05:43,600 --> 00:05:44,420 Yeah, you'll cover that. 83 00:05:48,480 --> 00:05:51,520 All right, so you want to sniff Bluetooth traffic, 84 00:05:51,520 --> 00:05:54,780 and with 82.11, you just throw your card, 85 00:05:54,860 --> 00:05:58,920 whichever card you've got, into monitor mode or promiscuous mode, 86 00:05:59,120 --> 00:06:01,500 and anything on that channel, you grab. 87 00:06:01,760 --> 00:06:05,680 But as Mike said, you can't do that with Bluetooth 88 00:06:05,680 --> 00:06:07,060 because it's frequency hopping, 89 00:06:07,160 --> 00:06:09,140 and you need to know which channel you need to be on. 90 00:06:10,100 --> 00:06:14,160 So the options are hop around and somehow work out how you hop 91 00:06:14,160 --> 00:06:18,880 or capture everything with really wideband hardware that's expensive. 92 00:06:20,060 --> 00:06:23,600 We picked the second option because expensive hardware is cool. 93 00:06:25,380 --> 00:06:28,560 There are basically three devices that you can use. 94 00:06:28,700 --> 00:06:31,840 There's a protocol analyzer that's about $10,000. 95 00:06:33,440 --> 00:06:35,820 It's made by a company who I won't mention right now. 96 00:06:36,020 --> 00:06:39,500 But that is great for debugging Bluetooth devices. 97 00:06:39,680 --> 00:06:42,780 If you're building a Bluetooth device and it's not working as you think, 98 00:06:42,960 --> 00:06:46,080 then their product is fantastic for what it does. 99 00:06:46,220 --> 00:06:47,980 But it's not going to sniff arbitrary traffic 100 00:06:47,980 --> 00:06:50,500 from anyone in the area or anything like that. 101 00:06:50,580 --> 00:06:53,380 It's designed for a very specific set of conditions. 102 00:06:54,640 --> 00:06:56,220 Then there's Bluetooth dongles. 103 00:06:56,960 --> 00:07:00,920 I assume most people in this room have a Bluetooth device of some sort. 104 00:07:02,340 --> 00:07:03,820 Otherwise, what the hell are you doing here? 105 00:07:05,200 --> 00:07:07,360 They're about $10. You've all seen them. 106 00:07:07,400 --> 00:07:08,600 We've got a Holo plugged in here. 107 00:07:08,900 --> 00:07:10,580 They're USB. They're that big. 108 00:07:11,940 --> 00:07:12,980 They're all over the place. 109 00:07:14,760 --> 00:07:16,780 And it would be really great to be able to use them. 110 00:07:16,780 --> 00:07:19,060 But they're designed to implement Bluetooth. 111 00:07:19,220 --> 00:07:20,640 They're not designed to be really wideband. 112 00:07:20,760 --> 00:07:22,800 They're designed to actually do this hopping that we're talking about. 113 00:07:23,380 --> 00:07:25,900 So you have to get in them and do a whole lot of stuff, 114 00:07:26,040 --> 00:07:27,660 which Mark will talk about later. 115 00:07:28,060 --> 00:07:31,840 And then there's the USRP, which is this box at the front. 116 00:07:31,980 --> 00:07:32,820 Do you want to just hold it up? 117 00:07:33,140 --> 00:07:34,760 I don't know if anyone's seen one before. 118 00:07:34,880 --> 00:07:37,580 It's a software-defined radio, and it's about $1,000. 119 00:07:40,260 --> 00:07:43,380 So you want to use the protocol analyzer for sniffing traffic. 120 00:07:44,060 --> 00:07:45,080 You can either buy it, 121 00:07:45,080 --> 00:07:46,940 or you can steal it. 122 00:07:47,220 --> 00:07:50,260 But neither of those are particularly great 123 00:07:50,260 --> 00:07:52,120 for being legal or cheap, 124 00:07:53,160 --> 00:07:54,660 which is my preferred method. 125 00:07:56,140 --> 00:07:57,580 I've already discussed what else it does. 126 00:07:59,480 --> 00:08:02,040 The Bluetooth devices, they're designed to go on one channel. 127 00:08:02,180 --> 00:08:03,920 They have this custom firmware. 128 00:08:04,040 --> 00:08:06,240 It's a custom CPU in there. 129 00:08:07,440 --> 00:08:09,120 You really don't want to get into it. 130 00:08:10,960 --> 00:08:12,040 You can vouch for that. 131 00:08:13,200 --> 00:08:13,900 Software radio. 132 00:08:15,500 --> 00:08:17,720 USRP gives us 8 megahertz of bandwidth. 133 00:08:17,960 --> 00:08:20,340 Now, that's obviously significantly less than the 80, 134 00:08:20,460 --> 00:08:21,320 but it's a start. 135 00:08:21,620 --> 00:08:23,160 So we might be able to do something with this. 136 00:08:23,280 --> 00:08:25,660 And the USRP2, which came out midway through this work, 137 00:08:25,840 --> 00:08:27,320 gives us significantly more, 138 00:08:27,460 --> 00:08:29,500 and we've incorporated that into what we do. 139 00:08:31,160 --> 00:08:34,060 But we have to do all our signal processing in software. 140 00:08:35,080 --> 00:08:37,860 So we don't have a device that we can just tune to a channel and listen. 141 00:08:38,020 --> 00:08:41,360 We have to do some serious post-processing on that. 142 00:08:41,580 --> 00:08:43,400 And that's where this project comes in. 143 00:08:45,220 --> 00:08:47,100 So I want to sniff a single channel. 144 00:08:47,260 --> 00:08:49,420 Let's see if we can get some data as devices hop past. 145 00:08:51,260 --> 00:08:52,140 All right. 146 00:08:52,600 --> 00:08:55,820 This is a Bluetooth packet in an oscilloscope. 147 00:08:56,040 --> 00:08:59,860 It took me months, six months to find that. 148 00:09:00,920 --> 00:09:03,020 I spent what I thought was about a month 149 00:09:03,020 --> 00:09:05,500 sniffing my own CPU clock, which was 2.4 gigahertz. 150 00:09:09,300 --> 00:09:12,380 And just an example of how bad at signal processing I really am. 151 00:09:12,500 --> 00:09:14,300 I discovered that it wasn't my CPU clock, 152 00:09:14,300 --> 00:09:16,080 only, what, three hours ago? 153 00:09:16,460 --> 00:09:18,840 And we discovered I was actually sniffing the internal clock 154 00:09:18,840 --> 00:09:20,640 of the device I was using to sniff. 155 00:09:25,020 --> 00:09:26,820 Yeah, that is epic fail. 156 00:09:28,160 --> 00:09:29,360 But we can get the packet. 157 00:09:29,560 --> 00:09:32,860 And so then we have to look at how the packets are formed. 158 00:09:32,960 --> 00:09:34,540 And this is all given to us in the Bluetooth spec, 159 00:09:34,680 --> 00:09:36,740 which you can go and download from the special interest group. 160 00:09:37,180 --> 00:09:38,880 And it's divided into three parts. 161 00:09:38,980 --> 00:09:41,920 There's an access code at the beginning which lets you know. 162 00:09:41,980 --> 00:09:44,040 It's kind of like the packet. 163 00:09:44,300 --> 00:09:44,680 Header, header. 164 00:09:44,840 --> 00:09:46,320 It lets you know there's a packet coming, 165 00:09:46,560 --> 00:09:48,560 and it tells you which channel it's on 166 00:09:48,560 --> 00:09:52,280 and which device it's come from or going to. 167 00:09:52,760 --> 00:09:55,000 Then there's a header which contains all the standard stuff 168 00:09:55,000 --> 00:09:56,020 you'd expect in a packet header. 169 00:09:56,860 --> 00:09:59,220 And then there's a payload which carries your data. 170 00:10:00,940 --> 00:10:06,920 The access code is derived from a 6430 BCH code from the LAP, 171 00:10:07,060 --> 00:10:09,920 which basically means it's an error check on the LAP. 172 00:10:10,180 --> 00:10:13,840 And just for good measure, they stuff the LAP in there as well. 173 00:10:13,840 --> 00:10:16,420 So you don't really have to perform the error check 174 00:10:16,420 --> 00:10:17,820 unless you are worried about noise. 175 00:10:18,340 --> 00:10:22,920 So we can capture a single packet and grab the lower address part. 176 00:10:23,080 --> 00:10:25,040 As you saw before, that's half your MAC address. 177 00:10:26,480 --> 00:10:29,660 So devices in non-discoverable mode don't respond to inquiries. 178 00:10:30,000 --> 00:10:32,620 But all you need is this MAC address to talk to them. 179 00:10:32,680 --> 00:10:34,760 So we've got half of it with one single packet. 180 00:10:35,160 --> 00:10:37,200 And as you can probably expect, 181 00:10:37,460 --> 00:10:40,280 all your devices are transmitting stuff all the time. 182 00:10:40,800 --> 00:10:42,100 They are not quiet devices. 183 00:10:42,100 --> 00:10:43,360 They don't go to sleep properly. 184 00:10:44,220 --> 00:10:45,580 So the next thing we want. 185 00:10:45,700 --> 00:10:47,060 Let's keep working up the MAC address. 186 00:10:47,620 --> 00:10:48,900 We have the UAP. 187 00:10:50,720 --> 00:10:52,040 The UAP is a single byte. 188 00:10:52,140 --> 00:10:54,440 It's the third or fourth byte, 189 00:10:54,520 --> 00:10:55,320 depending on which direction you're going. 190 00:10:56,940 --> 00:10:57,760 It's not as simple. 191 00:10:57,900 --> 00:10:59,180 It's not given to us in the packet. 192 00:10:59,420 --> 00:11:00,900 We don't just read it out. 193 00:11:01,080 --> 00:11:04,400 But it is used to initialize the checksums in the packet. 194 00:11:05,160 --> 00:11:07,300 And there are two checksums in some packets 195 00:11:07,300 --> 00:11:08,160 and only one in others. 196 00:11:08,420 --> 00:11:09,580 But there's a checksum on a header 197 00:11:09,580 --> 00:11:11,400 and there's a check on the payload. 198 00:11:11,840 --> 00:11:14,840 And the UAP happens to be used 199 00:11:14,840 --> 00:11:16,260 to initialize both of these checksums. 200 00:11:16,660 --> 00:11:18,800 So we might be able to do something 201 00:11:18,800 --> 00:11:20,860 to retrieve it from these checksums. 202 00:11:25,860 --> 00:11:27,160 There's an added complication. 203 00:11:27,460 --> 00:11:31,780 And this is that the Bluetooth packets 204 00:11:31,780 --> 00:11:33,320 are what they call whitened. 205 00:11:33,520 --> 00:11:36,460 And this means that they're XORed 206 00:11:36,460 --> 00:11:39,000 with a pseudo-random stream of data 207 00:11:39,580 --> 00:11:44,360 to prevent DC offset of the transmitter. 208 00:11:45,180 --> 00:11:46,940 Which is not a term I strictly understand. 209 00:11:47,260 --> 00:11:48,460 But it's something we've got to overcome. 210 00:11:51,320 --> 00:11:53,380 You don't have to understand it to break it. 211 00:11:56,320 --> 00:11:58,400 So that pseudo-random sequence 212 00:11:58,400 --> 00:12:00,500 is seeded by the current clock value 213 00:12:00,500 --> 00:12:02,320 at the time of transmitting the packet. 214 00:12:07,380 --> 00:12:09,460 The bad news is I'm going to interrupt the talk. 215 00:12:09,580 --> 00:12:11,100 The good news is I'm going to keep it short. 216 00:12:16,640 --> 00:12:19,380 There has been an almost epidemic outbreak 217 00:12:19,380 --> 00:12:22,760 of the stupids over the last 24 hours. 218 00:12:25,260 --> 00:12:28,280 You need to police yourselves. 219 00:12:29,660 --> 00:12:31,360 You are not 13 anymore. 220 00:12:31,920 --> 00:12:33,300 You are supposed to be adults. 221 00:12:34,560 --> 00:12:36,420 And you are supposed to be in the top 10% 222 00:12:36,420 --> 00:12:38,940 in terms of IQ in the United States. 223 00:12:40,620 --> 00:12:41,840 In the last 24 hours, 224 00:12:41,920 --> 00:12:43,220 I've been flashing back to DEFCON 9. 225 00:12:44,740 --> 00:12:45,240 Stop it. 226 00:12:46,620 --> 00:12:47,480 We like it here. 227 00:12:48,440 --> 00:12:49,480 We want to stay here. 228 00:12:50,460 --> 00:12:51,800 If you do not want to stay here, 229 00:12:51,920 --> 00:12:53,640 don't come and fuck it up for the rest of us. 230 00:12:55,500 --> 00:12:56,280 That's all I got to say. 231 00:13:06,520 --> 00:13:06,940 Okay. 232 00:13:07,280 --> 00:13:07,700 Okay. 233 00:13:08,820 --> 00:13:09,780 Where was I? 234 00:13:10,820 --> 00:13:11,240 Sorry. 235 00:13:12,140 --> 00:13:12,560 Whitening. 236 00:13:12,780 --> 00:13:15,020 I think you were fucking it up for the rest of us. 237 00:13:16,100 --> 00:13:17,520 Oh yeah, I was. 238 00:13:18,480 --> 00:13:18,900 Right. 239 00:13:20,840 --> 00:13:21,800 Oh yeah, whitening. 240 00:13:21,940 --> 00:13:24,400 Okay, so we take the six bits of the clock, 241 00:13:24,860 --> 00:13:26,260 or six of the bits of the clock. 242 00:13:26,260 --> 00:13:31,600 clock. It's a 27-bit clock, loops every 24 hours. So we take the lowest 6 bits and we 243 00:13:31,600 --> 00:13:35,000 un-mighten. Now, as you may expect, we don't know the MAC address of the device. It's a 244 00:13:35,000 --> 00:13:41,280 fair chance we don't know what its internal CPU clock value is. So what we do is we just 245 00:13:41,280 --> 00:13:45,960 brute force it. It's only 64 combinations. It's going to be fairly straightforward. And 246 00:13:47,940 --> 00:13:51,160 then there's some forward error correction, but that actually helps us eliminate the noise. 247 00:13:51,160 --> 00:13:59,500 So that's great for us. So we do the whole thing in reverse. We take those 64 candidate clock 248 00:13:59,500 --> 00:14:06,860 values. We un-mighten the packet. And then we reverse the checksum process. And we just run 249 00:14:06,860 --> 00:14:14,980 the algorithm in reverse. And that gets us out 64 candidate UAPs. And it turns out, for some 250 00:14:14,980 --> 00:14:21,140 bizarre reason, it gets us 16? 16 candidate UAPs. The same 16 candidates are going to be 251 00:14:21,140 --> 00:14:25,580 getting 16 candidate UAPs four times. And for every packet with that UAP, it will get us the 252 00:14:25,580 --> 00:14:34,760 same set of 16 candidate UAPs, which is slightly annoying, but not fatal. So then we go on and we 253 00:14:34,760 --> 00:14:40,200 go through the payload. And we reverse the payload checksum. And the great thing about that 254 00:14:40,200 --> 00:14:46,120 is that it's actually a 2-byte checksum. So we have a byte of 0 and a byte of the UAP. So we 255 00:14:46,120 --> 00:14:50,520 can be fairly sure when that's un-mightened. And there's a 1 in a really big number chance that 256 00:14:51,140 --> 00:14:55,740 we'll get a collision. And it's a 1 in a really big number chance, but it happens. I've seen it 257 00:14:55,740 --> 00:15:02,300 happen. Hopefully it won't happen during the demo, he says, jinxing it. So hopefully out of that 258 00:15:02,300 --> 00:15:08,820 we get a single UAP. And I think we're going to give that a try. So do you want to run the demo 259 00:15:08,820 --> 00:15:14,400 and I'll talk about it? Sure. Okay. I'll just talk you through what Mike's doing. I can see 260 00:15:14,400 --> 00:15:21,120 it. Do a UAP CRC keyboard. Okay. So we're going to run the demo and I'll talk about it. 261 00:15:21,140 --> 00:15:27,880 We're basically looking for the UAP by checking the CRC on both the header and the payload. And 262 00:15:27,880 --> 00:15:49,340 we're doing it. Turn around. This is what happens when you try live demos. Sorry. Okay. Wow. 263 00:15:49,800 --> 00:15:50,160 Okay. 264 00:15:53,560 --> 00:16:00,920 That was actually the demo of the next fantastic thing we were able to do. But let's start off 265 00:16:00,920 --> 00:16:04,660 here. If we scroll back up. Do you want to just highlight it with the mouse? Where it found the 266 00:16:05,620 --> 00:16:13,000 Okay. So just highlight this. So we went through six packets. And does that make it more 267 00:16:13,000 --> 00:16:18,020 readable for everybody? Okay. Excellent. We went through six packets. And on the first packet, we 268 00:16:18,020 --> 00:16:20,740 managed to drop from 64 to 54 candidates. 269 00:16:21,140 --> 00:16:26,940 So that's a lot of UAPs and candidate clock values. And then we kept reducing that for five more 270 00:16:26,940 --> 00:16:33,000 packets. And at one point, we got a CRC confirmation. And so we found out that given that we 271 00:16:33,000 --> 00:16:42,280 already know the LAP of our mobile phone, the UAP of the mobile phone is 0xAF. Own it at will. 272 00:16:42,540 --> 00:16:48,920 And in this particular case, we weren't lucky enough to get a packet that had a CRC, a payload CRC. 273 00:16:49,420 --> 00:16:55,480 Not all packets have them. Only certain packet types. And so the method that he was talking about 274 00:16:55,480 --> 00:17:03,020 on the slide was saying, well, you know, we try a value. We try a clock value. We try a UAP. And we 275 00:17:03,020 --> 00:17:09,220 see if it works. And we see if we get a CRC hit. And if we do, great. Now we have a pretty definitive 276 00:17:09,220 --> 00:17:17,240 answer. But in this case, we never got a CRC. We never got a payload that actually had a CRC. And so 277 00:17:17,240 --> 00:17:26,000 we were still able to determine the UAP not through CRC checks, which would have done it in one packet 278 00:17:26,000 --> 00:17:31,320 that had a CRC. In this case, we did it with six packets that don't have CRCs. But we were able to measure 279 00:17:31,320 --> 00:17:39,680 the relative timing between the packets. And so we could narrow down the clock values because, you know, 280 00:17:39,720 --> 00:17:44,880 if the clock value of one is such and such, then X microseconds later, the clock value is going to be 281 00:17:44,880 --> 00:17:45,860 such and such. Right? 282 00:17:45,940 --> 00:17:46,320 Right. 283 00:17:47,240 --> 00:17:53,120 So we had the ability to take multiple packets and run these checks and narrow it 284 00:17:53,120 --> 00:17:58,960 down within a handful of packets rather than just one that we, if we were lucky enough to get a CRC. 285 00:17:59,160 --> 00:18:05,120 Right. So the correlation between a candidate UAP and the clock value for the whitening actually gives us 286 00:18:05,120 --> 00:18:09,820 the extra information to be able to do that. So the whitening actually helps us to break it. 287 00:18:10,800 --> 00:18:11,540 Which one, Steve? 288 00:18:12,860 --> 00:18:13,820 You want to do another one? 289 00:18:13,960 --> 00:18:14,780 No, I was going to do it. 290 00:18:15,180 --> 00:18:15,620 There. 291 00:18:18,220 --> 00:18:22,960 Okay. So now we have an LAP and a UAP. What can we do? 292 00:18:23,400 --> 00:18:30,780 Well, we can sniff packets. That's all we need to grab the packets, verify that the checksums are correct 293 00:18:30,780 --> 00:18:34,420 because we used them to find the UAP in the first place, so we can use the UAP to find the checksums. 294 00:18:34,980 --> 00:18:41,420 And we can get six bits of the clock, which is part of the way there, but there's still another 21 bits to go. 295 00:18:42,640 --> 00:18:44,120 And that's quite a lot to brute force. 296 00:18:44,120 --> 00:18:49,120 But as you probably saw from the demo already, we were able to get that. 297 00:18:49,920 --> 00:18:51,880 So do you want to just flick that? 298 00:18:52,140 --> 00:18:53,260 Do you want to do the... 299 00:18:53,260 --> 00:18:53,720 Yeah. 300 00:18:54,080 --> 00:18:54,360 The... 301 00:18:54,360 --> 00:18:54,960 Yeah. 302 00:18:55,060 --> 00:18:55,340 Yeah. 303 00:18:56,260 --> 00:19:03,460 So if we scroll down in this, what you'll notice is that we were able to retrieve the clock value by doing exactly the same thing, 304 00:19:04,300 --> 00:19:11,760 finding packets, measuring the time gaps between them, and just finding a place that fits into the pseudo-random hopping sequence. 305 00:19:12,420 --> 00:19:12,720 Okay. 306 00:19:12,720 --> 00:19:14,580 But I was wondering if you wanted to do... 307 00:19:14,580 --> 00:19:15,120 Yeah, go for it. 308 00:19:15,240 --> 00:19:15,640 Yeah. 309 00:19:16,560 --> 00:19:17,000 Yeah. 310 00:19:17,080 --> 00:19:18,000 Why don't you talk about it? 311 00:19:18,180 --> 00:19:18,600 Okay. 312 00:19:19,320 --> 00:19:26,420 We're going to trade up here and let Dominic see if he can have more success at the demos than I am... than I had. 313 00:19:26,660 --> 00:19:30,600 We want to show you something that we just learned about the other day. 314 00:19:32,040 --> 00:19:32,480 The... 315 00:19:34,440 --> 00:19:41,820 One of the things you can do when you know a MAC address is actually connect to a device and do something like an L2 ping, 316 00:19:41,820 --> 00:19:43,920 which is what Dominic's about to do here. 317 00:19:44,460 --> 00:19:52,660 He's got a couple of different dongles plugged into this laptop, and he's using one of them to ping the other one. 318 00:19:52,940 --> 00:19:55,220 So he's doing an over-the-air L2 ping. 319 00:19:55,880 --> 00:20:02,420 It's just a real easy way to verify connectivity between the two Bluetooth devices. 320 00:20:03,000 --> 00:20:05,780 And if you know a MAC address, you can do this. 321 00:20:08,000 --> 00:20:11,340 But Josh Wright noticed recently... 322 00:20:13,700 --> 00:20:21,380 That you can do this even if you have the wrong non-significant address part. 323 00:20:21,600 --> 00:20:22,240 Check this out. 324 00:20:22,880 --> 00:20:23,420 Okay. 325 00:20:23,460 --> 00:20:25,840 So now we're pinging an incorrect MAC address. 326 00:20:27,160 --> 00:20:32,660 You can put garbage in those first two octets of the MAC address there. 327 00:20:33,080 --> 00:20:39,800 And it doesn't matter because at this layer, at this part of the protocol, the NAP is non-significant. 328 00:20:39,820 --> 00:20:40,640 It's completely ignored. 329 00:20:41,120 --> 00:20:41,800 Okay. 330 00:20:41,820 --> 00:20:48,380 So this is kind of interesting because it means that all the work that we've done to figure out what the UAP is, 331 00:20:49,380 --> 00:20:53,580 it kind of doesn't matter anymore because you can just brute force it. 332 00:20:53,780 --> 00:21:00,420 Once you know the LAP, there are only 256 UAPs that you have to try, right? 333 00:21:00,840 --> 00:21:03,600 Because it doesn't matter what you type in as the NAP. 334 00:21:04,020 --> 00:21:08,700 And this is the kind of stuff you can learn if you take Josh Wright out for sushi. 335 00:21:12,740 --> 00:21:18,740 But we still like our techniques because our techniques are a way to accomplish the same thing completely passively 336 00:21:18,740 --> 00:21:24,480 and relatively quickly, like in a few packets that happen in, say, a few milliseconds, 337 00:21:26,020 --> 00:21:34,420 versus a brute force that, at least using the command line tools, a brute force that I ran took like 90 minutes. 338 00:21:34,960 --> 00:21:37,960 It should be possible to speed that way up. 339 00:21:37,960 --> 00:21:41,700 But it's slower, and it's an active attack. 340 00:21:42,000 --> 00:21:45,280 And, of course, it's nice sometimes to be able to do passive stuff. 341 00:21:46,660 --> 00:21:47,560 It's you again. 342 00:21:47,680 --> 00:21:48,420 It's me again. 343 00:21:48,560 --> 00:21:49,160 I'm up. 344 00:21:49,340 --> 00:21:49,620 Yeah. 345 00:21:49,680 --> 00:21:50,020 You're up. 346 00:21:51,340 --> 00:21:51,940 Okay. 347 00:21:52,080 --> 00:21:59,660 So we would like, so far everything we've been showing you is just using a single channel. 348 00:22:00,020 --> 00:22:07,940 We have the USRP up here tuned to one particular channel of the 17. 349 00:22:07,940 --> 00:22:12,640 And that allows us to get some packets, which is great. 350 00:22:13,420 --> 00:22:16,740 It gives us kind of a survey of the traffic that's in the area. 351 00:22:19,180 --> 00:22:21,000 And that's very helpful. 352 00:22:21,060 --> 00:22:22,720 It lets us discover the LAPs there. 353 00:22:22,800 --> 00:22:24,300 It lets us discover the UAPs. 354 00:22:24,460 --> 00:22:33,220 But it sure would be nice if we could actually get more traffic and preferably all the traffic that's out there on a particular PicoNet, for example. 355 00:22:33,820 --> 00:22:37,900 So the most straightforward way to do that, to extend to several channels, 356 00:22:37,900 --> 00:22:42,560 is just to run our tool many times. 357 00:22:42,860 --> 00:22:48,520 If we take the input from the USRP, Dominic mentioned that we get 8 megahertz of bandwidth. 358 00:22:49,340 --> 00:22:58,740 We can take that same 8 megahertz of input and de-multiplex it by just running it through our code eight times with different down conversion frequency. 359 00:22:59,200 --> 00:23:05,120 And that allows us to, in software, tune to those eight different channels. 360 00:23:05,300 --> 00:23:07,880 And we can run it. 361 00:23:07,900 --> 00:23:10,660 Eight separate decoding threads. 362 00:23:10,940 --> 00:23:13,740 And away we go. 363 00:23:15,220 --> 00:23:17,240 That technique does work. 364 00:23:18,480 --> 00:23:22,420 It lets us get 8 channels at a time with the USRP. 365 00:23:22,720 --> 00:23:25,980 It also lets us get 25 channels at a time with the USRP, too. 366 00:23:26,460 --> 00:23:28,460 That's a pretty good chunk of channels. 367 00:23:29,380 --> 00:23:30,720 Can we get all 79? 368 00:23:31,020 --> 00:23:33,440 Well, we could if you happen to have a pile of these things. 369 00:23:33,880 --> 00:23:36,460 If you have 4 USRP2s, 370 00:23:36,460 --> 00:23:38,520 or 10 USRPs, 371 00:23:38,520 --> 00:23:39,800 you could theoretically do this. 372 00:23:40,080 --> 00:23:47,360 But realize you're dealing with an incredible amount of very high bit rate 373 00:23:47,360 --> 00:23:53,740 of data that's coming from the device, the USRP or the USRP2, 374 00:23:53,920 --> 00:23:55,840 to your host computers. 375 00:23:56,300 --> 00:24:00,860 And you are going to need multiple hosts to be able to do this. 376 00:24:03,220 --> 00:24:04,260 Roughly speaking, 377 00:24:04,680 --> 00:24:06,440 we get a little better than this. 378 00:24:06,460 --> 00:24:07,420 But roughly speaking, 379 00:24:07,700 --> 00:24:11,740 we can decode one channel per CPU core. 380 00:24:12,580 --> 00:24:16,560 So in this laptop here that has two CPU cores, 381 00:24:16,800 --> 00:24:22,720 I can do this and I can decode two channels in real time simultaneously. 382 00:24:23,360 --> 00:24:25,960 But if I go more than two channels, 383 00:24:26,180 --> 00:24:27,840 if I try to do eight, for example, 384 00:24:28,020 --> 00:24:30,840 I start not keeping up with the traffic. 385 00:24:30,960 --> 00:24:32,700 And so I can't do it in real time. 386 00:24:32,860 --> 00:24:33,940 I can post process. 387 00:24:33,940 --> 00:24:36,440 I can save the raw waveform to file. 388 00:24:36,660 --> 00:24:40,000 And then slowly post process later and decode all eight channels. 389 00:24:40,120 --> 00:24:41,500 But if you want to do it in real time, 390 00:24:42,140 --> 00:24:47,720 you need to have in the neighborhood of 79 CPU cores. 391 00:24:48,460 --> 00:24:53,960 And you need a lot of throughput for your USB buses, 392 00:24:54,200 --> 00:24:55,540 gigabit Ethernet buses, 393 00:24:55,700 --> 00:24:58,080 in the case of the USRP2 and so forth. 394 00:25:00,720 --> 00:25:01,740 Your favorite slide. 395 00:25:02,000 --> 00:25:03,660 Oh, I love this slide. 396 00:25:05,100 --> 00:25:07,700 So we gave a presentation on this at SmooCon. 397 00:25:07,820 --> 00:25:09,320 And a question at the end was, 398 00:25:09,600 --> 00:25:11,340 hey, there's an FPGA on board. 399 00:25:11,500 --> 00:25:13,480 Why don't you use the FPGA to demodulate channels? 400 00:25:13,860 --> 00:25:14,940 And I said, that's a great idea. 401 00:25:15,160 --> 00:25:15,980 I'll do that. 402 00:25:18,460 --> 00:25:19,140 Thank you. 403 00:25:20,660 --> 00:25:23,100 Tony is clapping because he knows the progress of my work. 404 00:25:23,960 --> 00:25:26,840 This slide is the entire progress of my work. 405 00:25:31,140 --> 00:25:31,760 There's a... 406 00:25:31,760 --> 00:25:35,580 On the USRP2, there is a huge FPGA. 407 00:25:35,720 --> 00:25:38,140 There's loads of stuff that can be done. 408 00:25:38,360 --> 00:25:44,220 And there are some guys on Thursday giving a whole workshop on FPGA design. 409 00:25:44,400 --> 00:25:47,260 And if they want to get their hands on the USRP2 and do it, 410 00:25:47,320 --> 00:25:48,200 that would be fantastic. 411 00:25:49,560 --> 00:25:52,480 But FPGA design is not something I appear to be good at. 412 00:25:54,300 --> 00:25:56,560 In fact, I appear to be less than good at it. 413 00:25:58,400 --> 00:26:01,100 And there's also debate as to whether we can... 414 00:26:01,100 --> 00:26:01,740 Before we get to the FPGA, 415 00:26:01,740 --> 00:26:02,940 before you demodulate, you have to filter. 416 00:26:04,400 --> 00:26:07,440 And there's some debate as to whether we can get the filtering and demodulation 417 00:26:07,440 --> 00:26:13,660 to all take place for all 79 channels in the single FPGA. 418 00:26:13,820 --> 00:26:18,040 And if we can't do that, then it's sort of pointless to do it 419 00:26:18,040 --> 00:26:21,040 because we have some techniques that are slightly more intelligent now. 420 00:26:22,060 --> 00:26:24,280 So it is something we've thought about and we're working on. 421 00:26:24,320 --> 00:26:28,080 Please, at the end, don't ask about FPGA demodulation 422 00:26:28,640 --> 00:26:31,340 because I'll just curl up into a ball and cry. 423 00:26:33,080 --> 00:26:33,960 Is this me? 424 00:26:34,700 --> 00:26:35,660 I don't remember. 425 00:26:36,000 --> 00:26:36,400 Okay. 426 00:26:36,580 --> 00:26:37,020 Go ahead. 427 00:26:37,160 --> 00:26:38,800 So earlier you may have seen that we... 428 00:26:38,800 --> 00:26:41,560 I jumped ahead a little bit and I was talking about getting the clock. 429 00:26:43,100 --> 00:26:46,240 The clock value is used as input to this frequency hopping. 430 00:26:46,400 --> 00:26:51,740 So as we hop frequency, we work out which channel we're going to use next 431 00:26:51,740 --> 00:26:54,580 by using the UAP... 432 00:26:55,700 --> 00:26:56,580 Yeah, let's get one. 433 00:26:57,720 --> 00:27:00,480 By using the UAP, the LAP, and the current clock value. 434 00:27:00,480 --> 00:27:00,560 Exactly. 435 00:27:00,940 --> 00:27:03,240 And it's not linear. 436 00:27:03,320 --> 00:27:04,760 It is all over the place. 437 00:27:04,820 --> 00:27:06,340 There are some characteristics to it. 438 00:27:06,780 --> 00:27:08,760 It windows and shifts the window. 439 00:27:08,920 --> 00:27:12,240 It jumps about inside a small band and then shifts that band. 440 00:27:12,520 --> 00:27:15,240 But in general, we have the algorithm. 441 00:27:15,340 --> 00:27:19,960 So we thought what we'd do is take the UAP and LAP that we know, 442 00:27:20,660 --> 00:27:24,420 generate the entire hopping pattern, which is about 24 hours long, 443 00:27:25,300 --> 00:27:27,560 and then time the gaps between packets 444 00:27:27,560 --> 00:27:31,860 and work out where in that hopping pattern we are 445 00:27:31,860 --> 00:27:35,700 and therefore which clock value we've got by the gaps between the packets. 446 00:27:36,780 --> 00:27:38,400 And back at the envelope calculation, 447 00:27:38,740 --> 00:27:41,520 I decided this would take five or six packets 448 00:27:41,520 --> 00:27:43,380 and in practice it takes a little bit more. 449 00:27:44,080 --> 00:27:47,000 And in fact, the entire discussion surrounding this is how I met Mike 450 00:27:47,000 --> 00:27:48,760 and how we got on to doing it. 451 00:27:48,960 --> 00:27:51,360 Do we want to demo this or are we going to... 452 00:27:51,360 --> 00:27:52,420 We'll do it with the alias. 453 00:27:52,580 --> 00:27:53,000 Okay. 454 00:27:53,080 --> 00:27:54,080 We'll demo it later. 455 00:27:54,500 --> 00:27:55,780 So ignore that slide. 456 00:27:56,340 --> 00:27:56,740 Okay. 457 00:28:03,300 --> 00:28:06,040 So we're going to combine two demos in one here to save time 458 00:28:06,040 --> 00:28:08,620 and give Mark a chance to talk. 459 00:28:12,000 --> 00:28:13,940 One of the things we'd really like to do 460 00:28:13,940 --> 00:28:17,100 is to be able to snip all 79 channels at once. 461 00:28:17,240 --> 00:28:20,940 And as we've shown you, we have a hard time doing that. 462 00:28:21,800 --> 00:28:25,640 But there's a trick that we use that allows us to do 463 00:28:25,640 --> 00:28:26,640 just that. 464 00:28:27,160 --> 00:28:30,100 And what we do is intentional aliasing. 465 00:28:30,560 --> 00:28:33,340 So those of you who know something about signal processing 466 00:28:34,040 --> 00:28:35,520 probably see this slide and say, 467 00:28:35,620 --> 00:28:36,720 ah, that's how they do it. 468 00:28:37,340 --> 00:28:42,080 And I've in the past sometimes explained in gory detail how this works. 469 00:28:42,280 --> 00:28:46,980 But I'm going to skip straight to the function, 470 00:28:47,320 --> 00:28:49,720 exactly the mechanics of what we do, 471 00:28:50,840 --> 00:28:53,420 instead of just boring you with all the theory. 472 00:28:53,420 --> 00:28:59,780 What we do is we have an antenna in the upper left-hand corner of this diagram. 473 00:29:00,020 --> 00:29:04,760 We have an antenna plugged into this daughterboard in the USRP2. 474 00:29:05,060 --> 00:29:06,580 It's called the RFX 2400. 475 00:29:07,740 --> 00:29:14,100 And in that daughterboard, the signal path goes through an ISM band pass filter. 476 00:29:14,260 --> 00:29:17,260 This is just a band pass filter that's specially designed for the 24... 477 00:29:17,260 --> 00:29:20,340 2.4 gigahertz ISM band, right? 478 00:29:20,640 --> 00:29:22,700 And then it's down converted. 479 00:29:22,700 --> 00:29:24,280 To base band. 480 00:29:24,540 --> 00:29:28,020 So a signal in the neighborhood of 2.4 gigahertz 481 00:29:28,020 --> 00:29:30,160 is now in the neighborhood of 0 hertz. 482 00:29:30,700 --> 00:29:32,640 And then it's low pass filtered, 483 00:29:32,940 --> 00:29:35,800 which is this triangle, empty triangle, 484 00:29:36,120 --> 00:29:37,620 that's an anti-aliasing filter 485 00:29:37,620 --> 00:29:43,200 that prevents different frequencies from clobbering each other in the digital domain. 486 00:29:43,740 --> 00:29:47,260 And so that happens right before the path goes to the ADC, 487 00:29:47,320 --> 00:29:48,760 the Analog to Digital Converter, 488 00:29:48,840 --> 00:29:51,800 which converts the analog signal into the digital signal. 489 00:29:51,800 --> 00:29:55,300 And then passes digital signal to the FPGA. 490 00:29:55,440 --> 00:29:59,060 Now the FPGA has to actually down sample or decimate. 491 00:29:59,340 --> 00:30:01,300 It has to throw out a lot of samples 492 00:30:01,300 --> 00:30:04,260 because there are too many to spit over the gigabit ethernet bus. 493 00:30:04,820 --> 00:30:06,760 The ethernet is not fast enough. 494 00:30:07,000 --> 00:30:11,120 So it has to throw out a lot of the samples that the ADC gives it. 495 00:30:11,180 --> 00:30:13,580 And at that point it has the opportunity to introduce more aliases. 496 00:30:14,840 --> 00:30:16,140 And generally speaking, 497 00:30:16,360 --> 00:30:20,840 when you're developing a software radio sort of device, 498 00:30:21,380 --> 00:30:23,540 you always have these anti-aliasing filters. 499 00:30:23,760 --> 00:30:24,320 Here we have two. 500 00:30:24,440 --> 00:30:28,740 One of them is in hardware on the RFX 2400 daughterboard. 501 00:30:28,920 --> 00:30:31,120 The other one is actually on the FPGA. 502 00:30:31,320 --> 00:30:33,160 So one of them is analog, one of them is digital. 503 00:30:33,320 --> 00:30:35,700 But they're both doing anti-aliasing filtering 504 00:30:35,700 --> 00:30:41,820 that prevents signals on disparate frequencies 505 00:30:41,820 --> 00:30:45,660 from ending up layered on top of each other in the digital domain. 506 00:30:46,000 --> 00:30:48,060 And usually you don't want that. 507 00:30:48,140 --> 00:30:50,820 You don't want those aliases layered on top of each other. 508 00:30:50,840 --> 00:30:54,260 Because it creates more interference when you're trying to decode stuff. 509 00:30:54,560 --> 00:30:57,220 But what we do is we remove, 510 00:30:57,540 --> 00:31:01,760 we bypass the low-pass anti-aliasing filter on the daughterboard. 511 00:31:02,020 --> 00:31:06,680 And we modify the FPGA so that it's not doing its anti-aliasing filtering either. 512 00:31:06,940 --> 00:31:10,380 We leave the ISM band filter intact on the daughterboard 513 00:31:10,380 --> 00:31:13,960 because that gives us only the aliases that we want. 514 00:31:14,160 --> 00:31:18,940 Only the ones that are between 2.4 and 2.483 515 00:31:20,620 --> 00:31:21,140 gigahertz. 516 00:31:21,340 --> 00:31:25,680 And that encompasses, quite nicely, our 79 channels. 517 00:31:26,260 --> 00:31:29,460 So we leave that intact so that we don't get aliases we don't want. 518 00:31:29,680 --> 00:31:32,060 But we do get aliases that we do want. 519 00:31:32,220 --> 00:31:34,740 We get 25 megahertz of bandwidth. 520 00:31:36,880 --> 00:31:41,820 We get 25 contiguous channels layered on top of the next 25 contiguous channels 521 00:31:41,820 --> 00:31:44,260 layered on top of the next 25 contiguous channels. 522 00:31:44,440 --> 00:31:47,100 And it allows us to decode packets 523 00:31:47,100 --> 00:31:50,240 that are on all these different channels. 524 00:31:50,400 --> 00:31:52,880 Now one of the things that, 525 00:31:53,080 --> 00:31:55,800 the reason that people usually don't do intentional aliasing 526 00:31:55,800 --> 00:32:00,420 is because if you have two packets or two signals 527 00:32:00,420 --> 00:32:03,500 on two different channels that are aliases of each other 528 00:32:03,500 --> 00:32:05,060 and they happen at the same time, 529 00:32:05,240 --> 00:32:09,120 then they clobber each other and you lose the ability to decode it. 530 00:32:09,280 --> 00:32:10,600 But we're lucky because in Bluetooth, 531 00:32:10,900 --> 00:32:14,540 the target network is only transmitting one packet at a time. 532 00:32:15,020 --> 00:32:15,540 Right? 533 00:32:15,540 --> 00:32:17,860 So it's only transmitting on one of those aliases 534 00:32:17,860 --> 00:32:24,060 and we don't end up with that problem of aliases clobbering each other. 535 00:32:24,600 --> 00:32:28,880 So as long as there isn't too much noise and interference, 536 00:32:29,200 --> 00:32:32,520 because this technique does amplify the effects of noise and interference, 537 00:32:33,380 --> 00:32:35,260 as long as there isn't too much noise and interference, 538 00:32:35,480 --> 00:32:41,080 this allows us to sniff all the channels of a single pico net. 539 00:32:42,460 --> 00:32:45,040 And if we use the techniques, 540 00:32:45,040 --> 00:32:47,560 that we talked about to recover the clock 541 00:32:47,560 --> 00:32:53,000 and figure out which channel to expect a packet on at a particular time, 542 00:32:53,260 --> 00:32:57,200 then we only have to do the work in our CPU 543 00:32:57,200 --> 00:32:59,800 of decoding one channel at a time. 544 00:32:59,980 --> 00:33:03,080 Even though we're getting 25 channels of bandwidth, 545 00:33:03,320 --> 00:33:05,200 which is multiplied by the aliasing. 546 00:33:05,420 --> 00:33:08,040 So really from our CPU's perspective, 547 00:33:08,140 --> 00:33:09,900 we only have to decode one at a time 548 00:33:09,900 --> 00:33:14,020 and we figure out by aliasing 549 00:33:14,960 --> 00:33:16,800 which channel we're going to look at. 550 00:33:16,940 --> 00:33:18,760 So let me give you a little demo. 551 00:33:40,820 --> 00:33:42,220 I'm going to kind of cheat on this one 552 00:33:42,220 --> 00:33:44,140 and do a demo. 553 00:33:44,320 --> 00:33:45,880 This is actually a waveform. 554 00:33:46,340 --> 00:33:47,680 Instead of doing this live, 555 00:33:48,620 --> 00:33:50,520 I'm going to use a waveform that was captured. 556 00:33:50,740 --> 00:33:53,320 So this is just the raw data that was coming from the USRP2. 557 00:33:53,560 --> 00:33:54,760 At tour camp, actually, 558 00:33:55,420 --> 00:33:57,680 one of our fellow campers had a Wiimote. 559 00:33:57,960 --> 00:34:00,580 And so we were just sniffing the traffic that it was producing. 560 00:34:01,380 --> 00:34:03,220 And so I'm going to run this. 561 00:34:04,600 --> 00:34:07,180 And you'll notice that it found the UAP really quickly 562 00:34:07,180 --> 00:34:08,200 because there was a CRC. 563 00:34:08,460 --> 00:34:09,320 Hey, that was good. 564 00:34:10,120 --> 00:34:12,080 And now it's trying to figure out, 565 00:34:12,220 --> 00:34:15,680 and it's going through all 25 channels, 566 00:34:15,880 --> 00:34:19,260 each of which is aliased to three or four channels in real life. 567 00:34:19,660 --> 00:34:23,000 And notice it keeps trying to calculate the hopping sequence 568 00:34:23,000 --> 00:34:26,560 and it keeps failing and restarting and failing and restarting. 569 00:34:26,600 --> 00:34:29,980 This happens sometimes for a variety of reasons, 570 00:34:30,240 --> 00:34:32,080 some of which are my fault, I'm sure. 571 00:34:36,200 --> 00:34:39,580 But sooner or later, it's going to acquire the clock. 572 00:34:39,860 --> 00:34:40,980 And at that point, 573 00:34:40,980 --> 00:34:42,300 it's going to stop being slow. 574 00:34:42,520 --> 00:34:43,040 Here it is. 575 00:34:43,120 --> 00:34:43,840 It just got the clock. 576 00:34:44,040 --> 00:34:45,160 And now it's spitting out packets. 577 00:34:45,500 --> 00:34:48,280 And notice that it's telling you what the clock value is 578 00:34:48,280 --> 00:34:51,840 and it's telling you what channel a packet occurred on. 579 00:34:52,040 --> 00:34:54,180 And it's spitting out packets at a pretty high rate. 580 00:34:54,460 --> 00:34:57,440 Actually, the Wiimote in this particular example 581 00:34:58,740 --> 00:35:00,640 was not working correctly. 582 00:35:00,940 --> 00:35:02,880 It was like, I don't know, 583 00:35:02,960 --> 00:35:04,460 he was trying to get them connected to each other, 584 00:35:04,560 --> 00:35:10,540 but he wasn't actually getting the accelerometer data streaming very rapidly. 585 00:35:10,980 --> 00:35:14,740 So overall, we have kind of sparse packets. 586 00:35:15,240 --> 00:35:16,600 But we're getting a lot of packets 587 00:35:16,600 --> 00:35:18,280 and they're on the channels we expect them 588 00:35:18,280 --> 00:35:19,900 and they're at the times we expect them. 589 00:35:20,100 --> 00:35:21,560 And once we're to this phase 590 00:35:21,560 --> 00:35:24,020 where we're actually decoding stuff, 591 00:35:24,260 --> 00:35:25,680 and that's the end of the sample, 592 00:35:26,220 --> 00:35:29,980 when we're actually decoding stuff like this, 593 00:35:30,200 --> 00:35:32,840 we're only having to deal with one channel at a time, 594 00:35:32,920 --> 00:35:35,200 and so it's fast and we can actually do this in real time. 595 00:35:35,480 --> 00:35:37,600 We're not in real time during that initial period 596 00:35:37,600 --> 00:35:39,860 where we're discovering the UAP and the clock. 597 00:35:39,860 --> 00:35:41,460 But once we have the UAP and the clock, 598 00:35:41,560 --> 00:35:43,520 we can catch up and do the rest in real time. 599 00:35:52,120 --> 00:35:56,600 Right, so yeah, as I said, 600 00:35:56,680 --> 00:36:00,780 I met Dominic as part of my master's project, 601 00:36:00,940 --> 00:36:05,080 which was investigating whether there was another way of doing this 602 00:36:05,080 --> 00:36:08,560 because as I've mentioned, 603 00:36:08,560 --> 00:36:15,280 it's quite a lot of work to sniff Bluetooth. 604 00:36:16,640 --> 00:36:19,520 There's the demodulation, there's the aliasing, 605 00:36:19,760 --> 00:36:22,500 there's the large amount of processing required. 606 00:36:25,120 --> 00:36:31,040 And it seemed that the thing you really want is a Bluetooth device 607 00:36:31,040 --> 00:36:34,240 because they already have all the hardware there. 608 00:36:37,220 --> 00:36:38,420 There are... 609 00:36:40,300 --> 00:36:45,520 So we targeted a large manufacturer of Bluetooth devices. 610 00:36:46,780 --> 00:36:52,520 This is the one who also created the protocol analyzer 611 00:36:52,520 --> 00:36:53,600 that Dominic mentioned earlier. 612 00:36:54,980 --> 00:37:00,020 And the protocol analyzer was actually the one that Max Moser, 613 00:37:00,040 --> 00:37:02,800 a couple of years ago, managed to get running 614 00:37:02,800 --> 00:37:08,380 on his own personal Bluetooth device just using the firmware. 615 00:37:10,620 --> 00:37:14,820 So yeah, basically, it's CSR. 616 00:37:14,880 --> 00:37:20,580 They've built quite a nice platform for Bluetooth. 617 00:37:21,100 --> 00:37:26,780 It's a soft core for the hardware. 618 00:37:27,020 --> 00:37:29,820 And then there's firmware on top of that. 619 00:37:29,980 --> 00:37:32,400 And then on top of that, there is a VM. 620 00:37:33,440 --> 00:37:37,800 So it's designed to be extensible at every level. 621 00:37:37,800 --> 00:37:46,620 And so the Bluetooth sniffer protocol analyzer 622 00:37:46,620 --> 00:37:49,580 just updates the firmware 623 00:37:49,580 --> 00:37:56,920 and can listen to anything when you have the lap. 624 00:37:59,280 --> 00:38:04,540 This is the layers of Bluetooth. 625 00:38:05,180 --> 00:38:06,080 We're actually... 626 00:38:06,080 --> 00:38:07,780 Ideally, we're looking for the radio. 627 00:38:07,800 --> 00:38:09,060 Radio layer, which is what Dominic's done. 628 00:38:10,440 --> 00:38:20,520 But the stuff on chip includes the link manager layer, 629 00:38:20,700 --> 00:38:21,460 which is... 630 00:38:23,480 --> 00:38:24,300 Excuse me. 631 00:38:29,680 --> 00:38:34,780 Yeah, basically, all the setting up of communications and links 632 00:38:34,780 --> 00:38:36,780 and so on is done on chip. 633 00:38:37,800 --> 00:38:41,380 And so there are different layers that are built into the firmware. 634 00:38:41,980 --> 00:38:45,100 So the chip itself, every Bluetooth chip, 635 00:38:45,520 --> 00:38:48,040 has sort of the complexity of about 286. 636 00:38:50,540 --> 00:38:52,120 And it's got a... 637 00:38:52,800 --> 00:38:59,160 This one in particular has a 16 megahertz processor as well. 638 00:39:02,660 --> 00:39:03,260 The... 639 00:39:05,580 --> 00:39:07,240 Yeah, so the firmware... 640 00:39:09,300 --> 00:39:12,680 Firmware does the link layer and the Mac layer. 641 00:39:13,460 --> 00:39:15,300 And everything else is done in hardware. 642 00:39:20,640 --> 00:39:25,700 As mentioned, everybody finds Bluetooth hard. 643 00:39:26,360 --> 00:39:28,140 So there's a lot of testing built in. 644 00:39:29,120 --> 00:39:30,160 The Bluetooth... 645 00:39:31,140 --> 00:39:36,080 Bluetooth SIG had to organize unplug fests for... 646 00:39:36,080 --> 00:39:37,720 In order to get... 647 00:39:37,720 --> 00:39:38,980 Once they'd done... 648 00:39:38,980 --> 00:39:42,460 Released all the spec in order to get everything to work. 649 00:39:43,600 --> 00:39:48,380 Because there are parts of the spec that aren't really very well defined. 650 00:39:49,700 --> 00:39:51,200 And so there... 651 00:39:51,200 --> 00:39:53,500 It makes sense to put in a lot of places for testing. 652 00:39:55,120 --> 00:39:55,660 However... 653 00:39:58,480 --> 00:40:02,100 There isn't a simple, you know, just read off the... 654 00:40:02,100 --> 00:40:03,400 Read off the air... 655 00:40:05,860 --> 00:40:08,960 Test mode in any of the test suites. 656 00:40:09,460 --> 00:40:14,800 This is probably on purpose because of FCC certification and so on. 657 00:40:15,020 --> 00:40:15,200 And... 658 00:40:17,840 --> 00:40:18,420 Because... 659 00:40:20,840 --> 00:40:22,980 Yeah, they don't want people... 660 00:40:24,200 --> 00:40:25,100 Sniffing Bluetooth. 661 00:40:27,860 --> 00:40:29,180 So the... 662 00:40:29,180 --> 00:40:31,480 The Bluetooth device comes with... 663 00:40:32,540 --> 00:40:34,600 Various internal tests as well. 664 00:40:34,920 --> 00:40:36,220 Which are not documented. 665 00:40:36,740 --> 00:40:38,160 But looking at the... 666 00:40:38,160 --> 00:40:40,360 At the firmware, you can work out what's going on. 667 00:40:42,920 --> 00:40:43,600 The... 668 00:40:43,600 --> 00:40:44,020 My... 669 00:40:44,020 --> 00:40:46,940 Dominic and my supervisor had actually built a... 670 00:40:46,940 --> 00:40:48,740 An assembler and disassembler. 671 00:40:50,520 --> 00:40:51,200 So... 672 00:40:51,200 --> 00:40:53,240 It was simply a matter of looking through... 673 00:40:53,240 --> 00:40:54,020 Finding the... 674 00:40:54,600 --> 00:40:55,140 And... 675 00:40:55,140 --> 00:40:55,500 And... 676 00:40:55,950 --> 00:40:58,080 You know, finding the tests and working out what they do. 677 00:41:01,820 --> 00:41:05,000 One of the tests which is particularly interesting is... 678 00:41:05,000 --> 00:41:07,500 One that is basically just called MemCopy. 679 00:41:09,060 --> 00:41:10,680 So you can... 680 00:41:11,540 --> 00:41:13,520 You can get your own code to run... 681 00:41:13,520 --> 00:41:16,520 On these little computers... 682 00:41:17,080 --> 00:41:18,140 Just by... 683 00:41:18,140 --> 00:41:19,320 Just by... 684 00:41:19,980 --> 00:41:20,520 Writing... 685 00:41:20,520 --> 00:41:22,920 Overwriting the return address on the stack. 686 00:41:25,140 --> 00:41:27,680 And it turns out that there is also an area... 687 00:41:27,680 --> 00:41:29,000 Presumably for flashing... 688 00:41:29,520 --> 00:41:31,080 Of memory that... 689 00:41:32,100 --> 00:41:32,640 Allows... 690 00:41:32,640 --> 00:41:34,040 That allows you to run... 691 00:41:34,040 --> 00:41:35,040 To put code... 692 00:41:35,040 --> 00:41:37,340 In RAM and then execute from that. 693 00:41:39,060 --> 00:41:39,600 So... 694 00:41:40,400 --> 00:41:41,700 I think I can... 695 00:41:42,720 --> 00:41:44,100 Do a little demo of that. 696 00:41:44,400 --> 00:41:44,940 If... 697 00:41:53,460 --> 00:41:55,020 Yeah, so basically you... 698 00:41:55,020 --> 00:41:56,880 Write the code you want into... 699 00:41:57,580 --> 00:41:58,760 Into this area of... 700 00:41:58,760 --> 00:41:58,980 Of... 701 00:41:58,980 --> 00:41:59,300 Of memory. 702 00:41:59,860 --> 00:42:01,740 Overflow the stack and you can... 703 00:42:02,660 --> 00:42:03,960 Say, call malloc. 704 00:42:04,100 --> 00:42:04,820 Or something. 705 00:42:05,040 --> 00:42:05,540 On the chip. 706 00:42:08,340 --> 00:42:09,620 You can also... 707 00:42:09,620 --> 00:42:11,640 Have a poke around at the internal settings. 708 00:42:11,860 --> 00:42:12,500 So there's... 709 00:42:13,800 --> 00:42:16,420 For instance, that is the page table... 710 00:42:16,420 --> 00:42:17,200 Of the device. 711 00:42:19,680 --> 00:42:20,160 And... 712 00:42:20,880 --> 00:42:22,460 Some of these... 713 00:42:22,460 --> 00:42:23,800 Some of these... 714 00:42:28,440 --> 00:42:29,680 Pages are... 715 00:42:29,680 --> 00:42:31,320 For particular areas. 716 00:42:31,520 --> 00:42:32,180 So there's... 717 00:42:32,180 --> 00:42:33,160 There's one that's... 718 00:42:33,160 --> 00:42:35,020 Specifically for... 719 00:42:35,940 --> 00:42:36,580 Testing. 720 00:42:36,660 --> 00:42:38,120 One specifically for sending information. 721 00:42:38,120 --> 00:42:38,940 One for receiving. 722 00:42:39,920 --> 00:42:42,080 There's various areas for... 723 00:42:43,440 --> 00:42:44,500 Link management. 724 00:42:44,540 --> 00:42:45,060 And so on. 725 00:42:45,560 --> 00:42:47,660 And you can actually watch... 726 00:42:47,660 --> 00:42:49,820 The information going through. 727 00:42:49,880 --> 00:42:50,140 And... 728 00:42:50,640 --> 00:42:51,120 So... 729 00:42:52,640 --> 00:42:55,040 This is the... 730 00:42:55,580 --> 00:42:56,300 This is... 731 00:42:56,300 --> 00:42:57,800 I think this is Linux doing a... 732 00:42:59,700 --> 00:43:01,000 Some kind of... 733 00:43:01,000 --> 00:43:02,480 Every now and then... 734 00:43:03,720 --> 00:43:04,680 Ping of some kind. 735 00:43:10,240 --> 00:43:10,720 But... 736 00:43:12,260 --> 00:43:12,740 Yeah. 737 00:43:12,840 --> 00:43:13,160 There's a... 738 00:43:13,160 --> 00:43:14,480 There is also a lot of... 739 00:43:14,480 --> 00:43:16,260 A lot of code in the firmware. 740 00:43:17,520 --> 00:43:19,440 Which helps a lot with working out what's... 741 00:43:19,440 --> 00:43:20,140 What's going on. 742 00:43:21,980 --> 00:43:23,340 And these are all... 743 00:43:24,840 --> 00:43:26,800 Used to implement the... 744 00:43:26,800 --> 00:43:28,580 Quite complex... 745 00:43:29,160 --> 00:43:29,660 Bluetooth... 746 00:43:29,660 --> 00:43:30,860 Virtual computer. 747 00:43:35,140 --> 00:43:37,320 But we don't actually want any of that. 748 00:43:37,440 --> 00:43:39,360 All we want really is the... 749 00:43:39,360 --> 00:43:41,460 Is the baseband and the code. 750 00:43:43,640 --> 00:43:44,260 And... 751 00:43:46,100 --> 00:43:47,640 Looking at it there are... 752 00:43:47,640 --> 00:43:48,640 There is some... 753 00:43:48,640 --> 00:43:49,380 It's quite well... 754 00:43:49,380 --> 00:43:50,000 Quite well equipped. 755 00:43:50,160 --> 00:43:50,440 There's... 756 00:43:50,440 --> 00:43:51,220 There's an ADC. 757 00:43:51,480 --> 00:43:52,920 It's got a USB controller. 758 00:43:53,600 --> 00:43:56,340 And it uses DMA to send information... 759 00:43:56,980 --> 00:43:58,540 Over the USB bus. 760 00:43:59,560 --> 00:44:01,040 And then there's of course the... 761 00:44:01,040 --> 00:44:01,300 The... 762 00:44:01,300 --> 00:44:02,280 The page table. 763 00:44:02,720 --> 00:44:04,480 Which deals with circular buffers. 764 00:44:06,400 --> 00:44:06,960 So... 765 00:44:06,960 --> 00:44:07,300 There's... 766 00:44:07,300 --> 00:44:08,740 There's everything in there... 767 00:44:09,940 --> 00:44:11,060 To write... 768 00:44:14,040 --> 00:44:15,400 Without using libraries. 769 00:44:16,020 --> 00:44:16,580 To... 770 00:44:16,580 --> 00:44:18,020 To receive using the ADC. 771 00:44:18,120 --> 00:44:19,280 The problem is... 772 00:44:19,280 --> 00:44:19,920 The ADC... 773 00:44:20,160 --> 00:44:21,040 Doesn't actually... 774 00:44:22,220 --> 00:44:23,360 Isn't very useful. 775 00:44:23,580 --> 00:44:24,780 It only gives you one bit. 776 00:44:24,980 --> 00:44:27,240 And it takes a microsecond to get that one bit. 777 00:44:27,880 --> 00:44:29,900 And the symbol rate of Bluetooth is one... 778 00:44:29,900 --> 00:44:30,980 Symbol per... 779 00:44:30,980 --> 00:44:31,900 Microsecond. 780 00:44:32,940 --> 00:44:33,460 So... 781 00:44:34,280 --> 00:44:34,800 You... 782 00:44:35,420 --> 00:44:37,980 You'd need 16 of these devices in order to... 783 00:44:37,980 --> 00:44:38,580 To... 784 00:44:38,580 --> 00:44:39,620 Just get... 785 00:44:40,160 --> 00:44:41,020 The normal... 786 00:44:41,020 --> 00:44:41,340 Sorry. 787 00:44:41,420 --> 00:44:41,760 Eight... 788 00:44:41,760 --> 00:44:43,500 Of these devices to get the normal... 789 00:44:43,500 --> 00:44:44,280 Bit rate. 790 00:44:45,760 --> 00:44:48,480 However in a particular mode... 791 00:44:49,840 --> 00:44:50,440 Sorry. 792 00:44:51,080 --> 00:44:52,640 In a particular mode... 793 00:44:52,640 --> 00:44:53,580 It... 794 00:44:53,580 --> 00:44:54,760 It opens up... 795 00:44:54,760 --> 00:44:56,560 A memory map register. 796 00:44:56,880 --> 00:44:57,340 Which... 797 00:44:59,480 --> 00:45:00,080 Conveniently... 798 00:45:00,080 --> 00:45:00,320 Some... 799 00:45:00,320 --> 00:45:01,380 For some reason... 800 00:45:01,380 --> 00:45:01,880 There's... 801 00:45:01,880 --> 00:45:02,460 It's never used. 802 00:45:02,940 --> 00:45:04,200 But there's... 803 00:45:04,200 --> 00:45:07,200 A sample of the demodulated data. 804 00:45:07,760 --> 00:45:09,060 And this is just... 805 00:45:09,680 --> 00:45:10,860 Happily sitting there... 806 00:45:10,860 --> 00:45:11,840 Spewing it out... 807 00:45:11,840 --> 00:45:13,040 At this particular address. 808 00:45:13,380 --> 00:45:15,120 So what you have to do is... 809 00:45:15,120 --> 00:45:16,840 Read all that information into a buffer. 810 00:45:17,080 --> 00:45:18,460 Send it back over your... 811 00:45:18,460 --> 00:45:18,680 USB. 812 00:45:20,160 --> 00:45:21,340 And then... 813 00:45:21,340 --> 00:45:23,200 When the ADC says that... 814 00:45:23,200 --> 00:45:24,360 There isn't a signal... 815 00:45:24,360 --> 00:45:24,920 Just stop. 816 00:45:26,780 --> 00:45:28,020 The original... 817 00:45:28,020 --> 00:45:28,960 The original... 818 00:45:28,960 --> 00:45:31,260 Plan was to send back information... 819 00:45:31,260 --> 00:45:31,840 Continually. 820 00:45:32,000 --> 00:45:32,420 But... 821 00:45:33,420 --> 00:45:34,740 That doesn't work. 822 00:45:34,940 --> 00:45:35,880 Because of... 823 00:45:35,880 --> 00:45:36,340 The... 824 00:45:36,340 --> 00:45:37,240 The DMA controller. 825 00:45:38,360 --> 00:45:40,020 Completely ruins the timing. 826 00:45:44,500 --> 00:45:45,260 Yeah. 827 00:45:45,360 --> 00:45:45,740 So... 828 00:45:45,740 --> 00:45:47,220 I'm just gonna... 829 00:45:47,220 --> 00:45:48,040 Try... 830 00:45:48,040 --> 00:45:48,440 To... 831 00:45:55,560 --> 00:45:56,760 As with all demos... 832 00:45:56,760 --> 00:45:57,660 It's worth noting... 833 00:45:57,660 --> 00:45:58,260 This is Defcon. 834 00:45:58,460 --> 00:45:59,220 And therefore... 835 00:45:59,220 --> 00:46:00,700 None of them work properly. 836 00:46:02,280 --> 00:46:03,460 That's why we just ran... 837 00:46:03,460 --> 00:46:03,860 Our... 838 00:46:03,860 --> 00:46:05,020 Our aliasing one from file. 839 00:46:05,560 --> 00:46:05,980 Because... 840 00:46:06,570 --> 00:46:06,780 As... 841 00:46:06,780 --> 00:46:07,720 As we said with that one... 842 00:46:07,720 --> 00:46:08,720 Noise interferes. 843 00:46:08,720 --> 00:46:08,920 And... 844 00:46:08,920 --> 00:46:09,180 Well... 845 00:46:09,180 --> 00:46:10,040 You're in like... 846 00:46:10,040 --> 00:46:11,420 One of the electronically noisiest places. 847 00:46:12,320 --> 00:46:12,740 So... 848 00:46:14,100 --> 00:46:15,240 If we can't get this running... 849 00:46:15,240 --> 00:46:15,680 Straight off... 850 00:46:15,680 --> 00:46:15,960 We'll... 851 00:46:15,960 --> 00:46:16,560 We'll try and... 852 00:46:18,460 --> 00:46:18,980 Um... 853 00:46:18,980 --> 00:46:20,720 Which I think is room 106... 854 00:46:20,720 --> 00:46:21,240 In a couple of minutes. 855 00:46:30,120 --> 00:46:32,400 So what he's doing right now is... 856 00:46:32,400 --> 00:46:34,240 Generating some test traffic... 857 00:46:34,240 --> 00:46:34,700 Uh... 858 00:46:34,700 --> 00:46:36,120 Between a couple of Bluetooth devices. 859 00:46:36,780 --> 00:46:37,360 And... 860 00:46:37,360 --> 00:46:37,660 Uh... 861 00:46:37,660 --> 00:46:38,840 And then he's... 862 00:46:38,840 --> 00:46:39,180 Uh... 863 00:46:39,180 --> 00:46:41,240 Executing his code on the Bluetooth dongle. 864 00:46:41,780 --> 00:46:42,360 And... 865 00:46:42,360 --> 00:46:42,760 Uh... 866 00:46:42,760 --> 00:46:44,020 Retrieving that... 867 00:46:44,020 --> 00:46:44,380 Uh... 868 00:46:44,380 --> 00:46:45,120 Baseband... 869 00:46:45,120 --> 00:46:45,320 Uh... 870 00:46:45,320 --> 00:46:46,260 Demodulated... 871 00:46:48,460 --> 00:46:48,760 Uh... 872 00:46:48,760 --> 00:46:49,660 And dumping it to a file. 873 00:46:50,800 --> 00:46:52,100 As Dominic mentioned... 874 00:46:52,600 --> 00:46:53,040 Um... 875 00:46:53,040 --> 00:46:53,400 This... 876 00:46:54,220 --> 00:46:55,980 This device is not working at the moment. 877 00:46:57,060 --> 00:46:57,500 Um... 878 00:46:57,500 --> 00:46:58,380 Mm-hmm. 879 00:46:59,280 --> 00:47:00,320 It may come up. 880 00:47:00,440 --> 00:47:02,440 It has a habit of waiting about 15 seconds. 881 00:47:02,780 --> 00:47:03,160 Um... 882 00:47:03,160 --> 00:47:03,600 But... 883 00:47:03,600 --> 00:47:04,260 Uh... 884 00:47:04,260 --> 00:47:04,800 Yeah. 885 00:47:05,020 --> 00:47:05,460 Basically... 886 00:47:05,460 --> 00:47:06,040 Um... 887 00:47:06,040 --> 00:47:06,580 The... 888 00:47:06,580 --> 00:47:07,200 The code up... 889 00:47:07,200 --> 00:47:07,500 The... 890 00:47:07,500 --> 00:47:08,880 That's running on there at the moment... 891 00:47:08,880 --> 00:47:10,360 Sends it back directly over USB. 892 00:47:10,560 --> 00:47:12,060 And it occasionally confuses Linux. 893 00:47:13,480 --> 00:47:13,920 Um... 894 00:47:14,620 --> 00:47:15,060 Oh... 895 00:47:15,060 --> 00:47:15,320 Oh... 896 00:47:15,320 --> 00:47:15,900 They're both working now. 897 00:47:15,980 --> 00:47:16,220 Right. 898 00:47:16,300 --> 00:47:17,180 Let's just give that another go. 899 00:47:18,000 --> 00:47:18,440 Um... 900 00:47:18,440 --> 00:47:19,020 So... 901 00:47:19,020 --> 00:47:19,480 Uh... 902 00:47:19,480 --> 00:47:20,320 This is the sync. 903 00:47:20,660 --> 00:47:22,600 Which is receiving everything over USB. 904 00:47:27,560 --> 00:47:29,520 We'll make the other device send some information. 905 00:47:36,300 --> 00:47:36,860 And... 906 00:47:38,740 --> 00:47:39,300 This... 907 00:47:39,300 --> 00:47:41,420 Should now start sampling the data. 908 00:47:41,800 --> 00:47:43,220 And this information... 909 00:47:43,220 --> 00:47:43,620 Uh... 910 00:47:43,620 --> 00:47:44,340 This data can... 911 00:47:44,340 --> 00:47:45,060 Can plug... 912 00:47:47,500 --> 00:47:48,060 Yeah. 913 00:47:48,140 --> 00:47:48,420 This... 914 00:47:48,420 --> 00:47:48,480 This... 915 00:47:48,480 --> 00:47:49,160 Um... 916 00:47:49,160 --> 00:47:52,800 This sample stream can go straight into everything that Dominic and... 917 00:47:52,800 --> 00:47:53,560 And Mike have done. 918 00:47:53,700 --> 00:47:53,860 Yeah. 919 00:47:54,380 --> 00:47:54,860 Um... 920 00:47:55,400 --> 00:47:55,880 Yeah. 921 00:47:57,260 --> 00:47:57,740 Uh... 922 00:47:58,240 --> 00:47:58,480 So... 923 00:47:59,700 --> 00:48:00,180 Yeah. 924 00:48:00,420 --> 00:48:03,300 So we're actually able to use the GNU Radio libraries to do... 925 00:48:03,300 --> 00:48:03,740 Uh... 926 00:48:03,740 --> 00:48:04,660 Clock recovery. 927 00:48:05,080 --> 00:48:05,560 And... 928 00:48:05,560 --> 00:48:06,000 Uh... 929 00:48:06,000 --> 00:48:06,380 Bit slicing. 930 00:48:06,540 --> 00:48:09,320 And then just pass this in as if it came from the USLP. 931 00:48:09,900 --> 00:48:10,380 So... 932 00:48:10,380 --> 00:48:11,360 The software just... 933 00:48:11,360 --> 00:48:11,960 Doesn't... 934 00:48:11,960 --> 00:48:12,420 Well... 935 00:48:12,420 --> 00:48:15,320 The idea is the software doesn't care what kind of device you sniff the traffic with. 936 00:48:15,880 --> 00:48:16,360 Um... 937 00:48:16,360 --> 00:48:24,260 Whether it's the $2000 USLP2 or just a whole lot of USB hubs and 79 different Bluetooth 938 00:48:24,260 --> 00:48:24,680 dongles. 939 00:48:25,000 --> 00:48:25,480 Um... 940 00:48:25,480 --> 00:48:29,500 And what's actually on screen now is the raw waveform that was collected from the... 941 00:48:29,500 --> 00:48:29,820 Uh... 942 00:48:29,820 --> 00:48:31,060 From the dongle. 943 00:48:31,260 --> 00:48:32,100 But it is demodulated. 944 00:48:32,380 --> 00:48:32,780 Yeah. 945 00:48:32,900 --> 00:48:33,380 That's right. 946 00:48:33,480 --> 00:48:34,300 It's demodulated. 947 00:48:34,440 --> 00:48:34,720 It's... 948 00:48:34,720 --> 00:48:36,080 It's been run through the demodulator. 949 00:48:36,200 --> 00:48:37,920 But it hasn't been run through the decoder yet. 950 00:48:38,120 --> 00:48:38,600 So... 951 00:48:38,600 --> 00:48:39,320 Uh... 952 00:48:39,320 --> 00:48:39,960 It's... 953 00:48:39,960 --> 00:48:40,200 Uh... 954 00:48:40,200 --> 00:48:43,800 It's something that we can take and plug into the software that Dominic and I have written. 955 00:48:43,940 --> 00:48:45,720 And actually extract packets from. 956 00:48:45,860 --> 00:48:46,340 Um... 957 00:48:46,360 --> 00:48:47,000 So, yeah. 958 00:48:47,060 --> 00:48:47,360 Just... 959 00:48:47,360 --> 00:48:47,640 Just... 960 00:48:47,640 --> 00:48:50,020 Just here is the beginning of the Bluetooth packet. 961 00:48:50,340 --> 00:48:51,380 And then this... 962 00:48:51,380 --> 00:48:52,340 All of the rest here. 963 00:48:52,500 --> 00:48:53,020 If... 964 00:48:53,020 --> 00:48:55,640 If you plug it in, we'll... 965 00:48:55,640 --> 00:48:56,400 We'll... 966 00:48:56,400 --> 00:48:56,660 Um... 967 00:48:56,660 --> 00:48:58,280 We'll give a Bluetooth packet. 968 00:48:58,900 --> 00:48:59,420 Um... 969 00:48:59,420 --> 00:49:00,060 And the... 970 00:49:01,700 --> 00:49:02,220 Uh... 971 00:49:02,220 --> 00:49:02,780 Right. 972 00:49:02,860 --> 00:49:06,100 So the significant advantage of this is that it only costs $2. 973 00:49:07,160 --> 00:49:07,680 Um... 974 00:49:07,680 --> 00:49:09,540 Instead of $1000. 975 00:49:10,560 --> 00:49:11,080 Um... 976 00:49:11,680 --> 00:49:13,100 It doesn't have... 977 00:49:13,100 --> 00:49:13,660 Um... 978 00:49:13,660 --> 00:49:16,340 The advantage of the USLP of being able to... 979 00:49:16,340 --> 00:49:18,280 Sniff all 80 channels at a time. 980 00:49:18,340 --> 00:49:20,060 But in order to do that, all you really need is... 981 00:49:20,060 --> 00:49:20,780 Uh... 982 00:49:20,780 --> 00:49:21,900 79 dongles. 983 00:49:22,920 --> 00:49:23,360 Um... 984 00:49:23,360 --> 00:49:25,060 And a lot of USB hubs. 985 00:49:25,260 --> 00:49:28,020 If you'd like to pass your dongles and USB hubs to the front... 986 00:49:28,020 --> 00:49:28,600 We will... 987 00:49:28,600 --> 00:49:29,800 Give it a try. 988 00:49:29,980 --> 00:49:30,420 Um... 989 00:49:30,420 --> 00:49:31,000 And then... 990 00:49:31,000 --> 00:49:35,220 Of course, the fact that Bluetooth is only transmitting on one channel at a time helps. 991 00:49:35,660 --> 00:49:36,100 Um... 992 00:49:36,900 --> 00:49:37,340 Because... 993 00:49:37,340 --> 00:49:37,760 Again... 994 00:49:37,760 --> 00:49:38,000 The... 995 00:49:38,000 --> 00:49:38,660 The... 996 00:49:39,300 --> 00:49:39,740 80... 997 00:49:39,740 --> 00:49:40,460 Um... 998 00:49:40,460 --> 00:49:42,880 Devices sending back information... 999 00:49:42,880 --> 00:49:44,640 Of USB wouldn't work. 1000 00:49:45,260 --> 00:49:45,700 Um... 1001 00:49:45,700 --> 00:49:46,320 But... 1002 00:49:46,320 --> 00:49:46,460 Actually... 1003 00:49:47,200 --> 00:49:49,440 Sniffing on one channel seems to work well enough. 1004 00:49:50,020 --> 00:49:50,540 Um... 1005 00:49:50,540 --> 00:49:52,100 The randomness means that it... 1006 00:49:52,100 --> 00:49:52,500 If you... 1007 00:49:52,500 --> 00:49:54,260 If you listen on one particular frequency... 1008 00:49:54,260 --> 00:49:55,160 You... 1009 00:49:55,160 --> 00:49:56,140 Um... 1010 00:49:56,140 --> 00:49:56,880 Uh... 1011 00:49:56,880 --> 00:49:57,460 You get... 1012 00:49:57,460 --> 00:49:57,920 Uh... 1013 00:49:57,920 --> 00:49:58,700 You get a... 1014 00:49:58,700 --> 00:49:59,020 A... 1015 00:49:59,980 --> 00:50:01,400 Even proportion of... 1016 00:50:01,400 --> 00:50:01,660 Um... 1017 00:50:01,660 --> 00:50:02,220 Of packets. 1018 00:50:04,700 --> 00:50:05,220 Um... 1019 00:50:05,220 --> 00:50:06,020 Keep going. 1020 00:50:06,080 --> 00:50:06,180 Yeah. 1021 00:50:06,520 --> 00:50:07,100 I'll do this bit. 1022 00:50:07,320 --> 00:50:07,840 Yeah. 1023 00:50:07,840 --> 00:50:08,020 Yeah. 1024 00:50:09,480 --> 00:50:10,520 Really, really quickly. 1025 00:50:10,620 --> 00:50:11,680 Because I've got about 30 seconds left. 1026 00:50:11,820 --> 00:50:12,140 Uh... 1027 00:50:12,140 --> 00:50:13,380 The security implications are... 1028 00:50:13,380 --> 00:50:14,900 Non-discoverable mode doesn't exist. 1029 00:50:15,040 --> 00:50:15,560 They're lying. 1030 00:50:16,320 --> 00:50:16,660 Uh... 1031 00:50:16,660 --> 00:50:17,720 Feel free to... 1032 00:50:18,260 --> 00:50:19,020 Argue with me on this one. 1033 00:50:19,120 --> 00:50:19,380 But... 1034 00:50:19,380 --> 00:50:20,560 By all means... 1035 00:50:20,560 --> 00:50:21,060 If you've got your... 1036 00:50:21,060 --> 00:50:21,340 Uh... 1037 00:50:21,340 --> 00:50:22,780 Bluetooth devices in non-discoverable mode... 1038 00:50:22,780 --> 00:50:23,800 Just turn Bluetooth off. 1039 00:50:23,880 --> 00:50:24,900 It's using up the battery anyway. 1040 00:50:25,520 --> 00:50:25,960 Um... 1041 00:50:25,960 --> 00:50:26,800 It's not worth it. 1042 00:50:27,000 --> 00:50:28,520 It does open the door for active attacks. 1043 00:50:28,680 --> 00:50:29,700 Which we haven't done yet. 1044 00:50:29,800 --> 00:50:30,560 But that's the plan. 1045 00:50:30,620 --> 00:50:31,540 At least at some point. 1046 00:50:32,160 --> 00:50:32,600 Um... 1047 00:50:32,600 --> 00:50:33,160 And... 1048 00:50:33,160 --> 00:50:34,220 We have made some... 1049 00:50:34,220 --> 00:50:35,620 Interesting observations regarding encryption. 1050 00:50:36,180 --> 00:50:37,620 Which we will... 1051 00:50:37,620 --> 00:50:38,040 Uh... 1052 00:50:38,040 --> 00:50:39,000 Have to detail... 1053 00:50:39,000 --> 00:50:40,120 Next year at DEVCOM. 1054 00:50:41,080 --> 00:50:41,520 So... 1055 00:50:41,520 --> 00:50:41,800 Uh... 1056 00:50:41,800 --> 00:50:42,520 We'll be in the... 1057 00:50:42,520 --> 00:50:44,000 Breakout room 106. 1058 00:50:44,400 --> 00:50:44,840 Yeah. 1059 00:50:46,320 --> 00:50:47,460 We'll try and get that demo working... 1060 00:50:47,460 --> 00:50:47,740 Uh... 1061 00:50:47,740 --> 00:50:48,920 All those demos working properly. 1062 00:50:49,480 --> 00:50:49,860 And... 1063 00:50:49,860 --> 00:50:51,320 We'll take questions and answers in there. 1064 00:50:51,660 --> 00:50:52,040 Um... 1065 00:50:52,040 --> 00:50:52,820 But that's the... 1066 00:50:52,820 --> 00:50:54,240 Address of the code if you want it.