Hello, DEF CON. Thank you for being here on a Saturday morning. I know everyone was partying yesterday until 5 a.m. probably, so I'm glad that you're here. So yeah, now we're talking about our talk, open CSAM, or how secure is your stuff in your lockers. And this is the main question, basically, which we will talk through the talk. As you might have heard, there have been some issues with the talk in the past, so I will address it later. So before we start with the topic, let me introduce myself real quick. So I'm Dennis, I'm a security researcher or also a hardware hacker. And I basically am interested in wireless and embedded security and privacy. So I take a look at all kinds of interesting devices which are around me. Primarily this is vacuum robots, but I generally look at all kinds of things. That's why I call myself also a vacuum robot and IoT collector, so I have probably way over 600, 700 devices and 60 or 70 vacuum robots by now. So my main goal typically is to root vacuum robots, but again, I look at all the other things. And if you're interested in vacuum robots, by the way, I have a website which documents all the hardware and everything. One thing which is kind of new in the slides, so I have been a target of a cease and desist at DEF CON, so I think this is like a, you know, interesting thing. Which by the way was withdrawn as today in the morning or at night, so yeah. And now we would like to introduce Braylyn. Cool. Hi, I'm Braylyn. I hack things for the Leviathan security group during the day, but I'm here representing myself as an independent security researcher and this talk does not reflect their views. My general focus has been application security and APIs, but I've started hardware hacking for fun. Looking at things like robots, cameras, and smart locks. And this is my first DEF CON talk and I was also named in the cease and desist, so that's pretty fun. All right. So let's talk about some previous work. So this is not necessarily the first lock which we took a look at. Like exactly ten years ago, well, a little bit more than ten years ago, I was working on a group which looked at Siemens and Foss door locks and we published a paper about that. Also some while ago I was taking a look at Schlage electronic locks which you find especially in America, like, you know, in government buildings, universities. So what are the goals of this talk? Well, first we want to give you some overview of the reverse engineering of digilock and SAG locks. We want to tell you something about vulnerabilities and we want to show you some ideas and methods how you can extract typically firmware and configurations from that kind of devices. One thing which is the most important part of this talk is basically we want to raise awareness about pin numbers. As a general side note, we use digilock and SAG as examples and we're not claiming that they're more or less secure than other companies. We're kind of just unlucky that they're one of the market leaders and that they build good products. So, yeah, so we basically have chosen them because they have a good reputation, they have a quality of products, we just might have made some mistakes. We reported the things also to the vendors and digilock is actively working on fixing the issues and I will tell, give you some information later on that. So, about this talk. It's basically a continuation of my Nulcon talk at Nulcon Berlin 24. The focus, and this is the important part, on offline locks which are managed, so if there's like a master key or something, if you think of a gem or, you know, master key systems. And we do not cover a couple of things. For example, we do not cover management software, we do not cover reprovisioning, so how to, you know, factory reset the lock. We also don't talk about physical attacks using magnets or destructive attacks like drilling, you know, decapping, all other kinds of things. And later on, we have included a statement of digilock in regard to their cease and desist. All right, so what is our motivation here? So, generally, back when I was, you know, looking at locks, I realized quite quickly that hacking locks is not that, you know, new. There's a lot of people who were hacking like high security locks, so a lot of researchers were kind of focusing on that, especially like safe locks, because there's probably very important stuff in there. A lot of research has been put into side channel attacks, you know, safes contain expensive things, and the impact is like very high if they're insecure. The general problem is for, you know, manufacturers or for even companies who have this kind of devices, it's very hard to defend against physical attacks and highly motivated attackers. So, if I'm an attacker, if I have unlimited time and money, then I will get into whatever it is. In regard to consumer devices, it's slightly different. Consumer locks, safes and cabinets are known to be bad, and there's mechanical flaws, there's trivial bypasses using magnets and other things, and there's insecure software. I have an example here from one of my favourite YouTubers, a lock-picking lawyer, where he has a gun safe kind of thing where you put the gun in, and you just pry open the plastic handle and you can just pull the gun out, you don't care about the lock. Sometimes you don't need to even attack locks, there's other ways around that. Okay. So, how did we start with this particular research? So I was in the University around 2018, and they introduced lockers in the labs. One of the ideas was you can put your stuff in, and you just choose your own pen, lock it, and if you come back, you unlock it again and the next one can use it. But also, when we were travelling around, we saw these locks in many, many co-working spaces, banks, airports, hotels, gyms, so we were literally everywhere. At some point, you develop an eye for interesting things around you. And one thing which we figured out very quickly is there's only a few widely used vendors which are out there, so there's groups in the US in particular, like Digilock, or in Europe, SAG, there's some very limited kind of vendors out there. And these kind of locks, they stay for a very, very long time in use, because why would you change a gym lock after five years, or after four years, or whatever? These things typically stay in use for ten years, 20 years, until they're broken, basically. Okay. The question is now why do we hack cabinet lockers, or lockers generally, and not saves? Well, lockers and cabinets are basically everywhere, and they're used in public spaces, or spaces which are accessible to the public, or shared workspaces. And there might be many reasons why you want to hack them. For example, you forgot your pin, you lost your key, or you do a red team penetration test. Also, sometimes the audit locks are not super correct, so you want to correct them. And they might contain a lot of interesting stuff, including our own. And this is what I want to say, one of the reasons why we do the research is because we're kind of slightly annoyed because our stuff is also about kind of lockers, so this is one big motivation from us. So what kind of things do you might store there? Well, you might store your backpack, laptop, employee ID, phone, keys, money, credit cards, USB sticks, important documents, your bitcoins, or candy. So the question is, well, did you use the same pin which you used to lock the locker also for your phone, notebook, or credit card? Quick survey, who has a friend that does this? Who reuses their pins? No, you're not supposed to admit that. To be fair, I mean, in the beginning, before I was doing the research, I caught myself using the same pin all over again, so it gets a little bit complicated. Anyway, so what kind of attack ideas do we have, and how do we do it? So what are we looking for generally in this kind of devices? Well, we try to extract somehow the firmware, because firmware can give us some secret backdoors or bugs. It helps us to understand functionality, and it can allow an attacker to create custom firmware. You know, like basically de-clouding or n-certification of your smart locks. The other thing is, which is obviously the crown jewel here, is the interesting data in terms of key IDs, user pins, RFID IDs, or lock files. And the other thing, if you do lockpicking, you know you try to find any easy way to bypass things into open locks. So, our idea, and this is why we want to kind of stress on that, it's not necessary that we want to steal your stuff, but we don't want to steal your stuff anyway, but I mean, theoretically as attackers. But lateral movement, and that's the core idea of our talk. So how do we do it? So we have in this particular example three cabinets, basically one of them is open, two of them are locked, one is locked with a pin, the other one is locked with an RFID. And so what we do is we try to extract the manager key from the locker which is open. As soon as we have the manager key, this is like a key which you use to kind of unlock the locker, to audit things in there so that there's nothing, you know, like the Defcon hotel, it's like sketchy things, your flipper. And you can lock it again without resetting the pin. So, by having this manager key, what we can do is basically we can unlock other lockers, and we can extract from the lockers, like with the pin, we can extract the user pin. At the same time, we can obviously access whatever is in the locker. So, if you have a laptop in there, and if you have your phone in there, well, we might be able to use the pin which you use to lock the locker to, you know, unlock that. But it gets even more interesting because, well, we can also extract the RFID, you know, ID or secret, in some cases, from a lock which was used to lock the locker with an RFID or employee badge. And then we can go to an interesting door, like a server room or something, and can use that to unlock that. Especially SAG, they use test fire encryption, so they store the keys, which gets very, very interesting here. All right, so how do you get that kind of locks? What's the logistics behind that? The problem is, if you do that kind of research, you need to invest a lot of time and money, and experiments typically require multiple devices. And you obviously cannot use someone else's property because there might be one or two bricks in the process of reverse engineering that. These locks are also expensive, so typically you pay more than $100 for a lock and more than $50 for a key, or way more than $50. We will talk about that later. But the good thing was, for us, there's surplus on eBay. And it's a little mean, but COVID kind of helped us a little bit because a lot of gyms kind of got bankrupt, so they kind of offset their locks and other things on eBay. And we got a lot of cheap provisioned locks, so locks which were already provisioned to some manager key or programming key, which we were able to play around with. And the other thing is, especially in Germany, we got a lot of locks from failed projects. Basically, we have a big gym, which didn't happen, so we had stacks and stacks of these locks, and we kind of sell them on eBay for a cheap price. So we spent probably more than $1,000 or $2,000 on buying random locks, which we don't even have so many lockers for. So as mentioned, we were going on a shopping tour on eBay and bought a lot of locks. So let's talk about the DigiLock ecosystem, and this is our first candidate for which devices we looked at. So DigiLock itself, we're like a brand of Security People Inc., which is U.S.-based, and they are in the industry for a very, very long time. So they're very experienced, especially also with mechanical locks. They call themselves the global leader in keyless lock solutions, and they have many different bands of locks. So they have connected locks, which we're not talking about. We have offline locks. We have mechanical locks. And as access media, you can use RFIDs, the pins, key fobs, smartphones with the newest generation. And you might see them under different brands. For example, DigiLock, Nex, Numeris, so there's different ones. If you take a look at their website, I mean, they kind of say we're literally in all the industries, which is like, I mean, that's the reason why we kind of saw them in the first place, because we're in education, in gyms, in some professional sports organizations, so we're literally everywhere. The way how you can typically identify them is, this is some examples right now, by the three-pin connector, which we use, which is very specific for DigiLock. Other lock vendors use slightly different kind of connectors, but this is like a thing, if you see that, it's kind of like, you know, kind of know what it is. If you take a look at the lock hardware itself, the good thing for us is that they use more or less the same or very similar hardware, so they use a similar type of MCU. So if you're kind of familiar with one of them, you kind of know how the others work in a way. So this makes it also a great kind of thing for us as reverse engineers. And they didn't have tamper switches, so if you just assemble one, then there's nothing which triggers, which is, by the way, very, very normal for low security or middle security locks. Only safe locks have some tamper switches and other things. The lock state is controlled by the latch, which is kind of interesting for us, and we'll kind of talk about that later. And because we have so much experience with mechanical locks, we added a lot of mechanical protections against physical attacks. So for example, you cannot use bypassing things. We tried a couple things with needles, so there's no way to kind of, you know, bypass things. So we did a very good job there. The features which you get per lock are kind of dependent on the brand, so some of them support audit locks, so you can basically record who opened or locked the locker. And they have assigned and shared locker functionality, which means sometimes you can give an employee just one locker and only that person can use it, or you have a scenario like in the gym. If you take a look closer at the hardware, one thing which is kind of great for us is all of them have a PIC programming interface exposed. Many of them have EEPROM. We have obviously an MCU. We have a connection to the inside unit, which kind of contains the latch and the motor, and it gets also power from there. We have a piezo for the sound. And the most interesting thing for us was the interface. As you see, we soldered some wires to that to kind of intercept that, which is basically one wire. Hardware-wise, if you take a closer look at the microcontrollers, we use most of the time PIC18 controllers, but sometimes, especially newer models, we use PIC24s. We have EEPROM for audit locks and for credential storage in some of them devices. And if you have a device which supports RFIDs, you have an ST controller for NFCs. All the newer ones have a logic IC, which is also an HSM. And from what they told us, basically, in new generations of these locks, we use the HSM to store some kind of secrets, which we can confirm because it's not on eBay right now. So I need to wait until it shows up on eBay. So if you look inside at the locker hardware, the thing which was for me, as someone who's like doing physical security for quite a while, is like it's extremely well-built and engineered. And what I mentioned before is that the inside lock kind of defines if it's locked or unlocked. You have some read contacts, which are kind of sensing if the latch is locked or not locked. There's also different variants of the lock, where everything is just in the front, and we have, again, read contacts, which kind of detect a couple things. But all of the locks have some kind of debug pins. So let's talk about the keys. So there's a bunch of keys, and you see we have a stack of them because we were going on shopping trips. The most important one is the yellow key, which is the programming key. Only one of them exists in the locking system. This is basically the main provisioning key. It allows you to add manager keys, to remove them, to overwrite the lock, so if you need to open the lock. It also is used to power deadlocks. So if a battery is empty, you can use it to power jump it. And it has some additional functions like cloning, functionality, audits, and some other things. Another key which is important is the black key, which is the manager key. And this is basically typically your administrator, whatever has it, you kind of, to open the locker so that you can get your stuff, or to kind of check if you have a flipper in there, a legal flipper in there. So this is kind of things which it's used for. And one thing which is very, very special for Digilog, and this is kind of, I think, one very important feature for a lot of people, is the so-called ADA key, which is in blue. And ADA means Americans with Disabilities Act. So this key allows you basically for people who cannot enter a pin physically, you just tap the key fob, and it will kind of act as a pin or as a key. Yeah, so if you take a look closer into these keys, well, all of them are kind of the same. So programming the manager keys, by the way, have exactly the same hardware, just the case is different. But price-wise, they are very different. They have a battery in there, they have a PIC18, and they have, again, very nice for us, a PIC programming interface. The ADA key is basically an I button, which will be later we will use for some things. There's one special key, which we're not going too deep into, it's a so-called data key, and what it does is basically it connects over USB to a tablet, and you can basically use it as a programming or manager key, you can have audit logs, you can pull things, you can clone logs and some other things. So this is like an additional thing, which I think they have in their fifth generation or something. It's a little more expensive, but it doesn't matter for us. All right, so what is the communication between log and key? And the thing here is, which you probably figured out very quickly already, is OneWire. And OneWire, by the way, is a very standard protocol. You find it in a lot of alarm systems, you find it like if you go to a restaurant to unlock the cash register and some other things, it's a very standard kind of thing. Which makes it great to be intercepted with logic analyzers, so there's some tools out there which you can use to basically decode the stream. They use the readrom command to ask the key for its ID, and the key returns eight bytes of ID to the log, and this is basically authentication. And the key types are identified basically by the first byte of the ID. One thing which is important if you want to do side-channel attacks or timing attacks, the bus resets for every transaction. In our talk at the Nulcon, we described how you potentially could do side-channels. One key thing to take away here is we don't use any crypto, so we kind of rely on whatever security guarantees OneWire has. All right, I want to give a quick rundown of PIC MCUs because it's kind of important to understand what's going on here. So PICs generally are microcontrollers by microchip. They're very common in locks, so literally everyone is using them. Siemens and Floss use them, Schlage use them, Kitlock uses them, so everyone uses them. And they are ideal because they are low power and ideal for battery operations. There's two flavors which we see for Digilock in particular, or for other locks. It's a PIC18, which is an 8-bit MCU which was released back in 2000, and the PIC24, which has a 16-bit MCU, which has no EEPROM data on board. So basically you can't flash the firmware onto it, but you need to store your data somewhere else. Okay, so this is an example of a random PIC18. So we have some SRAM, we have flash, we have EEPROM, as mentioned, and they support some protections. For example, you can enable code protection, you can enable write protection, and there's also a thing which is called external block table read. And on the right you can see it's consisting of multiple blocks, and at the bottom is the EEPROM part. So let's talk about the code protection. Speaking of which, code protection is, I think, a very PIC-specific term. If you work with other processors, you might know it as readout protection. And the basic idea is we have here an example log, which is not an example log, just an example chip, where the first two blocks are protected, the data is protected, and if you connect our programmer to it, what will happen is we will get, for the blocks which are protected, all zeros, but the blocks which are not protected, we get data back. So write protection, similar thing. The first two blocks are protected, the last one is protected. If you try to write with our programmer something to that, the writes will fail for them, but the other blocks are programmed. Speaking of security of these chips, these MCUs, they offer basically only basic protection against attacks. So there's many attacks which exist for these chips, even if protections are enabled. There's optical laser attacks back in 2002, there's UV erasure attacks, there's glitching, there's like overwriting of individual blocks. So there's a lot of attacks out there. So a lot of people kind of already figured out how to break these chips. Okay, let's talk about the attacks. So our naive approach was like, hey, what happens if you just connect a debugger and we do some magic with power and other things? It's not as trivial as it seems. And we try to dump the MCU. We had the luck that we exposed the data pins, both for the locks and the keys. And one thing which we found is basically that the protection settings, which we did on the locks, were very inconsistent. So what do we mean with that? So typically, as mentioned, if readout protection is enabled, you get all back, all zeros back, like on the right side. And one thing which we saw very quickly is that we didn't have the right protection enabled, which is by itself not really an issue. But the bigger thing was that if you use an external EEPROM, like this external chip, but it's not encrypted, so you can dump it basically. And this is basically the result which we had for the manager keys, for the data keys, and everything. One thing which you will see is for most locks which use more modern chips, they are not protecting the code. And all of them are not protecting the EEPROM. Which is in the case of some of them doesn't matter too much, but for especially the locks, it matters a lot. So what are we doing? So for unprotected devices, which don't have any code protection enabled, we can just dump the code memory and the EEPROM directly. So we need a programmer, we need some other hardware, but generally, you know, if you work with embedded systems, you know how to do that. For partially protected devices, it gets a little bit more tricky. So and this is an example for a lock which had the first three blocks protected, but the code was creeping into the fourth one, which was not protected. So what we were doing is we can dump the fourth block, and you can put a custom dumper into that block, which hopefully gets hit by some code or branch link, and then we can dump the other ones. There's some other methods out there, but because we kind of cash strapped and don't want to spend too much time on like buying more locks of the same kind of thing and hoping that it's the same firmware, this is basically, you know, one of the things you can do. Otherwise, you can just access the EEPROM data directly. So as the same as the other ones. We described this attack at Nucon in the talk. So if you're interested in that, but it's a very generic attack. It's kind of well known for quite a while. So basically the firmware extraction can be successful for all the locks, so we can get back the firmware. You can analyze the firmware, you can modify it if you want, you can basically load it into Ghidra because it has big support. There's no real signatures, integrity checks, which is kind of normal for that kind of things. And the methods are well established. Basically, but the thing for us is like we don't necessarily need to even look at the firmware if you have the data. So that's just like a thing. So let's talk about the EEPROM contents, because that's where the current rules are. And one thing is it requires quite a while and a lot of trial and error to figure out which data fields are for what. Especially if you have only provisioned locks and you don't have like clean locks, which are provisioned, you kind of see what the differences are. And the data fields also differ slightly between lock generations and between lock types. So this is not accurate for all the locks. It's just one example for like an older fourth generation lock. But what we see typically is we have a partial programming ID. We see the amount of manager keys. We see what kind of manager key is provisioned on that. We see if like a pin was set, ADA key ID, or like RFID UID. So if you tap the UID, you know, RFID. And there's also failed pin counter. And for older locks, bad things might happen if you run over that. Just don't. Okay, as a general observation is some locks don't wipe the user pin or the key after it has been unlocked by the user. And some, especially newer versions do. So at some point, I think we figured out there's a problem and we kind of fixed that. All right, so let's talk about emulation and cloning keys. Well, and this kind of thing applies to both RFIDs and keys. So we only need the ID basically to clone the key. And we cannot extract from the key or the flash depending on, you know, what kind of media we have. And we can emulate it with an Arduino, with a Flipper Zero, or in case of RFIDs with a Proxmark. The thing is, it looks a little bit easy, but you have to kind of build like a custom PCB, which does a couple things to kind of, you know, wake up the lock in a particular way. So it's not as trivial as you can do it right now. You need to kind of put some effort into that. So don't go home and just program an Arduino. It won't work. All right, what kind of other ideas could you have if you want to attack them? Well, you could try to brute force pins and keys, which works for older locks very well, but for newer locks not so much. You can do side-channel attacks, which works for all of them as far as we know, but it's very complicated, takes like days. You can clone the lock configuration by one wire if you have a valid key, and you can try to modify the contents of EEPROMs. Also, you could think of like building a malicious firmware. We thought about that, but I mean, it's not really necessary to do. If you're interested in the first two attacks, you can take a look at the slides at NuCon. Now, probably one of the reasons why you guys are here is the cease and desist incident. So our talk was basically meant to be on Friday at 11 a.m., and the day before at 2 p.m., we basically got an email, cease and desist, which kind of came to a couple of things, like Copyright Act, Defend Trade Secrets Act, you know, obviously other things like the Computer Fraud and Abuse Act, and the DMCA. And the interesting thing here is, and I want to especially thank Corey to kind of connect us so quickly, who's sitting in the front, thank you. By 3.30, basically slightly more than an hour later, we were sitting already in a hotel room and talking to lawyers from the EFF and also from Kurt, and we were basically figuring out what was going on. And so to kind of, because it was very short notice, we kind of moved the talk from Friday to Sunday. We probably could have given the talk on Friday, but we decided like, okay, it might be worth to kind of figure out what's going on. On Saturday, so yesterday, we had a phone call in both of everyone, we kind of exchanged views, we kind of resolved our differences, and in that call, we kind of pulled the cease and desist back. And officially today, shortly after midnight, we got like the withdrawal in writing for the cease and desist. One thing which I want to quickly say is like, there's like a kind of official response from Digilog. They kind of acknowledged that we communicated with them prior to DEF CON, we gave them the slides even, which was maybe a mistake, maybe not. They promised to do some improvements. For example, they want to enable code protection on their logs. For the data blocks, they want to enable for the firmware. They want to encrypt somehow the communication between the keys and the log, so that you cannot clone the UID anymore, and they want to encrypt EEPROM data if it's external. They also told us that in over 32 years, we had no reported security incidents due to a hacked log, which I believe. And they also are very committed to the security solution for their customers. And I put a full statement, which they sent us on slide 70. So if you look later on the slides, you'll find it in the back. All right, that's all for Digilog. Let's move on with the next company and Braylon. Cool. So let's shift gears and talk about a being Schulte Schlagbaum AG. So this is a German company. They've been in business since 1833. So quite an old company. These are more widely used in Europe and Germany. They produce both mechanic and electronic locker locks. We took a look at the brand called Sabotronic. They also produce door locks, but we didn't take a look at those. We think they might be on the same platform, but we're not entirely sure. So the electronic locks accept both pin and RFIDs or RFID plus pins as access mediums. And they do provide audit log support. So let's talk about the LS series of locks. These are based on the STM32 MCU, and they also have SPI EEPROM. As for security, we found that SWD and debugging was not disabled and their EEPROM is not encrypted. And we noticed a lack of physical tamper switches in the locks. So as you can see, these are PCBs for three different locks. We think that they tried to save money by using the same design for nearly a decade. They use the same PCB, but they leave ICs unpopulated. So if you buy a lock that has pin support, you'll get an MCU for the keypad and a different MCU for RFID, and you'll get both for the RFID and pin supported locks. We also noted a difference in SPI EEPROM sizes. Okay, so let's talk about the management keys for some of the RFID SAG locks. So their RFID locks support MyFair Classic, MyFair Deskfire, and some ISO compatible tags. For the higher end locks, there are special RFID keys that are required for programming. There's a master key one and two. Those are used for unlocking and relocking lockers. There's also a data RFID tag for data transport, if you need to like pull audit logs off of certain locks. There's also like a physical communicator device, which is like an advanced handheld programmer, but we didn't take a look at that. We tried to procure a set of these programming keys, but they were $1,400 for eight MyFair Classic tags. So we didn't think it was worth the money, so we didn't take a look at those. So just a quick overview on how we dumped EEPROM contents just using an SOIC clip. We were able to interface with the EEPROM and dump the context, as you can see in the hex file. We were able to pull the master pin and the user set pin, this is just totally unencrypted EEPROM with pins that are available for anyone who can read it to see it. We also found that there are audit logs on the EEPROM as well. There are 500 entries, including a timestamp and a status code, with the status code 50 allowing you to see used pins and the RFID UIDs that have been used. So the last 500 you can see, yeah, all of that. So how did we extract firmware? We noticed on the PCB there was solder mask covering the SWD, like copper pads, so we scratched that off and we were able to interface with it and connect to SWD. And that allowed us to see that the devs didn't set the read protection byte. And as such, we were able to get the full firmware from these locks. So there are a couple of physical flaws on these locks. We noticed that the motor power wires and potentially debug pins are accessible from outside of the lock through a clipped plastic cover. So there's just a huge gap, as you can see, the power wires to the actual motor. And yeah, as you can see on the right, we were able to fit like a whole card under there. So that might allow us to tamper with the lock motor and do some physical hacking there. So we'll take it, we'll talk about a couple of other manufacturers now. One of them being Compact Security Company. This is a US company founded in 1903. So again, another pretty old company. We took a look at the regulator series. These use the PIC-16 MCU. And these locks accept user pins, technician pins, master pins. And there is some audit logging support for some models. As for security, we found that code data and write protection were enabled on all these locks. So that's good for them, but not very fun for us. So we kind of moved on. But we took a look at their documentation and saw what they were using for a programming slash audit tool. An Excel spreadsheet. I don't know what kind of Excel macro hell is happening here. I'm glad I'm not the person who has to maintain this and write this. But if it works for them, I'm happy for them. So next we'll talk about Kitlock. This is a sub-brand of CodeLocks. This is a UK-based company founded in 1991. This also uses the PIC-16 MCU. And again, accepts user pins, technician pins, and master pins. And again, they had code data and write protection enabled. So good for them, not fun for us. So for good measure, we took a look at a couple of no-name RFID locks from Amazon and eBay. These are just like $20 locks. Super cheap. We took them apart and found that they had EPROM and some kind of mystery MCU. If you like mystery MCUs and know what this is, let us know. Obviously, you can't really have many expectations of security on these cheap devices. So there's no encryption, no protection, and plain text RFID UIDs are just there for anyone to read it. Okay, so we're going to do a quick demo now to show how you can hack some of these locks. All right, due to the season, we will change the demo slightly. So usually, we were kind of thinking of doing a whole rundown on how we can extract manager keys and other things. What I would do instead is I would showcase our custom PCB, which we built ourselves and took us some time to develop it. What it basically does is it emulates the same function as a manager key, so I will just show you. So I locked all the lockers from DigiLock in this case, and I will just kind of show how I can hopefully open them again. Yeah. Okay, just like a quick example of a theoretical scenario. So we're going to assume that the attacker has access to any open locker or cabinet with the tools, the microchip, a picket 3 debugger, a Phillips screwdriver, and an Arduino and or flipper. We're using the flipper here. So our criminal has already set the key onto the flipper, and we are able to access the locks. Yeah, so to be fair, we put a lot of effort into like figuring it out already. So this is like basically if you got access to a lock, you somehow extracted that, you built that kind of tool. There's a magic back set which we don't show. So the attack will work very quickly after that. Now the obvious thing is if you want to extract secrets from these locks, you need to kind of disassemble them, so you need a screwdriver. The locks which are kind of just having the front part are super annoying because you need like a very special key to kind of unscrew them. But generally, to open and relock them again without resetting the original pin, that's basically all you need. But this might take you some time to do. All right. That's for that. Let's go to the conclusion. Okay. In summary, we were able to extract firmware and keys from these brands of locks. So access to one lock can give you access to all locks in one system or one location. Cloning and emulating keys is possible. And these attacks don't require complicated tools and are sometimes cheap unless you're using the flipper. That's a little bit more expensive. So how secure is your stuff in electronic lockers? Not super secure. But we need to be fair because these locks are not being sold as high security devices. They're not promising like military grade security or anything. These are just standard use locks. So how can we fix this? Of course we would recommend a security by design approach from the beginning. So enable all security features and always expect physical attacks when you're producing locks. Encrypt your secrets, store them in a secure way. So the best solution for vulnerable locks would be to have firmware updates for all of them. But depending on the age of the locks, this might not be possible. And in our opinion, it seems unfixable. So the workaround could be to use a programmer to enable code protection. But this only works if data is stored on the MCU and not on an external EEPROM chip. So this task is kind of complicated for an average and non-tech savvy user. So it's not a reasonable expectation. So the likely solution would be to buy new locks or just ignore the problem and hope it goes away. So takeaway lessons. Please don't reuse your important pins for lockers. Like public use lockers. Again, don't reuse your pins for your debit cards, your phone. Use separate things. Use like we're all using separate passwords now for everything I hope. So treat your pin like a password and never loan out your electronic keys. And always be aware of security limitations of devices. And you cannot trust audit logs of these devices because they can be tampered with. So even experienced and big companies make mistakes. And developing stuff is way harder than breaking it in 90% of cases. So be nice to developers. It's hard when people are attacking your stuff. And always remember there might be interesting cyber physical systems around you. So don't forget the human factor. Can you just ask nicely for the manager key? So final notes. Please don't break into lockers you don't own. I know these systems are in a lot of places. Hotels and such. But please don't. Messing with these locks can also permanently break them. Which is kind of the standard expectation when you're hardware hacking. You can always break things quite easily. Be careful. There are more attacks that we haven't covered here. Other companies and products are possibly vulnerable too. And just because they claim that they've never been hacked doesn't mean they're unhackable. Of course. And yeah. Thanks all. So I would like to also give special thanks to Corey who kind of connected us with Delorios. To Tara who did that too. To our counsel Hannah and Kurt. And to Andrew. And everyone at EFF. This kind of gave me again a motivation to definitely donate a lot of money to the EFF. One maybe side story is that Braylon was at B-Sides before this event and was getting a membership for EFF and was kind of joking like oh we might need you tomorrow. And lo and behold literally one day after that, on her birthday of all effects, both of us got a cease and desist letter. So if you have questions, we might be still around here. Otherwise feel free to contact us. Yeah. And thank you very much for being here. Right. So yeah. If you also want to read the statement, it will be in the slides. And I hope we will find a solution also to kind of fix the older locks. So there's probably a way we will figure it out together. Thank you.