1 00:00:01,420 --> 00:00:04,980 Hey everyone, how you doing out there? 2 00:00:04,980 --> 00:00:06,740 I am DeviantOlef. 3 00:00:07,040 --> 00:00:12,560 I am not particularly cool, but I get to do things that are cool. 4 00:00:12,900 --> 00:00:19,900 Specifically, many people in the hacker community and online know me as a lockpicker and a physical security person. 5 00:00:20,260 --> 00:00:22,100 I'm not going to lie, it's a cool gig. 6 00:00:22,100 --> 00:00:30,720 I get to break into buildings, that's my job and I get paid for it, but my knowledge in that area was pretty archaic for a very long time. 7 00:00:30,760 --> 00:00:34,680 Mechanical locks, safes, you name it, I'm there, I'm your guy. 8 00:00:35,580 --> 00:00:41,760 RFID and electronic access controls, however, that's the direction that a lot of things are moving, right? 9 00:00:41,760 --> 00:00:44,360 Using little boop-boop access cards. 10 00:00:44,640 --> 00:00:48,680 I didn't know a whole lot about that and I decided it was time to learn. 11 00:00:48,680 --> 00:00:58,920 If you've ever gotten interested in doing some RFID and credential hacking but you haven't learned yet either, well, how about I teach you what I've figured out so far and you can take it from there. 12 00:00:58,940 --> 00:00:59,900 Sound good? 13 00:01:00,600 --> 00:01:05,340 So when we're talking about electronic credentials, what do we actually mean here? 14 00:01:05,340 --> 00:01:08,520 Well, again, a lot of you have seen buildings like this, right? 15 00:01:08,520 --> 00:01:15,980 You have an access control card or some kind of token, you present it to a reader, you hear a beep , the door unlocks, you get to go inside. 16 00:01:16,440 --> 00:01:18,920 What's going on when you use a reader like that? 17 00:01:18,960 --> 00:01:20,720 That's what we're going to dig into. 18 00:01:20,960 --> 00:01:26,500 And what if you want to use credentials like that maybe improperly or maybe do interesting things with them? 19 00:01:26,500 --> 00:01:30,540 Well, instead of using a conventional reader, you can use a reader like this. 20 00:01:30,600 --> 00:01:34,100 This device right here, we're going to use it a lot in this presentation. 21 00:01:34,100 --> 00:01:36,980 This is my Proxmark RFID hacking tool. 22 00:01:36,980 --> 00:01:45,860 I'm going to explain how it works, you're going to see some basic commands and capabilities, and if you want to get started later, I'll give you an overview of what you want to look for online. 23 00:01:45,860 --> 00:01:48,940 So this is a picture of me with what kind of credential is that? 24 00:01:48,940 --> 00:01:49,840 Can anyone guess? 25 00:01:49,840 --> 00:01:51,180 It's not a work badge. 26 00:01:51,180 --> 00:01:52,580 No, that's a hotel key. 27 00:01:52,600 --> 00:01:57,640 This is me dumping memory out of a hotel key so that I can make extra room keys for where I'm staying. 28 00:01:57,640 --> 00:02:03,820 I'm actually going to show you at the end of the talk how I copy my hotel keys, and it might be not exactly what you're expecting. 29 00:02:04,240 --> 00:02:10,120 All right, before we get too deep into the hardware though, let's talk about the actual technology driving it. 30 00:02:10,140 --> 00:02:13,180 Radio frequency identification, RFID. 31 00:02:13,240 --> 00:02:14,780 What exactly is going on? 32 00:02:14,780 --> 00:02:20,780 Is this like, you know, I can put on my Walkman and tune a radio station and I can, oh, I'm listening to the radio. 33 00:02:20,780 --> 00:02:22,520 No, it's nothing like that. 34 00:02:22,660 --> 00:02:26,400 RFID is a very small distance technology. 35 00:02:26,420 --> 00:02:30,140 It doesn't involve broadcasting from one element to another. 36 00:02:30,200 --> 00:02:39,680 Now, if you look at things that are part of an RFID system, you've got some kind of tag, some kind of reader, and you crack them open, you say, well, wait, there's there's an antenna inside the tag. 37 00:02:39,740 --> 00:02:41,460 There's an antenna inside the rear. 38 00:02:41,460 --> 00:02:46,840 Deviant, you told me that it's not broadcasting and receiving, but it sure looks like that to me. 39 00:02:47,140 --> 00:02:51,800 No, these antennas are not used for transmission of data. 40 00:02:51,800 --> 00:02:54,280 These antennas are used like your phone. 41 00:02:54,280 --> 00:02:58,480 If you do wireless charging of your phone, anybody ever do that with their devices? 42 00:02:58,480 --> 00:02:59,160 Right. 43 00:02:59,560 --> 00:03:02,280 Inductive coupling is what we're talking about here. 44 00:03:02,280 --> 00:03:09,000 So if you put a charge in one coil of wire and bring another coil of wire near it, that other coil of wire develops a charge. 45 00:03:09,000 --> 00:03:10,840 That's how wireless charging works. 46 00:03:10,840 --> 00:03:14,780 That's also how RFID communication works. 47 00:03:15,060 --> 00:03:18,380 The reason is because of that inductive coupling, right? 48 00:03:18,380 --> 00:03:20,680 You can send and receive signals. 49 00:03:20,680 --> 00:03:23,280 And again, they're not broadcast signals. 50 00:03:23,280 --> 00:03:27,360 It's actually communicating in a very interesting way. 51 00:03:27,360 --> 00:03:29,140 So I want you to imagine something. 52 00:03:29,140 --> 00:03:40,780 I want you to imagine you're kind of locked in a house and you can't go outside and, you know, you don't have Internet, you don't have phone, you don't have any real way of communicating with the outside world. 53 00:03:40,780 --> 00:03:44,500 What if you needed to send a message to someone else? 54 00:03:44,780 --> 00:03:50,800 This might sound a little hokey, but imagine the utility company providing you with your water. 55 00:03:51,020 --> 00:03:53,680 That water pipe leading to your house? 56 00:03:54,060 --> 00:03:57,200 Well, someone at the utility company is monitoring that water, right? 57 00:03:57,200 --> 00:03:58,660 They have to send you a bill. 58 00:03:59,060 --> 00:04:07,240 It might be slow data rate, but you could communicate with someone at the water company just by turning your water on and off. 59 00:04:07,240 --> 00:04:13,360 You could kind of send them Morse code because they're watching your water usage and then it goes down and then it goes up and then it goes down. 60 00:04:13,760 --> 00:04:18,680 This is how credentials communicate with an RFID reader. 61 00:04:18,880 --> 00:04:25,420 Remember that inductive coupling where the card itself, these credentials don't have any batteries. 62 00:04:25,540 --> 00:04:27,200 There's no power in this card. 63 00:04:27,200 --> 00:04:31,780 The only time they get power is when they go near the reader and that wakes them up. 64 00:04:31,780 --> 00:04:34,060 That's how they power up and wake up. 65 00:04:34,300 --> 00:04:35,760 What else do they do? 66 00:04:35,800 --> 00:04:39,180 They actually modulate their power draw. 67 00:04:40,280 --> 00:04:44,400 I'm going to pull more power and then less power and then more power and then less power. 68 00:04:44,480 --> 00:04:49,120 That's how RFID communication works between a credential and a reader. 69 00:04:49,420 --> 00:04:58,840 Modulating that power draw, it's like you're a person in a house turning your water on and off trying to get someone to listen to what you're saying way out at the power company or the water company. 70 00:04:59,600 --> 00:05:05,460 Now there's a couple of terms that get really confused and we need to just talk about this right away. 71 00:05:06,520 --> 00:05:09,600 RFID is what we're hacking on here today. 72 00:05:09,600 --> 00:05:12,400 How many of you have ever heard of NFC? 73 00:05:12,580 --> 00:05:13,800 Probably a lot of you. 74 00:05:13,800 --> 00:05:16,200 It's in your cell phones these days. 75 00:05:16,200 --> 00:05:21,240 If you have contactless payment or anything like that, boop boop boop, well that's NFC. 76 00:05:21,240 --> 00:05:23,280 Oh, my phone is NFC enabled. 77 00:05:23,500 --> 00:05:25,160 And some people don't quite understand. 78 00:05:25,160 --> 00:05:28,420 They say, well, RFID, that's like NFC, right? 79 00:05:28,420 --> 00:05:29,800 It's the thing in my phone? 80 00:05:30,720 --> 00:05:33,320 Kind of, but not exactly. 81 00:05:34,080 --> 00:05:35,920 Let's make a big diagram. 82 00:05:36,640 --> 00:05:47,320 RFID is any kind of inductive coupling based communication using a coil of wire and a reader and a coil of wire in a token of some kind. 83 00:05:47,320 --> 00:05:52,520 If you're inductively coupling and modulating your power draw to communicate, that's RFID. 84 00:05:52,920 --> 00:05:54,960 There's a lot of ways to do it, though . 85 00:05:54,960 --> 00:05:58,080 There's a lot of different implementations of RFID. 86 00:05:58,080 --> 00:06:08,840 The oldest that's been around forever is low-frequency RFID, often used for old-school access control or sometimes inventory tracking in a retro way. 87 00:06:08,840 --> 00:06:11,960 These are not really complicated devices. 88 00:06:11,960 --> 00:06:18,660 There's not a lot of power from the reader going into the credential, and the chip itself that's powering up can't do a whole lot. 89 00:06:18,660 --> 00:06:22,780 We're about to learn how very simple and rudimentary those chips are. 90 00:06:23,000 --> 00:06:25,840 Now, there's also high-frequency RFID. 91 00:06:25,840 --> 00:06:27,380 That's up in the megahertz range. 92 00:06:27,380 --> 00:06:33,260 You've got more power to the chips, more functions and features on that chip, a lot more you can do. 93 00:06:33,760 --> 00:06:39,140 Not going to get into it in this talk, but there's even ultra-high frequency, way up in the 900 megahertz range. 94 00:06:39,260 --> 00:06:42,440 These are not generally used for access control. 95 00:06:42,440 --> 00:06:51,540 This is where you see a lot more asset tracking, and if your luggage ever gets tracked by your airline and you get little alerts on your phone, they're using UHF RFID. 96 00:06:51,740 --> 00:06:55,380 So then we've got a whole chart here, but there's no NFC on it. 97 00:06:55,380 --> 00:06:57,020 Is the whole thing NFC? 98 00:06:57,020 --> 00:06:58,260 Is it just a different word? 99 00:06:58,260 --> 00:06:59,060 No. 100 00:06:59,640 --> 00:07:07,520 NFC is just one small subset of high-frequency RFID. 101 00:07:07,520 --> 00:07:15,820 It's a very small piece of the puzzle, but it's become ubiquitous in the marketplace, in the landscape, because it's what's in all of our phones. 102 00:07:15,820 --> 00:07:18,860 NFC is the direction most tech is moving. 103 00:07:18,860 --> 00:07:25,940 Many times you'll hear NFC referred to as contactless smart cards, because those chips support modern feature sets. 104 00:07:25,940 --> 00:07:31,620 So how is RFID typically used in access control environments if you want to get into a building? 105 00:07:31,620 --> 00:07:33,360 Well, think of it this way. 106 00:07:33,360 --> 00:07:41,140 A lot of really basic RFID, really simplistic old-school tech, it's nothing more than a folder. 107 00:07:41,140 --> 00:07:43,660 A folder that contains a piece of paper. 108 00:07:43,720 --> 00:07:50,960 Inside there's just a simple credential string, a simple bit of data that's here's who I am, and that's it. 109 00:07:50,960 --> 00:07:52,840 And this is not like a locked folder. 110 00:07:52,840 --> 00:07:54,400 There's no padlock on this. 111 00:07:54,400 --> 00:07:59,600 It's just a folder that anyone can look at, open, read the numbers, and then close it again. 112 00:08:00,240 --> 00:08:03,920 When you think about this in terms of access control, it's kind of crazy. 113 00:08:03,920 --> 00:08:09,040 It's like walking up to a building and just holding a piece of paper up, saying, hi, I work here. 114 00:08:09,040 --> 00:08:10,080 Can I come in, please? 115 00:08:10,120 --> 00:08:12,180 Am I authorized to be in this building? 116 00:08:12,360 --> 00:08:13,800 Here's a little scenario for you. 117 00:08:13,800 --> 00:08:15,360 I'm going to paint you a picture. 118 00:08:15,360 --> 00:08:18,120 And if you can imagine all these different players, right? 119 00:08:18,120 --> 00:08:21,080 So someone's going to come up to this building and they want to get in. 120 00:08:21,080 --> 00:08:23,760 That someone is an RFID credential. 121 00:08:23,940 --> 00:08:26,080 And they're about to talk to this guard at the door. 122 00:08:26,080 --> 00:08:28,060 That guard is the reader. 123 00:08:28,300 --> 00:08:32,400 The guard, you'll find out, doesn't make a lot of decisions. 124 00:08:32,400 --> 00:08:36,140 Those decisions are made in the building by the boss lady up here. 125 00:08:36,140 --> 00:08:38,840 The boss, she is the door controller. 126 00:08:38,840 --> 00:08:40,280 She has all the logic. 127 00:08:40,280 --> 00:08:42,780 She has all the command and control structures. 128 00:08:42,780 --> 00:08:47,640 She is in charge of unlocking the door hardware, the doorman there in red. 129 00:08:47,900 --> 00:08:51,020 So what's going to happen when all these pieces interact together? 130 00:08:51,020 --> 00:08:52,640 Well, let's step through it. 131 00:08:52,960 --> 00:08:56,780 The reader, first of all, is always looking to talk. 132 00:08:56,780 --> 00:09:01,020 The reader is always just offering power in a little bubble. 133 00:09:01,020 --> 00:09:04,040 It's offering energy to anyone that comes near it. 134 00:09:04,040 --> 00:09:08,180 Because again, if I bring a card near a reader, that card has to wake up. 135 00:09:08,180 --> 00:09:12,100 So the reader is always looking for credentials, saying, hello, is anyone there? 136 00:09:12,100 --> 00:09:14,300 Hello, hello, hello. 137 00:09:14,420 --> 00:09:18,300 And then if a credential shows up by the reader, what happens? 138 00:09:18,300 --> 00:09:20,380 Well, the credential gets power. 139 00:09:20,380 --> 00:09:21,500 It wakes up. 140 00:09:21,680 --> 00:09:24,840 And old school credentials only know how to do one thing. 141 00:09:24,840 --> 00:09:29,860 They just know how to show people, hi, this is my number, this is all I am, this is all I can do. 142 00:09:30,080 --> 00:09:31,860 And the reader is fine with that. 143 00:09:31,860 --> 00:09:38,720 In access control, you take that simple string of data, that's called the PACS payload, or the Physical Access Control System payload. 144 00:09:38,720 --> 00:09:42,020 You take that payload, and the reader doesn't know who you are. 145 00:09:42,020 --> 00:09:45,480 The reader on the wall doesn't know if you're authorized or not. 146 00:09:45,480 --> 00:09:46,360 It doesn't care. 147 00:09:46,360 --> 00:09:51,500 It's just going to take whatever you gave it and throw it up the wire to the door controller. 148 00:09:51,500 --> 00:09:55,420 It's the door controller's job to say, oh, let's see what this is. 149 00:09:55,420 --> 00:09:58,280 Is this person authorized this time of day, this building? 150 00:09:58,360 --> 00:09:59,940 Okay, yeah, they're authorized. 151 00:09:59,940 --> 00:10:00,620 Cool. 152 00:10:00,640 --> 00:10:06,740 And the door controller, the boss lady, she tells, okay, unlock, the door opens, let you in. 153 00:10:07,220 --> 00:10:09,600 That's access control in a nutshell. 154 00:10:09,880 --> 00:10:17,940 Now, when we think about this though, remember, those credentials, especially old school credentials, don't have a lot of protection to them. 155 00:10:17,940 --> 00:10:22,460 So we can clone and copy these credentials very easily. 156 00:10:22,460 --> 00:10:24,820 Let's talk about how that would work, right? 157 00:10:24,920 --> 00:10:26,500 Well, here we have our credential, right? 158 00:10:26,500 --> 00:10:32,540 Our credential sees a reader, wakes up, spits out its number, and hopes for the best. 159 00:10:32,980 --> 00:10:35,980 The thing is, these credentials don't know who they're talking to. 160 00:10:35,980 --> 00:10:42,940 They don't know if they're talking to a reader that's attached to a building or if they're talking to maybe an interception device. 161 00:10:43,020 --> 00:10:48,500 If I come along with something like my Proxmark device, remember, this can act like a reader. 162 00:10:48,880 --> 00:10:53,200 Well, my Proxmark device can offer power into the world and say, hello, who's there? 163 00:10:53,200 --> 00:10:53,880 Hello. 164 00:10:53,980 --> 00:10:59,040 And if I have a credential on it, that credential will wake up and say, oh, I'm in front of a reader. 165 00:10:59,040 --> 00:11:00,060 Here's who I am. 166 00:11:00,060 --> 00:11:01,160 Here's my number. 167 00:11:01,540 --> 00:11:03,800 And this card just doesn't know any better. 168 00:11:03,800 --> 00:11:08,220 This card doesn't have any logging capability or audit capability on it. 169 00:11:08,240 --> 00:11:13,320 If a person goes ahead, accesses a building where they belong, now what have I done? 170 00:11:13,560 --> 00:11:17,860 I've listened in on their credential data because they gave it to me. 171 00:11:17,920 --> 00:11:24,160 I can come along later, walk right up to that reader, and then I can replay that data. 172 00:11:24,160 --> 00:11:26,700 I can simulate being that credential. 173 00:11:26,840 --> 00:11:32,300 And if that credential is authorized to open up a building or open up a locked system, there you go. 174 00:11:32,300 --> 00:11:34,060 That's all you need to do. 175 00:11:34,060 --> 00:11:35,600 Would you like to see a demo of that? 176 00:11:35,600 --> 00:11:37,880 It's pretty straightforward and simple here. 177 00:11:38,400 --> 00:11:41,400 All right, let me fire up the Proxmark environment here. 178 00:11:42,960 --> 00:11:47,800 So this is actually a lock designed to hold a shotgun in a police car in America. 179 00:11:47,800 --> 00:11:50,480 Here's the credential that operates it. 180 00:11:50,480 --> 00:11:55,260 So if I pass it in front, boom, that opens up just fine, right? 181 00:11:56,840 --> 00:11:59,560 Well, what if I'm not presenting it to that reader? 182 00:11:59,560 --> 00:12:03,100 What if I present this credential to my Proxmark tool? 183 00:12:03,540 --> 00:12:08,560 And if I do a quick search function, low frequency search, what do we have here? 184 00:12:08,560 --> 00:12:09,880 Wow, look at that. 185 00:12:09,880 --> 00:12:11,280 We've got a whole bunch of data. 186 00:12:11,280 --> 00:12:16,600 Again, this card wakes up, spits out who it is, and says, okay, I'm done. 187 00:12:16,860 --> 00:12:19,740 And here we have up here, we have an EM style credential. 188 00:12:19,740 --> 00:12:22,080 EM is a credential made by the Swatch Group. 189 00:12:22,080 --> 00:12:27,000 Very popular use in kind of low cost access control systems. 190 00:12:27,020 --> 00:12:38,820 Once I have that unique ID, if I want to use a low frequency command, and we're working again with EM chipsets, this is an EM410 style system, which is a very popular EM chipset. 191 00:12:38,820 --> 00:12:40,000 So 410X. 192 00:12:40,000 --> 00:12:44,820 If I want to simulate a card, how would I simulate a card? 193 00:12:45,060 --> 00:12:45,800 EM410. 194 00:12:45,800 --> 00:13:01,740 Okay, so if this is my syntax, I just need to simulate the ID number, just plug the ID number right into the command, low frequency, EM tag, 410, simulate this ID, paste, boom, simulating, simulating, simulating. 195 00:13:01,740 --> 00:13:03,140 So what's happening now? 196 00:13:03,300 --> 00:13:06,860 This Proxmark is no longer acting as a reader. 197 00:13:06,900 --> 00:13:10,160 This Proxmark is now acting as the credential. 198 00:13:10,160 --> 00:13:12,120 It is pretending to be the credential. 199 00:13:12,120 --> 00:13:16,700 And if I bring it in front of the locker, there you go. 200 00:13:16,720 --> 00:13:17,980 Simple as that. 201 00:13:18,120 --> 00:13:20,460 Get yourself a shotgun out of a police car. 202 00:13:20,700 --> 00:13:22,900 Now, of course, this looks a little weird. 203 00:13:22,900 --> 00:13:27,680 I wouldn't want to walk around a police car and kind of like start pushing this into windows. 204 00:13:27,680 --> 00:13:28,620 This looks odd. 205 00:13:28,620 --> 00:13:36,600 It would look a lot better if I wanted to steal something out of a building on a test that I'm doing, if I could be carrying a little white card like this. 206 00:13:36,600 --> 00:13:38,460 So let's go ahead and do that. 207 00:13:38,460 --> 00:13:42,700 Let me take a blank card that I can put on my reader here. 208 00:13:43,640 --> 00:13:48,100 Now, if we want to check and see what is on this card, search for it. 209 00:13:48,100 --> 00:13:50,520 Nope, no tags found, nothing found. 210 00:13:50,520 --> 00:13:54,380 All right, but we do have a reprogrammable chip. 211 00:13:54,600 --> 00:14:01,600 Okay, so instead of running that simulate command, what if I want to clone that badge data onto a blank card? 212 00:14:01,600 --> 00:14:05,140 Well, let's see if we have a nice little clone command. 213 00:14:07,380 --> 00:14:08,980 Sure enough, I do. 214 00:14:08,980 --> 00:14:09,960 And what does it want? 215 00:14:09,960 --> 00:14:12,120 It just wants the unique ID. 216 00:14:12,400 --> 00:14:15,660 All right, let's go to clone, unique ID. 217 00:14:15,980 --> 00:14:17,460 There's our badge data. 218 00:14:17,460 --> 00:14:19,860 We'll put this right on the proxmark. 219 00:14:20,780 --> 00:14:22,840 All right, tag written. 220 00:14:23,140 --> 00:14:24,480 Let's see if that works. 221 00:14:24,480 --> 00:14:31,720 Instead of walking around with my laptop trying to unlock a police car, what if I just have a little innocuous white tag? 222 00:14:31,720 --> 00:14:33,520 Doesn't look like anything special, does it? 223 00:14:33,520 --> 00:14:34,780 But what does it do? 224 00:14:36,660 --> 00:14:44,620 Works just like the original tag would, because whatever was on this tag, we've copied it now onto this one. 225 00:14:44,640 --> 00:14:48,180 So that's the kind of thing you can do with a tool like this. 226 00:14:48,200 --> 00:14:51,840 RFID hacking tools are really common on the marketplace. 227 00:14:51,980 --> 00:14:59,480 And if you want to clone simple credentials like the ones you see here, you don't need something as high-tech as the proxmark at first. 228 00:14:59,480 --> 00:15:02,340 There are a lot of really cheap tools that are on the market. 229 00:15:02,340 --> 00:15:03,960 The famous blue cloner. 230 00:15:03,960 --> 00:15:05,900 It looks like this little fist gun. 231 00:15:05,900 --> 00:15:08,980 There's a different one that has a little more verbose display on it. 232 00:15:08,980 --> 00:15:10,900 But these cloners are out there. 233 00:15:10,900 --> 00:15:19,320 You can do a lot of these attacks on the low-end credential technologies, low-frequency technologies, older technologies, with pretty cheap hardware. 234 00:15:19,400 --> 00:15:24,300 But I'm not gonna lie, the standard of the industry is the proxmark3. 235 00:15:24,300 --> 00:15:25,820 What is the proxmark? 236 00:15:25,820 --> 00:15:27,120 Where's the history? 237 00:15:27,120 --> 00:15:29,860 If there was a proxmark2, was there a proxmark1? 238 00:15:29,860 --> 00:15:30,620 Yeah! 239 00:15:30,680 --> 00:15:45,500 The original proxmark was made by someone named Jonathan Westhues, and it was made as a student project just to demonstrate when RFID was becoming on the market really new, and companies like Texas Instrument and others were saying, oh, this is super secure. 240 00:15:45,500 --> 00:15:47,420 No one could ever clone our technology . 241 00:15:47,420 --> 00:15:48,260 It's brand new. 242 00:15:48,260 --> 00:15:49,760 It's impenetrable. 243 00:15:49,840 --> 00:15:52,980 Jonathan Westhues said, that kind of looks pretty easy to do, actually. 244 00:15:52,980 --> 00:15:54,600 I see how you're doing inductive coupling. 245 00:15:54,600 --> 00:15:55,600 I could do that. 246 00:15:55,660 --> 00:15:59,720 So this is the original proxmark, and it went through revisions over the years. 247 00:15:59,720 --> 00:16:10,320 He released a second version of the project and started publishing more, but really it came into its own, and the hacker world got a hold of it when Jonathan Westhues gave it to everyone in the community. 248 00:16:10,320 --> 00:16:22,920 He open-sourced it in the proxmark3, and there started to become kits where people could buy the parts, solder the board, they would actually hand wind their own antennas, actually tuning the copper. 249 00:16:23,000 --> 00:16:32,680 Eventually, enough people liked this technology, and RFID became so common, and hacking on it became so typical, that people started making ready-made kits. 250 00:16:32,680 --> 00:16:43,920 They were commercial antennas, the boards were pre-populated, but again, it was all still the original proxmark3 code that people were working on as open source at this point. 251 00:16:44,000 --> 00:16:56,800 We started to see the hardware being repackaged, so Elekhaus released the RDV2, which was like these nice integrated antennas, very well tuned, you didn't have to fudge around with weird chunky antennas anymore. 252 00:16:56,920 --> 00:17:02,800 Then you have companies making like the proxmark3 Easy, or the proxmark3 Evo. 253 00:17:03,060 --> 00:17:04,540 These weren't as good. 254 00:17:04,540 --> 00:17:09,900 They were trying to maintain that proxmark3 name, but honestly cut in a lot of corners. 255 00:17:09,960 --> 00:17:24,140 Frankly, it looked like the was going to kind of really go in some bad directions, until really amazing people, principally Iceman and some others from the RFID research group, manufactured the RDV4. 256 00:17:24,140 --> 00:17:31,860 They designed a complete revamp of the hardware package, and they've been rewriting the code base as well for years. 257 00:17:31,860 --> 00:17:36,040 This is a really gorgeous unit at this point. 258 00:17:36,040 --> 00:17:42,300 There's really nothing else like it on the research. 259 00:17:42,640 --> 00:17:45,120 Now there is, of course, a software component. 260 00:17:45,120 --> 00:17:47,120 You see that I'm tethered to a laptop. 261 00:17:47,140 --> 00:17:51,000 You can run a proxmark in standalone mode with a little battery. 262 00:17:51,380 --> 00:18:01,160 It doesn't have true functionality unless you're connected to an actual software environment, the client application that controls the proxmark itself. 263 00:18:01,420 --> 00:18:09,680 You can run it on Windows, you can run it on Mac, you can run it on Unix, you can even run it on your phone nowadays with a little Bluetooth module, which my proxmark has. 264 00:18:09,680 --> 00:18:11,960 That's why it looks a little different and extra blinky. 265 00:18:12,720 --> 00:18:18,140 Now that's not the only tool on the market if you're doing RFID hacking and attack like we do in the field, right? 266 00:18:18,420 --> 00:18:30,400 So if you've ever seen a long-range RFID reader, you know, we're not talking again, it's not broadcast, but if you've ever seen a parking garage where they have a reader that you can be a foot or two away from, this is called the huntpad. 267 00:18:30,400 --> 00:18:38,340 We weaponize these long-range readers, and you can be about half a meter away and still get a credential grab out of someone. 268 00:18:38,340 --> 00:18:43,560 This is what it looks like in the field if we're trying to grab someone's credential to break in a building later. 269 00:18:43,980 --> 00:18:49,760 Here's a colleague of ours named Dennis, and he's going to sit down, and in his backpack, he's got that huntpad. 270 00:18:49,840 --> 00:18:52,160 So he looks like a person, oh, I'm just checking my messages. 271 00:18:52,160 --> 00:18:52,840 Oh, you're here? 272 00:18:52,840 --> 00:18:53,980 Oh, I'll come meet you. 273 00:18:53,980 --> 00:18:55,280 But what happened? 274 00:18:55,280 --> 00:19:02,740 Well, the gentleman next to him had a credential in their pocket, and then Dennis was able to grab that credential without getting that close to him. 275 00:19:02,740 --> 00:19:05,740 So there are a lot of ways we can use this in the field. 276 00:19:05,740 --> 00:19:08,040 We do this all the time, trying to break into buildings. 277 00:19:08,040 --> 00:19:10,160 I'll get near employees on trains. 278 00:19:10,160 --> 00:19:12,540 I'll get next to an employee in a restaurant. 279 00:19:12,560 --> 00:19:15,340 I will get near someone when they're out there, most vulnerable. 280 00:19:15,480 --> 00:19:25,200 And if I have my backpack or my laptop bag, and it's got a huntpad in it, I can grab that credential, and then we can recode it, rewrite it, simulate it, clone it , play it back later. 281 00:19:25,780 --> 00:19:28,880 Now, some credentials try to anticipate this, right? 282 00:19:28,880 --> 00:19:34,560 There are some technologies where they say, well, that RFID thing, it's not that secure. 283 00:19:34,560 --> 00:19:38,080 If you get near the card, it'll just release its information. 284 00:19:38,220 --> 00:19:46,380 Well, what we're going to do, if you want to secure technology, our card is better because we scramble all the data on the card, and it makes it hard to copy. 285 00:19:46,860 --> 00:19:48,820 Let's think about that for a second. 286 00:19:49,180 --> 00:19:52,920 The credential reader wants credential information, right? 287 00:19:52,920 --> 00:19:59,120 And if you have their special brand of credential reader, well, it knows how to de-scramble the card. 288 00:19:59,240 --> 00:20:01,100 Here's a credential, and it talks really funny. 289 00:20:01,100 --> 00:20:07,140 It says, hi, my number ends with 47, and my facility is 16, and my code starts with 33. 290 00:20:07,480 --> 00:20:14,040 That's kind of a dumb way to communicate, but the reader's like, okay, sure, I understand what you're doing here. 291 00:20:14,040 --> 00:20:23,900 The reader fixes it, and then passes that PAX payload up to the boss, and the door controller sees it as a regular credential string, and unlocks the door if they're authorized. 292 00:20:24,320 --> 00:20:28,060 Now, that's the whole idea of the security of this scrambled card. 293 00:20:28,060 --> 00:20:38,260 They say, well, you need the special reader, and without the special reader, which we sell, you know, that company says, well, you got to buy our reader because it understands the scramble pattern. 294 00:20:39,420 --> 00:20:42,480 However, let's think about this. 295 00:20:42,780 --> 00:20:50,320 Do I have to understand someone's language if all I want to do is replay what they're saying? 296 00:20:50,320 --> 00:20:55,280 What if I just put a tape recorder up to someone who's speaking, and I played that tape recorder later? 297 00:20:55,400 --> 00:21:00,600 I don't have to know what the language is if I can copy it all in one raw dump. 298 00:21:00,840 --> 00:21:01,760 Remember that guy? 299 00:21:01,760 --> 00:21:04,180 We said a guy holds up his... Hi, I'm this person. 300 00:21:04,180 --> 00:21:05,560 Can you let me in the building? 301 00:21:05,600 --> 00:21:08,960 What if that paper has something funny on it that I can't read? 302 00:21:08,960 --> 00:21:09,720 I don't understand. 303 00:21:09,720 --> 00:21:10,980 What if it's in symbols? 304 00:21:10,980 --> 00:21:13,320 I have no idea what this paper says. 305 00:21:13,660 --> 00:21:15,020 You know what I can still do? 306 00:21:15,020 --> 00:21:20,300 I can still put that paper in a photocopying machine and make a duplicate of it. 307 00:21:20,300 --> 00:21:25,880 I don't have to care what it says as long as the reader on the building understands what it says. 308 00:21:25,880 --> 00:21:28,240 That works just fine for me. 309 00:21:28,360 --> 00:21:32,720 Let's look at some scrambled data and talk about copying that data. 310 00:21:32,720 --> 00:21:35,520 So here we have a different type of credential. 311 00:21:35,520 --> 00:21:37,800 This is old, old tech, by the way. 312 00:21:37,800 --> 00:21:40,940 Motorola originally made this scrambled kind of card. 313 00:21:40,940 --> 00:21:42,320 They called it Indala. 314 00:21:42,320 --> 00:21:43,960 Indala's been around forever. 315 00:21:43,960 --> 00:21:47,220 It's actually been acquired by HID, the corporation. 316 00:21:47,220 --> 00:21:48,760 Motorola doesn't make it anymore. 317 00:21:48,760 --> 00:21:53,660 But if we did a quick search on our Proxmark tool, what do we have? 318 00:21:53,660 --> 00:21:54,660 Oh, there we go. 319 00:21:54,660 --> 00:21:56,580 Look, we've got some data out of this card. 320 00:21:56,580 --> 00:22:00,680 And the Proxmark is even smart enough to say that that looks like Indala. 321 00:22:00,920 --> 00:22:04,040 And now the Proxmark will try to de-scramble it. 322 00:22:04,040 --> 00:22:06,760 It'll say, I think this could be the internal ID. 323 00:22:06,760 --> 00:22:10,380 I mean, this is probably the card number and facility code. 324 00:22:10,380 --> 00:22:13,040 But none of that really matters to me. 325 00:22:13,160 --> 00:22:15,040 I can look at this big string. 326 00:22:15,040 --> 00:22:16,720 That's the raw dump. 327 00:22:16,720 --> 00:22:30,020 This raw card data, as long as I've got that, if I want to take one of those special blank cards, if I want to clone an Indala credential, LF Indala clone, what do I need? 328 00:22:30,020 --> 00:22:32,620 Do I need all the de-scramble patterns? 329 00:22:32,880 --> 00:22:34,760 Not if I don't want to. 330 00:22:34,820 --> 00:22:36,360 There is a dash R. 331 00:22:36,360 --> 00:22:37,980 There's a raw switch. 332 00:22:37,980 --> 00:22:39,200 What does that do? 333 00:22:39,200 --> 00:22:44,400 You can just throw raw bytes and shove them back into this card here. 334 00:22:44,400 --> 00:22:45,720 So what are we going to do? 335 00:22:45,720 --> 00:22:51,520 All right, LF Indala clone, and we're going to go raw mode. 336 00:22:51,520 --> 00:22:53,200 I don't care about the scramble. 337 00:22:53,200 --> 00:22:57,420 I'm just going to shove all those bytes right back into this other card. 338 00:22:57,420 --> 00:23:00,180 Preparing, block written, done. 339 00:23:00,180 --> 00:23:04,060 Now this card should be the same as this card. 340 00:23:04,060 --> 00:23:05,640 Let's check them out and see. 341 00:23:05,640 --> 00:23:07,680 Here was our original card. 342 00:23:07,920 --> 00:23:09,760 Let's search for that. 343 00:23:10,020 --> 00:23:12,860 Okay, there's our Indala output. 344 00:23:12,860 --> 00:23:15,900 What about the card we just copied? 345 00:23:15,940 --> 00:23:20,120 If I search for that, there's our Indala output. 346 00:23:20,120 --> 00:23:24,500 I don't know about you, that looks like the exact same card to me. 347 00:23:24,500 --> 00:23:25,740 And in fact it is. 348 00:23:25,740 --> 00:23:39,240 If a building was using Indala credentials, I can absolutely walk up to the door, present my new copied card, and these are indistinguishable to the reader and to the access control door controller on the inside. 349 00:23:39,480 --> 00:23:43,220 So that's how RFID kept evolving over the years. 350 00:23:43,220 --> 00:23:48,260 New ideas, new ways of packaging the data and scrambling the data and formatting the data. 351 00:23:48,260 --> 00:23:56,120 They were evolving all the time, but ultimately it's still just inductive coupling with a little RFID chip. 352 00:23:56,260 --> 00:24:00,360 So how many different types of credentials are there on the market now? 353 00:24:00,700 --> 00:24:03,340 Well, let's look at a couple of categories here. 354 00:24:03,340 --> 00:24:05,320 Let's look at low frequency and high frequency. 355 00:24:05,320 --> 00:24:07,400 That's what we said we're going to talk about today. 356 00:24:08,140 --> 00:24:12,740 There's a lot of each, I'm not going to lie, like a lot, a lot. 357 00:24:12,860 --> 00:24:15,140 But they all work the same way. 358 00:24:15,440 --> 00:24:18,320 They all just present some user data. 359 00:24:18,320 --> 00:24:20,980 Especially, let's talk about low frequency, right? 360 00:24:21,020 --> 00:24:25,860 If we want to simplify things, there's a couple of ways to break this down. 361 00:24:25,860 --> 00:24:33,840 On the low frequency side, first of all, there is one chip kind of to rule them all if you want to hack on these systems. 362 00:24:33,840 --> 00:24:38,120 And you've been seeing it as I've been writing cards on my Proxmark here. 363 00:24:38,120 --> 00:24:39,780 This little Atmel card. 364 00:24:40,060 --> 00:24:40,780 What is this? 365 00:24:40,780 --> 00:24:42,740 What is the T5577? 366 00:24:42,740 --> 00:24:43,960 What's going on there? 367 00:24:44,240 --> 00:24:52,940 This is a chip that can be reprogrammed to act like all kinds of other RFID credentials. 368 00:24:53,040 --> 00:24:54,920 This is part of the Atmel data sheet. 369 00:24:54,920 --> 00:24:56,900 Atmel is now Microchip Corporation. 370 00:24:57,100 --> 00:25:03,140 So you can see this is a configuration block that we can program using the Proxmark. 371 00:25:03,140 --> 00:25:06,580 And you can program all kinds of switches on this chip. 372 00:25:06,580 --> 00:25:11,560 You can change it to be Manchester encoding or phase shift keying or frequency shift keying. 373 00:25:11,560 --> 00:25:16,340 Anybody who does RF work, you understand there's a lot of different ways to format data. 374 00:25:16,640 --> 00:25:20,940 You can package the data scrambled or not scrambled or reversed or raw. 375 00:25:20,960 --> 00:25:25,600 This chip can pretend to be all kinds of different credentials. 376 00:25:25,800 --> 00:25:28,940 It's, you know, I can reprogram this card over and over. 377 00:25:28,940 --> 00:25:33,260 I can pretend to be a HID Prox credential from the HID Corporation. 378 00:25:33,300 --> 00:25:35,600 I can pretend to be Motorola's Indala. 379 00:25:35,600 --> 00:25:37,180 You just saw that happen. 380 00:25:37,180 --> 00:25:41,920 I can pretend to be another type of technology called Ioprox by Cantech, right? 381 00:25:41,920 --> 00:25:43,680 I can be an EM credential. 382 00:25:43,680 --> 00:25:46,780 That's what we saw when I opened up the shotgun lock. 383 00:25:47,360 --> 00:25:53,120 Applied wireless, Jablatron, Farpoint, Pyramid, the list goes on and on and on. 384 00:25:53,440 --> 00:26:07,040 This one card can pretend to be tons of different PAX type credentials, different low frequency physical access control credentials, even really outdated ones that no one uses anymore. 385 00:26:07,040 --> 00:26:09,120 It can be all those. 386 00:26:09,120 --> 00:26:10,780 Well, that sounds cool, right? 387 00:26:10,780 --> 00:26:12,680 Like, is this a hacker tool? 388 00:26:12,680 --> 00:26:18,100 Is like, did Atmel make this just for hackers who want to do RFID attacks? 389 00:26:18,680 --> 00:26:21,500 No, it's not that cool of a history. 390 00:26:21,500 --> 00:26:25,620 The reason this chip exists, and there's a family of these chips, right? 391 00:26:25,620 --> 00:26:33,520 There's the older generation that, in fact, Temec made the Q5, the T5555, and then there was the 5557, the 5567. 392 00:26:33,520 --> 00:26:45,320 The 5577 is one of the latest generations of a chip the industry uses to make up for the fact that some things are just archaic in the marketplace. 393 00:26:45,460 --> 00:26:49,080 Remember I said Indala used to be made by who? 394 00:26:49,080 --> 00:26:49,900 Motorola. 395 00:26:49,920 --> 00:26:53,760 Motorola sold this back in 2003 to HID. 396 00:26:53,760 --> 00:26:57,060 The Motorola factory is not making more Indala chips. 397 00:26:57,080 --> 00:26:59,240 They are out of that game. 398 00:26:59,240 --> 00:27:01,380 But HID still has customers, right? 399 00:27:01,380 --> 00:27:04,460 HID still needs to service these old installs. 400 00:27:04,460 --> 00:27:06,060 That's where Atmel came in. 401 00:27:06,060 --> 00:27:08,380 Atmel said, hey, you've got a really old chip. 402 00:27:08,380 --> 00:27:09,700 You've got Visa 2000. 403 00:27:09,700 --> 00:27:12,080 You've got Honeywell, Nexkey, Guardall. 404 00:27:12,080 --> 00:27:14,500 You can still support your old customers. 405 00:27:14,500 --> 00:27:17,640 Just use our chip and reprogram it as you need. 406 00:27:17,960 --> 00:27:21,240 Well, the industry uses it for legitimate purposes. 407 00:27:21,360 --> 00:27:31,480 We can use it for really cool hacking purposes because, again, this chip is meant to act like all the other LF credentials on the market that you've probably ever heard of. 408 00:27:31,480 --> 00:27:34,420 So now you might be saying to yourself, neat, that's awesome. 409 00:27:34,420 --> 00:27:36,680 Are high frequency tags just as simple? 410 00:27:36,680 --> 00:27:40,000 Like, this is a high frequency tag that I've got here on this little key fob. 411 00:27:40,000 --> 00:27:43,960 Is it just as... is there one special card that can copy all of these? 412 00:27:44,700 --> 00:27:45,800 Not exactly. 413 00:27:45,800 --> 00:27:51,020 So on the high frequency side, tech has gotten better, right? 414 00:27:51,020 --> 00:27:54,940 We do have more power coming out of the reader. 415 00:27:55,180 --> 00:27:59,580 As the megahertz, the clock frequency, there's more waves of energy coming out of the reader. 416 00:27:59,580 --> 00:28:04,520 So these chips can actually use more energy to perform more advanced functions. 417 00:28:04,520 --> 00:28:13,680 Because of this, there's a whole lot of work the industry has been doing to implement secure features, to implement encrypted sectors, to implement key exchange. 418 00:28:13,680 --> 00:28:17,920 They're often called contactless smart cards in many instances. 419 00:28:17,920 --> 00:28:20,560 But there are data standards now. 420 00:28:20,560 --> 00:28:23,540 There are working group standards that have been put out. 421 00:28:23,540 --> 00:28:30,040 And you'll actually see, you can read data sheets, you can understand the commands that you use to interact with these cards. 422 00:28:30,040 --> 00:28:36,140 They're not hidden in secrecy the way they used to be on the old obscure low frequency tech. 423 00:28:36,360 --> 00:28:40,800 Now there are different types of NFC and contactless smart cards. 424 00:28:40,800 --> 00:28:48,720 For the most part, you're usually dealing with type 2 and type 4 in a lot of kind of phone situations. 425 00:28:48,780 --> 00:28:51,700 Sometimes type 5 for some access control things. 426 00:28:51,700 --> 00:28:54,240 Type 5 is no longer supported by smartphones. 427 00:28:54,240 --> 00:28:57,480 Apple killed support for 15693. 428 00:28:57,500 --> 00:28:59,680 But let's break it down a little bit. 429 00:28:59,680 --> 00:29:01,080 Why is this better? 430 00:29:01,080 --> 00:29:02,880 Why is this supposedly more secure? 431 00:29:02,880 --> 00:29:10,620 Well, when you have more energy to play with, the credentials can actually use locking and unlocking of different sectors. 432 00:29:10,840 --> 00:29:17,560 There are segments of memory on these credentials that need to be unlocked with a key in high secure environments. 433 00:29:17,560 --> 00:29:18,900 How is that implemented? 434 00:29:18,900 --> 00:29:23,320 Well, you know that guy who says, here's my credential, here's my paperwork, can I be let in? 435 00:29:23,440 --> 00:29:31,640 Imagine taking that piece of paper, and instead of just showing it to anyone who walks by, you put that piece of paper in an envelope. 436 00:29:31,900 --> 00:29:35,360 And then you put that envelope in a secured banker's bag. 437 00:29:35,360 --> 00:29:39,100 And then you put that zippered locked bag in a safe. 438 00:29:39,140 --> 00:29:42,340 And that's how you transport your credential around. 439 00:29:42,760 --> 00:29:45,860 That's a much better way of going about security, right? 440 00:29:45,900 --> 00:29:50,120 So if you have a secure building, you still have a reader. 441 00:29:50,120 --> 00:29:51,600 The reader is looking to talk. 442 00:29:51,600 --> 00:29:53,100 Hello, hello, is anyone there ? 443 00:29:53,100 --> 00:29:53,820 Hello. 444 00:29:54,020 --> 00:29:58,940 And now a high frequency credential comes up with secure segments of memory. 445 00:29:59,180 --> 00:30:01,200 It will still introduce itself. 446 00:30:01,200 --> 00:30:02,840 It'll say, hi, you know, I'm Susan. 447 00:30:02,840 --> 00:30:04,200 This is my unique identifier. 448 00:30:04,200 --> 00:30:06,180 But that's not the security token. 449 00:30:06,400 --> 00:30:09,920 To do security, this credential goes, hmm, can I trust you or not? 450 00:30:09,920 --> 00:30:11,220 And they do a little exchange. 451 00:30:11,220 --> 00:30:12,820 The chair is against the wall. 452 00:30:12,820 --> 00:30:14,000 John has a long mustache. 453 00:30:14,000 --> 00:30:15,660 Let's do a secret handshake. 454 00:30:15,660 --> 00:30:16,180 Okay. 455 00:30:16,280 --> 00:30:19,240 Now the credential says, okay, I'm unlocked. 456 00:30:19,240 --> 00:30:20,040 I trust you. 457 00:30:20,200 --> 00:30:27,460 Then it will unlock and offer that PAX payload, that credential data that is important for the access control system . 458 00:30:27,740 --> 00:30:30,060 The reader passes that along. 459 00:30:30,060 --> 00:30:33,400 The boss lady looks at it and says, oh yeah, this user? 460 00:30:33,400 --> 00:30:33,700 Cool . 461 00:30:33,700 --> 00:30:34,680 They're authorized. 462 00:30:34,680 --> 00:30:35,340 Go ahead. 463 00:30:35,340 --> 00:30:36,120 Open that door. 464 00:30:36,120 --> 00:30:37,740 And the door unlocks. 465 00:30:37,860 --> 00:30:42,840 That's the way it's supposed to be done in high frequency environments. 466 00:30:43,080 --> 00:30:47,240 How secure is this process really though? 467 00:30:47,300 --> 00:30:50,660 When done correctly, it's pretty good. 468 00:30:50,660 --> 00:30:54,480 I'm not saying that the encryption hasn't been broken on certain technologies. 469 00:30:54,480 --> 00:31:02,120 There are a lot of credentials out there where the master keys are known and the implementation of the encryption was weak and has been broken by hackers. 470 00:31:02,120 --> 00:31:08,260 But let's say you have a brand new technology right off the line that hasn't been broken yet. 471 00:31:08,300 --> 00:31:10,400 Is it a hundred percent secure? 472 00:31:10,620 --> 00:31:13,340 Well, it depends how it's being implemented. 473 00:31:13,460 --> 00:31:16,300 Let's look at a memory dump from a credential. 474 00:31:16,300 --> 00:31:22,160 This is an actual dump of sectors of memory from an unlocked high frequency card. 475 00:31:22,260 --> 00:31:29,720 Now that first block, block zero, remember when the card first wakes up, it does introduce itself. 476 00:31:29,720 --> 00:31:31,720 It says, hi, you know, I'm Susan. 477 00:31:32,500 --> 00:31:40,900 You a unique identifier called a chip serial number and some manufacturer data that identifies what type of card it is. 478 00:31:41,060 --> 00:31:42,260 That's public. 479 00:31:42,260 --> 00:31:43,540 That's not encrypted. 480 00:31:43,540 --> 00:31:48,540 Anytime you get near a reader, the card offers that as part of its initial handshake. 481 00:31:48,600 --> 00:31:53,620 But the rest of the memory on the card is potentially encrypted and all locked up. 482 00:31:53,620 --> 00:31:57,700 And you can't get to that memory unless you do the handshake correctly. 483 00:31:57,700 --> 00:32:01,860 And we can see on this particular memory dump, there's some interesting stuff in here. 484 00:32:01,860 --> 00:32:03,940 There's definitely PAX payload data. 485 00:32:03,940 --> 00:32:07,540 There's credential and access control data in some of these sectors. 486 00:32:07,700 --> 00:32:09,860 And those are the locked sectors, right? 487 00:32:10,200 --> 00:32:13,600 So how secure is this in the real world? 488 00:32:13,600 --> 00:32:16,620 Well, if you do it the right way, it's great. 489 00:32:16,920 --> 00:32:24,000 If you use that safe and you say, all right, you got to unlock the safe and unlock the bag and take the envelope out and pull out the paper. 490 00:32:24,060 --> 00:32:29,540 That's wonderful because that credential data is very well protected with an encrypted system. 491 00:32:30,120 --> 00:32:32,500 But what do you notice about this safe? 492 00:32:33,020 --> 00:32:36,000 There's that serial number right on the outside of it, right? 493 00:32:36,000 --> 00:32:38,300 Think of that as block zero. 494 00:32:38,440 --> 00:32:43,240 That is the first thing the card will present to people whenever you see it. 495 00:32:43,240 --> 00:32:44,840 That is not encrypted. 496 00:32:44,840 --> 00:32:47,400 That is not secured in any way. 497 00:32:47,620 --> 00:32:53,600 There are systems that use that as the security token. 498 00:32:54,020 --> 00:32:58,680 Let's see what it looks like if we want to just read a high frequency chip. 499 00:32:58,680 --> 00:33:02,060 What happens if I get near a high frequency card? 500 00:33:02,060 --> 00:33:03,360 HF search. 501 00:33:04,000 --> 00:33:05,460 All right, we're searching around. 502 00:33:05,460 --> 00:33:06,660 Oh, there we go. 503 00:33:06,660 --> 00:33:07,900 This card woke up. 504 00:33:07,900 --> 00:33:10,220 This little credential woke up and said, hi. 505 00:33:10,460 --> 00:33:11,800 And it gave me some information. 506 00:33:11,800 --> 00:33:13,540 Now, it's not a lot of good information, right? 507 00:33:13,540 --> 00:33:16,680 It just tells me this is my unique ID. 508 00:33:16,680 --> 00:33:19,820 This is the CSN or the chip serial number, the unique ID. 509 00:33:19,820 --> 00:33:22,180 And we have some manufacturer data. 510 00:33:22,200 --> 00:33:25,160 And the Proxmark tries to interpret what that is. 511 00:33:25,160 --> 00:33:26,700 Maybe it's a MyFairCard. 512 00:33:26,700 --> 00:33:30,580 I can tell you it's actually an NTAG NFC type credential. 513 00:33:30,880 --> 00:33:34,220 But I don't see the rest of the data on this card. 514 00:33:34,220 --> 00:33:38,300 I don't get to figure out what is contained in those locked sectors. 515 00:33:38,300 --> 00:33:42,660 The thing is, in many instances, I don't have to care. 516 00:33:43,000 --> 00:33:49,620 There are lots of technologies out there where they only use the CSN. 517 00:33:49,620 --> 00:34:01,720 This is really common in any kind of product where they advertise interoperability and compatibility with other systems, where they might say like this Samsung deadbolt. 518 00:34:02,120 --> 00:34:04,420 They say you can enroll new credentials. 519 00:34:04,420 --> 00:34:06,060 We ship you a few credentials. 520 00:34:06,180 --> 00:34:13,520 But if you want to use your student ID, if you want to use your work badge, if you want to get more credentials, you can enroll more credentials. 521 00:34:13,520 --> 00:34:14,480 Use your phone. 522 00:34:14,480 --> 00:34:15,440 Who cares? 523 00:34:16,160 --> 00:34:17,300 That's great. 524 00:34:17,500 --> 00:34:20,020 I love that you're helping people out there, Samsung. 525 00:34:20,460 --> 00:34:32,100 But do you think Samsung has spent the time to figure out how every one of those different high frequency credentials works and where it stores its security payload? 526 00:34:32,100 --> 00:34:32,940 And is it encrypted? 527 00:34:32,940 --> 00:34:33,460 Is it not? 528 00:34:33,460 --> 00:34:34,930 How do you do the key exchange? 529 00:34:35,240 --> 00:34:37,060 They don't have time for that. 530 00:34:37,060 --> 00:34:40,780 They want the user to have a smooth, seamless process. 531 00:34:40,780 --> 00:34:45,480 If I want to enroll my hotel key into my home deadbolt, why not? 532 00:34:45,480 --> 00:34:46,680 Sure, let it work. 533 00:34:46,680 --> 00:34:52,280 They do this by only caring about the CSN, the chip serial number. 534 00:34:52,280 --> 00:34:53,420 It's like this. 535 00:34:53,420 --> 00:35:01,620 If you have this building where the reader is looking to talk, a high security credential comes up to the reader and says, hello, I'm Susan. 536 00:35:01,620 --> 00:35:05,720 And this credential is ready to do that crypto exchange, right? 537 00:35:05,720 --> 00:35:07,500 Are you going to unlock the safe? 538 00:35:07,500 --> 00:35:09,400 Are you going to take out the piece of paper? 539 00:35:09,500 --> 00:35:11,480 And they say, okay, let's start handshake. 540 00:35:11,480 --> 00:35:12,400 The chair is against the wall. 541 00:35:12,400 --> 00:35:13,500 What's happening? 542 00:35:13,800 --> 00:35:16,920 This reader literally doesn't know what's happening. 543 00:35:16,920 --> 00:35:18,540 It doesn't know the encryption. 544 00:35:18,540 --> 00:35:20,540 It doesn't know what technology that is. 545 00:35:20,660 --> 00:35:22,520 And it doesn't care. 546 00:35:22,680 --> 00:35:23,920 It says, I got your name. 547 00:35:23,920 --> 00:35:24,960 Your name is Susan, right? 548 00:35:24,960 --> 00:35:26,500 All right, let me just tell the boss you're here. 549 00:35:26,500 --> 00:35:27,660 Hey, Susan's here. 550 00:35:28,140 --> 00:35:33,840 And because the system is set up to say, well, the CSN, the chip serial number is supposed to be a unique ID. 551 00:35:33,840 --> 00:35:36,040 That's probably fine for security, right? 552 00:35:36,040 --> 00:35:37,320 No one can change that. 553 00:35:37,320 --> 00:35:37,820 Sure. 554 00:35:37,820 --> 00:35:38,900 Susan, we know a Susan. 555 00:35:38,900 --> 00:35:40,380 There's only one Susan in the world. 556 00:35:40,380 --> 00:35:41,100 Let them in. 557 00:35:41,100 --> 00:35:42,120 Go ahead. 558 00:35:42,820 --> 00:35:44,660 What's the problem here? 559 00:35:44,660 --> 00:35:49,560 The problem is that you're not using any secure memory segments. 560 00:35:49,560 --> 00:35:53,520 You're not accessing any of the secure functions on the chip. 561 00:35:53,520 --> 00:35:58,120 You're just using the CSN as an authenticating token. 562 00:35:58,300 --> 00:36:01,120 You can clone that almost as easily. 563 00:36:01,120 --> 00:36:05,700 Again, I don't have to be a reader that has all kinds of crazy crypto functions. 564 00:36:05,700 --> 00:36:08,640 I don't have to know how to unlock this credential. 565 00:36:08,660 --> 00:36:15,220 If the credential immediately gives me its CSN the moment I see it, they might want to do a bunch of encryption. 566 00:36:15,800 --> 00:36:17,960 I don't care about the encryption. 567 00:36:18,260 --> 00:36:21,680 The credential says, well, I don't know how to talk to you, and it leaves. 568 00:36:22,060 --> 00:36:24,940 Do I have to do encryption if I walk up to this building? 569 00:36:25,200 --> 00:36:26,000 No. 570 00:36:26,120 --> 00:36:27,520 What's the building expecting? 571 00:36:27,520 --> 00:36:30,040 It's expecting just a little chip serial number. 572 00:36:30,040 --> 00:36:31,180 And I say, hi, yeah, guess what? 573 00:36:31,180 --> 00:36:31,700 I'm Susan. 574 00:36:31,700 --> 00:36:32,660 Why not? 575 00:36:32,660 --> 00:36:33,960 Consider me Susan. 576 00:36:34,000 --> 00:36:35,020 And is Susan authorized? 577 00:36:35,020 --> 00:36:36,620 Sure, Susan's authorized. 578 00:36:36,680 --> 00:36:44,460 In systems that want to be as smooth as possible as an operating experience, they're only relying on the unencrypted CSN. 579 00:36:44,460 --> 00:36:49,640 And they rely on it because they say, well, no one could... there's no way to change the CSN. 580 00:36:49,640 --> 00:36:53,000 It's not like I can rewrite that block zero on this token. 581 00:36:53,240 --> 00:36:55,600 It's burned in at the factory. 582 00:36:55,980 --> 00:36:59,180 Well, that doesn't mean I can't rewrite it on something else. 583 00:36:59,280 --> 00:37:03,700 Just because you're not supposed to be able to rewrite the CSN doesn't mean you can't. 584 00:37:03,700 --> 00:37:14,860 There are a lot of credentials out there now on the shady kind of places on the internet where it'll say block zero, changeable, UID, changeable, clonable cards. 585 00:37:14,860 --> 00:37:19,020 This is tech that's out there now for people who want to hack on RFID. 586 00:37:19,700 --> 00:37:25,980 So what we have here, this is a little NFC-enabled padlock, right? 587 00:37:25,980 --> 00:37:34,060 So if I want to unlock this, present the token, that works. 588 00:37:34,420 --> 00:37:39,600 But part of the functionality on this lock, they advertise it as, ooh, it's super extensible. 589 00:37:39,600 --> 00:37:43,260 If you have other credentials, you can enroll new credentials. 590 00:37:43,260 --> 00:37:49,700 So I've taken a card that didn't come with this lock, but I've decided to program it into the lock instead. 591 00:37:54,310 --> 00:37:55,150 All right. 592 00:37:55,150 --> 00:37:56,470 And that works as well. 593 00:37:56,470 --> 00:37:57,350 Cool. 594 00:37:57,490 --> 00:38:02,710 Now, do you think this technology is the same as these other technologies here? 595 00:38:02,710 --> 00:38:07,470 No, it just happens to have a high-frequency chip inside of it. 596 00:38:07,470 --> 00:38:12,390 And that means it has a CSN that'll spit out whenever you're near a reader. 597 00:38:12,390 --> 00:38:20,410 So if this padlock is operating in CSN mode only, let's go ahead and do a CSN cloning attack. 598 00:38:21,270 --> 00:38:23,790 So we had this right here, right? 599 00:38:23,790 --> 00:38:29,650 This was the serial number that spat out when we were scanning this tag. 600 00:38:29,650 --> 00:38:34,870 I can actually tell you that a lot of these systems don't even use the entire serial number. 601 00:38:34,870 --> 00:38:36,810 I'm just going to grab the beginning of it. 602 00:38:36,810 --> 00:38:40,730 And now we're going to use one of our reprogrammable cards. 603 00:38:40,730 --> 00:38:46,110 So here we have a magic card, sometimes called a magic reprogrammable MyFair card. 604 00:38:46,110 --> 00:38:48,370 So I'm going to say high-frequency. 605 00:38:48,490 --> 00:38:54,350 We're doing a MyFair credential here with set UID. 606 00:38:54,550 --> 00:38:56,170 And what I want to set it as? 607 00:38:56,170 --> 00:38:59,850 Well, I want to copy the UID that I know works. 608 00:39:00,630 --> 00:39:03,030 Old UID was 1234. 609 00:39:03,030 --> 00:39:04,410 That's going to be written over. 610 00:39:04,410 --> 00:39:05,650 New UID. 611 00:39:05,650 --> 00:39:11,570 Okay, this now has the same CSN, the same unique identifier, as this card. 612 00:39:11,570 --> 00:39:15,170 I haven't copied the rest of the credential, nothing of the card contents. 613 00:39:15,170 --> 00:39:18,650 I've only copied that UID, that CSN string. 614 00:39:18,650 --> 00:39:20,330 Let's see what happens. 615 00:39:24,120 --> 00:39:26,780 Green light, lock is open. 616 00:39:26,780 --> 00:39:31,920 And I know this sounds crazy, but that's how it works on a lot of these systems. 617 00:39:32,500 --> 00:39:37,140 Manufacturers want to put product in the marketplace that has maximum compatibility. 618 00:39:37,320 --> 00:39:40,060 So here we have a reader by RF Ideas. 619 00:39:40,060 --> 00:39:41,840 This is a high-frequency reader. 620 00:39:41,840 --> 00:39:44,800 It's, you know, it's sold as a super secure solution. 621 00:39:44,800 --> 00:39:50,280 And they even say, like, look, our reader is so awesome because it works with, look at all these technologies. 622 00:39:50,280 --> 00:39:52,680 Look at all these different high-frequency card types. 623 00:39:52,680 --> 00:39:54,240 There's like 20 cards here. 624 00:39:54,240 --> 00:39:55,820 How many does it support? 625 00:39:55,820 --> 00:39:57,160 Supports all of them. 626 00:39:57,160 --> 00:39:57,880 Awesome. 627 00:39:58,420 --> 00:40:00,840 How does it achieve that level of support? 628 00:40:01,100 --> 00:40:03,480 Because it's operating in CSN mode. 629 00:40:03,600 --> 00:40:06,820 All of these chips, yeah, it's just chip serial number, chip serial number. 630 00:40:06,820 --> 00:40:09,200 Does it support any secure memory unlocking? 631 00:40:09,200 --> 00:40:10,960 Yeah, with two. 632 00:40:11,300 --> 00:40:15,420 And one of them, by the way, Legic Prime is super broken and outdated now. 633 00:40:15,420 --> 00:40:18,220 German hackers broke it like 10 years ago. 634 00:40:18,220 --> 00:40:22,360 So this amazing solution that supports all these credentials, wow. 635 00:40:22,460 --> 00:40:25,200 But are you really supporting anything securely? 636 00:40:25,200 --> 00:40:32,460 Or are you just reading the unencrypted portion of a card that was never meant to perform a security role? 637 00:40:32,460 --> 00:40:35,700 Now, better standards are emerging. 638 00:40:35,700 --> 00:40:39,560 There are interoperability proposals. 639 00:40:39,560 --> 00:40:48,960 The LEAF standard is a good one if you want to research into this, where they're going to say, look, all credentials should try to store the credential payload in the same sector. 640 00:40:48,960 --> 00:40:51,600 And you should try to unlock it in this fashion. 641 00:40:51,600 --> 00:40:53,600 And this is how you manage keys. 642 00:40:53,600 --> 00:40:56,480 And this is how you interoperate between different systems. 643 00:40:56,480 --> 00:40:58,260 We're not there yet. 644 00:40:58,260 --> 00:41:07,460 So right now, if you buy a product and it advertises, oh, this can operate with all these different card types, be skeptical of it. 645 00:41:07,900 --> 00:41:18,620 Okay, so you want to start getting into this, you want to start doing some of these attacks, maybe getting a Proxmark or even a cheaper device that you're starting out just to learn about this, you're going to need blank credentials, right? 646 00:41:18,620 --> 00:41:22,740 You want to get some reprogrammable credentials to do some hacking, some cloning, some attacking. 647 00:41:22,840 --> 00:41:23,820 What are your options? 648 00:41:23,820 --> 00:41:28,460 Well, on the low frequency side of the house, we've talked about the T5577. 649 00:41:28,460 --> 00:41:30,580 That really is the gold standard now. 650 00:41:30,580 --> 00:41:32,760 And it's available in plenty of form factors. 651 00:41:32,760 --> 00:41:38,620 You can get cards, you can get little fobs, you can get it as stickers that go on your cell phone case or something. 652 00:41:38,620 --> 00:41:41,500 You can find them in all different shapes. 653 00:41:41,780 --> 00:41:48,760 For high frequency, for those NFC and other functions like that, remember, NFC is a pretty open standard. 654 00:41:48,760 --> 00:41:53,180 You can read the ISO standards, you can pick up reprogrammable tags. 655 00:41:53,180 --> 00:41:55,900 The NTAG family is one of the biggest ones. 656 00:41:55,900 --> 00:42:00,460 So you'll see NTAG 216 or NTAG 215 or NTAG 213. 657 00:42:00,460 --> 00:42:02,300 What's the difference there, by the way? 658 00:42:02,620 --> 00:42:04,360 Just memory size. 659 00:42:04,360 --> 00:42:08,000 The only difference is how much storage capacity is on the tag. 660 00:42:08,000 --> 00:42:11,140 They were all released at the exact same time by NXP. 661 00:42:11,140 --> 00:42:12,880 They have the same feature set. 662 00:42:12,880 --> 00:42:14,500 They have the same write endurance. 663 00:42:14,500 --> 00:42:16,720 The only difference is how much memory they have. 664 00:42:16,720 --> 00:42:18,220 So go ahead and get the 216s. 665 00:42:18,220 --> 00:42:20,000 You get the most space on the cards. 666 00:42:20,020 --> 00:42:28,000 But the really fancy stuff for the hacking of areas of the chip you're not supposed to be able to modify, that's where we get into those Magic cards, right? 667 00:42:28,000 --> 00:42:29,820 And there's different varieties out there. 668 00:42:29,820 --> 00:42:35,220 There's the old MyFair Classic, which is a very common type of credential that's a little outdated now. 669 00:42:35,220 --> 00:42:38,360 That's been around for a while, the Magic MyFair card. 670 00:42:38,360 --> 00:42:43,660 But they even have newer ones, Magic DesFire cards and so forth, where you can write that block zero. 671 00:42:43,660 --> 00:42:46,900 You can modify things you're not supposed to be able to modify. 672 00:42:47,120 --> 00:42:50,900 So this is all accessible stuff. 673 00:42:51,160 --> 00:42:59,780 Every new technology comes out and it's secure for a while, and then researchers and hackers learn how to break that implementation, and you've got to get to the next page. 674 00:42:59,780 --> 00:43:01,200 You've got to get to the next level. 675 00:43:01,200 --> 00:43:09,260 So if you want to learn more about this, if you want to do this kind of stuff, pick up some of these rewritable credentials and start trying it. 676 00:43:09,460 --> 00:43:12,240 By the way, I noticed this chart's not really to scale here. 677 00:43:12,240 --> 00:43:13,840 Those sticker dots are pretty tiny, right? 678 00:43:13,840 --> 00:43:14,920 They're smaller than the fobs. 679 00:43:14,920 --> 00:43:15,980 Let's fix that. 680 00:43:16,540 --> 00:43:18,860 Also, what's that at the end there? 681 00:43:18,860 --> 00:43:19,980 That's also not to scale. 682 00:43:19,980 --> 00:43:21,060 Let's fix that. 683 00:43:21,520 --> 00:43:22,620 You know what those are? 684 00:43:23,180 --> 00:43:23,880 Ever heard of these? 685 00:43:23,880 --> 00:43:26,200 That's right, those are implantable credentials. 686 00:43:26,200 --> 00:43:46,460 Those are biohacking implants that you can insert between the first and second metacarpal of your hand, or really anywhere on your body if you like, and they are T55 chips, or MagicMyFair chips, or NTAG216 chips, and I can speak with experience here because both my wife and I have these in our hands right now. 687 00:43:46,460 --> 00:43:53,660 We have had them injected, we've hacked on them, we've played with them, we've reprogrammed them, and we use them for all kinds of purposes, right? 688 00:43:53,940 --> 00:43:56,940 One time my wife, you know, wanted to get into a building. 689 00:43:56,940 --> 00:44:04,140 We had a copy of her ID written to her hand, so she was able to access wherever she needed to go in that facility without carrying cards around. 690 00:44:05,140 --> 00:44:06,660 What do I do most of the time? 691 00:44:06,660 --> 00:44:14,340 I don't go into high secure... well, sometimes on pen tests I will write a badge to my hand and then people can't figure out why I'm... how am I getting this building? 692 00:44:14,340 --> 00:44:15,780 You don't have a card on you. 693 00:44:15,840 --> 00:44:18,100 For the most part, I use it for hotel rooms. 694 00:44:18,420 --> 00:44:27,860 I like to crack the implementation of whatever security is on my hotel key, clone it, and write it to my hand, get myself in that room, and then I go to the next hotel. 695 00:44:27,860 --> 00:44:35,100 And again, they're rewritable, so I can erase my hand and I can rewrite it the next time I travel and write the hotel key for that door. 696 00:44:35,240 --> 00:44:37,360 So I think this is really neat stuff. 697 00:44:37,360 --> 00:44:41,740 If you want to get into that, well, look for a talk at the DEF CON this summer in the U.S. 698 00:44:41,740 --> 00:44:45,240 where we hope to talk about this for biohacking and implantables . 699 00:44:45,240 --> 00:44:55,380 But all of these chips, they are really well known and they're understood by the hacker community now who are developing these toolkits and these different ways of interacting with them. 700 00:44:55,380 --> 00:45:01,920 If you want to learn more about this kind of technology, if you're excited about this, couple of names I'm going to give you. 701 00:45:02,040 --> 00:45:10,600 Babak Javadi, one of my longest time friends, one of my business partners, great guy in the access control space, and our colleague Iceman, right? 702 00:45:10,600 --> 00:45:17,640 So Christian Ehrman, this gentleman, he is responsible, again, for much of the RFID research group's project work. 703 00:45:17,640 --> 00:45:20,400 He's responsible for the design of the new Proxmark. 704 00:45:20,400 --> 00:45:22,080 And he runs a Discord. 705 00:45:22,320 --> 00:45:24,500 There is an open Discord server. 706 00:45:24,700 --> 00:45:27,360 Anyone can join, anyone who wants to learn about this. 707 00:45:27,360 --> 00:45:30,660 It's a wonderful community of hackers that just share information. 708 00:45:30,660 --> 00:45:32,480 They say, hey, I've got this new chip. 709 00:45:32,480 --> 00:45:33,380 I don't know what it is. 710 00:45:33,380 --> 00:45:34,700 I think it's low frequency. 711 00:45:34,700 --> 00:45:36,480 How do I decode it? 712 00:45:36,480 --> 00:45:38,980 And people would start jumping in and say, well, let's try this. 713 00:45:38,980 --> 00:45:39,760 Try these commands. 714 00:45:39,760 --> 00:45:42,020 And someone else says, oh, those commands need to be rewritten. 715 00:45:42,020 --> 00:45:46,200 And the open source Proxmark gets, the code base gets updated all the time. 716 00:45:46,360 --> 00:45:47,980 These are the people doing it. 717 00:45:47,980 --> 00:45:51,800 This is the community that is right on the bleeding edge of this technology. 718 00:45:52,280 --> 00:45:54,900 And if you want to join us, we want to see you with us. 719 00:45:55,280 --> 00:45:57,220 Again, I was never the cool kid. 720 00:45:57,220 --> 00:46:00,880 But when I hang out with these guys, I feel like I can do cool stuff sometimes. 721 00:46:01,180 --> 00:46:03,120 And I guarantee you can too.