1 00:00:00,000 --> 00:00:04,780 So, RFID myth busting. If you were here expecting to see a myth buster, that's next. 2 00:00:07,680 --> 00:00:13,840 Okay, feedback. A little bit about hardware. Hardware is my consulting company. 3 00:00:14,000 --> 00:00:17,580 We're a San Francisco-based startup. We do hardware security consulting. 4 00:00:18,020 --> 00:00:23,220 We design products, we assess products, we do gate-level reverse engineering. 5 00:00:23,420 --> 00:00:27,160 You give us a chip, we'll give you a netlist and a cryptanalysis. 6 00:00:28,620 --> 00:00:34,580 Hardware is some folks that you've heard of, myself, Tim Mullen, Karsten Noll broke my fare a little while ago. 7 00:00:35,260 --> 00:00:38,840 Some names that you haven't heard of that we just call Secret Agents 1 and 2. 8 00:00:39,920 --> 00:00:42,020 I don't actually know what their real names are. 9 00:00:43,920 --> 00:00:47,320 Okay, so first up, the plan that was. 10 00:00:47,580 --> 00:00:53,860 So, we did have this grand scheme planned where we were going to have all of this gear set up by those doors 11 00:00:53,860 --> 00:00:56,720 such that whenever anyone walked through the doors, 12 00:00:57,160 --> 00:01:00,520 they were going to read all of your RFID tags, every single one of them. 13 00:01:00,720 --> 00:01:05,240 Stick it all in a database, correlate it based on time, all kinds of stuff. 14 00:01:05,820 --> 00:01:10,960 As it turned out, we had a quite horrific number of equipment failures. 15 00:01:11,760 --> 00:01:17,700 Some were our fault, things like feeding 120 volts into a 741 doesn't tend to do it much good. 16 00:01:19,160 --> 00:01:23,060 Some of them weren't our fault, like RadioShack just not selling good enough components. 17 00:01:24,320 --> 00:01:27,140 So, hopefully everything that I've got here appears to be working. 18 00:01:27,140 --> 00:01:29,280 We're working at the moment, so we'll see how far we get. 19 00:01:31,620 --> 00:01:33,940 Okay, let me introduce you to the hardware first. 20 00:01:35,540 --> 00:01:37,240 First up, we have this device here. 21 00:01:37,960 --> 00:01:39,660 I don't know how well you can see that. 22 00:01:40,240 --> 00:01:44,480 This is a custom-built 125 kilohertz RFID reader. 23 00:01:45,020 --> 00:01:46,800 It's based around a PIC18. 24 00:01:47,460 --> 00:01:54,140 It's written in C, and it'll output anywhere from about half a watts 25 00:01:54,140 --> 00:01:56,680 with the 12-volt supply that I've got on it at the moment. 26 00:01:57,140 --> 00:02:01,440 It'll scale up to about 5 watts output power with a 60-volt rail. 27 00:02:02,380 --> 00:02:07,240 To put that into perspective, a traditional, typical off-the-shelf 125 kilohertz reader, 28 00:02:08,160 --> 00:02:11,020 somewhere between 10 milliwatts and 50 milliwatts. 29 00:02:11,700 --> 00:02:14,060 We're dumping a lot of power into this coil. 30 00:02:15,060 --> 00:02:20,540 It's capable of reading, copying, and playing back over a dozen different tag formats at 125 kilohertz, 31 00:02:20,660 --> 00:02:23,260 including tags that we have never before seen. 32 00:02:23,540 --> 00:02:27,120 So, I'd be interested to see if anyone does have any one of those. 33 00:02:27,140 --> 00:02:29,360 We're working on 25 kilohertz tags that we've not encountered before. 34 00:02:30,160 --> 00:02:33,100 If this was working completely, which it isn't at the moment, 35 00:02:33,260 --> 00:02:37,000 but we would be able to read those with zero knowledge. 36 00:02:37,680 --> 00:02:38,700 I'll get back to how. 37 00:02:39,580 --> 00:02:40,660 Next up, over here. 38 00:02:41,560 --> 00:02:46,460 This is an off-the-shelf 13.56 megahertz VivoPay reader. 39 00:02:46,660 --> 00:02:48,100 This was a couple hundred bucks online. 40 00:02:49,600 --> 00:02:52,440 This, as it is at the moment, is completely unmodified. 41 00:02:53,480 --> 00:02:55,560 We are in the process of producing 42 00:02:55,560 --> 00:02:57,320 an antenna chain for it. 43 00:02:57,900 --> 00:03:00,100 We've got a one watt amplifier that, 44 00:03:01,020 --> 00:03:03,060 again, it has worked, it has failed, 45 00:03:03,160 --> 00:03:05,380 it has been rebuilt and failed again several times. 46 00:03:06,420 --> 00:03:08,940 So, we can't demo the long-range stuff on that, 47 00:03:09,100 --> 00:03:10,280 but we do have it. 48 00:03:11,640 --> 00:03:14,780 The amplifier is built exclusively with parts from RadioShack. 49 00:03:14,900 --> 00:03:16,540 You spend 10 bucks on RadioShack parts, 50 00:03:16,660 --> 00:03:19,560 and you can amp this thing up to about a three-foot read range. 51 00:03:19,680 --> 00:03:21,180 We'll come back to the details on that. 52 00:03:22,020 --> 00:03:24,400 Important point, very important point about this, 53 00:03:25,640 --> 00:03:27,060 credit card RFID reader. 54 00:03:27,280 --> 00:03:30,060 I have performed no reverse engineering whatsoever. 55 00:03:30,780 --> 00:03:33,160 I can stand before you, put my hand on my heart, 56 00:03:33,220 --> 00:03:34,300 and swear to you faithfully, 57 00:03:34,420 --> 00:03:36,220 I know nothing about EMV. 58 00:03:37,500 --> 00:03:39,260 It's actually a good thing, trust me. 59 00:03:39,300 --> 00:03:40,320 We'll come back to it. 60 00:03:41,620 --> 00:03:42,940 Both of these devices, 61 00:03:43,320 --> 00:03:46,500 the 13.56 one watt amplifier 62 00:03:46,500 --> 00:03:49,040 and the 125 kilohertz, 63 00:03:49,180 --> 00:03:50,340 it's called a ProxPic, 64 00:03:50,900 --> 00:03:53,240 these will both be made available for sale. 65 00:03:53,880 --> 00:03:55,320 They're going to be commercial devices, 66 00:03:56,040 --> 00:03:58,660 we're hoping to launch them by the end of August, 67 00:03:58,820 --> 00:04:01,040 but depends on getting a few other things sorted first. 68 00:04:01,360 --> 00:04:03,940 But, yes, we will be making these commercially available. 69 00:04:05,200 --> 00:04:06,200 Finally, at the end, 70 00:04:06,260 --> 00:04:09,840 we have a 900 megahertz EPC Gen 2 reader. 71 00:04:10,700 --> 00:04:12,960 This is completely unmodified. 72 00:04:13,000 --> 00:04:16,120 This is the system that I presented about at ShmooCon. 73 00:04:16,920 --> 00:04:18,240 Exactly the same gear. 74 00:04:18,460 --> 00:04:21,180 You can go up on Google Video and watch the talk if you're interested. 75 00:04:23,240 --> 00:04:24,840 Okay, so, on to the myths. 76 00:04:24,840 --> 00:04:26,880 First up, RFID is short range. 77 00:04:29,040 --> 00:04:32,500 So, let's talk about the short range thing for a second. 78 00:04:33,660 --> 00:04:35,180 The 900 megahertz gear. 79 00:04:36,180 --> 00:04:41,220 EPC Generation 2 has a design read range of 20 to 30 feet. 80 00:04:41,460 --> 00:04:44,260 With a completely standard credit card size tag, 81 00:04:44,540 --> 00:04:48,580 you will get a 20 foot read range with off-the-shelf, unmodified gear. 82 00:04:49,200 --> 00:04:52,000 With a larger tag, you'll get 30 feet easily. 83 00:04:52,940 --> 00:04:55,900 It's relatively simple to scale it up to half a mile. 84 00:04:56,500 --> 00:04:58,380 If you wanted to go beyond that, 85 00:04:58,480 --> 00:05:05,420 it's also plausible that you could make friends with someone who operates your local airport. 86 00:05:05,700 --> 00:05:11,120 And just, if you can possibly convince them to let you borrow their radar tower, 87 00:05:11,840 --> 00:05:15,280 you could probably read these things from tens of miles away. 88 00:05:16,920 --> 00:05:18,660 Interesting note about this technology. 89 00:05:18,900 --> 00:05:21,880 This is for the enhanced driver's license and the passbook. 90 00:05:22,000 --> 00:05:23,840 Anyone have one of these things? 91 00:05:24,380 --> 00:05:25,500 Anyone have an EDL? 92 00:05:25,940 --> 00:05:30,440 You've been tagged with exactly the same technology that Walmart uses to tag razor blades. 93 00:05:31,940 --> 00:05:34,340 Everyone thank the federal government for making that law. 94 00:05:36,160 --> 00:05:37,800 13.56 megahertz. 95 00:05:39,100 --> 00:05:43,080 This is an industry term, contactless smart card. 96 00:05:43,300 --> 00:05:46,880 I'm going to be making gratuitous use of air quotes throughout my talk here. 97 00:05:47,520 --> 00:05:50,360 Doesn't necessarily mean that I disagree with the term. 98 00:05:50,540 --> 00:05:51,980 It just means that I'm using it out of context. 99 00:05:52,000 --> 00:05:57,940 It is quite an important point because there's some subtleties that we'll see a little bit later on. 100 00:06:00,980 --> 00:06:03,380 Again, standard reader is about 50 milliwatts. 101 00:06:03,400 --> 00:06:05,100 Gives you maybe an inch of read range. 102 00:06:05,500 --> 00:06:09,080 Our one watt amplifier, again, when it works, gives you about three feet. 103 00:06:10,160 --> 00:06:11,720 13.56 megahertz. 104 00:06:11,880 --> 00:06:14,460 If you double the frequency, you're in 27 megahertz. 105 00:06:14,780 --> 00:06:17,120 There's a whole lot of gear available for 27 megahertz, 106 00:06:17,620 --> 00:06:20,240 and it's really easy to drop the frequency by half. 107 00:06:20,920 --> 00:06:21,980 So, 101 megahertz. 108 00:06:22,000 --> 00:06:24,620 Your amplifiers are very, very easy to get hold of. 109 00:06:26,180 --> 00:06:28,340 The 125 kilohertz Prox gear. 110 00:06:28,920 --> 00:06:31,660 Off the shelf reader does about an inch. 111 00:06:32,380 --> 00:06:36,440 My gear here, as it stands at the moment, not entirely functional. 112 00:06:36,960 --> 00:06:40,140 I'll be demonstrating about an eight to nine inch read range. 113 00:06:40,720 --> 00:06:44,840 If it was working completely, it would have a foot, maybe more. 114 00:06:46,160 --> 00:06:51,280 So, I mean, already we've got, you know, good long read range out of the 900 megahertz gear 115 00:06:51,280 --> 00:06:52,100 to start out with. 116 00:06:52,620 --> 00:06:54,120 Shorter range on the other two bands, 117 00:06:54,280 --> 00:06:56,420 but let's look at that a little more closely. 118 00:06:59,600 --> 00:07:02,860 The demo for the 900 megahertz I might be able to do, 119 00:07:03,980 --> 00:07:06,040 despite the broken projector. 120 00:07:11,040 --> 00:07:12,740 Is that coming through on the screens? 121 00:07:23,340 --> 00:07:24,140 Come on. 122 00:07:24,960 --> 00:07:25,360 Okay. 123 00:07:25,840 --> 00:07:28,620 So, we can just about see the window there as much as we need to. 124 00:07:31,640 --> 00:07:32,040 Okay. 125 00:07:33,340 --> 00:07:34,640 So, three windows here. 126 00:07:34,780 --> 00:07:37,060 On the left is tags that are currently visible. 127 00:07:37,500 --> 00:07:42,880 So, you can see that there's one tag with a zero code that's kind of fading in and out. 128 00:07:43,680 --> 00:07:47,320 The panel in the middle is all of the tags that it has seen at any point. 129 00:07:47,940 --> 00:07:49,360 And if you click on one, 130 00:07:49,360 --> 00:07:53,000 then it logs what the tag details were, 131 00:07:53,100 --> 00:07:53,840 what type of tag, 132 00:07:53,980 --> 00:07:54,500 when it read it, 133 00:07:54,580 --> 00:07:55,400 how many times it read it, 134 00:07:55,460 --> 00:07:56,080 all that kind of stuff. 135 00:07:56,520 --> 00:07:59,300 So, if I can have a volunteer, 136 00:08:00,440 --> 00:08:01,440 someone in the front row, 137 00:08:02,220 --> 00:08:04,840 have an EPC generation two RFID card. 138 00:08:09,660 --> 00:08:12,680 And you can see that's reading. 139 00:08:12,840 --> 00:08:16,080 I can step back and it's still reading it. 140 00:08:18,820 --> 00:08:22,180 So, yeah, there's no way that's a short range system. 141 00:08:25,220 --> 00:08:27,300 It just doesn't even argue. 142 00:08:27,520 --> 00:08:29,540 So, 900 megahertz, okay. 143 00:08:29,600 --> 00:08:32,420 We've already busted the short range at 900 megahertz. 144 00:08:33,160 --> 00:08:34,380 That's very easy. 145 00:08:39,580 --> 00:08:41,740 If you think that was good, keep watching. 146 00:08:44,100 --> 00:08:45,820 Wow, the Vista machine came back. 147 00:08:48,020 --> 00:08:51,120 So, at ShmooCon and on the synopsis of my talk, 148 00:08:51,240 --> 00:08:54,380 I did say that we were going to be setting a 900 megahertz world record. 149 00:08:55,160 --> 00:08:57,820 It didn't happen because as it turns out, 150 00:08:57,920 --> 00:08:59,800 900 megahertz amplifiers, 151 00:09:00,480 --> 00:09:02,420 when you're working in this kind of spectrum, 152 00:09:02,680 --> 00:09:04,540 every single circuit trace, 153 00:09:04,720 --> 00:09:06,240 every leg of every component, 154 00:09:06,520 --> 00:09:07,460 every ground line, 155 00:09:07,580 --> 00:09:09,260 everything wants to radiate power. 156 00:09:09,680 --> 00:09:13,980 So, your circuit is constantly just trying to bleed off all of the power into space. 157 00:09:14,200 --> 00:09:16,060 The design of this gear is very, very simple. 158 00:09:16,080 --> 00:09:16,280 It's very involved. 159 00:09:16,700 --> 00:09:18,660 And as a result, it's very expensive. 160 00:09:19,620 --> 00:09:21,500 We weren't able to find anyone 161 00:09:21,980 --> 00:09:24,840 who was prepared to lend us $20,000 of RFID amplifier 162 00:09:25,520 --> 00:09:28,000 for us to take it out into the desert and screw with it. 163 00:09:28,960 --> 00:09:29,880 Can't imagine why. 164 00:09:33,020 --> 00:09:34,840 So, what has been demonstrated, 165 00:09:35,500 --> 00:09:40,060 213 feet is what I'm aware of the longest read range. 166 00:09:40,420 --> 00:09:44,260 That was using 10 watts of output power compared to the normal 1 watt off the shelf. 167 00:09:44,840 --> 00:09:48,980 You can easily go up to 100 watts with no real problems at all 168 00:09:48,980 --> 00:09:50,020 other than getting hold of the gear. 169 00:09:51,440 --> 00:09:53,680 Standard antenna is 6 decibels gain. 170 00:09:54,720 --> 00:09:57,500 The 213 feet was using 9 decibels of gain. 171 00:09:57,660 --> 00:10:01,220 You can easily get 15 dBi antennas. 172 00:10:01,720 --> 00:10:06,200 The only real problem you've got with amping this up to infinity, 173 00:10:07,340 --> 00:10:09,520 with this kind of UHF spectrum, 174 00:10:09,800 --> 00:10:12,520 if you can see the antenna, you can receive the signal. 175 00:10:12,520 --> 00:10:13,820 It's as simple as that. 176 00:10:14,780 --> 00:10:16,620 So, the biggest problem that you've got 177 00:10:16,620 --> 00:10:19,840 is the amount of power that you're putting out. 178 00:10:20,060 --> 00:10:22,040 A lot of that gets reflected back in 179 00:10:22,040 --> 00:10:23,580 and you need some way to filter that out. 180 00:10:23,840 --> 00:10:27,380 So, you need to dump all of the carrier that you don't want 181 00:10:27,380 --> 00:10:30,440 and just look for the modulated data that's coming back from the tag. 182 00:10:31,700 --> 00:10:37,160 That's not a particularly important factor 183 00:10:37,160 --> 00:10:38,880 until you get up to about half a mile. 184 00:10:39,260 --> 00:10:41,160 We did a whole bunch of number crunching on it 185 00:10:41,160 --> 00:10:43,800 and we reckon that half a mile is kind of the bridge point 186 00:10:44,800 --> 00:10:47,700 where just simply dumping more power into it 187 00:10:47,700 --> 00:10:48,960 will not give you more read range. 188 00:10:49,880 --> 00:10:52,800 That is the point at which you need to design your own preamp. 189 00:10:54,180 --> 00:10:56,900 Again, it's 900 megahertz design, 190 00:10:57,020 --> 00:11:01,320 so it's inherently sensitive to noise and things like that, 191 00:11:01,420 --> 00:11:04,580 but the actual amplifier itself isn't particularly complicated. 192 00:11:05,940 --> 00:11:07,460 We haven't looked at doing it yet. 193 00:11:07,480 --> 00:11:10,420 We haven't had time with all the other gear that we've got. 194 00:11:11,160 --> 00:11:15,240 I do promise that we will set the 900 megahertz world record for RFID. 195 00:11:15,780 --> 00:11:17,260 We will do that at some point. 196 00:11:17,420 --> 00:11:22,040 I'm also contemplating running an RFID range shootout competition 197 00:11:22,040 --> 00:11:23,160 at DEF CON next year. 198 00:11:23,760 --> 00:11:26,780 Show of hands, anyone that would be interested in an RFID range shootout? 199 00:11:27,480 --> 00:11:29,500 Okay, I might see about that then. 200 00:11:31,000 --> 00:11:31,520 Okay. 201 00:11:33,680 --> 00:11:36,420 So, this is the prox pick. 202 00:11:36,700 --> 00:11:39,020 This is the 125 kilohertz reader. 203 00:11:41,160 --> 00:11:43,740 I want to kind of go through this schematic in some detail 204 00:11:44,400 --> 00:11:49,400 and kind of explain why RFID is different from radio. 205 00:11:49,900 --> 00:11:53,000 If you treat RFID like a radio system 206 00:11:53,000 --> 00:11:56,700 and you just try and amplify it up and increase your gain, 207 00:11:56,900 --> 00:11:57,760 you will fail. 208 00:11:57,920 --> 00:12:02,080 There's a number of things that are very specific to RFID 209 00:12:02,080 --> 00:12:04,820 that just kind of don't map over from radio, 210 00:12:04,960 --> 00:12:10,740 so it's kind of a bizarre system to try and build if you're a radio geek. 211 00:12:12,140 --> 00:12:16,660 So, I don't know if I can get my oscilloscope working, hopefully. 212 00:12:18,520 --> 00:12:22,260 So, let me walk you through the circuit really quick first. 213 00:12:23,580 --> 00:12:24,860 I'll use this one over here. 214 00:12:26,620 --> 00:12:30,660 So, you come out from the pick. 215 00:12:30,920 --> 00:12:34,820 You generate a 125 kilohertz square wave and feed it in here. 216 00:12:35,320 --> 00:12:37,300 You're limited to about 30 milliamps. 217 00:12:37,740 --> 00:12:41,100 So, the first thing that you need to do is amplify it up. 218 00:12:41,160 --> 00:12:44,460 So, this first transistor here, 219 00:12:44,660 --> 00:12:48,560 this is just configured as a voltage buffer. 220 00:12:49,480 --> 00:12:51,280 The pick runs on 5 volts, 221 00:12:51,360 --> 00:12:53,960 and we want to be able to scale to any arbitrary voltage 222 00:12:53,960 --> 00:12:55,180 that we want to dump into it. 223 00:12:55,500 --> 00:12:57,720 Like I said, we can handle up to about 60 volts 224 00:12:57,720 --> 00:12:59,700 just with the components that we're rated to at the moment. 225 00:13:01,360 --> 00:13:02,680 So, amplify it up. 226 00:13:03,680 --> 00:13:05,720 Just a normal inverting amplifier 227 00:13:06,520 --> 00:13:08,100 followed by an emitter follower pair. 228 00:13:08,940 --> 00:13:09,860 So, this is... 229 00:13:09,860 --> 00:13:12,620 This forms the entirety of the power output stage. 230 00:13:12,800 --> 00:13:15,140 The first transistor acts as a voltage amplifier. 231 00:13:15,540 --> 00:13:18,680 The second pair of transistors acts as a current amplifier. 232 00:13:19,040 --> 00:13:20,760 So, on the positive half of the signal, 233 00:13:20,940 --> 00:13:24,140 you're effectively shorting whatever your supply voltage is, 234 00:13:24,220 --> 00:13:26,120 just shorting that straight into the coil. 235 00:13:26,640 --> 00:13:28,660 On the negative phase, 236 00:13:29,260 --> 00:13:31,760 this PNP transistor right at the bottom here, 237 00:13:32,360 --> 00:13:34,420 that will turn on during the negative phase 238 00:13:34,420 --> 00:13:36,540 and it will dump the power back out of the coil. 239 00:13:36,840 --> 00:13:39,280 So, given that we're feeding a square wave into it 240 00:13:39,280 --> 00:13:39,960 and it's an inductor, 241 00:13:40,020 --> 00:13:41,900 we get very, very rapid changes in current. 242 00:13:42,040 --> 00:13:43,800 We get lots of flyback voltage. 243 00:13:44,120 --> 00:13:46,000 And coming out here, 244 00:13:46,180 --> 00:13:48,740 between the end of the inductor and this capacitor, 245 00:13:50,040 --> 00:13:51,720 there we've got about... 246 00:13:52,280 --> 00:13:54,540 Well, typically about 150 volts. 247 00:13:54,740 --> 00:13:56,540 We're rated to 400 volts up there. 248 00:13:56,600 --> 00:13:57,840 We're getting about 60. 249 00:13:59,500 --> 00:14:02,060 So, the next thing that we do... 250 00:14:02,060 --> 00:14:04,840 Let's see if this works so I can get an oscilloscope trace up. 251 00:14:10,180 --> 00:14:10,540 Okay. 252 00:14:10,780 --> 00:14:12,400 Kind of got an oscilloscope trace. 253 00:14:12,980 --> 00:14:14,320 So, let me give this thing power. 254 00:14:23,320 --> 00:14:23,680 Okay. 255 00:14:23,760 --> 00:14:24,800 Do we actually have a trace there? 256 00:14:25,080 --> 00:14:25,740 Oh, there we go. 257 00:14:26,420 --> 00:14:26,780 Awesome. 258 00:14:26,920 --> 00:14:27,360 It's working. 259 00:14:28,920 --> 00:14:30,780 So, this is what we get out of the coil. 260 00:14:30,900 --> 00:14:33,940 This is between the inductor that you saw horizontally 261 00:14:34,320 --> 00:14:36,000 and the capacitor that sits vertically. 262 00:14:36,240 --> 00:14:37,880 These two components are tuned, 263 00:14:37,880 --> 00:14:40,340 so they're resonant at 125 kilohertz. 264 00:14:40,880 --> 00:14:43,820 This is why you can put 12 volts into it 265 00:14:43,820 --> 00:14:46,620 and this is currently producing... 266 00:14:54,760 --> 00:14:57,260 So, that's currently 70 volts peak to peak 267 00:14:57,900 --> 00:14:59,280 from a 12-volt rail. 268 00:14:59,440 --> 00:15:00,400 So, that's healthy. 269 00:15:00,720 --> 00:15:01,380 That's not too bad. 270 00:15:02,460 --> 00:15:04,220 The idea is that... 271 00:15:04,780 --> 00:15:07,240 Can everyone see the oscilloscope traces okay? 272 00:15:08,040 --> 00:15:08,560 Awesome. 273 00:15:09,320 --> 00:15:12,680 So, the idea is that you get your RFID tag. 274 00:15:12,880 --> 00:15:14,480 I have a whole bunch of them here. 275 00:15:15,400 --> 00:15:17,000 I'm not going to use... 276 00:15:18,000 --> 00:15:20,680 I'm actually going to use an HID Prox card, 277 00:15:20,840 --> 00:15:23,520 not because there's anything particularly special about HID Prox. 278 00:15:23,600 --> 00:15:26,320 It just happens to be much more visible on the oscilloscope trace. 279 00:15:26,700 --> 00:15:28,400 So, we drop that into our antenna. 280 00:15:28,820 --> 00:15:30,140 This is my antenna. 281 00:15:31,920 --> 00:15:36,440 This is just like 50 turns or so of 26-gauge wire. 282 00:15:36,440 --> 00:15:38,440 This used to be a table. 283 00:15:42,080 --> 00:15:44,420 Oddly, it was my wife's suggestion that I destroy it. 284 00:15:45,900 --> 00:15:48,440 So, we drop our tag into the middle of our coil 285 00:15:48,440 --> 00:15:51,860 and you can see that the trace... 286 00:15:51,860 --> 00:15:54,040 If you look at the very top and bottom edges of that trace, 287 00:15:54,220 --> 00:15:56,880 you can see it just kind of wiggling up and down a little tiny bit. 288 00:15:57,120 --> 00:15:57,980 That's the modulation. 289 00:15:58,460 --> 00:16:03,020 So, that's the entirety of the signal from the card at this point. 290 00:16:04,160 --> 00:16:06,320 So, what we've got, in effect, 291 00:16:06,440 --> 00:16:10,460 is we've got somewhere north of a watt of power 292 00:16:10,460 --> 00:16:12,440 being dumped into that coil. 293 00:16:13,780 --> 00:16:17,140 It gets transformed from 12 volts at reasonable current 294 00:16:17,140 --> 00:16:19,620 to high voltage, lower current. 295 00:16:19,680 --> 00:16:20,560 That's what the coil does. 296 00:16:20,680 --> 00:16:22,540 It kind of mutates the one into the other. 297 00:16:22,860 --> 00:16:24,400 So, we've got very high voltage. 298 00:16:24,640 --> 00:16:26,200 We've got lots of power behind it. 299 00:16:26,340 --> 00:16:28,300 And we've got a very, very small signal. 300 00:16:28,440 --> 00:16:29,620 So, our modulation depth, 301 00:16:30,400 --> 00:16:33,880 given that we've got about 70 volts of carrier, 302 00:16:34,560 --> 00:16:35,960 we're looking at maybe... 303 00:16:35,960 --> 00:16:37,700 maybe 2 volts of modulation depth. 304 00:16:38,180 --> 00:16:39,220 So, what we've got to do 305 00:16:39,220 --> 00:16:41,740 is we've got to separate that signal from the carrier, 306 00:16:41,960 --> 00:16:43,460 reject all of the carrier, 307 00:16:43,620 --> 00:16:45,280 and just pass the modulation. 308 00:16:46,840 --> 00:16:49,700 So, the way that we do that... 309 00:16:50,940 --> 00:16:55,900 Can I come back to the schematic real quick? 310 00:16:56,840 --> 00:16:58,400 Is Vista going to cooperate with me? 311 00:16:58,540 --> 00:16:59,960 Yes, it is. Awesome. 312 00:17:00,440 --> 00:17:02,160 So, the way that we do that... 313 00:17:03,340 --> 00:17:04,240 First thing that we do 314 00:17:04,240 --> 00:17:06,740 is half-wave rectify with this diode here. 315 00:17:07,060 --> 00:17:08,660 So, what that effectively does 316 00:17:08,660 --> 00:17:10,300 is it just completely cuts off 317 00:17:10,300 --> 00:17:11,880 the negative half of the supply. 318 00:17:12,240 --> 00:17:14,560 So, everything that we're doing from this point forward 319 00:17:14,560 --> 00:17:16,340 is positive with respect to ground. 320 00:17:18,400 --> 00:17:22,200 We then have this resistor going to ground 321 00:17:22,200 --> 00:17:23,940 and this capacitor going to ground. 322 00:17:24,180 --> 00:17:26,180 This is... It's called a tank circuit. 323 00:17:26,400 --> 00:17:27,300 It's an AM detector. 324 00:17:28,010 --> 00:17:31,480 So, the idea is that on the very positive spikes, 325 00:17:31,860 --> 00:17:33,680 that capacitor will charge up 326 00:17:33,680 --> 00:17:35,780 to whatever voltage it gets to. 327 00:17:36,240 --> 00:17:37,880 When the voltage drops off, 328 00:17:38,020 --> 00:17:39,760 the capacitor will start slowly leaking 329 00:17:39,760 --> 00:17:40,620 through that resistor. 330 00:17:41,860 --> 00:17:43,780 So, if we take a look 331 00:17:43,780 --> 00:17:46,400 at the trace coming out of there... 332 00:17:54,500 --> 00:17:56,520 We can see straightaway... 333 00:17:56,520 --> 00:17:59,160 So, I haven't changed the scale on the oscilloscope. 334 00:18:00,360 --> 00:18:01,940 And straightaway, you can see 335 00:18:01,940 --> 00:18:03,140 that it's a much smaller signal. 336 00:18:03,140 --> 00:18:06,220 So, let me put my scope down to times one. 337 00:18:07,300 --> 00:18:07,700 Okay. 338 00:18:08,160 --> 00:18:09,600 So, that's the peak detector output, 339 00:18:10,200 --> 00:18:11,640 if everyone can see that. 340 00:18:11,740 --> 00:18:13,060 Let me try moving that over a little. 341 00:18:22,140 --> 00:18:23,320 Is that a little better? 342 00:18:24,220 --> 00:18:24,620 Okay. 343 00:18:24,980 --> 00:18:26,640 So, this is the output from our peak detector. 344 00:18:26,780 --> 00:18:29,860 You can see it's AC coupled, 345 00:18:29,960 --> 00:18:32,320 which is why the negative side 346 00:18:32,320 --> 00:18:32,960 of the... 347 00:18:32,960 --> 00:18:35,400 Sorry, the lower voltage side 348 00:18:35,400 --> 00:18:38,060 of the trace is moving up and down. 349 00:18:38,180 --> 00:18:40,060 That should be completely flat, more or less. 350 00:18:40,520 --> 00:18:42,760 And you can see that we've got... 351 00:18:43,580 --> 00:18:45,060 We've got modulation here, 352 00:18:45,640 --> 00:18:47,240 which is much more visible 353 00:18:47,240 --> 00:18:48,840 than was present on the coil. 354 00:18:49,260 --> 00:18:50,280 So, we've... 355 00:18:51,640 --> 00:18:52,340 There we go. 356 00:18:52,420 --> 00:18:53,940 That's a good, clean signal. 357 00:18:54,160 --> 00:18:55,380 So, we've already rejected 358 00:18:57,280 --> 00:19:01,680 80-90% of the coil carrier voltage at this point, 359 00:19:01,680 --> 00:19:03,100 just with a peak detector. 360 00:19:03,780 --> 00:19:06,100 Now, the problem with this is, 361 00:19:06,320 --> 00:19:08,000 if I come back here... 362 00:19:11,400 --> 00:19:14,040 This is one of the first major problems 363 00:19:14,040 --> 00:19:14,960 with RFID systems. 364 00:19:16,000 --> 00:19:18,160 You've got an awful lot of power 365 00:19:18,160 --> 00:19:19,380 coming through this coil 366 00:19:19,380 --> 00:19:21,260 into this peak detector circuit. 367 00:19:21,940 --> 00:19:24,100 So, there's, you know, plenty of power 368 00:19:24,100 --> 00:19:25,740 available to charge that capacitor. 369 00:19:27,220 --> 00:19:29,400 What you don't want is you don't want 370 00:19:29,400 --> 00:19:31,040 the voltage on this tank circuit. 371 00:19:31,040 --> 00:19:33,000 You don't want that to leak out too quickly, 372 00:19:33,500 --> 00:19:35,140 because the more voltage 373 00:19:35,140 --> 00:19:36,320 that leaks out of that, 374 00:19:36,880 --> 00:19:39,060 the more carrier is going to leak through 375 00:19:39,680 --> 00:19:40,760 with your signal, because 376 00:19:40,760 --> 00:19:43,300 you only want to drop about 5 volts 377 00:19:43,300 --> 00:19:45,520 per carrier wave. 378 00:19:45,940 --> 00:19:47,200 Any more than that, and you're just 379 00:19:47,200 --> 00:19:49,420 catching carrier, and it's all just noise 380 00:19:49,420 --> 00:19:50,400 that you need to filter out. 381 00:19:51,520 --> 00:19:53,040 So, what you end up with 382 00:19:53,040 --> 00:19:55,680 is you need as large a capacitor 383 00:19:55,680 --> 00:19:56,720 as you can get here, 384 00:19:56,860 --> 00:19:58,920 so that it charges up as high as possible. 385 00:19:59,460 --> 00:20:01,020 And then you need as high a voltage 386 00:20:01,040 --> 00:20:02,380 and impedance as possible, 387 00:20:02,580 --> 00:20:04,200 both with this resistor 388 00:20:04,200 --> 00:20:05,980 that forms the tank circuit, 389 00:20:06,280 --> 00:20:08,480 as well as the impedance of the rest 390 00:20:08,480 --> 00:20:09,240 of the receive chain. 391 00:20:10,000 --> 00:20:12,680 So, currently this is configured. 392 00:20:13,100 --> 00:20:14,900 The tank circuit 393 00:20:14,900 --> 00:20:16,860 sees a load of about 394 00:20:16,860 --> 00:20:17,900 10 megaohms, 395 00:20:18,600 --> 00:20:20,580 which is how we've got the noise 396 00:20:20,580 --> 00:20:21,840 down to such a manageable figure. 397 00:20:22,360 --> 00:20:25,240 So, straight away, 398 00:20:25,340 --> 00:20:26,040 we've got the situation 399 00:20:26,040 --> 00:20:28,320 where we can't draw any power out of it. 400 00:20:28,440 --> 00:20:29,980 We've got a huge amount of power 401 00:20:31,040 --> 00:20:31,180 in the tank circuit, 402 00:20:31,180 --> 00:20:33,300 and the more power that we draw out of it, 403 00:20:33,360 --> 00:20:34,700 the more noise we get that we're just 404 00:20:34,700 --> 00:20:35,840 going to have to filter out anyway. 405 00:20:36,180 --> 00:20:38,500 So, we want to make sure that we've got 406 00:20:38,500 --> 00:20:40,000 our impedances as high as possible. 407 00:20:42,000 --> 00:20:43,180 The way that we do that, 408 00:20:45,780 --> 00:20:46,820 the peak detector, 409 00:20:47,040 --> 00:20:48,520 so this oscilloscope trace 410 00:20:48,520 --> 00:20:49,240 that I showed you, 411 00:20:49,940 --> 00:20:51,960 that's the AC component of the signal. 412 00:20:52,220 --> 00:20:52,920 Now, don't forget, 413 00:20:53,000 --> 00:20:54,760 we half-wave rectified it first, 414 00:20:55,060 --> 00:20:58,500 so we're only on the positive phase, 415 00:20:58,640 --> 00:20:59,940 and this signal that we've got 416 00:21:01,040 --> 00:21:02,480 is a couple of volts of ripple voltage 417 00:21:02,480 --> 00:21:04,980 that's floating 60 volts up in the air. 418 00:21:05,820 --> 00:21:06,840 So, first off, 419 00:21:06,960 --> 00:21:08,800 we need to block that DC voltage 420 00:21:08,800 --> 00:21:11,140 in order to get it back down into a range 421 00:21:11,140 --> 00:21:12,320 at which we can work with it again. 422 00:21:12,840 --> 00:21:14,780 So, that's what this 423 00:21:15,420 --> 00:21:16,720 capacitor right here does. 424 00:21:16,980 --> 00:21:18,400 That's a DC blocking capacitor. 425 00:21:18,820 --> 00:21:21,900 It forms a high-pass filter 426 00:21:21,900 --> 00:21:23,360 with this resistor. 427 00:21:24,180 --> 00:21:25,420 So, that helps us 428 00:21:25,420 --> 00:21:26,600 get rid of a little bit of the noise, 429 00:21:26,800 --> 00:21:27,940 blocks out the DC, 430 00:21:28,200 --> 00:21:30,000 and then we go straight into 431 00:21:31,040 --> 00:21:31,460 amplifying it from there, 432 00:21:31,580 --> 00:21:33,440 so that we can amplify it up. 433 00:21:33,940 --> 00:21:35,960 The idea of choosing the op-amp, 434 00:21:38,300 --> 00:21:40,100 op-amps generally have 435 00:21:40,100 --> 00:21:42,300 extremely high input impedances. 436 00:21:42,640 --> 00:21:44,700 So, we're looking at just the raw voltage. 437 00:21:44,800 --> 00:21:46,500 We're not actually loading the circuit at all. 438 00:21:46,980 --> 00:21:49,300 So, our AM detector 439 00:21:49,920 --> 00:21:50,840 is only clipping 440 00:21:50,840 --> 00:21:52,380 the very, very top of the signal off, 441 00:21:52,460 --> 00:21:54,120 which has got all the data that we're interested in. 442 00:21:55,120 --> 00:21:56,940 So, if I just kind of step through 443 00:21:56,940 --> 00:21:58,120 this on the oscilloscope now, 444 00:21:58,800 --> 00:22:00,820 having explained the basic mode of operation, 445 00:22:02,420 --> 00:22:05,100 so, this is the output 446 00:22:05,100 --> 00:22:06,100 from the peak detector. 447 00:22:07,500 --> 00:22:08,920 If you look at the read range 448 00:22:08,920 --> 00:22:10,680 from the coil right here, 449 00:22:12,900 --> 00:22:13,660 you can 450 00:22:13,660 --> 00:22:14,780 more or less 451 00:22:14,780 --> 00:22:15,600 see modulation 452 00:22:16,860 --> 00:22:17,720 about there. 453 00:22:17,880 --> 00:22:19,440 A few inches of read range. 454 00:22:19,700 --> 00:22:20,480 Not very good. 455 00:22:20,560 --> 00:22:21,940 We need to clean the signal up a bit more. 456 00:22:23,180 --> 00:22:24,960 So, we come out of that 457 00:22:25,900 --> 00:22:27,360 and into our 458 00:22:29,500 --> 00:22:31,020 low high-pass filter. 459 00:22:31,040 --> 00:22:31,820 I beg your pardon. 460 00:22:32,720 --> 00:22:35,080 And our signal gets a little smaller still 461 00:22:35,080 --> 00:22:36,440 because we're still filtering. 462 00:22:38,540 --> 00:22:39,080 However, 463 00:22:40,160 --> 00:22:41,560 when you drop the card in, 464 00:22:41,680 --> 00:22:43,420 you've got pretty clear modulation. 465 00:22:44,040 --> 00:22:44,880 And again, 466 00:22:45,220 --> 00:22:46,800 we've got a little less carrier 467 00:22:46,800 --> 00:22:48,020 and a little more signal. 468 00:22:48,700 --> 00:22:51,220 So, if I just zoom in a little here. 469 00:22:53,680 --> 00:22:54,700 So, you can see 470 00:22:54,700 --> 00:22:56,500 the ratio between 471 00:22:56,790 --> 00:22:59,320 the amount of modulation depth that you've got 472 00:22:59,320 --> 00:23:00,940 versus the amount of noise 473 00:23:01,040 --> 00:23:01,980 that you've got from the carrier. 474 00:23:02,580 --> 00:23:04,420 It's getting higher as you progress 475 00:23:04,420 --> 00:23:05,260 through the circuit. 476 00:23:07,160 --> 00:23:08,400 That's the point at which 477 00:23:09,040 --> 00:23:11,000 the output of this 478 00:23:11,000 --> 00:23:12,680 goes into an op-amp circuit 479 00:23:12,680 --> 00:23:14,560 and gets amplified up. 480 00:23:15,760 --> 00:23:16,880 The problem 481 00:23:16,880 --> 00:23:18,640 with that is one of 482 00:23:18,640 --> 00:23:19,380 dynamic range. 483 00:23:20,220 --> 00:23:22,880 We've got extremely high voltage swings. 484 00:23:23,560 --> 00:23:25,160 120 volts peak-to-peak 485 00:23:25,160 --> 00:23:25,780 trivially. 486 00:23:26,080 --> 00:23:28,420 200 volts peak-to-peak is very manageable. 487 00:23:28,540 --> 00:23:30,900 I'm actually rated to 400 volts peak-to-peak. 488 00:23:31,040 --> 00:23:33,300 Huge voltages flying back and forth. 489 00:23:33,620 --> 00:23:35,500 And we've got tiny, tiny, 490 00:23:35,580 --> 00:23:37,120 tiny modulation depths on the top. 491 00:23:37,440 --> 00:23:38,640 So, if you were to 492 00:23:38,640 --> 00:23:40,420 try to do this digitally, 493 00:23:40,660 --> 00:23:42,760 just by sampling it with an ADC 494 00:23:42,760 --> 00:23:43,840 at the peak of every carrier, 495 00:23:44,080 --> 00:23:45,440 it's not going to work. 496 00:23:45,600 --> 00:23:47,840 Because if you've got a 16-bit ADC even, 497 00:23:48,700 --> 00:23:49,860 you're going to be sampling 498 00:23:49,860 --> 00:23:52,700 15 bits of resolution to cover 499 00:23:52,700 --> 00:23:54,700 the 120, 200-volt swing 500 00:23:54,700 --> 00:23:56,340 of the carrier, and you're going to have 501 00:23:56,340 --> 00:23:57,680 one bit of resolution left 502 00:23:57,680 --> 00:23:59,140 for the actual modulation depth. 503 00:24:01,040 --> 00:24:02,880 We need to reduce the dynamic range 504 00:24:02,880 --> 00:24:05,040 of the signal before we can do 505 00:24:05,040 --> 00:24:06,240 anything digital with it. 506 00:24:06,700 --> 00:24:08,740 And as it turns out, going digital is 507 00:24:08,740 --> 00:24:10,120 quite an expensive option. 508 00:24:10,500 --> 00:24:12,320 There's a device called the Proxmark 3. 509 00:24:12,560 --> 00:24:14,440 I don't know if many people have heard of it. 510 00:24:14,800 --> 00:24:16,700 It's a general-purpose RFID 511 00:24:16,700 --> 00:24:18,100 experimentation platform. 512 00:24:19,020 --> 00:24:20,280 It's very, very powerful. 513 00:24:20,400 --> 00:24:22,540 It's based on an ARM CPU and 514 00:24:22,540 --> 00:24:23,900 digital signal processor. 515 00:24:24,720 --> 00:24:27,100 Because of that, they cost about $500. 516 00:24:28,000 --> 00:24:28,820 Because this 517 00:24:28,820 --> 00:24:31,200 is based on a PIC microcontroller 518 00:24:31,200 --> 00:24:32,500 and an analog receive chain, 519 00:24:32,800 --> 00:24:34,420 the analog path has 520 00:24:34,420 --> 00:24:36,160 extremely good dynamic range. 521 00:24:36,380 --> 00:24:38,720 Far better than you'd ever get from... 522 00:24:38,720 --> 00:24:40,660 Oh, crap, 10 minutes. Okay, got to move on. 523 00:24:41,640 --> 00:24:42,380 Okay, so 524 00:24:42,380 --> 00:24:44,380 anyway, you do it in analog because you get better 525 00:24:44,380 --> 00:24:46,460 dynamic range, and you don't need to worry about it. 526 00:24:47,500 --> 00:24:48,620 So, right here, 527 00:24:48,740 --> 00:24:49,800 you can see 528 00:24:50,900 --> 00:24:52,520 the card is detectable 529 00:24:53,160 --> 00:24:54,020 from about here. 530 00:24:54,560 --> 00:24:56,080 So that's maybe... 531 00:24:56,080 --> 00:24:57,980 Let me hold that up so you can see it at the back. 532 00:24:58,840 --> 00:24:59,280 ... 533 00:25:02,180 --> 00:25:04,320 So you've got a clear signal from 534 00:25:04,320 --> 00:25:05,260 four or five inches. 535 00:25:06,000 --> 00:25:08,080 My reader is actually wigging out and 536 00:25:08,080 --> 00:25:09,900 not being entirely happy at the moment, 537 00:25:09,940 --> 00:25:11,000 so I'm going to leave it there and move on. 538 00:25:12,680 --> 00:25:14,260 Okay, so anyway, 539 00:25:14,940 --> 00:25:16,580 that's the 125 kilohertz circuit. 540 00:25:16,720 --> 00:25:18,340 The major problems that you've got are 541 00:25:18,340 --> 00:25:20,120 input impedance and dynamic range. 542 00:25:20,480 --> 00:25:22,420 So let's go back to the slides 543 00:25:22,420 --> 00:25:24,680 because I want to get on to the boomstick. 544 00:25:27,380 --> 00:25:28,620 You'll like the boomstick. 545 00:25:30,320 --> 00:25:30,880 Okay, so 546 00:25:30,880 --> 00:25:32,020 as I mentioned, the ProxPic, 547 00:25:32,100 --> 00:25:33,400 it's going to be commercially available. 548 00:25:33,560 --> 00:25:35,200 We're aiming for a $50 price point. 549 00:25:36,100 --> 00:25:37,560 Probably available in kit form. 550 00:25:38,320 --> 00:25:40,200 There'll be some slight variations on this, 551 00:25:40,280 --> 00:25:42,180 but we'll deal with that when we come to it. 552 00:25:43,320 --> 00:25:44,420 So, off the shelf, 553 00:25:44,460 --> 00:25:45,900 you're looking at a few inches of read range 554 00:25:45,900 --> 00:25:48,700 with a moderately complicated circuit like this. 555 00:25:48,720 --> 00:25:49,780 You can bump that up to a foot. 556 00:25:49,980 --> 00:25:52,560 If you really worked at it, you could probably get two feet 557 00:25:52,560 --> 00:25:54,120 out of a system like this. 558 00:25:54,640 --> 00:25:56,060 The problem with that is 559 00:25:56,060 --> 00:25:57,880 that that's not what you need to count 560 00:25:57,880 --> 00:25:58,640 as your read range. 561 00:25:59,340 --> 00:26:01,440 Your read range is actually 562 00:26:01,440 --> 00:26:03,300 largely irrelevant because 563 00:26:04,080 --> 00:26:05,960 I won't show you the oscilloscope trace 564 00:26:05,960 --> 00:26:07,620 because we're kind of running out of time already. 565 00:26:08,400 --> 00:26:09,840 But suffice it to say that 566 00:26:09,840 --> 00:26:12,000 wherever the tag is placed within that 567 00:26:12,000 --> 00:26:13,940 coil, as long as it's within the 568 00:26:13,940 --> 00:26:15,980 coil somewhere, you get a clean signal 569 00:26:15,980 --> 00:26:17,940 from it. So what you can do 570 00:26:17,940 --> 00:26:19,880 is you can wind your coil around 571 00:26:19,880 --> 00:26:22,120 a door such that every tag 572 00:26:22,120 --> 00:26:24,020 that walks through goes through the coil 573 00:26:24,020 --> 00:26:25,980 and you get a clean read on every 574 00:26:26,060 --> 00:26:27,940 tag. I don't give a damn 575 00:26:27,940 --> 00:26:29,800 how far away that'll read. If I can read 576 00:26:29,800 --> 00:26:31,200 every tag that comes through a door, 577 00:26:31,420 --> 00:26:32,680 surely that's a valid attack. 578 00:26:34,140 --> 00:26:35,900 You can actually do that with anything 579 00:26:35,900 --> 00:26:37,160 that's inductively coupled. 580 00:26:37,480 --> 00:26:39,460 You can't do it with this 900 MHz gear 581 00:26:39,460 --> 00:26:41,880 but you don't really need to because it's already long range. 582 00:26:42,860 --> 00:26:44,100 1356 and Prox, 583 00:26:44,180 --> 00:26:45,680 you can do it really easily. 584 00:26:46,120 --> 00:26:47,840 I'm actually going to be hanging out at the hardware 585 00:26:47,840 --> 00:26:50,040 hacking village for the rest of the day. 586 00:26:50,180 --> 00:26:51,740 I've brought some magnet wire with me 587 00:26:51,740 --> 00:26:53,760 if someone wants to help out 588 00:26:53,760 --> 00:26:55,920 and we'll try and make a Prox reader 589 00:26:56,440 --> 00:26:58,140 Prox antenna for a doorway 590 00:26:58,140 --> 00:26:59,820 and see just how efficient it is. 591 00:26:59,880 --> 00:27:00,800 I've got everything that we need. 592 00:27:02,500 --> 00:27:02,940 So, 593 00:27:04,000 --> 00:27:05,800 let's go back to the myth. 900 MHz. 594 00:27:06,840 --> 00:27:08,340 Range of 20 to 30 feet, 595 00:27:08,460 --> 00:27:09,460 half a mile is achievable. 596 00:27:09,740 --> 00:27:11,680 Is it short range? Totally busted. 597 00:27:12,700 --> 00:27:14,040 13.56 MHz. 598 00:27:14,580 --> 00:27:15,920 I'm standing here claiming 599 00:27:15,920 --> 00:27:17,700 that we've got amplifiers that'll 600 00:27:17,700 --> 00:27:19,760 give us a few feet of read range or 601 00:27:19,760 --> 00:27:22,060 cover a door. I haven't got the gear to actually 602 00:27:22,060 --> 00:27:23,980 prove that so I kind of got 603 00:27:23,980 --> 00:27:25,120 to call that plausible. 604 00:27:26,340 --> 00:27:27,300 125 KHz. 605 00:27:28,320 --> 00:27:29,840 Well, you've seen read range 606 00:27:29,840 --> 00:27:31,720 here of, that's about 6 inches. 607 00:27:32,940 --> 00:27:33,900 The next 608 00:27:33,900 --> 00:27:35,920 amplifier stage, the op-amp 609 00:27:35,920 --> 00:27:38,040 stage is actually broken on this particular circuit 610 00:27:38,520 --> 00:27:39,880 so I can't show you that. 611 00:27:40,120 --> 00:27:41,840 But it's definitely 612 00:27:41,840 --> 00:27:43,880 busted. There is no way that you can claim that 613 00:27:43,880 --> 00:27:45,400 125 KHz is short range 614 00:27:45,400 --> 00:27:47,360 when you can wind a coil around a door 615 00:27:47,880 --> 00:27:48,880 and capture everything. 616 00:27:49,620 --> 00:27:51,620 The only practical limit to that attack 617 00:27:51,620 --> 00:27:53,840 is how stealthily 618 00:27:53,840 --> 00:27:54,980 you can hide your coil. 619 00:27:56,560 --> 00:27:57,040 So, 620 00:27:57,680 --> 00:27:59,940 one out of three is plausible, two out of three 621 00:27:59,940 --> 00:28:01,920 busted. I think we've got to call short range busted. 622 00:28:02,840 --> 00:28:03,320 Okay. 623 00:28:04,400 --> 00:28:05,400 RFID is secure. 624 00:28:07,020 --> 00:28:08,080 You'll like this one. 625 00:28:09,460 --> 00:28:09,940 So, 626 00:28:10,040 --> 00:28:11,460 first thing that we've got to do. 627 00:28:12,220 --> 00:28:13,960 First thing we've got to do is fork the myth. 628 00:28:14,200 --> 00:28:15,980 So, I mentioned this industry 629 00:28:15,980 --> 00:28:18,280 term, contactless smart card. 630 00:28:19,300 --> 00:28:19,780 It's 631 00:28:19,780 --> 00:28:21,960 interesting because the industry 632 00:28:21,960 --> 00:28:23,820 that pushes this term to try and separate 633 00:28:23,820 --> 00:28:25,600 themselves from RFID, 634 00:28:26,660 --> 00:28:27,880 don't actually use 635 00:28:27,880 --> 00:28:29,480 the term contactless smart card. 636 00:28:29,720 --> 00:28:31,760 If you look at your credit card, it won't say 637 00:28:31,760 --> 00:28:33,800 I'm a contactless smart card credit card. 638 00:28:33,960 --> 00:28:35,600 It'll say I'm an RFID credit card. 639 00:28:36,040 --> 00:28:37,840 So, the industry doesn't use their own 640 00:28:37,840 --> 00:28:39,780 terminology that they're trying to enforce to 641 00:28:39,780 --> 00:28:41,860 separate it, but whatever. We'll give them the 642 00:28:41,860 --> 00:28:43,800 benefit of the doubt. We'll say, okay, maybe there's something 643 00:28:43,800 --> 00:28:45,420 different between a contactless smart card 644 00:28:45,420 --> 00:28:48,000 and an RFID tag, so we'll consider 645 00:28:48,000 --> 00:28:49,900 them separately. Two things 646 00:28:49,900 --> 00:28:51,680 that we need to know about them. Firstly, 647 00:28:51,820 --> 00:28:53,080 are the tags themselves secure? 648 00:28:54,240 --> 00:28:55,900 If the tags can be trivially 649 00:28:56,060 --> 00:28:57,900 copied, then the myth is 650 00:28:57,900 --> 00:28:59,960 busted. If the tags can't 651 00:28:59,960 --> 00:29:01,840 be trivially copied, then it comes down to whether 652 00:29:01,840 --> 00:29:03,640 the infrastructure surrounding the tags 653 00:29:03,640 --> 00:29:05,720 is secure. If you can break the 654 00:29:05,720 --> 00:29:07,900 system, then you don't 655 00:29:07,900 --> 00:29:09,220 necessarily need to break the tag. 656 00:29:09,820 --> 00:29:11,640 So, let's consider both. 657 00:29:12,020 --> 00:29:13,700 Just to be clear, 125 658 00:29:13,700 --> 00:29:15,620 kilohertz prox and 659 00:29:15,620 --> 00:29:18,320 13 point, sorry, 900 megahertz, 660 00:29:18,480 --> 00:29:20,020 those are RFID 661 00:29:20,020 --> 00:29:22,380 systems. 13.56 662 00:29:22,380 --> 00:29:23,840 is pay pass, that's 663 00:29:23,840 --> 00:29:25,520 contactless smart card. 664 00:29:27,140 --> 00:29:27,660 So, 665 00:29:27,860 --> 00:29:29,600 are RFID tags secure? 666 00:29:30,720 --> 00:29:31,760 125 kilohertz, 667 00:29:31,820 --> 00:29:33,500 the answer is just plain flat, 668 00:29:33,680 --> 00:29:35,840 no. This device 669 00:29:35,840 --> 00:29:36,660 here, the 670 00:29:37,480 --> 00:29:39,760 receive chain is kind of 671 00:29:39,760 --> 00:29:41,660 broken at the moment, but when it does 672 00:29:41,660 --> 00:29:43,400 work, we're able to copy 673 00:29:44,200 --> 00:29:45,700 several different formats of 674 00:29:45,700 --> 00:29:47,780 HID prox. We can read Indala, 675 00:29:47,940 --> 00:29:49,720 we can read VeriChip, EM4100, 676 00:29:49,900 --> 00:29:51,880 all of these tags. Every single one of 677 00:29:51,880 --> 00:29:53,660 them, we can read them, we can copy them, 678 00:29:53,740 --> 00:29:55,920 we can replay them. We can't 679 00:29:56,060 --> 00:29:57,900 clone TI type tags, just purely 680 00:29:57,900 --> 00:29:59,980 because they use a slightly different method 681 00:29:59,980 --> 00:30:01,940 to energize the tag. We can 682 00:30:01,940 --> 00:30:04,000 support them with a firmware upgrade as soon as 683 00:30:04,000 --> 00:30:06,020 someone actually gives us a sample that we can code against. 684 00:30:07,360 --> 00:30:07,840 We 685 00:30:07,840 --> 00:30:09,960 deliberately left out playback functionality from 686 00:30:09,960 --> 00:30:11,580 this, it will be present in the final device. 687 00:30:12,080 --> 00:30:13,660 That was for privacy 688 00:30:13,660 --> 00:30:15,820 concerns over the demo 689 00:30:15,820 --> 00:30:16,560 that didn't happen. 690 00:30:17,520 --> 00:30:19,840 We do also have working code for HITag2. 691 00:30:20,400 --> 00:30:21,840 The fact that I'm working with 692 00:30:21,840 --> 00:30:24,020 Cast and Null at hardware should give 693 00:30:24,020 --> 00:30:25,160 that definite credibility. 694 00:30:26,220 --> 00:30:27,880 The HITag is an encrypted 695 00:30:27,880 --> 00:30:29,880 tag. The idea 696 00:30:29,880 --> 00:30:30,680 of it is that 697 00:30:31,740 --> 00:30:33,800 there is some kind of cryptographic 698 00:30:33,800 --> 00:30:35,840 exchange. I'm not too familiar with the details 699 00:30:35,840 --> 00:30:37,920 myself, but the upshot 700 00:30:37,920 --> 00:30:39,880 of it is that the final production 701 00:30:39,880 --> 00:30:41,920 version of this device, you can scan 702 00:30:41,920 --> 00:30:43,520 someone's Prius car key, 703 00:30:44,460 --> 00:30:46,200 plug the device into your PC, 704 00:30:46,340 --> 00:30:48,000 do a few hours of number crunching to break the 705 00:30:48,000 --> 00:30:49,900 crypto, upload the result back 706 00:30:49,900 --> 00:30:51,580 to the device, back to the prox pick, 707 00:30:52,020 --> 00:30:53,920 and then not only can you open the doors 708 00:30:53,920 --> 00:30:56,040 on the Prius, you can actually start the car and drive it away. 709 00:30:57,840 --> 00:30:58,360 So... 710 00:31:04,420 --> 00:31:05,760 HITag2 is actually used by 711 00:31:05,760 --> 00:31:07,620 quite a few vehicle manufacturers. 712 00:31:07,960 --> 00:31:09,820 The list that I was given was Prius, 713 00:31:09,860 --> 00:31:11,640 BMW, Lexus, Mercedes, 714 00:31:12,620 --> 00:31:14,060 all the top end vehicles. 715 00:31:14,560 --> 00:31:15,940 It's kind of amusing to 716 00:31:15,940 --> 00:31:17,780 me that $50 of 717 00:31:17,780 --> 00:31:20,080 pick microcontroller can steal 718 00:31:20,080 --> 00:31:22,160 $50,000 of Lexus. 719 00:31:23,260 --> 00:31:24,040 We couldn't 720 00:31:24,040 --> 00:31:25,660 integrate it in time for DEF CON, and it wouldn't make 721 00:31:26,060 --> 00:31:28,060 a good presentation anyway because there's a few hours 722 00:31:28,060 --> 00:31:30,100 of crypto, but we do have it. 723 00:31:30,140 --> 00:31:31,140 It will be in the production devices. 724 00:31:31,680 --> 00:31:34,020 Total security fail on prox 725 00:31:34,020 --> 00:31:35,660 technology. All prox technology. 726 00:31:36,180 --> 00:31:37,960 No one vendor is any 727 00:31:37,960 --> 00:31:39,180 better or worse than anyone else. 728 00:31:39,880 --> 00:31:42,000 HITag2 makes an effort, not a very good one. 729 00:31:42,160 --> 00:31:43,440 It's just all bad. 730 00:31:45,580 --> 00:31:47,720 So, I mentioned that we can clone other tags 731 00:31:47,720 --> 00:31:48,960 that we haven't seen before. 732 00:31:49,920 --> 00:31:51,960 We have a whole pile of 733 00:31:51,960 --> 00:31:53,020 different test tags here. 734 00:31:53,520 --> 00:31:55,940 All different kinds of cars, 735 00:31:56,060 --> 00:31:57,800 and syringes with horrible 736 00:31:57,800 --> 00:31:59,240 injectable microchips in. 737 00:32:00,340 --> 00:32:02,200 Quite possibly the nastiest, 738 00:32:02,200 --> 00:32:03,760 scariest needle I've ever seen 739 00:32:03,760 --> 00:32:04,440 in my life. 740 00:32:06,200 --> 00:32:07,920 Despite all of the different tag 741 00:32:07,920 --> 00:32:09,080 formats, all of the different 742 00:32:09,080 --> 00:32:11,220 data structures that they contain, 743 00:32:11,900 --> 00:32:13,480 there are essentially two 744 00:32:13,980 --> 00:32:14,840 modulation formats. 745 00:32:15,700 --> 00:32:17,740 One of those does two 746 00:32:17,740 --> 00:32:18,640 different bit rates. 747 00:32:19,160 --> 00:32:21,540 So if you can support dynamic bit rates 748 00:32:21,540 --> 00:32:23,340 with two different modulation formats, 749 00:32:23,580 --> 00:32:25,140 you can clone anything. 750 00:32:26,060 --> 00:32:26,440 It's as simple as that. 751 00:32:26,740 --> 00:32:28,720 It all comes down to Manchester encoding. 752 00:32:30,380 --> 00:32:31,860 HITags use a slightly 753 00:32:31,860 --> 00:32:32,800 different encoding scheme. 754 00:32:33,040 --> 00:32:36,000 They layer a thing called FC810 on top of it. 755 00:32:36,520 --> 00:32:37,640 But it's still 756 00:32:37,640 --> 00:32:38,480 Manchester underneath. 757 00:32:38,780 --> 00:32:40,940 Manchester is designed to be very easy to decode. 758 00:32:42,360 --> 00:32:43,860 Our routine on this 759 00:32:44,380 --> 00:32:46,100 doesn't use any memory at all. 760 00:32:46,280 --> 00:32:48,260 And it receives, decodes, 761 00:32:48,260 --> 00:32:49,400 and error checks Manchester 762 00:32:50,060 --> 00:32:51,780 encoded RFID tags in about 763 00:32:51,780 --> 00:32:52,560 20 lines of C. 764 00:32:53,480 --> 00:32:55,880 Very, very easy. So we've got two decode 765 00:32:56,060 --> 00:32:58,060 routines. That'll copy every 766 00:32:58,060 --> 00:32:59,780 RFID tag that lives at 125 767 00:32:59,780 --> 00:33:01,820 kilohertz. The exception being 768 00:33:02,420 --> 00:33:03,960 HITag2 just because there's some back end 769 00:33:03,960 --> 00:33:05,680 crypto. It's 770 00:33:05,680 --> 00:33:07,900 very easy. So quick note about 771 00:33:07,900 --> 00:33:09,200 Manchester for those who don't know. 772 00:33:09,900 --> 00:33:10,340 The 773 00:33:12,700 --> 00:33:13,920 idea is you take 774 00:33:13,920 --> 00:33:15,900 a data one, becomes a one zero. 775 00:33:16,140 --> 00:33:17,880 You get a transition in the middle of every bit. 776 00:33:18,100 --> 00:33:20,140 You can sync on that transition 777 00:33:20,140 --> 00:33:21,200 in the middle of every bit. 778 00:33:22,240 --> 00:33:23,940 And you can check if the 779 00:33:23,940 --> 00:33:25,840 first bit and the last bit in your 780 00:33:26,060 --> 00:33:27,480 Manchester encoded stream. 781 00:33:27,720 --> 00:33:29,740 If those are the same, then you've got invalid 782 00:33:29,740 --> 00:33:31,540 Manchester coding and you can throw an error. 783 00:33:31,720 --> 00:33:32,500 It's very simple. 784 00:33:33,680 --> 00:33:35,960 I'll skip the decode routine. You can look at the source. 785 00:33:36,580 --> 00:33:37,920 Some other features that this 786 00:33:37,920 --> 00:33:39,920 prox pick has, it can sniff tags 787 00:33:39,920 --> 00:33:42,060 passively. We don't need to be the one powering 788 00:33:42,060 --> 00:33:44,040 the tag. We can let someone else's 789 00:33:44,040 --> 00:33:45,560 reader power the tag and we can just 790 00:33:46,060 --> 00:33:47,820 sniff and synchronize on their 791 00:33:47,820 --> 00:33:50,060 carrier and then read their tag 792 00:33:50,060 --> 00:33:52,000 from their carrier. And we can actually power 793 00:33:52,000 --> 00:33:53,860 ourselves passively while we're doing it. 794 00:33:53,860 --> 00:33:55,380 So you put a 795 00:33:55,380 --> 00:33:57,820 one meg EPROM in this. You can 796 00:33:57,820 --> 00:33:59,420 slap it on the wall behind 797 00:33:59,420 --> 00:34:01,280 a legitimate RFID reader. 798 00:34:01,480 --> 00:34:03,560 It'll power itself passively for pretty much 799 00:34:03,560 --> 00:34:05,760 indefinitely and just sit and harvest tags 800 00:34:05,760 --> 00:34:07,660 until you get bored and take it down. 801 00:34:09,400 --> 00:34:11,780 It's also got a semi-active shielding mode. 802 00:34:11,940 --> 00:34:13,720 So the idea of this is 803 00:34:13,720 --> 00:34:15,400 that it detects an incident 804 00:34:15,400 --> 00:34:17,160 carrier from a reader 805 00:34:17,680 --> 00:34:19,640 and it sends out invalid 806 00:34:19,640 --> 00:34:21,700 modulation. So the 807 00:34:21,700 --> 00:34:22,800 idea being that the prox 808 00:34:23,860 --> 00:34:26,040 cards don't have any collision avoidance. 809 00:34:26,180 --> 00:34:27,720 So what this thing does is 810 00:34:27,720 --> 00:34:29,840 it just kind of blurs the data. 811 00:34:29,960 --> 00:34:31,280 It just messes the data up. 812 00:34:31,380 --> 00:34:33,700 Makes it completely impossible to pick 813 00:34:33,700 --> 00:34:35,760 up anything. It's 814 00:34:35,760 --> 00:34:37,520 much better than an RFID shielding wallet 815 00:34:37,520 --> 00:34:39,460 because you can actually 816 00:34:39,460 --> 00:34:41,760 actively interfere with it instead of 817 00:34:41,760 --> 00:34:43,600 just trusting that it's passively being 818 00:34:43,600 --> 00:34:43,940 killed. 819 00:34:45,740 --> 00:34:47,680 Other bands. 900 megahertz. 820 00:34:47,820 --> 00:34:49,820 Trivial to clone. Watch the ShmooCon talk 821 00:34:49,820 --> 00:34:50,920 if you want to know more. 822 00:34:51,320 --> 00:34:53,800 13.56 megahertz. Danger will 823 00:34:53,860 --> 00:34:54,900 Robertson. I smell crypto. 824 00:34:55,480 --> 00:34:57,640 There is some deep voodoo going on at 825 00:34:57,640 --> 00:34:59,500 13.56. We'll come back to that in a sec. 826 00:34:59,720 --> 00:35:01,620 Other bands. I've no idea. Give me 827 00:35:01,620 --> 00:35:02,080 tag samples. 828 00:35:03,860 --> 00:35:05,380 So back to the myth. 829 00:35:05,600 --> 00:35:07,620 We forked it originally and we're 830 00:35:07,620 --> 00:35:09,460 considering RFID differently 831 00:35:09,460 --> 00:35:10,760 from RFID. 832 00:35:13,020 --> 00:35:14,060 So RFID 833 00:35:14,060 --> 00:35:15,540 900 megahertz. 125 834 00:35:15,540 --> 00:35:17,720 kilohertz. Totally busted. 835 00:35:17,800 --> 00:35:19,360 Totally insecure. Wide open. 836 00:35:19,480 --> 00:35:21,660 Trivial to clone. Totally busted. 837 00:35:21,720 --> 00:35:22,840 Not secure in the slightest. 838 00:35:24,580 --> 00:35:26,140 13.56 megahertz. 839 00:35:26,160 --> 00:35:27,500 Contactless smart cards. 840 00:35:27,720 --> 00:35:29,620 These things support deep, deep 841 00:35:29,620 --> 00:35:31,320 voodoo. They support all of the 842 00:35:31,820 --> 00:35:33,860 basic cryptographic primitives that you need 843 00:35:33,860 --> 00:35:35,760 to build any kind of system that you 844 00:35:35,760 --> 00:35:37,880 want. Strong, strong 845 00:35:37,880 --> 00:35:39,280 crypto. Strong algorithms. 846 00:35:39,900 --> 00:35:41,620 They can sign. They can encrypt. 847 00:35:41,740 --> 00:35:43,360 They can key exchange. They can key generate. 848 00:35:43,500 --> 00:35:45,580 All on chip. They have some 849 00:35:45,580 --> 00:35:47,200 insanely powerful capabilities. 850 00:35:47,740 --> 00:35:49,640 It's all written in Java. You can have multiple 851 00:35:49,640 --> 00:35:51,460 applications with multiple data stores. 852 00:35:51,720 --> 00:35:53,840 In theory, that should be secure 853 00:35:53,860 --> 00:35:55,960 secure. In practice, 854 00:35:56,220 --> 00:35:57,440 it's kind of fail. 855 00:35:58,660 --> 00:35:59,580 $200 online 856 00:35:59,580 --> 00:36:01,520 buys you one of these VivoPay readers. 857 00:36:02,900 --> 00:36:03,760 I'll skip the 858 00:36:03,760 --> 00:36:05,280 demo, but I'll 859 00:36:05,730 --> 00:36:07,020 show anyone later if they want. 860 00:36:07,740 --> 00:36:09,020 Suffice it to say that 861 00:36:09,690 --> 00:36:11,740 you take your RFID reader. 862 00:36:11,980 --> 00:36:13,800 You take your contactless credit card. 863 00:36:13,920 --> 00:36:15,660 This actually belongs to a guy who's known to all of his 864 00:36:15,660 --> 00:36:17,600 friends as Spam. Seems kind of 865 00:36:17,600 --> 00:36:19,860 amusing that I'm screwing with Spam's credit card. 866 00:36:21,620 --> 00:36:22,620 Swipe it over the reader. 867 00:36:24,000 --> 00:36:25,740 And it spits out all the card 868 00:36:25,740 --> 00:36:27,880 details over RS232. 869 00:36:28,300 --> 00:36:29,180 So the 870 00:36:29,800 --> 00:36:31,640 reason why I mentioned that I know nothing 871 00:36:31,640 --> 00:36:33,760 about EMV is because I don't have 872 00:36:33,760 --> 00:36:35,840 to. This does all of the crypto 873 00:36:35,840 --> 00:36:36,320 for me. 874 00:36:39,020 --> 00:36:39,580 Yeah. 875 00:36:39,700 --> 00:36:40,980 It's pretty pitiful. 876 00:36:41,440 --> 00:36:43,260 You get full card information. 877 00:36:43,720 --> 00:36:44,180 You get 878 00:36:47,500 --> 00:36:49,480 card number, expiry date, 879 00:36:49,620 --> 00:36:51,620 name. Same as 880 00:36:51,620 --> 00:36:53,840 card face. The newer technologies you get 881 00:36:53,860 --> 00:36:55,000 a thing called dynamic CVV. 882 00:36:55,140 --> 00:36:57,340 The card details that you read will be good for one 883 00:36:57,340 --> 00:36:58,840 transaction and one transaction only. 884 00:36:59,000 --> 00:37:00,520 So you read it a thousand times. 885 00:37:01,460 --> 00:37:02,120 Big deal. 886 00:37:04,300 --> 00:37:05,680 The other thing to 887 00:37:05,680 --> 00:37:06,560 bear in mind. 888 00:37:07,080 --> 00:37:08,780 The name may not be supplied. 889 00:37:10,040 --> 00:37:11,740 If you think about this for a second. 890 00:37:15,620 --> 00:37:16,500 Oh no.