1 00:00:00,000 --> 00:00:03,000 Mark and James are here to amaze you. 2 00:00:03,380 --> 00:00:08,660 With their safe cracking skills with cash drugs and guns. 3 00:00:13,980 --> 00:00:16,080 Oh, welcome everybody to our talk. 4 00:00:16,080 --> 00:00:17,360 Cash drugs and guns. 5 00:00:17,360 --> 00:00:19,320 Why your safes aren't safe. 6 00:00:19,900 --> 00:00:21,640 So we'll start off here with a little introduction. 7 00:00:21,640 --> 00:00:22,840 So my name is Mark. 8 00:00:22,840 --> 00:00:24,940 I lead an awesome engineering team. 9 00:00:24,940 --> 00:00:26,720 We build embedded products. 10 00:00:26,720 --> 00:00:28,200 We secure embedded products. 11 00:00:28,200 --> 00:00:31,900 We usually work on stuff where our hack- our attackers have physical access. 12 00:00:32,080 --> 00:00:39,080 So I have a background in highly regulated design, industrial, aerospace, military, IOT, that kind of stuff. 13 00:00:40,060 --> 00:00:41,000 And I'm James. 14 00:00:41,000 --> 00:00:45,220 I work with Mark, although this work is not part of our professional work. 15 00:00:45,220 --> 00:00:46,940 I do a lot of the same stuff. 16 00:00:47,160 --> 00:00:56,180 Product design, sometimes cyber security design, sometimes cyber security analysis and reverse engineering, which is what I find really fun and a lot of what I contributed to this. 17 00:00:57,140 --> 00:01:01,520 Like James said, the views and opinions here are not of any organization we talk about. 18 00:01:01,520 --> 00:01:02,840 They're not of our employer. 19 00:01:02,840 --> 00:01:04,860 This work was conducted independently by us. 20 00:01:04,860 --> 00:01:07,980 This has been our nights and weekends for the last two years. 21 00:01:08,480 --> 00:01:11,600 So, who remembers this incident with Liberty Safe? 22 00:01:11,600 --> 00:01:19,080 Where the Liberty Safe handed over a code to the FBI responsive to a search warrant for a user's home. 23 00:01:19,240 --> 00:01:23,520 And so the main question to us is, you know, how is that even work? 24 00:01:23,520 --> 00:01:25,040 How is that even possible? 25 00:01:27,700 --> 00:01:35,540 That is a new third party that lets them open a security product that's not connected, that's installed inside their home. 26 00:01:35,940 --> 00:01:37,500 So we did some research. 27 00:01:37,500 --> 00:01:41,220 Turns out Liberty Safe uses a brand of lock called SecureRAM. 28 00:01:41,220 --> 00:01:46,340 So SecureRAM locks are UL certified high security electronic locks. 29 00:01:46,360 --> 00:01:49,760 And of course the first stop in any reverse engineering, we go to eBay. 30 00:01:49,760 --> 00:01:50,920 We buy one. 31 00:01:50,920 --> 00:01:53,020 So we bought a Liberty Safe top lid. 32 00:01:53,020 --> 00:01:55,860 Turns out these are actually OEMed by SecureRAM. 33 00:01:56,220 --> 00:02:01,100 And so we want to take a little side note, talk about the terminology we use. 34 00:02:01,100 --> 00:02:03,760 So we call the outside part of the safe the keypad. 35 00:02:03,760 --> 00:02:05,140 This is where you type in the codes. 36 00:02:05,140 --> 00:02:06,320 It's got a little screen. 37 00:02:06,320 --> 00:02:07,880 Shows you some nice information. 38 00:02:07,880 --> 00:02:10,380 That's connected via cable to the latch. 39 00:02:10,380 --> 00:02:12,160 The latch is the inside part of the safe. 40 00:02:12,160 --> 00:02:17,720 That's the part that keeps you from turning the handle to open the safe when you haven't entered the right code. 41 00:02:19,400 --> 00:02:27,500 So we've got a SecureRAM top lid latch and keypad and we set about reverse engineering it so we could figure out how this stuff worked. 42 00:02:27,740 --> 00:02:35,180 And the safe logic series which includes the top lid, all the smarts are in the latch inside the safe. 43 00:02:35,180 --> 00:02:40,160 The keypad does have a microcontroller but the only function it has is turning an LED on and off. 44 00:02:40,160 --> 00:02:43,460 So we're really just interested in what's inside the latch. 45 00:02:43,460 --> 00:02:46,000 And the hardware is pretty simple. 46 00:02:46,000 --> 00:02:52,300 It's just a microcontroller and a little motor driver that opens and closes the latch or allows it to open and close. 47 00:02:52,420 --> 00:02:57,280 So what we really need to reverse engineer is the firmware on that microcontroller. 48 00:02:57,340 --> 00:02:59,080 And it's kind of a weird old processor. 49 00:02:59,080 --> 00:03:02,100 This renaissance 78K0SKX1 series. 50 00:03:02,480 --> 00:03:06,100 So it doesn't actually have a mechanism to read out the firmware. 51 00:03:06,240 --> 00:03:07,460 They didn't disable it. 52 00:03:07,460 --> 00:03:10,360 It's just not part of that microcontroller's boot ROM. 53 00:03:10,360 --> 00:03:16,060 But we figured out a way to get it to spill its guts and read out all the data in the flash. 54 00:03:16,060 --> 00:03:19,040 We gave a talk on that at Hard Wario last year if you want to know more about that. 55 00:03:19,040 --> 00:03:21,660 But it's a new exploit we came up with against that part. 56 00:03:21,980 --> 00:03:25,460 So with the firmware out, we reverse engineered it. 57 00:03:25,460 --> 00:03:27,420 This was a mostly manual process. 58 00:03:27,420 --> 00:03:29,380 It's a bit of a weirder , older architecture. 59 00:03:29,440 --> 00:03:34,740 There was no support in Ghidra, no support in IDA, no support in any reverse engineering tools that I could find. 60 00:03:34,740 --> 00:03:37,480 So we wrote our own disassembler, which was pretty fun. 61 00:03:37,700 --> 00:03:44,520 And from the disassembly, we manually translated that back into a sort of pseudo C. 62 00:03:44,520 --> 00:03:48,540 We worked through all the byte code in the device so that we weren't missing anything. 63 00:03:49,000 --> 00:03:52,700 And we figured out at a high level, how does everything work? 64 00:03:53,180 --> 00:03:57,900 So this lets us answer the question, are there any super secret backdoor codes? 65 00:03:57,900 --> 00:04:00,560 Is that how LibertySafe is able to do this thing? 66 00:04:01,360 --> 00:04:02,220 No. 67 00:04:02,340 --> 00:04:03,320 There's not. 68 00:04:03,420 --> 00:04:05,680 In the safe logic, there's two codes. 69 00:04:05,680 --> 00:04:07,560 Manager code and the user code. 70 00:04:07,560 --> 00:04:09,240 Both of these unlock the safe. 71 00:04:09,240 --> 00:04:13,380 The manager code is a little special because it can disable or change the user code. 72 00:04:13,380 --> 00:04:16,600 But those are the only ways programmed in that let you open the lock. 73 00:04:16,600 --> 00:04:20,360 There's no secret backdoor in the code. 74 00:04:20,700 --> 00:04:25,960 But as an end user, you might not necessarily know about the manager code. 75 00:04:26,040 --> 00:04:32,220 So LibertySafe, as an example, when we bought our locks from LibertySafe, we got two sets of documentation. 76 00:04:32,220 --> 00:04:36,260 One intended for the person installing the lock and one intended for the end user. 77 00:04:36,260 --> 00:04:39,540 The end user manual does not say anything about the manager code. 78 00:04:39,540 --> 00:04:40,820 It only describes one code. 79 00:04:40,820 --> 00:04:42,180 And that's the user code. 80 00:04:42,180 --> 00:04:52,100 So in LibertySafe's practice, which is not necessarily unique to LibertySafe, they set the manager code and they keep a record of that with the serial number of the safe. 81 00:04:52,600 --> 00:04:58,840 The well intentioned version of this is that they can use that to help you out if you get locked out of your safe. 82 00:04:59,220 --> 00:05:01,360 Perhaps they hand it out responsive to a warrant. 83 00:05:01,360 --> 00:05:03,440 They did change their policy around this . 84 00:05:03,720 --> 00:05:06,900 So responsive to the kind of controversy that emerged. 85 00:05:06,900 --> 00:05:09,580 I think they're more strict about when they'll give that out . 86 00:05:09,580 --> 00:05:11,200 You can request that they delete it. 87 00:05:11,200 --> 00:05:12,560 And you can also reset it yourself. 88 00:05:12,560 --> 00:05:17,820 There's just a little pinhole in the lock that lets you clear both those codes back to default. 89 00:05:18,500 --> 00:05:20,440 But this isn't a problem with the lock. 90 00:05:20,440 --> 00:05:22,520 The lock is doing exactly what it says it does. 91 00:05:22,520 --> 00:05:25,860 Both those codes are in the operating manuals from SecureRAM. 92 00:05:25,860 --> 00:05:27,660 They're easily found online. 93 00:05:27,660 --> 00:05:30,180 There's no secret backdoor here. 94 00:05:30,180 --> 00:05:34,680 This is really just a management practice employed by LibertySafe, for example. 95 00:05:34,680 --> 00:05:47,400 But it's also a management practice recommended by SecureRAM in certain documents that you get with the locks, like the printed manual that comes with some of their locks intended for an audience of like safe integrators or OEMs. 96 00:05:48,120 --> 00:05:51,420 So this management practice is just that. 97 00:05:51,420 --> 00:05:58,020 It's not indicative of any technical backdoor or failure in the lock itself. 98 00:05:58,020 --> 00:06:03,160 And really after looking through everything, what we realized is that these locks are fine. 99 00:06:03,160 --> 00:06:07,020 We didn't find any clear exploitable security vulnerabilities in the lock at all. 100 00:06:07,020 --> 00:06:15,180 The only thing we found, which is not a best practice, they use a non-constant time compare on the unlock code when they're comparing that to what you entered. 101 00:06:15,180 --> 00:06:19,720 But we weren't able to exploit this to actually get an advantage in opening the lock. 102 00:06:19,720 --> 00:06:23,400 And even if we could, there's like a five-minute timeout every three wrong codes. 103 00:06:23,400 --> 00:06:26,420 It would be very difficult to exploit this in the field anyways. 104 00:06:26,800 --> 00:06:29,840 So we think it's pretty secure. 105 00:06:30,120 --> 00:06:34,920 In safe logic mode, in analog mode, where is he? 106 00:06:34,920 --> 00:06:36,740 All right. 107 00:06:36,740 --> 00:06:41,020 So talking about analog mode, turns out there's also a digital mode. 108 00:06:41,020 --> 00:06:47,360 In analog mode, the way the lock works, when you hit a keypad button, it transmits that as an analog voltage down to the lock. 109 00:06:47,360 --> 00:06:49,500 But of course, there's actually a digital code. 110 00:06:49,500 --> 00:06:56,400 For the eagle-eyed among you, I know you're all out there, the struct that James showed had an enum that said lock type. 111 00:06:56,400 --> 00:06:58,380 It said analog lock type. 112 00:06:58,380 --> 00:07:03,060 Turns out there's a digital lock type with a whole bunch more interesting code in the latch. 113 00:07:03,380 --> 00:07:06,620 So it turns out Securum actually has a whole digital line of locks. 114 00:07:06,620 --> 00:07:10,440 These are called the ProLogic and ScanLogic series of locks. 115 00:07:10,700 --> 00:07:13,600 So we've dug into the ProLogic series first. 116 00:07:13,600 --> 00:07:18,260 So we looked at the ProLogic L02 as kind of our main example. 117 00:07:18,260 --> 00:07:21,740 So this is the most popular lock in their digital series of locks. 118 00:07:21,740 --> 00:07:25,940 This is another UL certified high security electronic lock. 119 00:07:26,340 --> 00:07:28,320 So of course we expanded the scope. 120 00:07:28,320 --> 00:07:30,360 Now we've kind of gotten this curse. 121 00:07:30,360 --> 00:07:32,600 We have dozens and dozens of locks. 122 00:07:32,600 --> 00:07:33,940 We have debug tools. 123 00:07:33,940 --> 00:07:34,980 We have interfaces. 124 00:07:34,980 --> 00:07:36,020 We have cables. 125 00:07:36,020 --> 00:07:37,920 It's gotten way out of hand. 126 00:07:37,920 --> 00:07:40,760 I have too many boxes of stuff in my office now. 127 00:07:41,260 --> 00:07:43,400 So some interesting facts that we've got. 128 00:07:43,400 --> 00:07:50,980 When you reset the latch on this lock, we actually found it doesn't reset the codes that you use to open the safe. 129 00:07:50,980 --> 00:07:55,920 If you recall in the safe logic, when you reset the latch it does reset all the codes. 130 00:07:55,920 --> 00:07:57,700 We found this really interesting. 131 00:07:57,700 --> 00:07:59,720 It also has this recovery mode. 132 00:07:59,720 --> 00:08:06,520 This lets you call the factory, you get a magic code and this code re- does reset all the codes on the lock. 133 00:08:06,520 --> 00:08:12,160 And of course we read the manual and it talks all about the encryption and the security in these locks. 134 00:08:12,160 --> 00:08:16,060 So, first step, we've got to figure out what's inside this lock. 135 00:08:16,540 --> 00:08:21,000 So it turns out it's a renaissance RL78G13 lock. 136 00:08:21,000 --> 00:08:24,260 Luckily this was a processor in the PS4. 137 00:08:24,260 --> 00:08:27,240 So the hackers, they already took care of it for us. 138 00:08:27,240 --> 00:08:31,400 No need to exploit anything, no need to make any new research. 139 00:08:31,500 --> 00:08:36,540 Failover flow has a really nice blog post that talks about the work that they did. 140 00:08:36,540 --> 00:08:41,120 And of course the more widely used this processor is, the bigger the attack surface. 141 00:08:41,120 --> 00:08:44,660 And the PS4 is a huge attack surface for locks. 142 00:08:46,960 --> 00:08:55,480 So with that in mind, we're going to look at the code now on the pro logic keypad and we've actually got to get it out first. 143 00:08:55,480 --> 00:08:58,500 Like Mark said, failover flow is going to make that pretty easy for us. 144 00:08:59,140 --> 00:09:06,460 So on this processor, there's a combined flash and programming, flash programming and debug pin which is called the tool pin. 145 00:09:06,460 --> 00:09:08,500 It's basically a bidirectional UART . 146 00:09:08,620 --> 00:09:16,660 And the flash programming mode on that pin doesn't have any code , doesn't have any command that lets you read out the flash memory. 147 00:09:16,720 --> 00:09:22,000 It has a debug mode that has some commands like write to RAM and execute from RAM. 148 00:09:22,000 --> 00:09:33,140 So we can just upload a little piece of code that takes over the tool pin and sends out every byte of memory over the tool pin as a UART including all the firmware, all the data, all the RAM, everything. 149 00:09:33,620 --> 00:09:37,260 So flash programming mode is publicly documented by renaissance. 150 00:09:37,260 --> 00:09:38,640 It's very cleanly documented. 151 00:09:38,640 --> 00:09:40,140 It's pretty easy to use. 152 00:09:40,240 --> 00:09:47,380 Debugging mode is, you know, they tell you all about what it is and what it does but the actual line protocol is not documented by renaissance. 153 00:09:47,740 --> 00:09:50,720 Fortunately it is documented by failover flow. 154 00:09:50,820 --> 00:09:57,400 So we were able to leverage their work to a huge extent and they actually even had a reference implementation of this protocol. 155 00:09:57,540 --> 00:10:03,920 But there's still a little bit of work we have to do because there's a couple security measures that we have to bypass. 156 00:10:04,080 --> 00:10:05,520 Basically two things. 157 00:10:05,520 --> 00:10:14,080 You can disable debugging on the processor and you can set a password that you have to supply the correct value of in order to access debugging. 158 00:10:14,080 --> 00:10:22,500 So failover flow documented that you can glitch patch past these and had some good info about how but not an actual reference implementation. 159 00:10:22,760 --> 00:10:27,200 So we've got to set that up ourselves and figure out the glitch parameters in order to bypass that. 160 00:10:28,080 --> 00:10:32,180 The first step of the first step is, of course, actually getting connected to the pins. 161 00:10:32,300 --> 00:10:35,400 That's pretty easy on this lock because it's also the programming port. 162 00:10:35,400 --> 00:10:38,520 So secure M has brought it out as this nice labeled header here. 163 00:10:38,940 --> 00:10:41,380 You can also see it through the battery door. 164 00:10:41,460 --> 00:10:43,320 We're going to take advantage of that later. 165 00:10:44,420 --> 00:10:49,080 So aside from those four pins, the only thing we've got to do is set up for some voltage glitching. 166 00:10:49,080 --> 00:10:59,980 So we take off the core voltage regulator capacitor and we replace it with a little MOSFET that we're going to control so that we can get the processor into a weird state and make it not do some of these security checks correctly. 167 00:11:00,160 --> 00:11:01,280 So we're set up. 168 00:11:01,280 --> 00:11:03,600 We're ready to start figuring out our glitch parameters. 169 00:11:03,740 --> 00:11:05,380 It's all running on a Raspberry Pi Pico. 170 00:11:05,380 --> 00:11:06,900 We reimplemented this stuff. 171 00:11:07,340 --> 00:11:10,920 And, you know, I think I'm pretty good at this stuff. 172 00:11:10,940 --> 00:11:14,440 But I don't expect a new to me glitch on a processor . 173 00:11:14,440 --> 00:11:16,620 I don't really know much about the internals of. 174 00:11:16,620 --> 00:11:18,900 I don't have any idea what the glitch parameters are supposed to be. 175 00:11:18,900 --> 00:11:21,120 I don't expect it to work on the first try. 176 00:11:21,420 --> 00:11:22,460 But it did. 177 00:11:22,880 --> 00:11:27,460 And it turns out the reason that it did is because they didn't disable debugging. 178 00:11:27,600 --> 00:11:29,480 So we didn't have to glitch past that. 179 00:11:29,480 --> 00:11:30,000 That's easy. 180 00:11:30,000 --> 00:11:30,820 That's nice. 181 00:11:30,820 --> 00:11:32,100 Makes my life easier. 182 00:11:32,400 --> 00:11:37,340 But we still need to figure out the unlock code or renaissance calls it debugging ID. 183 00:11:37,820 --> 00:11:40,460 That's a ten byte code we have to figure out. 184 00:11:40,460 --> 00:11:44,400 And fail overflow also documented how you can glitch past this and kind of dump it anyways. 185 00:11:44,400 --> 00:11:45,820 And once you dump it, then you know it. 186 00:11:45,820 --> 00:11:47,480 So that makes it easy. 187 00:11:47,720 --> 00:11:51,740 But, you know, I mean, I like to try some of the easy things first. 188 00:11:51,740 --> 00:11:56,260 Let's try a few basic pass codes like all zeroes. 189 00:11:58,100 --> 00:11:59,820 It's all zeroes. 190 00:11:59,860 --> 00:12:03,100 So we actually didn't have to glitch past anything. 191 00:12:03,100 --> 00:12:06,140 We didn't violate any of the security guarantees of this microcontroller. 192 00:12:06,140 --> 00:12:07,660 We didn't exploit anything. 193 00:12:07,740 --> 00:12:10,740 We just read the code out through the debug port. 194 00:12:11,520 --> 00:12:12,660 So we've got it. 195 00:12:12,760 --> 00:12:16,580 We're going to bring it into Ghidra and we're going to start looking at it. 196 00:12:16,580 --> 00:12:21,400 Thank you to XYZZ on GitHub for their Ghidra RL78 plugin. 197 00:12:21,600 --> 00:12:22,620 I'm pretty good at Ghidra. 198 00:12:22,620 --> 00:12:25,600 Still haven't quite figured out how to implement a new architecture. 199 00:12:25,880 --> 00:12:27,480 So this was a huge help. 200 00:12:27,480 --> 00:12:28,520 It does struggle a bit. 201 00:12:28,520 --> 00:12:32,200 It's got a weird 16, 20 bit address space on this part. 202 00:12:32,380 --> 00:12:35,240 It's 20 bits but sometimes you only know 16. 203 00:12:35,440 --> 00:12:37,340 Makes it very nice to reverse engineer. 204 00:12:37,560 --> 00:12:39,580 Anyways, we fixed it up. 205 00:12:39,580 --> 00:12:40,600 We worked through it. 206 00:12:40,600 --> 00:12:47,700 We didn't look at every single byte of code but we looked at everything that, you know, we found everything that's in the manual. 207 00:12:47,740 --> 00:12:49,720 We found how that stuff gets accessed. 208 00:12:49,720 --> 00:12:52,940 We checked to see if there was anything else you could access that wasn't in the manual. 209 00:12:53,280 --> 00:12:55,500 That's the level of checking we did with this. 210 00:12:55,620 --> 00:13:00,240 And we at least got to the level of understanding how everything critical works. 211 00:13:00,240 --> 00:13:01,800 How does it check unlock codes? 212 00:13:01,800 --> 00:13:03,280 How does the recovery process work? 213 00:13:03,280 --> 00:13:05,720 How does it talk to the latch inside of the safe? 214 00:13:06,020 --> 00:13:11,940 And when we fully understood that, we realized there were some interesting design decisions in this lock. 215 00:13:11,940 --> 00:13:16,000 So one kind of paradigm we have to establish is where do the codes go? 216 00:13:16,000 --> 00:13:19,740 Do they go inside the safe or outside the safe? 217 00:13:19,740 --> 00:13:25,360 Because outside the safe is also where the people who you don't want to be inside of the safe also are. 218 00:13:25,420 --> 00:13:30,120 And inside the safe is protected by steel and concrete and whatever else goes into a safe . 219 00:13:30,120 --> 00:13:30,400 I don't know. 220 00:13:30,400 --> 00:13:31,620 I'm not a safe engineer. 221 00:13:31,760 --> 00:13:37,900 But it should be at least as secure, you know, as the valuables you're trying to protect or the guns or whatever. 222 00:13:38,840 --> 00:13:41,480 So what do you ‑‑ oh, go. 223 00:13:41,480 --> 00:13:42,640 What do you think they did? 224 00:13:42,640 --> 00:13:51,880 In the case of this product that we analyzed from SecureM, what they actually did is they put the codes in the keypad outside of the safe. 225 00:13:51,880 --> 00:14:01,420 So if we read out the data flash the same way that we did reading out the firmware and everything, data flash is, as the name implies, it's flash used for storing data. 226 00:14:01,600 --> 00:14:02,080 Yeah. 227 00:14:02,080 --> 00:14:04,940 The super code is just right there. 228 00:14:04,940 --> 00:14:07,040 It does look a little funny, though. 229 00:14:08,640 --> 00:14:13,020 So for those of you remember, this OEM, we talked all about the encryption. 230 00:14:13,580 --> 00:14:17,040 So it turns out that this super code is stored encrypted. 231 00:14:17,200 --> 00:14:22,140 You might notice it's really long for just storing a six or eight digit code. 232 00:14:22,220 --> 00:14:25,500 And the super code on this processor, this is kind of like the root password. 233 00:14:25,500 --> 00:14:27,400 Let's you bypass things like time delay. 234 00:14:27,400 --> 00:14:30,420 Let's you manage and change the codes of all the users. 235 00:14:30,520 --> 00:14:33,460 It lets you manage all the settings on the lock. 236 00:14:33,460 --> 00:14:38,720 It's encrypted with a protocol called XXTEA with a 128 bit long key. 237 00:14:38,720 --> 00:14:46,280 This protocol, this key length is considered secure against things like brute forcing, GPUs, that kind of stuff. 238 00:14:46,280 --> 00:14:50,140 There's no reasonable sized GPU cluster you could use to brute force this. 239 00:14:50,140 --> 00:14:53,360 So how do we actually decode this? 240 00:14:53,360 --> 00:14:55,920 If we can't brute force it, we can't do that. 241 00:14:55,920 --> 00:14:59,000 Luckily, Secura made a great decision for us. 242 00:14:59,000 --> 00:15:00,820 They put it right in the flash. 243 00:15:00,820 --> 00:15:02,940 Right next to the super code. 244 00:15:03,060 --> 00:15:12,620 Luckily all we got to do, read it out, decrypt the super code, add the 96 bits of static key, key bits that don't change, and then we can just decrypt the codes. 245 00:15:13,980 --> 00:15:17,020 So there's another lock that's part of their digital line up. 246 00:15:17,020 --> 00:15:19,060 So we looked at the scan logic basic. 247 00:15:19,240 --> 00:15:22,560 Unfortunately, this one is not as advanced as the LO2. 248 00:15:22,560 --> 00:15:24,540 It doesn't feature any encryption. 249 00:15:24,620 --> 00:15:26,900 It just stored it right in the flash. 250 00:15:26,900 --> 00:15:28,480 You can just read it right out. 251 00:15:28,480 --> 00:15:29,620 Plain text. 252 00:15:31,540 --> 00:15:34,760 So now let's talk about how do we actually attack this processor? 253 00:15:34,900 --> 00:15:36,320 So we made this great tool. 254 00:15:36,460 --> 00:15:38,600 It started out, I designed this beautiful board. 255 00:15:38,600 --> 00:15:39,740 It was the right shape. 256 00:15:39,740 --> 00:15:42,860 And as we started working on it, we needed to bend it a little bit. 257 00:15:42,860 --> 00:15:44,820 We needed to run some wires because we broke it. 258 00:15:44,820 --> 00:15:46,140 We got to glue it in place. 259 00:15:46,220 --> 00:15:48,940 So now it's acquired a little bit more of a hackery look. 260 00:15:49,160 --> 00:15:52,780 So all we got to do, we take it, it reaches way up in there. 261 00:15:53,140 --> 00:15:54,980 Right up to that debug port. 262 00:15:55,500 --> 00:15:56,760 Connects right in. 263 00:15:57,580 --> 00:15:59,840 And we go through this long complicated process. 264 00:15:59,840 --> 00:16:01,340 This complicated exploit. 265 00:16:01,540 --> 00:16:03,440 First thing, we enter debug mode. 266 00:16:03,440 --> 00:16:04,360 Not disabled. 267 00:16:04,360 --> 00:16:05,380 Enter debug key. 268 00:16:05,380 --> 00:16:06,340 All zeros. 269 00:16:06,900 --> 00:16:08,520 Then we inject a blob of code. 270 00:16:08,520 --> 00:16:10,320 We patch that debug RAM. 271 00:16:10,380 --> 00:16:13,580 And then we dump all the codes in .8 seconds. 272 00:16:13,900 --> 00:16:16,020 We actually were to optimize it a little better. 273 00:16:16,020 --> 00:16:17,920 It's slightly better than this now. 274 00:16:18,640 --> 00:16:21,580 So this is an exploit we call code snatch. 275 00:16:21,740 --> 00:16:25,640 And so now James is going to give us a short demo on the safe here. 276 00:16:33,140 --> 00:16:33,740 All right. 277 00:16:33,740 --> 00:16:37,640 So first we got to take out the battery door and then go and put this tool in. 278 00:16:37,640 --> 00:16:39,100 It's a little bit awkward to get in there. 279 00:16:39,100 --> 00:16:40,540 We're not mechanical engineers. 280 00:16:40,540 --> 00:16:42,380 We're electrical and firmware engineers. 281 00:16:42,580 --> 00:16:46,400 But after we get it in, he's going to turn it on and it's going to read out the code. 282 00:16:46,400 --> 00:16:49,900 So you can see the code here is 001337. 283 00:16:50,520 --> 00:16:52,380 So now we got to put the battery back in. 284 00:16:52,380 --> 00:16:57,200 Wait for our safe lock to boot up which takes a surprisingly long amount of time. 285 00:16:58,040 --> 00:16:58,660 Keep going. 286 00:16:58,660 --> 00:16:59,720 Keep waiting here. 287 00:17:01,140 --> 00:17:01,860 There we go. 288 00:17:01,860 --> 00:17:02,920 Now we're all booted. 289 00:17:02,920 --> 00:17:04,400 Now we can try out that code. 290 00:17:04,400 --> 00:17:06,660 See if it was the right code for us. 291 00:17:07,800 --> 00:17:09,500 And boom, there we go. 292 00:17:09,500 --> 00:17:13,380 Of course with the GSA container, we always got to indicate what state it's in. 293 00:17:13,380 --> 00:17:17,200 So we got to leave it in the open state at all times for the safe. 294 00:17:30,250 --> 00:17:30,910 All right. 295 00:17:30,910 --> 00:17:32,250 So who actually uses these things? 296 00:17:32,250 --> 00:17:33,450 I mean, anybody serious? 297 00:17:33,450 --> 00:17:34,110 Right? 298 00:17:34,110 --> 00:17:38,430 So it turns out they're used by these OEMs for consumer safes. 299 00:17:38,510 --> 00:17:47,810 Uh, Securram in a 20, 2021 interview claims that they have 70 percent of the smart lock system market in the U.S. 300 00:17:47,810 --> 00:17:51,830 and that they sold to approximately 3 million customers in North America. 301 00:17:51,930 --> 00:17:55,710 We're not sure what the split is between the vulnerable and non-vulnerable locks. 302 00:17:55,710 --> 00:17:58,830 But as far as we can tell, they have high penetration in the market. 303 00:17:58,870 --> 00:18:07,010 So they're used by companies like Liberty Safe, Fort Knox, Rhino Metals, Fire King, Pro Steel, Tracker Safe, High Noble, Sun Noble, those kinds of companies. 304 00:18:07,110 --> 00:18:09,770 We didn't actually buy locks from all these companies. 305 00:18:09,770 --> 00:18:16,390 What we did is our exploits work on locks manufactured between May 2014 and March 2025. 306 00:18:16,630 --> 00:18:24,050 So we look to see if these vendors sold at least one of the vulnerable models during the overlapping with those manufacturing dates. 307 00:18:24,170 --> 00:18:30,890 So these companies sell safes that are designed to protect things like firearms and personal documents, things like that. 308 00:18:31,150 --> 00:18:33,430 So besides firearms, you know, what are they used for? 309 00:18:33,430 --> 00:18:35,430 Anything, anything actually serious? 310 00:18:35,650 --> 00:18:39,490 So we took a look, turns out these are big and pharmaceutical safes. 311 00:18:39,490 --> 00:18:46,630 Safes used to store and protect narcotics for manufacturers, distributors, pharmacies, hospitals. 312 00:18:46,630 --> 00:18:54,230 The L0 tier appears to be the safe lock of choice for pharmaceutical locks, especially in the low end market. 313 00:18:54,230 --> 00:19:02,890 It's the cheapest safe lock that actually supports the required features like time delay and multiple access users. 314 00:19:02,890 --> 00:19:08,950 So it's the default choice as far as we can tell on Senox pharmaceutical safes and Narc safe pharmaceutical safes. 315 00:19:08,950 --> 00:19:11,670 Narc safe luckily they list a couple of their users. 316 00:19:11,670 --> 00:19:18,290 They're used by some of the largest pharmacies in Canada, like Pharma Choice which has over 800 locations. 317 00:19:18,290 --> 00:19:22,710 And other people like the government of Canada is listed as a user for them. 318 00:19:23,310 --> 00:19:25,830 So we wanted to go see are these actually out in the world. 319 00:19:25,830 --> 00:19:40,370 So on the right hand here you can see a screenshot from a news story a couple of years ago where CVS updated their whole fleet of locks to add time delay as part of the opioid epidemic. 320 00:19:40,930 --> 00:19:44,910 And on the left here it's actually one of my favorite pictures of CVS locks in the wild. 321 00:19:44,910 --> 00:19:47,530 You can see there's a pro logic right on the front here. 322 00:19:47,530 --> 00:19:52,650 Turns out in the background, two more bonus pro logics in this image as well. 323 00:19:53,250 --> 00:19:59,310 So as far as we can tell all the coverage we showed for CVS, they all use these L02 locks at that time. 324 00:20:00,130 --> 00:20:01,990 So they're also using cash drop safes. 325 00:20:01,990 --> 00:20:04,470 So we found this, there's this brand, CSS. 326 00:20:04,470 --> 00:20:08,190 They are a managed safe provider, later acquired by Senox. 327 00:20:08,190 --> 00:20:10,590 So here's a picture of a cash drop safe in Subway. 328 00:20:10,590 --> 00:20:12,270 Here's one in Papa Murphy's. 329 00:20:12,270 --> 00:20:13,770 Here's one at Taco Del Mar. 330 00:20:13,770 --> 00:20:15,010 Here's one at T-Mobile. 331 00:20:15,010 --> 00:20:19,270 It was quite easy to find a number of pictures of these being installed in places. 332 00:20:19,810 --> 00:20:22,090 So what can we actually do about this? 333 00:20:22,190 --> 00:20:34,570 So as far as we can tell there are no mitigations for code snatch that don't involve updating the firmware on both the latch and the keypad to move those codes from the outside to the inside of the safe. 334 00:20:34,570 --> 00:20:40,890 When we went back and forth to Securium they sent us a safe with a lock and a latch installed with updated firmware. 335 00:20:40,890 --> 00:20:44,190 It looks like it moved the codes from the inside to the outside. 336 00:20:44,190 --> 00:20:46,290 We never actually got a code for that safe. 337 00:20:46,290 --> 00:20:48,330 We never opened it to see if it was functional. 338 00:20:48,330 --> 00:20:51,570 We weren't really able to tell if the whole system worked. 339 00:20:51,590 --> 00:20:56,450 But a month ago we bought a lock from distribution to see if anything had been updated. 340 00:20:56,510 --> 00:21:00,450 And we, that lock was made in March of this year. 341 00:21:00,550 --> 00:21:06,690 And that lock did not mitigate the error where the codes are in the keypad. 342 00:21:06,690 --> 00:21:10,330 They set the debug code on this to something that's not all zeros. 343 00:21:10,550 --> 00:21:12,350 This doesn't really mitigate it. 344 00:21:12,350 --> 00:21:14,930 We just added the new value to our tool. 345 00:21:17,250 --> 00:21:20,630 So we can't actually do a field firmware update on these parts. 346 00:21:20,630 --> 00:21:25,910 The tool we made here, it connects to the debug port, it speaks to debug protocol. 347 00:21:25,910 --> 00:21:33,930 You can absolutely use this or a low cost tool like it to update both the latch and the keypad for these devices. 348 00:21:33,930 --> 00:21:37,930 We didn't actually implement this functionality because we didn't go rewrite the firmware for them. 349 00:21:37,930 --> 00:21:40,570 But it's something that you absolutely could do. 350 00:21:42,790 --> 00:21:47,090 So that requires specialized hardware that we made. 351 00:21:47,090 --> 00:21:48,570 That cool little tool. 352 00:21:48,710 --> 00:21:53,190 And it only works on a subset of their locks as we'll explain in a minute. 353 00:21:53,190 --> 00:21:56,050 So is there an easier and more effective way in? 354 00:21:56,050 --> 00:21:57,890 Is there something different we can do? 355 00:21:58,070 --> 00:22:00,690 Remember the lock recovery feature. 356 00:22:00,830 --> 00:22:13,010 So to quote the manual, system recovery is used to delete all the codes on the pro logic or scan logic and set the entry pad, keypad, and it's linked lock, latched back to a factory default state. 357 00:22:13,310 --> 00:22:21,690 And this kind of works by, you have to be a locksmith to do this with them, but you call them, they do something on their end and that lets you reset the safe. 358 00:22:21,690 --> 00:22:24,150 So what does that process actually look like? 359 00:22:24,330 --> 00:22:28,150 You get into the menu and you can get into some of the menus even if you don't know the codes. 360 00:22:28,150 --> 00:22:29,110 This is one of them. 361 00:22:29,110 --> 00:22:30,830 You try to recover the system. 362 00:22:30,830 --> 00:22:32,190 You put in your code. 363 00:22:32,190 --> 00:22:34,230 That's 999999 by default. 364 00:22:34,230 --> 00:22:36,550 It's a special code used for accessing this mode. 365 00:22:36,930 --> 00:22:41,810 It shows a recovery challenge on the screen which is what you're seeing there. 366 00:22:41,990 --> 00:22:44,430 You call secure M as a locksmith . 367 00:22:44,430 --> 00:22:45,790 Tell them what it says. 368 00:22:45,790 --> 00:22:51,530 They give you another code to type in and all the codes on the lock are reset including the super code . 369 00:22:51,710 --> 00:22:52,510 So now you know that. 370 00:22:52,510 --> 00:22:53,350 Now you own the lock. 371 00:22:53,350 --> 00:22:54,330 You can change any settings. 372 00:22:54,330 --> 00:22:55,630 You can do whatever you want. 373 00:22:55,750 --> 00:22:58,210 So how does it actually work from a technical perspective? 374 00:22:58,650 --> 00:23:03,970 We feed a few pieces of data into an algorithm and we get the response code. 375 00:23:04,370 --> 00:23:08,470 So the data that goes in includes the recovery challenge which is a random number. 376 00:23:08,470 --> 00:23:10,330 It's part of what was shown on the screen. 377 00:23:10,570 --> 00:23:14,230 The recovery code which you had to know to access this mode. 378 00:23:14,410 --> 00:23:18,330 The encryption code which is a different special code on the lock. 379 00:23:18,330 --> 00:23:22,150 Secure M doesn't mention it as much in the context of the recovery procedure. 380 00:23:22,150 --> 00:23:24,450 It is part of the computation. 381 00:23:24,550 --> 00:23:26,270 You can also change that. 382 00:23:26,590 --> 00:23:32,850 And the other things that go in are either constants or not secret like information about the configuration of the lock. 383 00:23:32,870 --> 00:23:36,470 That all goes into something to make the response code that you have to type in. 384 00:23:36,470 --> 00:23:39,790 And that something is also XXTEA. 385 00:23:39,870 --> 00:23:43,170 And what's important about that is that is a symmetric cipher. 386 00:23:43,250 --> 00:23:48,530 So there is no secret piece of data in this operation that isn't in the lock. 387 00:23:48,530 --> 00:23:51,230 There's no secret that only secure M has. 388 00:23:51,370 --> 00:23:59,150 And there's also no hardware security module on this lock that they could use to hide part of that computation or hide part of the secrets. 389 00:23:59,310 --> 00:24:01,090 So it's all in the firmware. 390 00:24:01,390 --> 00:24:08,690 And when we reverse engineer that, we learn exactly how to do this computation and produce the correct response code. 391 00:24:08,690 --> 00:24:12,790 So Mark is going to show you that now we're the OEM. 392 00:24:12,790 --> 00:24:14,310 We can do this. 393 00:24:14,830 --> 00:24:18,830 And where is that? 394 00:24:18,990 --> 00:24:20,450 There we are. 395 00:24:20,870 --> 00:24:22,130 Whole thing, please. 396 00:24:23,770 --> 00:24:31,510 So he's going to start by putting the lock into recovery mode, typing in that default code of all nines. 397 00:24:32,990 --> 00:24:35,750 And that's going to show him the challenge code on the screen there. 398 00:24:35,750 --> 00:24:38,170 He's going to type that into this little web app we made. 399 00:24:38,170 --> 00:24:40,510 It's just a single page thing running some JavaScript. 400 00:24:41,390 --> 00:24:45,450 And it's going to run the computation that we pulled out of the firmware. 401 00:24:46,190 --> 00:24:49,270 And it's going to produce that response code. 402 00:24:49,370 --> 00:24:51,150 He's going to type it in. 403 00:24:58,580 --> 00:25:00,320 User code verified. 404 00:25:00,820 --> 00:25:03,820 And now it's saying it's going to reset everything to the default if you'd like. 405 00:25:03,820 --> 00:25:04,920 We would like. 406 00:25:04,920 --> 00:25:07,380 So now everything is back to normal. 407 00:25:07,680 --> 00:25:10,500 Super code 111111. 408 00:25:10,500 --> 00:25:11,820 You can do whatever you want. 409 00:25:11,820 --> 00:25:15,980 And Mark is going to show you that by typing in 111111. 410 00:25:16,680 --> 00:25:18,080 One more one, please. 411 00:25:19,720 --> 00:25:21,280 And we're in again. 412 00:25:24,060 --> 00:25:28,580 So, yeah, we've got to make sure we keep track of whether it's open or not. 413 00:25:29,460 --> 00:25:31,760 Where are my slides? 414 00:25:32,880 --> 00:25:33,740 There we go. 415 00:25:35,020 --> 00:25:38,460 So what about the recovery and encryption code, right? 416 00:25:38,460 --> 00:25:40,640 So we did that with those at the default. 417 00:25:40,820 --> 00:25:42,860 So is this really a thing ? 418 00:25:42,860 --> 00:25:44,860 Do people just leave those at default? 419 00:25:45,080 --> 00:25:51,880 Well, we've got two data points from secure RAM on whether or not you should change these codes. 420 00:25:52,440 --> 00:25:56,360 And how to change them is perfectly easy to find. 421 00:25:56,360 --> 00:25:58,060 These are in all the manuals. 422 00:25:58,060 --> 00:25:59,500 You can look up how to change it. 423 00:25:59,500 --> 00:26:00,540 But should you change it? 424 00:26:00,540 --> 00:26:01,700 We've got two data points. 425 00:26:01,720 --> 00:26:05,500 One is a webinar from secure RAM which is still on their YouTube channel today. 426 00:26:05,980 --> 00:26:08,040 And this is a screen shot from that. 427 00:26:08,040 --> 00:26:10,200 Usually never changed, usually never changed. 428 00:26:10,200 --> 00:26:14,440 Quote, the encryption key is rarely changed, at least in the North American market. 429 00:26:14,440 --> 00:26:15,700 No one ever changes this key. 430 00:26:15,700 --> 00:26:19,300 You can change it, but most people leave it as default and that's fine. 431 00:26:19,320 --> 00:26:27,140 The recovery code is also usually never changed because there is no security risk in leaving it as six nines as we saw previously. 432 00:26:27,440 --> 00:26:29,300 So that's an interesting statement. 433 00:26:29,300 --> 00:26:30,540 But fair enough. 434 00:26:30,540 --> 00:26:32,280 This is a matter of opinion maybe. 435 00:26:32,540 --> 00:26:35,120 The other data point is more positive. 436 00:26:35,240 --> 00:26:48,100 In some of the printed manuals that ship with some of their locks, and this is the same manual that recommended keeping the database of unlocked codes for OEMs, they do recommend changing the recovery and encryption codes, which is a good recommendation. 437 00:26:48,320 --> 00:26:50,620 We can't find this online. 438 00:26:51,300 --> 00:26:58,260 So whether you as an end user will be exposed to this recommendation, it's hard to say. 439 00:26:59,460 --> 00:27:01,300 But that's the recommendation we would make. 440 00:27:01,780 --> 00:27:04,380 Change your recovery code, change your encryption code. 441 00:27:04,380 --> 00:27:06,760 That's going to be the main mitigation for end users. 442 00:27:07,540 --> 00:27:14,680 You can't change the recovery code without doing the same have a locksmith call into secure RAM thing, but you can change the encryption code yourself. 443 00:27:15,220 --> 00:27:17,100 You can also disable recovery. 444 00:27:17,100 --> 00:27:19,480 I don't remember how that works, but it's possible. 445 00:27:20,380 --> 00:27:34,600 Beyond that, I think what we would want to see is an asymmetric cryptographic protocol used for this process so that at least there's some secret that is not in the lock that's needed to produce the correct response. 446 00:27:34,940 --> 00:27:39,040 Beyond that, it's up to you whether you want this feature in there or not. 447 00:27:39,140 --> 00:27:40,840 They do provide a method to disable it. 448 00:27:42,160 --> 00:27:52,540 What this does actually work on, reset heist that we just showed you with the little phone thing, that works on every lock that we tested that has that feature. 449 00:27:52,920 --> 00:27:57,260 So we didn't test every lock that they make, but we tested a lot of them. 450 00:27:57,260 --> 00:28:01,240 Scan logic basic, for instance, doesn't have this recovery feature, so obviously it doesn't work on that. 451 00:28:01,280 --> 00:28:12,820 But locks made from May 2014 to March 2025 were all vulnerable to this insofar as they used the same algorithm and the same default values. 452 00:28:12,820 --> 00:28:20,480 That includes several locks that we purchased secondhand from eBay with the caveat that the seller did not know any of the codes and could not help us open it. 453 00:28:20,480 --> 00:28:23,680 Even on those locks, they were left at their default values. 454 00:28:24,420 --> 00:28:29,880 Code snatch with the little tool that reads out the codes is a bit more specific in what it works on. 455 00:28:29,880 --> 00:28:43,360 It works on LO1s and LO2s manufactured starting sometime between 2019 and 2022, they switched over to a new processor and we don't have any exploits against the old processor today. 456 00:28:43,360 --> 00:28:47,660 It also works on that scan logic basic, not sure exactly when that model was introduced. 457 00:28:48,100 --> 00:28:51,560 But it does not work on some of their older pro logic locks. 458 00:28:52,300 --> 00:28:55,520 So obviously we have to tell secure RAM about this. 459 00:28:55,520 --> 00:28:56,620 This is kind of important. 460 00:28:57,140 --> 00:28:58,840 I'm just going to walk you through the whole timeline. 461 00:28:59,280 --> 00:29:06,220 September of 2023, we read the article from the New York Times about this liberty safe stuff and we say, huh. 462 00:29:06,960 --> 00:29:09,800 December, we start actually looking into this. 463 00:29:09,800 --> 00:29:11,700 How did they manage that? 464 00:29:11,700 --> 00:29:14,400 And this is mostly top lit safe logic. 465 00:29:14,400 --> 00:29:16,940 We expand that to pro logic pretty quickly. 466 00:29:17,720 --> 00:29:21,780 In March, we let secure RAM know that we were looking into it. 467 00:29:21,780 --> 00:29:24,900 We didn't have any vulnerabilities to report at that time. 468 00:29:25,060 --> 00:29:34,000 But in April, we provided them with a detailed technical disclosure explaining all the same exploits that we showed you in this presentation today. 469 00:29:35,060 --> 00:29:45,700 In May, their response to that was, quote, we will refer this matter to our council for trade libel if you choose the route of public announcement or disclosure. 470 00:29:45,940 --> 00:29:50,480 Also, quote, the attack method you have indicated is not new. 471 00:29:50,700 --> 00:30:03,800 And in this, the context of this is they're talking about certain tools that are intended to only be sold to locksmiths which have the capability of opening some of their locks as well as some other brands of locks according to the vendors of those tools. 472 00:30:04,700 --> 00:30:07,240 So this kind of put a damper on our activities. 473 00:30:07,240 --> 00:30:11,020 But in November of 2024, we were feeling like this really is important. 474 00:30:11,020 --> 00:30:12,260 We really have to talk about this. 475 00:30:12,260 --> 00:30:16,260 We reached out again saying, we're going to present sooner or later. 476 00:30:16,460 --> 00:30:19,040 And got pretty much the same response. 477 00:30:19,460 --> 00:30:27,520 The EFF in December, thank you very much to the EFF, reached out on our behalf to say, yeah, give them a round of applause. 478 00:30:28,120 --> 00:30:36,120 They reached out on our behalf to say basically the same thing and also offer to include a statement from SecurRAM in any presentation we might make. 479 00:30:36,120 --> 00:30:38,040 We did not get a statement at that time. 480 00:30:38,560 --> 00:30:40,740 June, accepted here. 481 00:30:40,760 --> 00:30:41,460 Whoo! 482 00:30:41,520 --> 00:30:43,800 And we requested again a statement from them. 483 00:30:43,800 --> 00:30:45,240 Didn't get one at that time. 484 00:30:45,340 --> 00:30:50,640 Just last month , July, for the first time, we heard from their lawyers instead of just from their management. 485 00:30:50,920 --> 00:30:59,040 This was actually somewhat more productive, but we still didn't get a statement from them at that time or at all. 486 00:30:59,040 --> 00:31:02,480 They did not provide a statement to us by the time of this talk. 487 00:31:02,580 --> 00:31:07,180 15 months after the initial technical disclosure, almost two years we've been working on this. 488 00:31:07,180 --> 00:31:08,180 It's DEF CON. 489 00:31:08,180 --> 00:31:09,700 We're telling you all about it. 490 00:31:10,080 --> 00:31:12,880 So , thank you. 491 00:31:14,080 --> 00:31:17,620 A couple interesting quotes from our communications with them. 492 00:31:17,860 --> 00:31:23,180 We don't believe it is appropriate for you to communicate to our customers of any concern. 493 00:31:23,180 --> 00:31:27,540 Your disclosure to our customers would interfere with our relationship with the customers. 494 00:31:28,380 --> 00:31:29,140 And you know what? 495 00:31:29,140 --> 00:31:30,560 We said, okay. 496 00:31:30,560 --> 00:31:31,620 It's your product. 497 00:31:31,620 --> 00:31:32,500 It's your customers. 498 00:31:32,500 --> 00:31:35,080 You've got a moral right to handle this with them how you want. 499 00:31:35,080 --> 00:31:37,040 We have not reached out to any of their customers. 500 00:31:37,040 --> 00:31:40,200 We have not reached out to the safe vendors involved. 501 00:31:40,220 --> 00:31:45,300 We did send an initial email to Liberty at the very beginning, but we never heard back and we never chased that down. 502 00:31:46,140 --> 00:31:47,220 Other quotes. 503 00:31:47,220 --> 00:31:57,620 We object to your sharing or disclosure of your findings even at a conference as such disclosure as you presented would be misleading and damaging to secure RAM's goodwill and reputation. 504 00:31:58,240 --> 00:32:01,300 So, hey, no comment. 505 00:32:01,860 --> 00:32:06,600 But we, you know, we wanted to give this talk at DEF CON last year. 506 00:32:06,720 --> 00:32:07,580 And we didn't. 507 00:32:07,580 --> 00:32:11,920 Because of statements like this, we decided not to give this talk last year. 508 00:32:12,600 --> 00:32:17,320 This does mean they had a full extra year to address this in a manner of their choosing. 509 00:32:18,460 --> 00:32:20,540 We haven't received a statement from them. 510 00:32:20,540 --> 00:32:24,400 So we don't know what their plans are to mitigate these issues. 511 00:32:24,400 --> 00:32:30,760 If they plan to mitigate them, you know, they did send us that one lock that was maybe moving the codes inside the safe. 512 00:32:30,760 --> 00:32:32,740 It's not in the wild, as Mark mentioned. 513 00:32:32,920 --> 00:32:42,700 And really the only other thing I can tell you about this is what Mark said earlier, which is that we purchased a lock last month, made in March of this year, made 11 months after our technical disclosure. 514 00:32:42,700 --> 00:32:44,460 The codes are still in the keypad. 515 00:32:44,460 --> 00:32:47,500 It's still fundamentally vulnerable to both of these attacks. 516 00:32:47,700 --> 00:32:48,800 That's all we know. 517 00:32:48,800 --> 00:32:52,180 If you're affected by these issues, you should reach out to SecureRAM. 518 00:32:54,400 --> 00:32:55,460 All right. 519 00:32:55,460 --> 00:32:57,860 So I want to talk a little bit about the prior art. 520 00:32:58,240 --> 00:33:02,480 So we were, we learned about these tools from them. 521 00:33:02,480 --> 00:33:06,360 And after they mentioned it, we took a deep dive into these two tools. 522 00:33:06,360 --> 00:33:08,760 The little black box and the Phoenix tool. 523 00:33:08,920 --> 00:33:20,480 These are locksmith only tools that allow locksmiths to do things like variously resetting codes, opening safes without codes, getting the codes out of locks, stuff like that. 524 00:33:20,480 --> 00:33:26,680 And so these locks actually, these tools work on a wide variety of safe brands, including SecureRAM, McGard, Sgt. 525 00:33:26,680 --> 00:33:34,220 Greenleaf, Amsec, Dormkaba, you know, the major brands inside these kinds of high security electronic locks. 526 00:33:34,300 --> 00:33:40,300 And what really blew us away is that these are safe locks with known exploited vulnerabilities. 527 00:33:40,320 --> 00:33:43,060 They make these awesome tools to exploit them for you. 528 00:33:43,060 --> 00:33:47,940 It blows me away that people are still using these locks, that these models haven't been discontinued. 529 00:33:47,940 --> 00:33:51,980 I mean, would you use software with known exploited vulnerabilities in it? 530 00:33:52,840 --> 00:33:57,120 So these, these tools, they actually don't open ProLogic locks. 531 00:33:57,420 --> 00:34:00,640 They only open ProLogic locks before 2016. 532 00:34:00,640 --> 00:34:02,080 Luckily we're able to help fill the gap. 533 00:34:02,080 --> 00:34:08,860 So sometime in 2021, 2022, maybe earlier than that, they switched over to this new processor. 534 00:34:08,860 --> 00:34:10,920 And that's what our attacks work on. 535 00:34:11,920 --> 00:34:18,700 So in 2016, Somerset Recon demonstrated a Bluetooth sniffing attack against the ProLogic B01. 536 00:34:18,940 --> 00:34:21,680 So this is a discontinued Bluetooth model of lock. 537 00:34:21,680 --> 00:34:24,260 I don't know if I really want Bluetooth in my safe locks. 538 00:34:25,080 --> 00:34:30,040 Separately they demonstrated unlock capability against a latch unit at that time as well. 539 00:34:30,180 --> 00:34:39,900 And then Deviant also had a great talk on locksmith tools, including the little black box and the Phoenix tool at Pancake Con in 2024, which has some great info in it as well. 540 00:34:40,960 --> 00:34:44,800 So we have some, some opinions of a pining that we want to do here. 541 00:34:44,800 --> 00:34:46,480 The first one is, does it really matter? 542 00:34:46,480 --> 00:34:48,440 Is this a legitimate threat to security? 543 00:34:48,440 --> 00:34:54,880 One of the things that we heard is that, you know, this attack method that we used is more effort than people are willing to put in. 544 00:34:54,880 --> 00:34:57,540 This is, you know, we used advanced techniques. 545 00:34:57,540 --> 00:35:01,100 We were prepared and willing to do glitching against these locks. 546 00:35:01,100 --> 00:35:06,800 When we investigated other models, we, we found novel unknown exploits to microcontrollers. 547 00:35:06,800 --> 00:35:12,520 We did deep reverse engineering, new processors, new disassembling tools, lots of analysis. 548 00:35:12,520 --> 00:35:16,380 Is this something that people, that threat actors can actually do? 549 00:35:16,380 --> 00:35:18,360 Is this something that people are willing to do? 550 00:35:18,360 --> 00:35:21,800 And we would say the answer is absolutely yes. 551 00:35:21,800 --> 00:35:30,220 Organized crime rings absolutely have the capabilities to execute tools, attacks like this, and make tools like the one that we demonstrated. 552 00:35:30,220 --> 00:35:35,360 They already make credit card skimmers, which can be incredibly sophisticated pieces of technology. 553 00:35:35,360 --> 00:35:41,580 They also make and sell tools that you can connect to the can buses on cars to unlock and steal them. 554 00:35:41,580 --> 00:35:49,760 Those kinds of attacks, those kinds of analyses, those kinds of tools far exceed the capabilities we had to bring to bear to analyze these locks. 555 00:35:50,060 --> 00:35:53,820 And the other, uh, group of people is nation state threat actors. 556 00:35:53,940 --> 00:35:59,600 Way within their capabilities to do this analysis, to do this reverse engineering, to do these attacks. 557 00:35:59,600 --> 00:36:03,660 It's absolutely within the capability of state police like organizations. 558 00:36:03,660 --> 00:36:08,040 FBI and others to do this reverse engineering, build these kinds of tools. 559 00:36:08,060 --> 00:36:12,720 And these vulnerabilities, these aren't just theoretical, we glitch it for 20 hours, something's weird. 560 00:36:12,720 --> 00:36:17,020 These, these are vulnerabilities that let you open in minutes as we demonstrated here. 561 00:36:17,020 --> 00:36:21,940 These are things that are very real, very apt, absolutely possible for people to use. 562 00:36:21,940 --> 00:36:26,660 And attacks like code snatch, uh, leave almost or zero trace. 563 00:36:26,660 --> 00:36:31,960 You're able to get out these codes, then you own the keys to the kingdom on these locks. 564 00:36:32,720 --> 00:36:37,040 So when thinking about the threat modeling for safes, safes have only one function. 565 00:36:37,040 --> 00:36:41,960 Keep people with physical access to the outside from getting physical access to the inside. 566 00:36:41,960 --> 00:36:50,860 And to that effect, there is no way in which you can put safe codes on the outside of the lock without reducing the security of the system. 567 00:36:50,920 --> 00:36:55,720 Safe codes are only 6 to 8 digits in almost all electronic locks. 568 00:36:55,720 --> 00:36:59,420 They are incredibly short by modern standards for passwords. 569 00:36:59,420 --> 00:37:04,960 There's no hashing scheme, there's no cryptographic scheme that can protect these from you. 570 00:37:04,960 --> 00:37:26,000 If everybody today, your phone, could in seconds crack a SHA-1 hash of a safe code, and even if you did something like use bcrypt with a work function so high, it took 20 hours for the processor and this keypad to check if it was right, it would take you a fraction of an hour on a desktop GPU to brute force that code. 571 00:37:27,000 --> 00:37:31,200 So, you know, really the thing to ask in this point is what went wrong? 572 00:37:31,200 --> 00:37:34,980 Where was the biggest failure in this chain that caused this to happen? 573 00:37:34,980 --> 00:37:37,300 You know, the easiest person to point to is SecurRAM. 574 00:37:37,300 --> 00:37:40,920 We can say they implemented these locks insecurely. 575 00:37:40,920 --> 00:37:42,780 They didn't consider the threat models. 576 00:37:42,780 --> 00:37:44,280 They didn't set the debug codes. 577 00:37:44,280 --> 00:37:48,020 They didn't use the features that they should have to protect the locks. 578 00:37:48,080 --> 00:37:53,200 And I think you might imagine, gosh, what about the safe OEMs? 579 00:37:53,200 --> 00:37:54,760 They're the ones picking these locks. 580 00:37:54,760 --> 00:37:57,160 They're the ones choosing which ones to use. 581 00:37:57,160 --> 00:38:03,300 Shouldn't they have done something like evaluated them on their own, done analysis, investigated what's going on. 582 00:38:03,300 --> 00:38:05,020 Are these really secure? 583 00:38:05,100 --> 00:38:09,560 And I think if you ask them, they would tell you that these were certified by UL. 584 00:38:09,560 --> 00:38:12,820 These are certified high security electronic locks. 585 00:38:12,820 --> 00:38:15,680 This is a certification that is baked into U.S. 586 00:38:15,680 --> 00:38:19,160 code for DEA safes and other applications. 587 00:38:19,480 --> 00:38:23,580 And so it's, I would say it's almost, it's not UL's fault here. 588 00:38:23,580 --> 00:38:30,300 They correctly applied a standard that is wildly out of date for modern product security. 589 00:38:30,300 --> 00:38:38,720 The product security for physical products lags significantly behind the state of the art for product security that we understand today. 590 00:38:38,720 --> 00:38:41,120 You should be able to trust the certifications. 591 00:38:41,120 --> 00:38:51,800 They are there to set the minimum standard for manufacturers to meet and they are there for the users to understand what is and isn't a high enough quality product for their application. 592 00:38:52,760 --> 00:38:55,560 So let's go back to this list of locks here. 593 00:38:55,560 --> 00:38:57,460 The little black box in the Phoenix tool. 594 00:38:57,460 --> 00:39:00,020 There's almost 50 unique models on here. 595 00:39:00,020 --> 00:39:05,460 How many of you guys think less than half of these locks are UL high security certified locks? 596 00:39:05,460 --> 00:39:06,640 Raise your hands. 597 00:39:07,200 --> 00:39:08,000 Oh, nobody. 598 00:39:08,000 --> 00:39:08,880 Yep, you're all right. 599 00:39:08,880 --> 00:39:12,860 Almost all of these are UL certified high security locks. 600 00:39:12,860 --> 00:39:19,660 Almost every single one on this list of known exploited locks meets that standard for high security locks. 601 00:39:19,660 --> 00:39:26,700 The only ones that aren't highlighted here are the ones where I couldn't actually find the certificate showing that model was certified. 602 00:39:26,840 --> 00:39:34,680 So what really needs to happen is that safe lock products and locks, they need to require secure product development framework. 603 00:39:34,680 --> 00:39:39,320 We can't have security through obscurity for locks and physical access. 604 00:39:39,320 --> 00:39:46,020 We need threat modeling, risk assessments, functional flow descriptions, independent white box, black box testing. 605 00:39:46,020 --> 00:39:57,080 We need FIPS and common criteria type evaluation and certification of cryptography and side channel resistance for these devices who have no other function than physical security. 606 00:39:57,080 --> 00:40:02,140 Some other industries who do things besides physical security have done an amazing job. 607 00:40:02,140 --> 00:40:10,580 The FDA has one of the most stringent cyber security regimes in the world for medical devices. 608 00:40:10,580 --> 00:40:15,860 They have really raised the bar requiring almost all of these things for medical devices. 609 00:40:15,860 --> 00:40:23,540 As well as the National Highway and Transportation Safety Administration has significantly raised the bar for vehicle cyber security. 610 00:40:23,540 --> 00:40:31,580 And the UL and the lock industry need to bring the standards that are codified by statute in line with modern standards. 611 00:40:31,580 --> 00:40:36,180 We can't be questioning whether or not these certifications mean anything. 612 00:40:36,780 --> 00:40:40,500 So another thing, I want to talk a little bit about Chinese government back doors. 613 00:40:40,500 --> 00:40:49,560 Seen lots of hype in the media about got back doors by governments that have been put into devices and things like that. 614 00:40:49,560 --> 00:40:53,400 We found no evidence of any such feature in the locks we evaluated. 615 00:40:53,400 --> 00:40:55,060 And we definitely looked. 616 00:40:55,060 --> 00:41:01,980 When we say back door, we're talking about manuals that are not declared in the feature, features that are not declared in the manual. 617 00:41:02,800 --> 00:41:04,960 And so don't believe the hype. 618 00:41:04,960 --> 00:41:08,760 Bad design is not the same thing as a government back door. 619 00:41:08,760 --> 00:41:13,940 I certainly hope if people are designing government back doors, they do a lot better job than they did here. 620 00:41:16,320 --> 00:41:22,540 So one more thing, I want to have a huge shout out to the Electronic Frontier Foundation and the Coder's Ride Project. 621 00:41:22,540 --> 00:41:25,980 They are the reason we are here today presenting to you guys. 622 00:41:25,980 --> 00:41:27,340 They represented us. 623 00:41:27,340 --> 00:41:30,120 They helped us understand everything as we went through. 624 00:41:30,120 --> 00:41:37,060 And we are grateful to them for all of the support that they provided to us throughout our whole experience. 625 00:41:37,120 --> 00:41:38,920 Thank you guys so much. 626 00:41:43,900 --> 00:41:46,380 I think we have a few minutes for questions. 627 00:41:46,920 --> 00:41:47,220 All right. 628 00:41:47,220 --> 00:41:48,880 We'll take questions outside . 629 00:41:48,880 --> 00:41:50,420 Happy to chat with you guys. 630 00:41:50,420 --> 00:41:51,320 Thank you.