Alright. Are we ready? So today's talk is called mutual authentication is optional. And it's going to get into how we can get past HID I class SE readers that are enforcing secure credentials. We'll also go over a technical overview of all the other I class credentials. So who am I? So my name is Xavier. And I like all things physical security and I am a RFID researcher. I'm a HID credential enthusiast. I like NFC. So yeah, that's me. So today we're going to cover a few things in our agenda today. We're going to go over cloning, downgrading, emulation, and we're going to get into buildings enforcing secure credentials without one. So we're going to go over a few ways to get an exploit HID I class credentials to gain unauthorized access into a facility. So we're going to go over four different attacks today in varied degrees of complexity. So the most simple one attack we're going to go over is cloning, which is going to be the least complicated attack. Most I class legacy credentials use the standard authentication key, which has been obtained in the heart of darkness paper in 2010. Now, if you've not read this legendary paper yet, you should go, it's totally worth a read. If the systems are not standard key, those keys can be extracted using a attack called low class. Overall, these credentials are fairly trivial to make a copy of. It's been, it's, it's, it's been done for over a decade now. So nothing much to write home about. But we're going to have to cover it anyways. Our next attack we're going to go over is a downgrade attack, where we're going to take a secure credential, we're going to move the payload over to a insecure credential. So for example, this would be turning an SE credential into a legacy credential. We're also going to cover emulation today. So what if that downgrade didn't work? We're going to do something by emulating a virtual credential. So this can be done with like electronic tools such as the Proxmark 3 or the Flipper 0. This exploits the HID present transitional credentials, also known as SR. And finally, the fun part of today's talk is going to be exploiting the bugs in reader firmware to gain access to facilities that only only enforce using a secure credential. So we're going to go over some background tech today so you guys sort of know what we are talking about. So you guys are all familiar with physical access control systems, right? You probably interact with one without thinking twice. There are a ton of those HID rev e-readers scattered around this convention floor today. Uh, weekend protocol. That is the signaling protocol between the reader and the controller. Simple signaling protocol over two wires. Really old actually. Developed by John Wiegand in 1975. Still used today in the majority of installations. It is basically just binary data that is being transmitted to the reader to the door controller. And it is up to the controller to determine access. The reader is just there to read the credential. These are usually padded with a preamble to tell the controller what bit length the uh, the credential is. And also has a uh, checksum to ve- verify the data integrity. You know, access control systems, access control controllers are pretty dumb. They can't tell what type of credential is presented for the most part. So they only read credentials. So in the case of my class, it is going to read any credential that has the same key. And we know, well the cards have the same key for the most part. This just doesn't cover like, special functions such as readers in key rolling or any uh, and they're just gonna, it's up to the controller to determine access. Whether to allow or deny the access. And finally, card cloning. That is just gonna be making a physical copy of a credential onto another credential. Just a direct copy. Card emulation would be to make a digital copy of a physical credential. With the, and emulating that with a device, like a Proxmark 3 or a Flipper 0. A real world use case for this would be the HIV transitional credentials called SR, I-class SR. And uh, those have a unique part where these uh, the secure part of the credential, the secure identity object is actually s- is actually cryptographically bound to the card's serial number. And since there are no uh, serial number changeable I-class cards, you're unable to make a uh, direct copy, which means we're going to emulate those. Here are just an overview of all the different uh, HIV credential types. Starting with Prox. It's a bit out of scope for today's topic, but we have a reader here anyway. It's a, it's a low frequency credential. And then moving on to around 2000, we have I-class Legacy that first came out. And uh, those were unique because those were actually encrypted with a 64-bit key. These were broken in 2010 by a Milos Mariak during the Heart of Darkness attack, where two readers were actually destructively attacked in a way to dump the firmware to derive the master identification keys. Going on to around the 2010s, we have the uh, we have I-class SE, also known as the SIO-enabled. SIO meaning secure identity object. And SEOS would still be the uh, flagship credential from HID up to today. So we're going to go over a few possible attack vectors. So we're going to go over card-only attacks, and card and reader attacks. Card-only attacks are very simple because it involves one thing, the physical credential itself, and that's it. But you can only do a limited things with um, with just a card. One attack that's possible is just a downgrade to IPOC Legacy, because they would just send the same PAX payload on a different type of media. You can think of cards as just an encrypted storage device, like a USB stick, but crappier. Since you can just read the distance from quite a distance in the case of I-class. The power efficiency, simple cryptography, and the ISO 15693 protocol all contribute to enhanced read ranges, using long-range readers. This is when card and reader attacks come in. Card and reader attacks are very fun, because you would think the reader on the building is there to secure the, secure the building, right? But we're going to use that exact reader that's outside the building, and use that to compromise the security of the building, which we'll get into a bit later. So how secure are each of these HID credentials? So starting with the least secure one that is broken for over a decade now, we have I-class Legacy. The cryptography is completely broken, keys are leaked. Card's serial number is not relevant in the PAX payload, which means cloning is extremely trivial. And elite keys are recoverable by low-class attack. PAX payload is easily transferable by copying block six to nine to another card. We have I-class SR, which is a transitional conditional, and the application instruction area on the card is going to tell the reader that it has a secure identity object. This is good for transitioning between buildings that have SE, secure readers, and legacy readers. And these are easily downgradable to I-class Legacy, or you can emulate this credential with the correct card's serial number for a complete clone. Going to I-class SE, standard key and the key deprivation function are not leaked, and the keys are not recoverable by low-class. Currently we still do not have the master authentication key for SE. These can be standard, elite keyed, or custom keyed, and these can also be duplicated if it's an open format, like HID 26-bit, and you'll be able to use a HID encoder to create another SE card, actually a legit copy, because they are freely encodable. It's an open format. These are also downgradable to Legacy or SR, and these can also be emulated, which we'll get into, and it will work on most readers. So we're going to get, so how are we going to get past HID readers that are enforcing secure credentials? The first would be a downgrade. So using official HID hardware against their credentials to perform downgrade attacks. So we're going to use a HID Omni-key reader, which is the official HID hardware that plugs into a computer, acts like a keyboard, and we're just going to configure it to spit out the payload data, along with the commands in the Proxmark 3 to just make another copy without ever typing on the computer. We have a quick demo of this here. And one of the cards is SE and one of the cards is Legacy. We're just going to put the Legacy card on the Proxmark, and we're going to read the SE card on the HID reader. Types out the command, and there you go. The downgrade is done. Like this person, said, like the cheapest way isn't even to use the flipper with that add-on board to downgrade the SE cards anymore. You can literally just buy that HID reader on Amazon for about $130, load up that config, and it's ready to downgrade any amount of standard keyed SE credentials. So now we're going to get into iClass SR. We have another way. So we're going to emulate an iClass SR with the correct card serial number and the secure identity object. And to accomplish this, we're going to actually need to do something special, which is dump the SIO, the secure identity object. So here in this example, we're going to get the publicly accessible parts of the card, which is the uh, the card serial number, the EPRS, and the application instruction area from that iClass SE card. And we're going to populate those values in a dump file and get them ready to emulate. And that those bytes 0006 instructs the reader that, hey, there is an SIO. We're going to use the reader on the building that's supposed to secure against, secure the building against, like attackers, to generate a successful challenge to dump the card. So once you have emulated that partial card against that reader, you're going to gather a trace. So that's what the reader is, that's what the reader is sending to the card and we're intercepting that data. And we see here, where we underline here, as that there is a MAC that we got. A message authentication code and that is what we're going to use to generate a successful challenge to dump that credential. So, after we have got, gotten that, we're going to run that standard dump command and what, what you got? The card just puked out all of its secure contents that's supposed to be secure. So manual dumping of that SIO is possible on the command line. But to build on that recently, Eric Betts, Betsy, also implemented NRMAC dumping on the Flipper Zero very recently with a very intuitive workflow. And this allows reading the publicly accessible parts of the card without authentication. Emulating that on the reader and, and using that to generate a successful challenge to dump the card. This as a side effect also allows users of the Flipper Zero who do not have a NARD add-on board or the secure access module to dump the credential, send it to someone who has that reader and to use that, to use that and use that to decrypt the copy and make a logical copy off-site. So, we're going to prepare our traditional, transitional credential by just transferring those over to the, to another card. Like we see here, those, the blue blocks are transferred under the, under the legacy payload and there we go, we have the SR credential already done. So, now we're going to get into the readers that enforce secure credentials. So, now we do have, since we have a full dump of that SE card already, we can emulate the high security SIO only secure credential using a bug in reader firmware that was originally discovered by NVX about a year and a half ago and also ported over to the Flipper Zero by editing some code. So, these actually work on signal readers, revision uh, on firmware 10.0, 5.6 or older and REV-E readers are still not patched at the moment. And you can also use reader manager to inspect those signal readers without even being close to them and you can verify what firmware they are running. So, we can make, we can make installations more secure in a few ways. By using a high security key set, such as standard two. Elite custom keys for SE installations. Updating firmware. Disabling or disabling all legacy technologies that issue secure credentials, such as SEOS, Desfire, mobile credentials. And now we're going to get into some fun stuff. What not to do. Over the years I've seen a lot of terrible installations of secure credentials being issued to clients. Such as this one here. You can see this is a very popular vendor in Canada. They're located in BC. And they have all the latest signal readers on all their buildings. But um, all their readers are pro- all their credentials are programmed with the same facility code as laid out in their official documentation that's available publicly online. And what do you know? All the, all the legacy technologies are enabled on that reader too. So, yeah. You can just, they are easily downgradable. And that's not even the worst part. Is that you don't even need the credential to make a copy. Because since we know that the facility code is the same, we can just uh, if the numbers aren't rubbed off on the back yet, we can just uh, take those numbers and just encode another one. And it's going to work. So given what we know, we can literally make a copy of that FOB in that picture there. And we can make a logical copy that is going to work on all of those readers from this specific integrator. And that concludes my presentation for today. I want to say I have a special thanks for the RFID hacking community. Uh, Eric Betts, also known as Betsy, has the uh, pretty good documentation on all the uh, I-class uh, credentials and how the data is laid out. NBX, who discovered, originally discovered the authentication bypass bug, which allows working uh, allows um, working I-class SE emulation, as well as the people class emulation code for the Flipper Zero. Kate, or Miss Steel Dev, genius on all things HID, and have to thank her for uh, taking in my uh, HID readers that I have ricked by bad firmware updates. And Iceman, and I wouldn't be here without Iceman urging me to do this talk on uh, I-class SE today. So if you have any questions, I'll be at the NFC table in the RF village. And thank you for attending.