[00:00.000 --> 00:04.960] All right, let's kick this thing off. So I found out today this was not in Hacker Tracker, [00:04.960 --> 00:11.560] so everybody in here must read the old ink version of the schedule. So thank you for reading the old [00:11.560 --> 00:16.280] paper version and showing up. Today we're going to learn how to break into buildings. [00:16.480 --> 00:21.500] Plain and clear. Why do I like breaking into buildings? I've actually never broken into a [00:21.500 --> 00:26.280] building for context, but when you can do a computer exploit and it touches the real world, [00:26.280 --> 00:30.920] that has always been the ultimate for me. So I played CTF for a long time, done a lot of binary [00:30.920 --> 00:37.020] exploitation, but seeing a pound sign pop up on your screen versus seeing a door unlock is a very [00:37.020 --> 00:45.380] different adrenaline hit. So let's go back through the history and see all the different ways you can [00:45.380 --> 00:49.720] break into buildings with laptops. So first we'll go over access control one-on-one. I'll just [00:49.720 --> 00:54.940] explain how these systems work. That's step one. What a smart card is. This is actually a pretty [00:54.940 --> 00:59.520] overloaded word. Everything looks like a smart card is just a piece of plastic with some [01:00.220 --> 01:03.800] microcontrollers in it. And then I'll go over all of the attacks that we've seen come out over the [01:03.800 --> 01:09.000] last couple decades. And then some food for thought on what the future might look like. [01:09.700 --> 01:15.200] So if you look at a typical access control system, there's only a couple of components. This is the [01:15.200 --> 01:20.240] most complicated system you would ever see. On the left side you'll see that there's a door reader. [01:20.240 --> 01:25.380] This is the little box you tap your card to and it goes boop! And green or red or blue or whatever [01:25.380 --> 01:31.800] color it turns. That then has a couple of wires that run all the way to the secure side into a [01:31.800 --> 01:36.500] controller board that will ultimately make the yes-no decision. So it's going to compare that [01:36.500 --> 01:42.000] number to some database and say, does this person have access? If it does, it opens the door. For [01:42.000 --> 01:47.420] security reasons, if you're using a mag lock, which is just an electromagnet, you'll plug it [01:47.420 --> 01:53.340] in to 12 or 24 volts. That electromagnet will hold the door shut. There's a problem here though, [01:53.340 --> 01:58.560] that if you're on the inside of that building, you cannot get out unless you can pull harder than [01:58.560 --> 02:04.740] that electromagnet, which is typically like 1500 kilograms for a cheap one, and they go way up. [02:05.200 --> 02:11.480] So in the event of a fire, you need a button that you can push to cut the power. This actually was [02:11.480 --> 02:16.100] not deployed well on the initial ones. A lot of people burned to death. So this is like fire [02:16.100 --> 02:21.180] marshal enforced now. Every door that has an electromagnetic lock will have a motion sensor [02:21.180 --> 02:27.900] and an exit button for egress. And by law, it has to be one motion. So if you hit the exit button, [02:27.900 --> 02:34.180] that needs to be all you do, or a big bar. So that comes into play quite a bit when you [02:34.180 --> 02:40.460] see some of the attacks and how to bypass these. So if we take away all the fluffy words and just [02:40.460 --> 02:44.720] look at what this is, it's an Arduino project that any high school or middle school student [02:44.720 --> 02:51.620] could build. There's just three relays. Ultimately, there's one that matters. So on the secure side, [02:51.620 --> 02:59.200] if that relay trips, the power is either turned off or on, and the door will unlock. On the reader [02:59.200 --> 03:05.100] side, there's just a little microcontroller that is going to do something over RF and then send a [03:05.100 --> 03:11.220] number out over Wiegand, which is this unencrypted two-wire protocol that has a data zero line to [03:11.220 --> 03:16.320] encode the number zero and a data one line to encode the number one. Once it gets the other [03:16.320 --> 03:23.440] side, decision is made. The other two things are also just relays. The exit button, when you hit [03:23.440 --> 03:29.640] it, it's just going to cut the power. And the motion sensor, again, when you wave at it, it just [03:29.640 --> 03:33.840] touches a relay. These are either normally closed or normally open. [03:33.840 --> 03:40.920] If you get any of those relays to chip, the door will unlock. So let's look at some of the worst [03:40.920 --> 03:45.680] relay fails in honor of the Olympics. This is not a running relay we're talking about, though. This [03:45.680 --> 03:51.820] is an electronic relay. I'm going to gamble that the internet works and show you how you can trip [03:51.820 --> 03:58.180] these relays in not-so-sophisticated ways. We'll get to interesting computer hacks later, but you [03:58.180 --> 04:04.160] see here in this video the exit button is on the left. You get yourself a nice sturdy piece of [04:04.160 --> 04:12.620] metal, shove that thing through the door, and you just click that relay. Bang, you're in. We'll keep [04:12.620 --> 04:18.240] going up in complexity. This is probably the least advanced way to trip one of those relays. [04:18.780 --> 04:26.540] So I call this the hook key. There's also the magnet key. So if you're aware of the internal [04:26.540 --> 04:31.300] mechanics in a relay, it's just two pieces of metal like this. You touch them together, [04:31.300 --> 04:36.800] the connection is made. You separate them, the connection is not made. So some of these... [04:37.800 --> 04:43.920] this is the locksmith, uh, lock picking lawyer. You hit the pin pad, the door unlocks. You can [04:43.920 --> 04:50.160] literally take a magnet, touch it to where the relay is, and it just clicks the relay. So if you [04:50.160 --> 04:55.260] buy this system, put it on the outside of your building, anyone can just come up with a magnet, [04:55.260 --> 05:03.340] click, click, click, click the relay on. So don't do that. When you install these systems, [05:03.340 --> 05:08.380] make sure the relay is on the inside of the building, not the outside. And then there's [05:08.380 --> 05:14.880] the motion sensor. So for obvious reasons, when there's motion, it's going to trigger. [05:14.960 --> 05:20.320] If you vape, it turns out the smoke in your vape for most of these motion sensors [05:20.320 --> 05:27.300] is thick enough that it will actually trip the motion sensor. And you can just blow smoke through [05:27.300 --> 05:33.880] the crack and walk right through the door. So we'll call these the very unsophisticated, [05:33.880 --> 05:40.920] uninteresting, why the hell did I come to this talk hacks. There are much more fun ways to do [05:40.920 --> 05:45.740] this. Just to note, when you're looking at these systems, so there's the electromagnets that are [05:45.740 --> 05:51.080] huge, chunky electromagnets over the top. There's also electric strikes. So these are solenoids [05:51.080 --> 05:56.800] that are going to have a pin that in its unpowered position is stuck down in the hole. [05:56.900 --> 06:02.580] And then when you power it, it pulls the solenoid out. These are far better for various reasons. [06:02.580 --> 06:08.640] You can't get locked into your building and die. They're a little harder to trip. You can't vape [06:08.640 --> 06:14.380] into these and have them pull a solenoid up. So if you're given an option, you're installing these, [06:14.380 --> 06:20.180] anytime you can put an electric strike. So now let's look at smart cards. [06:21.160 --> 06:26.160] First, we need to answer the question, what do I mean by smart card? There's really, I think, [06:26.160 --> 06:31.180] three different forms you'll see. There's the ones that look like our credit cards that have these [06:31.180 --> 06:36.800] little pads on them. There's ones that are just pieces of plastic that do some RF stuff. And then [06:36.800 --> 06:44.020] there's ones with the mag stripe on the back. So these are all very, very different technologies. [06:44.020 --> 06:48.820] The end goal of all of this is to take stuff from our digital world and encode it somehow [06:48.820 --> 06:53.800] in a physical piece of plastic that fits in our wallet and is the same size as our driver's license. [06:54.520 --> 07:02.160] So if we look at a mag stripe, this one normally fascinates people. The stuff that is stored on [07:02.160 --> 07:07.800] the magnetic strip of your credit card is exactly the data that is printed on the front of your [07:07.800 --> 07:15.200] card. It is just a way to encode ASCII text effectively in a magnetic form. There is no [07:15.200 --> 07:19.880] security involved. There is no encryption. If you want to clone some mag stripe cards, [07:19.880 --> 07:23.720] we have them over in the physical security village. This was like, you know, attempt number [07:23.720 --> 07:28.700] one at, hey, we're gonna use a physical thing to interface with a digital world. There is [07:29.760 --> 07:34.540] nothing interesting or sophisticated there other than some physics with like magnetic poles. [07:34.540 --> 07:43.960] Not smart at all. Then came the prox cards. These you literally just emanate radio waves at them. [07:43.960 --> 07:48.800] They can be passively powered, which is really cool. So the radio waves actually give them the [07:48.800 --> 07:54.940] power they need to power on. And then they respond with a number. You can actually hack [07:54.940 --> 07:58.600] these things with AM radios. I have like a little kit when my sister was like five, [07:58.600 --> 08:03.620] we were playing around and like emulating these kind of smart cards. They are not encrypted. [08:03.620 --> 08:08.060] There is nothing really interesting from a cryptography standpoint going on there. [08:08.180 --> 08:12.580] The only thing to figure out is how they encode the data that coming back. Is it [08:12.580 --> 08:17.040] amplitude shift keying? Is it phase shift keying? How are they encoding the radio frequency? But [08:17.680 --> 08:22.540] at the end of the day, it is just a number. And that number is typically printed on the card, [08:22.540 --> 08:27.360] just to add to the security of the whole situation. These were never intended as a high [08:27.360 --> 08:32.460] security thing. Yet, if you go to most enterprises on earth, including the one my wife works at, [08:32.460 --> 08:37.300] they still use these exact cards today, as does the high rise that my company is in, [08:37.300 --> 08:42.720] in downtown Houston. It's a bummer. Like I saw her come home first day of work, like why? [08:42.720 --> 08:49.740] Like I know where you work. Don't do that. You have sensitive stuff. So then came along [08:49.740 --> 08:56.140] the near field communication cards, NFC or high frequency cards. These run at 13.56 megahertz. [08:56.140 --> 09:01.680] These do have cryptography on them. The way to think of the cryptography on all of these is as [09:01.840 --> 09:08.020] a memory card. There is a symmetric key that is on the card. And if you have it, you can read and [09:08.020 --> 09:14.020] write to that card. And if you don't, you cannot. So there is one key that will let you read and [09:14.020 --> 09:19.580] write data from these cards. Otherwise, I colloquially call them dumb cards. They're [09:19.580 --> 09:24.340] not doing anything sophisticated. They're just memory cards, but they are better than the mag [09:24.340 --> 09:32.780] stripes and the prox cards. So there's going to be a shared key, which that screen still looks [09:32.780 --> 09:37.340] like it's on. So there's gonna be a key on the card and a key on the reader. So for the reader [09:37.340 --> 09:42.780] to read the card, it needs another key, which you can kind of see where this is going. If I'm [09:42.780 --> 09:48.100] deploying, you know, a million of these, that means that that key has to be on all of the readers and [09:48.100 --> 09:57.720] all 1 million cards. Now we look at what is actually considered a smart card. So our credit [09:57.720 --> 10:03.120] cards that look like this with the little chip, these are actually little microprocessors. [10:03.160 --> 10:10.200] They're not microcontrollers. They actually run Java OS. They have a CPU. They have memory. They [10:10.200 --> 10:15.600] have non-volatile storage. They have, you know, dedicated crypto units. And they can do public [10:15.600 --> 10:22.040] key cryptography. So these are actually smart in the sense that we would hope they are and do [10:22.040 --> 10:29.140] proper security things. With the asymmetric encryption, this is much better than the symmetric [10:29.140 --> 10:33.180] key encryption. It means if you break my card, you only get my private key and you're not going to [10:33.180 --> 10:40.220] take down my whole company and be able to clone every employee's card, which is very good for the [10:40.220 --> 10:45.580] scalability point. And I put this diagram there because I think it's interesting that I didn't [10:45.580 --> 10:50.020] realize this until I started hacking smart cards in my career, that these really are just little [10:50.020 --> 10:56.820] embedded systems. There's far more sophisticated stuff in there than I thought. And you can kind [10:56.820 --> 11:01.980] of see the overlap. You have contact cards that speak one protocol. You have contactless cards. [11:01.980 --> 11:06.140] And then you have the dual interface cards, which almost all credit cards are today. You can tap [11:06.140 --> 11:12.600] to pay or you can shove that thing into the credit card reader. And if you look at the specs, [11:12.600 --> 11:18.020] they have 1k mbit flash. There's an EEPROM that speaks I-squared seed and SPI. They have [11:18.020 --> 11:25.160] segmented memory with a 64k bit EEPROM. Pretty decent specs for a credit card. [11:28.080 --> 11:33.000] The way they work is if you look at those pads, only four matter. You have your power and your [11:33.000 --> 11:38.200] ground to power the little computer on. You drive the clock externally, which is interesting from a [11:38.200 --> 11:43.240] glitching perspective. So you control both the voltage and the clock. And then you just have a [11:43.240 --> 11:48.460] single pin for I-O. So as you're driving the clock, use that I-O to read and write commands [11:48.460 --> 11:54.760] and application data units. So APDUs, you're going to send commands. You can actually send [11:54.760 --> 12:00.440] admin commands and install Java applets and manipulate the operating system. Or [12:01.180 --> 12:05.020] unauthenticated commands that are just going to query this thing for a challenge response. [12:06.400 --> 12:11.800] So I got my doctorate in embedded system security, where I was glitching and doing all sorts of [12:11.800 --> 12:16.080] crazy things that break into embedded systems. So smart cards have always fascinated me because [12:16.080 --> 12:23.100] they actually do a very, very good job at physical attacks. So it's common that you would drop your [12:23.100 --> 12:27.820] credit card and somebody could pick it up, right? They can still go make payments, but actually [12:27.820 --> 12:33.600] extracting that key, cloning cards is a big deal. So they actually lay, if you look at the IC [12:33.600 --> 12:39.900] and delid it, between every single layer of logic, there is a layer of mesh that is a destroy [12:40.620 --> 12:45.760] mechanism. If that is tampered and you break a single one of those traces, it actually will [12:45.760 --> 12:51.340] self-destruct the card by deleting all of the sensitive material. They also have to have brownout [12:51.340 --> 12:56.480] detection. Because you're controlling the voltage externally, there are glitching attacks you can do [12:56.480 --> 13:02.020] on embedded systems, where while they are doing computation, you can brown the voltage out. So that [13:02.020 --> 13:06.460] means you're going to take it from your positive five volts to negative five volts. That can make [13:06.460 --> 13:12.140] your D flip-flops go crazy, and you can have an if statement evaluate to true that otherwise [13:12.140 --> 13:19.200] should have been false or vice versa. They also, because you're controlling power, clock, all of [13:19.200 --> 13:26.140] these things, you have to program the logic very specially. So one of these two statements on the [13:26.140 --> 13:33.060] right is correct in an embedded system standpoint. If you're writing this for a computer software, [13:33.060 --> 13:38.880] they're both probably fine. But this is the code to check the pin when I'm entering the [13:38.880 --> 13:46.860] pin to say unlock my debit card. Does anybody have an inkling of which one is better than the other? [13:53.750 --> 14:01.550] We think number two is better. Correct. Number two is better. So the reason that number one would [14:01.550 --> 14:06.450] fall vulnerable on a smart card is because you can do side channel analysis to actually see [14:06.450 --> 14:12.890] if that if statement evaluated to true or false. And what you can do in this attack is that if [14:12.890 --> 14:18.150] you believe it evaluated to false, you cut the power immediately before it has time to increment [14:18.150 --> 14:23.590] the counter and write that to the non-volatile storage. Which means you could then brute force [14:23.590 --> 14:28.230] this with unlimited tries. Whereas if you increment the counter before you do the check, [14:28.230 --> 14:32.490] you can still limit it to 10 or 15 pin attempts, whatever you have. [14:33.110 --> 14:38.530] The awesome part is on these smart cards, this is all actually, they've thought about a lot of this [14:38.530 --> 14:43.730] because it's used for financial transactions in the EU especially. So I read the whole book on [14:43.730 --> 14:48.210] smart card security and these were the highlights that I thought were particularly interesting of [14:48.210 --> 14:54.310] security done well. So before we go break all these, why did we even build these in the first [14:54.310 --> 15:00.430] place? The real problem is that physical keys are one to one. There's one key that opens one door. [15:00.430 --> 15:05.210] If I want 1,000 people to open that one door, they all have the exact same key. And if one of [15:05.210 --> 15:14.370] those 1,000 people is bad and I have to fire them, I now have to give out 9,999 new keys and rekey [15:14.370 --> 15:20.790] that door. So in enterprise, this sucks. Smart cards can be one to many. You can have many [15:20.790 --> 15:26.210] different credentials that get into the same door. It used to be really complicated to carry a full [15:26.210 --> 15:30.730] computer in your pocket. As you can see, modern smart cards are actually little mini computers. [15:30.730 --> 15:36.450] Our smartphones are really big, fast computers. And you can put a picture on them. This should [15:36.450 --> 15:42.350] not be ignored. It is nice that when you come to conferences and things, there is something around [15:42.350 --> 15:48.050] everyone's neck that indicates they are meant to be here and should not be escorted out. So even [15:48.050 --> 15:52.750] all the security and stuff aside, the fact that people have things hanging around the neck that [15:52.750 --> 15:58.170] says that they belong is actually valuable. Enough with all that fluffy stuff. Let's go through [15:58.170 --> 16:04.430] some exploits. That's why we're at DEF CON. So when you're doing a vulnerability assessment, you first [16:04.430 --> 16:09.330] want to ask yourself, what's the goal, right? What's the worst that can happen? So we could use a card [16:09.330 --> 16:15.670] without someone's permission. I could, you know, swipe it out of your back pocket. I can clone the [16:15.670 --> 16:21.310] smart card or I can subvert the need for it altogether. So we already saw at the beginning [16:21.310 --> 16:25.610] some of the ways that you can just completely ignore the card. If you go to the physical [16:25.610 --> 16:31.110] security village, they have many, many, many more ways to get into buildings that have nothing to do [16:31.110 --> 16:36.330] with computer science. And using the card without a person's permission is not particularly interesting [16:36.330 --> 16:40.950] because you're just stealing the card. There are ways that there are some smart cards that will [16:40.950 --> 16:46.350] have like biometrics built into them, you know, other things like that. We're going to specifically [16:46.350 --> 16:54.510] focus on cloning the smart cards. So the way it works when you have a good, you know, one of the [16:54.510 --> 17:01.170] dumb cards, the 13.5 megahertz, 5, 6 megahertz cards, there's going to be two keys that really [17:01.170 --> 17:07.230] have to work together to store this credential. So there's going to be one, an authentication key, [17:07.230 --> 17:12.170] an in-transit key that lets you read and write data. And then you can also encrypt the data at [17:12.170 --> 17:19.070] rest on the card. So if my employee credential is 1, 2, 3, 3, 4, 5, 6, 8, 9, 0, I will encrypt that [17:19.070 --> 17:25.370] while it's on the card. And then I will also have effectively a key that encrypts the in-transit that [17:25.370 --> 17:31.970] lets me even talk to the card. It doesn't matter what the key for the encryption on the card is, [17:31.970 --> 17:37.290] if I'm just going to clone it outright. So that is worth noting because one of the fixes I'll [17:37.290 --> 17:44.150] explain later, they fixed the in-transit key, or sorry, yeah, they changed the in-transit key, but [17:44.150 --> 17:51.510] it didn't actually fix the problem. So the whole goal of this, when we're trying to break into [17:51.510 --> 17:56.370] buildings with laptops, is just find that dang key. Whatever the key is that lets me read and [17:56.370 --> 18:01.870] write data from the cards is game over for that security system. Because now I can walk up next [18:01.870 --> 18:09.010] to anybody and just outright clone employee IDs. And in the case that I also know the at-rest key, [18:09.010 --> 18:13.870] I can just fabricate whatever keys I want. And if it's printed on the badge, I can just read [18:14.370 --> 18:19.690] someone's ID badge walking by and then go become them and just go in whatever door I know they can [18:19.690 --> 18:29.870] go into. So how are these attacks done? These are almost all exclusively physical attacks on the [18:29.870 --> 18:36.150] cards and their readers first. This one on the MyFairClassic, so this was the most prolific card [18:37.030 --> 18:43.070] early in the smart card era. This was used for everything, public transit, cash cards, so you'd [18:43.070 --> 18:48.590] actually store money in the value on the card. So breaking these was a really big deal in the [18:48.590 --> 18:53.710] research world. There were a couple professors at UVA that actually delidded the chip. They [18:53.710 --> 18:59.490] dissolved it in acid and went layer by layer delidding this chip and taking really high [18:59.490 --> 19:06.690] resolution pictures that you see here of the actual ASIC, like the the circuitry of the IC. [19:06.690 --> 19:13.470] And then they applied image recognition to all of these images to reverse engineer the algorithm [19:13.470 --> 19:19.330] that was encoded in that chip. And then from there, we're able to start analyzing, you know, [19:20.170 --> 19:24.310] cryptanalysis to figure out if there are any vulnerabilities in the cryptography on these [19:24.310 --> 19:31.770] MyFairClassics. Spoiler alert, yes, there was. MyFairClassic at this point is quite broken. [19:31.770 --> 19:37.150] Anybody with a Flipper Zero can just go to RFID, read, put it up to the back of the Flipper Zero [19:37.150 --> 19:42.730] or to the back of the card, and it will run some version of this program. I wasn't involved in the [19:42.730 --> 19:47.410] porting of it, but mostly a user of all these great tools. But this is what it looked like way [19:47.410 --> 19:53.590] back in the day in your terminal window. Now it's a very awesome, you know, handheld little device. [19:53.590 --> 19:58.070] But you can effectively brute force all of those keys, break the keys. Back to the beginning of [19:58.070 --> 20:01.850] the talk, once you have the key, it's game over. You tap any card you're reading and writing. [20:02.730 --> 20:07.350] You can again come over to our booth. There's still hotel key cards and public transit cards [20:07.350 --> 20:16.110] and things today that are still using MyFairClassic. So in the enterprise environment, there's HID [20:16.110 --> 20:23.630] dominated. They were by far the monopolist in, you know, enterprise access control. This thing [20:23.630 --> 20:27.770] on the left probably looks very familiar to most of you. They're all around this [20:27.770 --> 20:32.150] conference. You've seen them probably in tons of buildings, airports, financial institutions, [20:32.150 --> 20:38.770] whatever. Every elevator here has one of these. These use symmetric keys, right? So we go back to [20:38.770 --> 20:43.930] how would you deploy a system like this? Every single one of these on Earth that is sold [20:43.930 --> 20:50.030] has the exact same symmetric key. Every single card, every single reader has the exact same [20:50.030 --> 20:54.850] key. So they've sold millions of these to many different buildings, one of which we are standing [20:54.850 --> 21:02.870] in today with the same key. So that would be absolutely terrible if that one key got leaked. [21:03.530 --> 21:09.310] It took a while actually to get this key. They did pretty good security. Nobody dissolved the [21:09.310 --> 21:15.170] cards in acid, didn't anything like that. Back in 2010, Baloch and Maryak was looking at the [21:15.170 --> 21:20.310] back of one of these readers, I think it's the RW40, said, hey, that looks a lot like the pin [21:20.310 --> 21:28.250] header on my PIC, my PIC kit, my PIC microcontroller. Turns out the way they secured this system was by [21:28.250 --> 21:33.990] flipping pin one and pin three, because, you know, nobody on Earth would ever dream of flipping pin [21:33.990 --> 21:41.950] one and pin three on their PIC kit. So he just swapped pins one and pin three, plugged it in. [21:42.570 --> 21:47.070] Great. We're debugging it. There is a security feature on PIC, though, where you can't just [21:47.070 --> 21:51.390] read memory. That would be catastrophic and extremely dumb. They did not do that. [21:51.550 --> 21:57.110] This particular one, though, had a vulnerability where you could wipe individual sectors [21:57.790 --> 22:02.410] and write data to individual sectors. So the way this should work is I'm going to write new [22:02.410 --> 22:07.630] firmware, I have to wipe the whole firmware and write my own custom firmware. With this little [22:07.630 --> 22:14.790] subtlety, you could erase sector zero, write code in there that would dump sectors one through n, [22:14.790 --> 22:21.190] and then take another sacrificial reader, delete sectors one through n, and write code in all of [22:21.190 --> 22:27.290] those that would dump sector zero. So by sacrificing two of these, you now put all of that together [22:27.290 --> 22:32.910] and you have the complete firmware dumped on your computer that you can now analyze with IDA Pro. [22:33.690 --> 22:40.170] They stored everything in PIC memory, including those keys. They weren't stored off chip in some [22:40.170 --> 22:45.490] sort of secure RAM or anything like that. So once you reverse engineer this go through, [22:45.490 --> 22:52.090] lo and behold, the keys just pop right out at you. That's game over. Since these are symmetric [22:52.090 --> 22:57.170] keys, now when you go to clone an HID card, there is no brute brute forcing going on, [22:57.170 --> 23:04.190] you just read the freaking card. They did add an iClass SE, so if you're in the industry and [23:04.190 --> 23:10.010] you see this on the back of your card, the SE I think stands for secure encryption or something [23:10.010 --> 23:16.250] like that, but they did encrypt the data at rest on the card. So it used to be you'd use this key, [23:16.250 --> 23:21.290] you just read the the credential off, and you could write arbitrary credentials. With the SE, [23:21.290 --> 23:26.710] they did use AES, that's good, they used a known algorithm to encrypt the blob on the card, [23:26.710 --> 23:30.490] but you can still clone it outright. So if I want to become you, I just tap your card, [23:30.490 --> 23:36.450] I take your blob, I put on my card, boom, I'm you. They also had a version that they would upsell you [23:36.450 --> 23:42.910] on called HID Elite Class. So what Elite Class would do is it would just change that standard [23:42.910 --> 23:48.010] key that's on every door on earth. For your organization, they would give you an organization [23:48.010 --> 23:53.650] specific key, and then your cards, your employees would use a different key so people couldn't come [23:53.650 --> 23:59.310] up and clone it. Sounds good. Unfortunately, the firmware at this point is, you know, [23:59.310 --> 24:03.670] it's not open sourced, but it's out there if you know the right people and know where to look. [24:03.830 --> 24:09.410] There were some researchers, Flavio Garcia, a couple other folks, looked at this algorithm [24:09.410 --> 24:15.550] and found that there was actually a vulnerability in the way that the elite keys were derived, [24:15.550 --> 24:21.250] and they were able to go up to an elite key reader, send I think it was seven failed attempts [24:22.010 --> 24:26.050] of cards that wouldn't register at all. The backend, it would never spit them out, [24:26.050 --> 24:30.790] they were total failed transactions, and then offline, you could brute force the elite key. [24:31.010 --> 24:36.130] So even if you paid to upgrade to the elite key, somebody has had to walk by one of your readers, [24:36.130 --> 24:40.370] tap their proxmark, boom, now they have the key, and we're back to where we started, [24:40.370 --> 24:45.210] just clone and employee IDs. This was like, I don't know, at least in my career, this is like [24:45.210 --> 24:51.450] the coolest, like, heyday couple of years in breaking into RFID things. And all these papers [24:51.450 --> 24:56.450] are published, I'm like implementing the stuff as they're publishing it, like emailing these guys, [24:56.450 --> 25:00.890] like, oh my god, like, I can't believe this works. Is this a typo? Like, is this algorithm real? And [25:00.890 --> 25:05.670] then, yes, it's all real. I've like, wrote these on proxmarks, I wrote a version of Python, wrote [25:05.770 --> 25:11.290] a version in C, and now it's all been ported to the Flipper Zero. I think the guy who ported it [25:11.290 --> 25:16.710] was hanging out in the RFID village, actually, one of the co-authors. So, like, it's awesome. [25:16.710 --> 25:22.730] Like, crazy stuff. Totally works. And people are literally flipping out these days. This used to [25:22.730 --> 25:27.230] be something that, like, you know, there was a small group of us that knew about these things, [25:27.230 --> 25:30.890] and we'd come to DEF CON, like, hey, you know, talk about these exploits, we had email threads [25:30.890 --> 25:36.250] going back and forth. Now it is everybody here is walking around with one of these things on [25:36.250 --> 25:41.110] their neck with the ability to just walk into pretty much any door they run, if they find the [25:41.110 --> 25:49.170] correct employee, and kind of just nudge into them correctly. So, it is a pretty strange time [25:49.170 --> 25:54.330] to be in this world. And that's why we're hosting at the Physical Security Village now, the decades [25:54.330 --> 25:58.110] leading up to the Flipper Zero, I'm like, you know, this probably isn't the right time to talk about [25:58.110 --> 26:04.150] this. Like, this is a pretty bad exploit. But now that it's commoditized, hey, come play with it. [26:04.530 --> 26:09.770] So, the implications of this are actually huge. Most of the employee badges are, like, the world's [26:09.770 --> 26:14.410] largest companies. I still today walk around and have friends, and I'm always looking at people's [26:14.410 --> 26:19.270] IDs and trying to clone everything. And I have, like, way, way too many, oh, my God, moments, [26:19.270 --> 26:24.730] given that this key was leaked back in 2010. Like, there's so many organizations that either have the [26:24.730 --> 26:30.230] prox cards with no encryption at all, or still have these standard I-class cards. Like, in Houston, [26:30.230 --> 26:34.810] there was a brand new building that was built. I was a tenant there for, like, six months. And on [26:34.810 --> 26:40.130] day one, I just, like, cloned the card they gave me and started walking through doors. I'm like, [26:40.130 --> 26:48.130] this is... why in 2024 did we just build this and buy this technology? So, there's still security [26:48.130 --> 26:52.250] theater, though. So, this actually is interesting. There is something to be said about, like, keeping [26:52.250 --> 26:58.290] the honest people honest. And, like, as long as it looks good on paper, you know, you have all [26:58.290 --> 27:02.890] these security audits and SOC 2s and things like that, that, like, you do have to do these things. [27:02.890 --> 27:07.870] And it is not highly publicized that this is out there. It's highly publicized at DEF CON. [27:07.870 --> 27:12.030] But outside of this, you know, there's not big signs, like, your HID reader key was leaked in [27:12.030 --> 27:18.550] 2010. What version are you running? And it's just an absolute headache for admins. Like, [27:18.550 --> 27:22.510] now you don't know if your keys have been cloned. Upgrading these is a huge hassle, [27:22.510 --> 27:26.870] because this is your whole infrastructure. These readers aren't cheap. They can go up, [27:26.870 --> 27:31.790] like, $1,500 a piece. Not to mention the labor of ripping one out and rewiring it. [27:33.690 --> 27:41.030] So, just to take a step back, though, the only common feature here is bad implementation. Like, [27:41.030 --> 27:48.530] trying to roll your own crypto, you know, doing things that in the grand scheme, you'd look back [27:48.530 --> 27:52.810] and say, that was a terrible decision. I wasn't there making the decision. And normally, you don't [27:52.810 --> 27:57.790] realize it at the time. Like, you know, encoding strings that ended in null bytes. At the time, [27:57.790 --> 28:01.810] you're writing C, what could go wrong? And now we have buffer overflows forever. So, [28:01.810 --> 28:05.810] the design process, I'm sure, never dreamed that it would get to the point where, my God, [28:05.810 --> 28:10.730] there's too many of these on Earth and every building can be walked into. But otherwise, [28:10.730 --> 28:17.770] the smart card community as a whole has really crushed it. I mean, to attack, like, the DoD [28:17.770 --> 28:24.250] CAC or a modern credit card is actually pretty complicated. You'll see attacks here, kind of [28:24.250 --> 28:29.050] few and far between. The last one I remember that was quite notable, when I was in the smart card [28:29.050 --> 28:34.210] hacking world, there's somebody who found that on SIM cards, they use triple DES to authenticate. [28:34.850 --> 28:38.390] And I remember going through this with my colleague and I'm like, man, everything actually [28:38.390 --> 28:43.230] does look fine. It looks totally shady. But if anyone used single key DES instead of, like, [28:43.230 --> 28:48.850] the triple keys on triple DES, this would be catastrophic. There was a talk at DEF CON that [28:48.850 --> 28:52.930] was like, hey, every SIM card for this entire manufacturer only uses a single key and they [28:52.930 --> 28:58.290] were just root SIM cards like crazy. Because SIM cards are these cards if you just cut more [28:58.290 --> 29:04.570] plastic off and shove it in a phone. But the security of these at its core is actually [29:04.570 --> 29:11.830] quite good if implemented well. So, okay, Chad, we have these ultra secure cards. Why don't we have [29:11.830 --> 29:17.370] more of them then? Why don't I have one for my credit card? They don't scale well at all. Like, [29:17.370 --> 29:21.730] they were intended to have a bunch of applets. We'd all have one card. I'd have my Chad card [29:21.730 --> 29:27.970] and it has my bank ID and my gym pass and my employee ID. But the security architecture in [29:27.970 --> 29:33.590] this Java OS has almost no isolation and it's pretty terrible. So you can't trust that Gold's [29:33.590 --> 29:39.430] gym had the same security standards as Bank of America to throw those in the same memory space. [29:39.430 --> 29:43.590] So now I need one card for everything. And if I'm using them to log into websites, [29:43.590 --> 29:48.470] now we're talking a huge freaking nightmare, right? I'm gonna have a Rolodex of 800 cards [29:48.470 --> 29:53.430] coming in here trying to log into a site. They also require extra hardware, which people don't [29:53.430 --> 29:57.990] love. So like, for me to log into this computer with a smart card, I need some little dongle [29:57.990 --> 30:03.550] thing that I'm gonna plug into. And then for all, you know, your wallets are just gonna be crazy fat [30:04.070 --> 30:08.970] and they have no user interface. This one is actually pretty relevant. So going back to the [30:08.970 --> 30:13.770] first attack of being able to use someone else's card, if you drop your smart card, someone else [30:13.770 --> 30:19.090] picks it up, they become you instantly. There's no way to verify that. If you had a user interface [30:19.090 --> 30:23.850] on there, even with just this, you know, four digit pin, you could pretty much mitigate that [30:23.850 --> 30:29.190] attack. A four digit pin with some throttling or some, you know, threshold of five attempts, [30:29.190 --> 30:33.090] anyone who picked up that card would be doomed. But these are passively powered, [30:33.090 --> 30:39.650] so you can't have interfaces. So this is the research question I've asked myself my whole [30:39.650 --> 30:47.110] career. Like, can we do better? I hate passwords, smart cards, things in my pocket. And this was [30:47.110 --> 30:53.830] back in, God, I don't know, 2009. I'm like, why don't we use iPhones when they were new? And [30:53.830 --> 30:57.930] everyone's like, no one will ever take their iPhone to work. It's a terrible idea. The security [30:57.930 --> 31:05.230] on them was bad at the time. But I really do think we're at a point where smartphones can kind of [31:05.230 --> 31:11.250] completely eliminate smart cards over the next 10, 20, 30 years. So they actually already put [31:11.250 --> 31:15.910] smart cards in every single smartphone today. So if you take that exact chip that I'm telling you [31:15.910 --> 31:20.810] that's in the SIM card, that's in your credit card, take all the plastic off of it. It's called [31:20.970 --> 31:24.310] a secure element and it is soldered on the motherboard of every single person's phone in [31:24.310 --> 31:28.970] here today. And when you do tap to pay, that's where you're interacting with. Everything is [31:28.970 --> 31:34.070] stored in that secure element. In fact, all of the initial NFC stuff implemented on phones, [31:34.070 --> 31:38.090] they kind of had a hybrid chip that would do NFC plus the secure element. They're just taking [31:38.090 --> 31:42.010] everything they knew from a smart card, trying to put in a phone so that you can do your digital [31:42.010 --> 31:48.890] payments. The other interesting thing that has unfolded on phones, every modern ARM processor [31:48.890 --> 31:53.010] on earth, even the embedded processors, have something in there called a trusted execution [31:53.010 --> 31:59.270] environment. In ARM's version, they call it trust zone. So when the phone boots, it boots into a [31:59.270 --> 32:04.730] secure world that is your first stage bootloader. In there is where you're supposed to keep only [32:04.730 --> 32:10.230] your most sacred secrets and code. So your cryptographic keys, anything you use for [32:10.230 --> 32:15.910] authentication, payments, secure world. Then you create a sandbox called the non-secure world, [32:15.910 --> 32:22.430] and that's where you let iOS and Android and the operating systems play. So now if iOS gets [32:22.430 --> 32:28.750] totally rooted, 100% rooted, exploited, they still cannot touch the code in the secure world. [32:28.750 --> 32:32.830] So if you've ever played around with your Android phone, it tells you to push the physical button. [32:32.830 --> 32:37.270] That's because that code is, I don't work for Google, but it's very likely running in the [32:37.270 --> 32:42.730] secure world, and they're getting the interface from the physical button. Nobody to date has written [32:42.890 --> 32:48.490] a driver for all of the touchscreen, all the graphics in the secure world, but you can securely [32:48.490 --> 32:54.070] detect, yes, somebody's physically hitting this button and wants to do this thing that is being [32:54.070 --> 32:59.810] requested of me. Not just being used by malware or some proximity trying to read your phone. [33:01.530 --> 33:09.990] So the future that I am hoping for and literally bet my career on is that we can put all of this [33:09.990 --> 33:14.650] cool security that we've learned through the smart card world into these phones that we already carry, [33:14.650 --> 33:19.010] and you get really amazing interactions because these can interact with everything. They can [33:19.010 --> 33:23.210] interact with the smart card readers we already have, our computers, each other, [33:23.210 --> 33:27.850] and then we can replace everything in our wallet with these phones. And once you have a private [33:27.850 --> 33:32.130] key store, we can do something more akin to what they wanted to do with the applets, where we [33:32.130 --> 33:36.950] actually can store multiple different credentials in here, and I could have my gym pass next to my [33:36.950 --> 33:46.070] Bank of America card, next to my Defcon badge, or whatever. So I quit my job in academia, or I [33:46.070 --> 33:51.710] declined all my professorship offers, and what I've built since is a company called Authenticate, [33:51.710 --> 33:58.850] where we actually do that. We have an app that can talk to door readers. It all uses asymmetric [33:58.850 --> 34:03.570] encryption, uses all the good stuff, but can also talk to computers, SSH servers, [34:04.230 --> 34:08.770] websites, you name it. You can use that credential for all sorts of different protocols. [34:09.110 --> 34:15.530] So I would now welcome any questions about breaking into buildings, or maybe securing [34:15.530 --> 34:20.430] buildings if you're into that, as I've since switched my career to go from, I don't know, [34:20.430 --> 34:26.270] the fun side to the not fun side of trying to patch all of these holes that I just showed you. [34:26.270 --> 34:41.560] So thank you for attending. Question. And I think on time, I am very early, [34:41.560 --> 34:58.000] so there's plenty of time for questions. Has anybody broken into the CAC card? [34:58.440 --> 35:03.000] That's one of those questions where even if I knew the answer, I couldn't tell you. [35:05.460 --> 35:11.420] There is a library that we published when I used to work in Lincoln Laboratory called LLSmartCard. [35:11.420 --> 35:17.360] If you want to pull that on GitHub and play with it, it gives you a decent interface in Python to [35:17.360 --> 35:24.000] fuzz smart card interfaces over both the contact and contactless interface. So if you want to look [35:24.000 --> 35:28.400] for yourself and plug some cards in, it's... and I think we have some templates on there for [35:28.560 --> 36:01.500] a Visa card and a CAC card of basic interactions with it. How well do trust execution environments [36:01.500 --> 36:07.520] stand up against physical attacks? Is that a downgrade from smart cards that have all of [36:07.520 --> 36:13.480] these physical anti-tamper in there? The answer is yes. There are some side channel attacks and [36:13.480 --> 36:18.580] things that have been published on tees. The way you would implement this is really to couple the [36:18.580 --> 36:22.980] tee with the secure element though. So you would keep all of your keying infrastructure [36:23.820 --> 36:28.380] in the secure element. So all of your digital signatures, all of the cryptography, everything [36:28.380 --> 36:32.780] is done in the secure element that has all this physical anti-tamper and side channel [36:33.600 --> 36:39.820] defenses built in. And you really need the tee specifically for a trusted user interaction. [36:39.820 --> 36:45.440] So you really want the tee to disable all of the accelerometers and side channels [36:45.440 --> 36:50.540] and then anything that's mildly sensitive interacting with the secure element. [36:50.540 --> 36:59.360] But the computation itself should not be in the tee because you don't want RSA side channels. [36:59.360 --> 37:03.520] The one thing that I focused a lot of my PhD on, on the tee security in particular, [37:03.520 --> 37:08.480] was glitching attacks. So the one thing you can do when you're booting into secure world [37:08.480 --> 37:13.380] is if you can glitch at just the right time. This is actually how the Xbox One was hacked. [37:13.860 --> 37:18.460] I love it. If that person is here, introduce me to them so I can like hug them and give them a high [37:18.460 --> 37:24.200] five. But they actually, you're able to glitch it and skip the part where you would then put [37:24.200 --> 37:28.680] everything in non-secure world. So then you could have unfettered access to the secure element [37:28.680 --> 37:34.240] and start doing crazier attacks. So I actually looked extensively into how to write glitching [37:34.240 --> 37:40.100] resistant code in software only with a clang pass. We published a paper on it. I wanted to call it [37:40.100 --> 37:46.280] glitch please in honor of bitch please, but academics don't have the same sense of humor [37:46.280 --> 37:52.080] that I do. So I had to change it to glitching demystified or something far more lame. But [37:52.080 --> 37:59.600] we did show that in software only you can actually do an LLVM pass and make your code glitching [37:59.600 --> 38:04.100] resistant for all practical purposes on your bootloader to keep the the T code at least in [38:04.260 --> 38:35.000] a secure world where it belongs. So how effective are the RFID blocking badge holders and little [38:35.000 --> 38:41.260] sleeves that they get you? They're very effective. When I was doing this research, that was actually [38:41.260 --> 38:46.780] my number one thing I recommended to everybody and probably got the most enemies from. Because [38:46.780 --> 38:52.720] I'm like, hey, these things are annoying, but they absolutely work. And I work here. I'm trying [38:52.720 --> 38:58.680] to protect, you know, the stuff we're doing. So my favorite ones, they have these badge holders that [38:58.680 --> 39:03.140] are plastic, and they're spring loaded, you can put your ID in them that has a Faraday cage in [39:03.140 --> 39:07.760] the back. But then you can flip the plastic up, tap your badge and flip it back. Because otherwise [39:07.760 --> 39:12.380] you're like in this fight every morning trying to like slide it out of this stupid metal thing. [39:12.440 --> 39:18.640] They're not cheap. So they're hard to do at scale. But I don't know, they bought me one because I [39:18.640 --> 39:26.120] exposed all this stuff. And they were not happy with me, but happy enough to get me the fancy one. [39:26.120 --> 39:31.000] But they totally work, like RFID wallets and stuff. I guess the one thing I didn't mention [39:31.000 --> 39:35.780] here, the one attack that can pretty much never be protected against in smart cards, [39:35.780 --> 39:40.520] it's called the relay attack. So this is where I would come near you with a software defined radio, [39:40.520 --> 39:44.920] I would touch somewhere near your card. And I have my friend anywhere on earth with another [39:44.920 --> 39:50.420] software defined radio that just re-emits back and forth. So there's almost no way to defend [39:50.420 --> 39:55.440] against that, unless you have some like capacitive touch on the smart card that would stop it. [39:55.500 --> 40:00.140] And that's really like those RFID wallets. That's what those are all about. Because somebody could [40:00.140 --> 40:04.120] come up to you, you're nowhere near the cash register. Someone else has a Proxmark up their [40:04.120 --> 40:08.940] sleeve and then they just bought, you know, a really fancy dinner on you. Thank you very much. [40:09.060 --> 40:13.540] So yeah, they totally work though. We've tested them in the lab and they do their job. [40:42.500 --> 40:48.460] The question there was about the legal action since the, you know, this key has been leaked [40:48.460 --> 40:54.380] since 2010. Has there any been class action suits? I don't know. And I don't know what [40:54.380 --> 40:59.820] the law is around that. I actually have a friend who's a law professor in Texas and asked her to [40:59.820 --> 41:05.040] speak recently about cybersecurity law in particular. And I came out of that talk with [41:05.040 --> 41:11.380] far more questions than I got answers. It is extremely complicated and confusing. It does [41:11.380 --> 41:16.900] seem to me though, just like a gut feeling that if there's a security vulnerability, the fix for [41:16.900 --> 41:24.760] it should be free for customers. And it should be like strongly advertised, like, hey, you haven't [41:24.760 --> 41:31.900] updated yet. Maybe you should consider this free firmware update. So I don't know. I mean, [41:31.900 --> 41:36.840] that was part of the reason I also decided to throw my hat in the ring and try to build [41:37.320 --> 41:41.140] products instead of staying in my ivory tower, just pointing fingers at people saying you did [41:41.140 --> 41:45.980] it wrong. It is really freaking hard though. I will stress building a security product. [41:45.980 --> 41:50.840] It is way harder than it sounds when you're on the offensive side your whole career. Like, [41:50.840 --> 41:54.500] why didn't they just do this? And then you're on the other side. You're like, oh, damn, that is, [41:55.040 --> 42:00.180] that's a lift there. That is not as easy as I made it sound in my publication. [42:23.120 --> 42:27.220] Okay. I should have had this in my talk. Is there any way to secure your enterprise today [42:27.220 --> 42:31.440] with smart cards that I didn't go over? Yes. A hundred percent. These are just the known [42:31.440 --> 42:36.680] vulnerabilities. There are cards like the Dezfire, even like the Mifer Dezfire, Mifer [42:36.680 --> 42:41.100] Ultralights. There are cards that are properly, like they're using Dez, they're using AES, [42:41.100 --> 42:45.520] they're using good cryptography that is not broken. So you can get these cards with the [42:45.520 --> 42:50.860] good cryptographic standards on them and key them to your organization. And, you know, [42:50.860 --> 42:57.100] at least for now, there's no known vulnerabilities you're cruising. So yeah, there are card stocks [42:57.100 --> 43:02.760] out there. HID even sells Dezfire cards. So it's not that like all of their cards have to be this [43:02.760 --> 43:09.220] I-class or, you know, any brand. And most of these readers will read the good cards. So even if you [43:09.220 --> 43:13.000] buy off-brand readers, they'll read Dezfire cards, they'll read whatever cards you want, [43:13.000 --> 43:17.180] and you can set them up in a way that, you know, someone can't just come up with their flipper. [43:17.680 --> 43:22.360] And we plan on our website, if we get time after DevCon, because I get this question a lot, [43:22.360 --> 43:26.240] we want to publish all of the known vulnerabilities, kind of like the thumbs down, [43:26.780 --> 43:30.880] and then, you know, some of the other card stocks, at least we'll try and keep a record of [43:30.880 --> 43:41.280] what's been broken, what hasn't on our website. Any other questions about how to break into [43:41.280 --> 43:49.460] buildings? You got me for... I'm legally allowed to stay up here for 10 more minutes before I [43:49.460 --> 43:53.920] get ripped off the stage, is what I was told. So we can hang out for a little bit more. [44:16.570 --> 44:20.230] This question, I never know the answer to it. Someone's been coming to DevCon forever. How [44:20.230 --> 44:25.670] dangerous is it to walk around DevCon without your cards in a Faraday cage? Your credit cards [44:25.670 --> 44:30.570] are fine, unless it's a relay attack. There's no known, like, wireless attack that I'm aware of [44:30.570 --> 44:37.050] that can just clone cards. If it is your employee badge, I would say if you have a 125 kilohertz [44:37.050 --> 44:42.190] card, it's pretty likely somebody here has read that card. Last year in the physical security [44:42.190 --> 44:45.950] village, we had the wall of sheep for everybody that would walk in with their prox cards in their [44:45.950 --> 44:53.670] pocket, and it caught quite a few people. Yeah, and if you have an iClass card that, you know, [44:53.670 --> 44:58.210] if you're a target and someone bumped into you awkwardly, you know, maybe go get a new badge [44:58.210 --> 45:03.510] when you get back to work. But I don't know. I generally think that, like, the shenanigans at [45:03.510 --> 45:08.110] DevCon is... I hope it's overhyped as someone who's been coming my whole life, but someone [45:08.110 --> 45:13.670] did steal something from our village this year, so now I'm like, more on your team. Like, no, [45:13.670 --> 45:19.010] there's bad people here. We're not all good. We're not all honest hackers. But, you know, [45:19.010 --> 45:24.510] credit cards and stuff, you know, I would put them potentially in, like, a Faraday wallet or something, [45:24.510 --> 45:37.620] but you don't need to cancel them. You should be fine. Yeah, well, let's keep rifting. [45:59.290 --> 46:06.250] Yeah, so if we... let's say we go from smart cards to phones, what risk would we open ourselves up to? [46:06.250 --> 46:13.250] So the biggest one there, and the one that I've spent a lot of my research thinking about, was [46:13.250 --> 46:17.810] the software attack, right? Our phones are on the internet. Our smart cards are not. [46:17.830 --> 46:23.670] So the question that's kind of been, like, my brain itch for the past 15 years is, like, what if my phone [46:23.670 --> 46:29.770] gets hacked, right? Like, that's now an attack factor that wouldn't have existed on a smart card. [46:29.890 --> 46:34.750] So that's where the secure element, the trust execution environment, a lot of the hardware [46:34.750 --> 46:40.590] architecture that's been built out on these phones. Back to the bad implementation, if done [46:40.590 --> 46:48.010] well, if done correctly, you can actually mitigate that software-based attack. It'll never be fully [46:48.010 --> 46:52.310] gone, right? There's always gonna be a chance that you didn't have before. It was zero percent chance [46:52.310 --> 46:59.550] before. Now it's non-zero, but you really can push it down quite low to the point where, you know, I [46:59.550 --> 47:03.810] think my hope is eventually we can use that to, like, vote for the president, right? You could [47:03.810 --> 47:08.390] have your government ID on your phone and, like, election day comes out. You don't worry about [47:08.390 --> 47:13.850] waiting in some line. You could just cast your vote in some secure way. The physical attacks on [47:13.850 --> 47:18.330] the phone are going to be no better than the physical attacks on the card because it's the [47:18.330 --> 47:23.270] same chip at the end of the day that you're going to be attacking. So you're not really opening [47:23.270 --> 47:27.630] yourself up to another physical interface. But now that you do have all these radios, you have an [47:27.630 --> 47:35.350] application processor, you have a lot more other ways to poke on that card remotely. That's the one [47:35.350 --> 47:39.950] that I've spent most of my research freaking out about. And if you look at all my publications, [47:39.950 --> 47:45.430] we're, like, fuzzing the trusted execution environment on smartphones to figure out are [47:45.430 --> 47:51.850] other apps in there secure? You know, if we put our stuff in there, is a neighbor going to be the [47:51.850 --> 47:58.950] one that actually crumbles the whole security? So that's the sticky part of putting things on [47:58.950 --> 48:04.350] phones. It can be done well, but it's hard and it is going to take people to collaborate, which, [48:04.350 --> 48:41.190] you know, and agree on security standards. Yeah. The question was, in 2010, Chase sent out a bunch [48:41.190 --> 48:47.370] of, you know, tap-to-pay cards and then actually had a recall on them and had to send out new ones. [48:47.370 --> 48:54.130] And the question was, was that because of a security vulnerability? I'm not sure. Probably. [48:55.030 --> 49:00.110] That seems like a good reason. I know, like, that is the biggest issue with hardware tokens in [49:00.110 --> 49:04.150] general. And back to the counterpoint on phones, you can actually push over their updates to phones [49:04.150 --> 49:09.990] where you can't the physical security keys. Like, I know UBKey had an issue where they had some of [49:09.990 --> 49:14.530] their FIPS keys that had a vulnerability in them, and you have to reissue hardware. So that is [49:14.530 --> 49:19.250] actually another interesting thing. But then you run into these, like, Spectre meltdown attacks [49:19.250 --> 49:23.970] where, you know, not only are you reissuing hardware, but you now have to, like, refab [49:23.970 --> 49:29.630] processors. That's going to take 10 years. So it's a tough game, like trying to build secure [49:29.630 --> 49:35.150] systems. It's really, really complicated. I do think we're getting much better at it, though. [49:35.150 --> 49:40.050] Just if you look at the frequency of exploits, it actually is going down over time. I don't think [49:40.050 --> 49:44.510] we're going to be out of jobs anytime soon, but, you know, we are doing a good job going forward. [49:57.660 --> 50:04.260] Am I familiar with laser fault injection? Yes, like optical glitching attacks on hardware. I am [50:04.260 --> 50:09.440] familiar with. I've actually done one of them, not with the intent to succeed, but with the intent to [50:09.440 --> 50:16.580] learn, and it is freaking rad. Like, to look at an electron microscope, you're looking at, like, a [50:16.580 --> 50:23.080] couple nanometer resolution on this chip, and, like, it's sweet. He's, like, red fuming nitric acid. [50:23.080 --> 50:27.980] So how do I think that'll play into this going future? I think that's where you stand on the [50:27.980 --> 50:33.680] shoulders of giants in the smart card world, right? So, like, these secure elements really are [50:33.680 --> 50:39.640] done well to try to prevent against that stuff. Like, these physical attacks have really been [50:39.640 --> 50:45.480] thought about in depth. So if we can take all of that learned, really leverage those secure elements [50:45.480 --> 50:50.940] on the phone and all that same technology, you know, we start to move forward. The problem with [50:50.940 --> 50:55.960] kind of the industry as a whole, as being a hardware industry, as it has been, you're using [50:55.960 --> 51:01.240] all these low-end microcontrollers, right? You're trying to drive cross down. And I know PIX in [51:01.240 --> 51:06.160] particular, that's what we had a PIX, is vulnerable to that attack. So we wanted to see that happen. [51:06.160 --> 51:10.760] We're like, okay, we want to spread, hit UV light here, flip the right protect bit, and dump the [51:10.760 --> 51:17.780] firmware. In particular, we were messing around with my Subaru WRX. So, like, we were able to [51:17.780 --> 51:23.280] roll the odometer and make the odometer say leet. That was, like, one of the fun wins of that. And [51:23.280 --> 51:28.220] then we just found some other things with known, some other processors with known attacks. So, [51:28.220 --> 51:35.120] I mean, 100%. The more security we start putting in our phones, the more we need to beef up the [51:35.120 --> 51:38.960] defense. And if you look at how phones have advanced, we're already at the point where, [51:38.960 --> 51:43.900] like, they are really wildly impressive from a hardware architectural point of view. [51:43.900 --> 51:49.560] And the more we throw in there, the better job we have to do. And I'll leave you with, like, [51:49.560 --> 51:55.560] my adage on why I think that's a good thing. As a defender, and I worked for the DoD for a bit. So, [51:55.560 --> 52:00.560] if you watch the movie 300, as a defender, you want to create a choke point, right? Like, [52:00.560 --> 52:04.120] that's how you beat the Persians. You know exactly where they're coming, and you can focus all of [52:04.120 --> 52:08.620] your attack power there and all your defensive power. So we really do put it all in the phone, [52:08.620 --> 52:14.780] all in the secure element, and this one chip that has a single line for IO. Like, you now, [52:14.780 --> 52:22.240] your parsers are very rudimentary, can actually be audited quite well. And if you get to the point [52:22.240 --> 52:28.500] where all you're looking at is this one input, like, one input channel in and out, you actually [52:28.500 --> 52:32.320] have a chance to defend that. Whereas now, you know, with passwords and credentials and smart [52:32.320 --> 52:38.780] cards, you know, you have all these cards out in the wild, you have no clue what's happening where, [52:38.780 --> 52:42.700] all these different technologies. So, if you really do put all your eggs in one basket and [52:42.700 --> 52:47.560] guard that basket, it's not as crazy as it initially sounds, or I've at least convinced [52:47.560 --> 52:52.620] myself of that after a 15-year academic career that, you know, I've convinced myself I'm not [52:52.620 --> 53:00.240] crazy. I don't know if I've convinced others yet. I have two minutes for either a final question or [53:00.240 --> 53:14.340] an awkward silence. All right. Thank you all so much. Hopefully, this was educational and useful. [53:14.340 --> 53:17.260] Swing by the Physical Security Village if you want to play with any of this stuff [53:17.260 --> 53:20.320] hands-on and see what it's actually like to clone a card.