start	end	text
350	8630	Alright. Are we ready? So today's talk is called mutual authentication is optional. And it's
8630	14610	going to get into how we can get past HID I class SE readers that are enforcing secure
14610	21730	credentials. We'll also go over a technical overview of all the other I class credentials. So
21730	28750	who am I? So my name is Xavier. And I like all things physical security and I am a RFID
28750	40140	researcher. I'm a HID credential enthusiast. I like NFC. So yeah, that's me. So today we're
40140	44960	going to cover a few things in our agenda today. We're going to go over cloning,
44960	49560	downgrading, emulation, and we're going to get into buildings enforcing secure credentials
49560	58340	without one. So we're going to go over a few ways to get an exploit HID I class credentials to
58340	63560	gain unauthorized access into a facility. So we're going to go over four different attacks
63560	68880	today in varied degrees of complexity. So the most simple one attack we're going to go over
68880	75780	is cloning, which is going to be the least complicated attack. Most I class legacy
75780	84560	credentials use the standard authentication key, which has been obtained in the heart of
84560	90020	darkness paper in 2010. Now, if you've not read this legendary paper yet, you should go,
90020	98160	it's totally worth a read. If the systems are not standard key, those keys can be extracted
98160	105260	using a attack called low class. Overall, these credentials are fairly trivial to make a copy
105260	110860	of. It's been, it's, it's, it's been done for over a decade now. So nothing much to write home
110860	118040	about. But we're going to have to cover it anyways. Our next attack we're going to go over is a
118040	122520	downgrade attack, where we're going to take a secure credential, we're going to move the payload
122700	129440	over to a insecure credential. So for example, this would be turning an SE credential into a legacy
130960	137400	credential. We're also going to cover emulation today. So what if that downgrade didn't work?
137400	142760	We're going to do something by emulating a virtual credential. So this can be done with like
142760	148980	electronic tools such as the Proxmark 3 or the Flipper 0. This exploits the HID present
148980	158980	transitional credentials, also known as SR. And finally, the fun part of today's talk is going to
158980	166820	be exploiting the bugs in reader firmware to gain access to facilities that only only enforce using
166960	174880	a secure credential. So we're going to go over some background tech today so you guys sort of
174880	179320	know what we are talking about. So you guys are all familiar with physical access control
179320	186340	systems, right? You probably interact with one without thinking twice. There are a ton of those
186340	200120	HID rev e-readers scattered around this convention floor today. Uh, weekend protocol. That is the
200120	205200	signaling protocol between the reader and the controller. Simple signaling protocol over two
205200	211560	wires. Really old actually. Developed by John Wiegand in 1975. Still used today in the majority
211560	217180	of installations. It is basically just binary data that is being transmitted to the reader to the
217180	222400	door controller. And it is up to the controller to determine access. The reader is just there to
222400	227980	read the credential. These are usually padded with a preamble to tell the controller what bit
227980	234320	length the uh, the credential is. And also has a uh, checksum to ve- verify the data
234320	242500	integrity. You know, access control systems, access control controllers are pretty dumb. They
242500	247580	can't tell what type of credential is presented for the most part. So they only read
247580	251800	credentials. So in the case of my class, it is going to read any credential that has the same
251800	257040	key. And we know, well the cards have the same key for the most part. This just doesn't cover
257040	264780	like, special functions such as readers in key rolling or any uh, and they're just gonna, it's
264780	271380	up to the controller to determine access. Whether to allow or deny the access. And finally,
271380	276300	card cloning. That is just gonna be making a physical copy of a credential onto another
276300	282380	credential. Just a direct copy. Card emulation would be to make a digital copy of a physical
282380	288520	credential. With the, and emulating that with a device, like a Proxmark 3 or a Flipper 0. A
288520	295100	real world use case for this would be the HIV transitional credentials called SR, I-class SR.
295560	303120	And uh, those have a unique part where these uh, the secure part of the credential, the secure
303120	307800	identity object is actually s- is actually cryptographically bound to the card's serial
307800	313900	number. And since there are no uh, serial number changeable I-class cards, you're unable to
313900	321380	make a uh, direct copy, which means we're going to emulate those. Here are just an overview of
321380	326200	all the different uh, HIV credential types. Starting with Prox. It's a bit out of scope for
326200	332920	today's topic, but we have a reader here anyway. It's a, it's a low frequency credential. And
332920	338880	then moving on to around 2000, we have I-class Legacy that first came out. And uh, those were
338880	346800	unique because those were actually encrypted with a 64-bit key. These were broken in 2010 by a
346800	350740	Milos Mariak during the Heart of Darkness attack, where two readers were actually
351280	357740	destructively attacked in a way to dump the firmware to derive the master identification keys.
357740	362900	Going on to around the 2010s, we have the uh, we have I-class SE, also known as the
362920	373820	SIO-enabled. SIO meaning secure identity object. And SEOS would still be the uh, flagship
373820	381980	credential from HID up to today. So we're going to go over a few possible attack vectors. So
381980	387980	we're going to go over card-only attacks, and card and reader attacks. Card-only attacks are
387980	392580	very simple because it involves one thing, the physical credential itself, and that's it.
392580	397660	But you can only do a limited things with um, with just a card. One attack that's possible is
397660	404120	just a downgrade to IPOC Legacy, because they would just send the same PAX payload on a
404120	409760	different type of media. You can think of cards as just an encrypted storage device, like a
409760	414740	USB stick, but crappier. Since you can just read the distance from quite a distance in the
414740	422240	case of I-class. The power efficiency, simple cryptography, and the ISO 15693 protocol all
422240	431180	contribute to enhanced read ranges, using long-range readers. This is when card and reader
431180	437320	attacks come in. Card and reader attacks are very fun, because you would think the reader on
437320	444000	the building is there to secure the, secure the building, right? But we're going to use that
444000	449280	exact reader that's outside the building, and use that to compromise the security of the
449280	460630	building, which we'll get into a bit later. So how secure are each of these HID credentials? So
460630	465010	starting with the least secure one that is broken for over a decade now, we have I-class
465010	471570	Legacy. The cryptography is completely broken, keys are leaked. Card's serial number is not
471570	477910	relevant in the PAX payload, which means cloning is extremely trivial. And elite keys are
477910	485310	recoverable by low-class attack. PAX payload is easily transferable by copying block six to
485310	493250	nine to another card. We have I-class SR, which is a transitional conditional, and the
493250	498810	application instruction area on the card is going to tell the reader that it has a secure
498810	507130	identity object. This is good for transitioning between buildings that have SE, secure readers,
507130	513010	and legacy readers. And these are easily downgradable to I-class Legacy, or you can emulate
513010	519970	this credential with the correct card's serial number for a complete clone. Going to I-class
519970	526850	SE, standard key and the key deprivation function are not leaked, and the keys are not
526850	533090	recoverable by low-class. Currently we still do not have the master authentication key for SE.
533090	538930	These can be standard, elite keyed, or custom keyed, and these can also be duplicated if it's
538930	547530	an open format, like HID 26-bit, and you'll be able to use a HID encoder to create another SE
547530	554270	card, actually a legit copy, because they are freely encodable. It's an open format. These are
554270	560270	also downgradable to Legacy or SR, and these can also be emulated, which we'll get into, and it
560270	567590	will work on most readers. So we're going to get, so how are we going to get past HID readers
567590	573050	that are enforcing secure credentials? The first would be a downgrade. So using official HID
573050	578550	hardware against their credentials to perform downgrade attacks. So we're going to use a HID
578550	582490	Omni-key reader, which is the official HID hardware that plugs into a computer, acts like a
582490	590250	keyboard, and we're just going to configure it to spit out the payload data, along with the
590250	596110	commands in the Proxmark 3 to just make another copy without ever typing on the computer. We
596110	615370	have a quick demo of this here. And one of the cards is SE and one of the cards is Legacy. We're
615370	619910	just going to put the Legacy card on the Proxmark, and we're going to read the SE card on
619910	640200	the HID reader. Types out the command, and there you go. The downgrade is done. Like this person,
640220	645480	said, like the cheapest way isn't even to use the flipper with that add-on board to downgrade the
645480	651460	SE cards anymore. You can literally just buy that HID reader on Amazon for about $130, load up
651460	660120	that config, and it's ready to downgrade any amount of standard keyed SE credentials. So now
660120	665520	we're going to get into iClass SR. We have another way. So we're going to emulate an iClass SR
665520	670820	with the correct card serial number and the secure identity object. And to accomplish this, we're
670820	674980	going to actually need to do something special, which is dump the SIO, the secure identity
674980	683020	object. So here in this example, we're going to get the publicly accessible parts of the card,
683020	687920	which is the uh, the card serial number, the EPRS, and the application instruction area from
687920	693020	that iClass SE card. And we're going to populate those values in a dump file and get them ready
693020	700260	to emulate. And that those bytes 0006 instructs the reader that, hey, there is an SIO. We're
700260	703740	going to use the reader on the building that's supposed to secure against, secure the
703740	712740	building against, like attackers, to generate a successful challenge to dump the card. So once
712740	716640	you have emulated that partial card against that reader, you're going to gather a trace. So
716640	720240	that's what the reader is, that's what the reader is sending to the card and we're intercepting
720240	727440	that data. And we see here, where we underline here, as that there is a MAC that we got. A
727440	730620	message authentication code and that is what we're going to use to generate a successful
730620	737660	challenge to dump that credential. So, after we have got, gotten that, we're going to run
737660	743200	that standard dump command and what, what you got? The card just puked out all of its secure
743200	748880	contents that's supposed to be secure. So manual dumping of that SIO is possible on the
748880	755420	command line. But to build on that recently, Eric Betts, Betsy, also implemented NRMAC
755420	760140	dumping on the Flipper Zero very recently with a very intuitive workflow. And this allows
760140	764600	reading the publicly accessible parts of the card without authentication. Emulating that on
764600	772700	the reader and, and using that to generate a successful challenge to dump the card. This as a
772700	777880	side effect also allows users of the Flipper Zero who do not have a NARD add-on board or the
777880	786040	secure access module to dump the credential, send it to someone who has that reader and to use
786040	794240	that, to use that and use that to decrypt the copy and make a logical copy off-site. So, we're
794240	798240	going to prepare our traditional, transitional credential by just transferring those over to
798240	807580	the, to another card. Like we see here, those, the blue blocks are transferred under the, under
807580	818890	the legacy payload and there we go, we have the SR credential already done. So, now we're
818890	825490	going to get into the readers that enforce secure credentials. So, now we do have, since we
825490	830910	have a full dump of that SE card already, we can emulate the high security SIO only secure
830910	835750	credential using a bug in reader firmware that was originally discovered by NVX about a year
835750	842630	and a half ago and also ported over to the Flipper Zero by editing some code. So, these
842630	850090	actually work on signal readers, revision uh, on firmware 10.0, 5.6 or older and REV-E
850090	854150	readers are still not patched at the moment. And you can also use reader manager to inspect
854150	857570	those signal readers without even being close to them and you can verify what firmware they
857570	873380	are running. So, we can make, we can make installations more secure in a few ways. By using a
873380	880460	high security key set, such as standard two. Elite custom keys for SE installations. Updating
880460	885220	firmware. Disabling or disabling all legacy technologies that issue secure credentials, such
885220	891620	as SEOS, Desfire, mobile credentials. And now we're going to get into some fun stuff. What not
891620	897180	to do. Over the years I've seen a lot of terrible installations of secure credentials being
897180	903300	issued to clients. Such as this one here. You can see this is a very popular vendor in
903300	907260	Canada. They're located in BC. And they have all the latest signal readers on all their
907260	911640	buildings. But um, all their readers are pro- all their credentials are programmed with the
911640	915080	same facility code as laid out in their official documentation that's available publicly
915080	922920	online. And what do you know? All the, all the legacy technologies are enabled on that
922920	930200	reader too. So, yeah. You can just, they are easily downgradable. And that's not even the
930200	935220	worst part. Is that you don't even need the credential to make a copy. Because since we
935220	940400	know that the facility code is the same, we can just uh, if the numbers aren't rubbed off on
940400	944700	the back yet, we can just uh, take those numbers and just encode another one. And it's
944700	951760	going to work. So given what we know, we can literally make a copy of that FOB in that
951760	956420	picture there. And we can make a logical copy that is going to work on all of those readers
956830	964730	from this specific integrator. And that concludes my presentation for today. I want to
964730	970230	say I have a special thanks for the RFID hacking community. Uh, Eric Betts, also known as
970230	975970	Betsy, has the uh, pretty good documentation on all the uh, I-class uh, credentials and how
975970	982250	the data is laid out. NBX, who discovered, originally discovered the authentication
982250	989950	bypass bug, which allows working uh, allows um, working I-class SE emulation, as well as the
989950	996670	people class emulation code for the Flipper Zero. Kate, or Miss Steel Dev, genius on all
996670	1003430	things HID, and have to thank her for uh, taking in my uh, HID readers that I have
1003430	1012150	ricked by bad firmware updates. And Iceman, and I wouldn't be here without Iceman urging me
1012150	1019850	to do this talk on uh, I-class SE today. So if you have any questions, I'll be at the NFC
1019850	1025170	table in the RF village. And thank you for attending.
