start	end	text
0	2900	Okay, so hacking hotel locks.
4680	6020	Okay, thank you.
7720	13060	Yeah, so we did our talk on expanding on safe lock vulnerabilities that were discussed last year at DEF CON.
13140	20140	There was a number of things excluded in the talk, and there were some different areas they didn't investigate, so we wanted to kind of elaborate on those.
20140	27340	We also are hosting a demonstration on some of this at the physical security village, so if you're interested, stop by after the talk.
27340	28480	We'll mention this again.
30000	31200	So about us.
31280	32480	My name is Noah Holland.
32480	34380	I'm an undergrad at Michigan Tech.
34380	44200	I'm the president of the Red Team and Linux Users Group clubs, and I host the Access Control Village at various conventions and am a co-founder of BadSec LLC with Josh.
45740	46560	I'm Josh.
46560	48120	I'm a Michigan Tech alumni.
48460	51940	I co-host the Access Control Village with Noah as well.
51960	59120	We both co-founded BadSec LLC, a recent failed PCT through Hyper, and a proud owner of an HPC 1200.
62220	64160	So about this talk.
64360	68040	This builds on the original unsafe lock presentation from DEF CON 32.
68400	73380	We'll briefly recap how the exploit works, but we're not going to go over, like, everything they covered in the talk.
73380	82920	It's more specific about how this works compared to ULC and how we managed to re-exploit the new patch systems.
83540	86680	I highly recommend watching the original talk, if you haven't seen it already.
86680	88480	It's pretty crucial to understand this talk.
88480	91780	So just afterwards, if you're able to, just check it out on YouTube.
92500	94300	It's very well constructed.
96200	102460	So first, in order to understand really what the issue is with the system, you need to understand PAX.
102460	105540	So PAX is Physical Access Control System.
105540	107080	That's what it stands for.
107080	111940	And the original talk didn't really cover the technicalities of how this works.
112120	118080	So with online PAX, that's what's most common for a lot of commercial systems and organizations.
118080	121780	That's where the credentials just have a facility code and a card number.
122160	125440	Usually this is encoded in something called the WGAN format.
125520	129680	The card numbers are then tied to individuals, usually on the server side.
130340	134920	So it's transmitted from the card to the reader, to the controllers, to the upstream server.
135600	139080	So I do have a nice animation for that, but you guys can't see it, unfortunately.
139840	149560	So it does get cross-referenced in a database that defines access, usually customizable with like a web interface or their proprietary program from a software vendor.
149760	155500	So the controller just speaks to the server, hey card number 123 wants to open door 100.
155500	159740	Then the server looks up in its own database, oh card number 123, that belongs to Bob.
159740	160820	Accept entry.
161780	168700	And of course, you get centralized audit logging, you can get real-time alerts for if someone tries to tap into a location.
169400	171780	But how does this actually relate to hotels?
171780	173900	Well, it doesn't, and that's the problem.
173900	176320	So this gets us into offline packs.
176320	184160	This is the other form of an access control system where you have just the card and the reader, and they both serve offline.
184160	186220	They don't communicate with the internet.
187440	193560	And so it's a pretty common approach for hospitality systems, the access data is encoded directly on the card itself.
194080	199540	And now, of course, as a security folk, what's one potential issue with this approach?
199540	201800	Well, it's significantly more insecure.
202300	212040	Privilege escalation is much easier, and there's a lot less audit logging because you have to go to each individual lock to check what its individual audit logs are versus having a centralized holistic view.
212880	216820	And logs have to be stored either on the cards or the readers.
216820	230380	And technically, some of these systems now are semi-offline, so you can get Zigbee or other IoT protocols, and they can send audit logs back to a central server, but their authentication mechanism is still primarily offline.
233020	241300	And so hotels do have a number of unique use cases, pretty much just that not all the readers can be networked, so that's why it's so common.
241300	245720	Although they don't really need it for every single reader, it's still common.
245720	248920	Industry practice is supposed to have all of them offline first.
249860	251640	So first learning of unsafe lock.
252180	258280	The first coverage we heard about it was when it was first brought up in news articles around March 2024.
258360	260240	This was covered in our Red Team meeting.
261500	277280	And then eventually, later, fast forward to August, we saw the talk at DEF CON 32, and Josh recognized one of the presenters, Ian Carroll, where he went to the same high school, and he found this picture in his yearbook, which I think is pretty fitting.
279540	284840	This is where we understood that it was a fairly popular line of hotel locks.
285140	295460	There was a vulnerability that allowed for creating master keys, and that the cards used MicroClassic as a container of sorts, or their actual encrypted at-rest data.
295940	300640	And they had weak security through obscurity, like encryption, if you can even call it that.
301620	309740	And the deadbolts were software controlled, which was kind of the real smoking gun of the talk, was that when you hack these locks, you can then override the deadbolts.
311060	318940	But they really emphasized at the end of the talk that this was now patched, there's nothing to worry about, all the hotels on the strip got patched.
318940	324700	So it seemed like a pretty neat exploit, and a neat journey, but we didn't really think much of it in particular at the time.
325420	329940	However, this all changed when I moved into a new apartment.
330300	332960	It wasn't even being finished, constructed yet.
333080	340520	The picture that's included is my first day walking in to pick up my fob, and there's still the construction paper on the side of the building.
341220	343700	And they still use construction cores for all the gates.
344400	352900	So when I scanned my apartment fob with a flipper, just to back up the key so I had a spare, I noticed it was able to parse the data.
352900	354760	And some of this data sounded familiar.
354800	363180	So I looked into it more, and I realized it was unsafe lock, that there was now a parser on the flipper, yet this was in an apartment, not a hotel.
363180	364220	So what does this mean?
364220	366420	Well, this gets into Sapphire locks.
366420	369320	So Dora Macabre has more offerings than just safe lock.
369420	371160	Sapphire is one such offering .
371400	376580	But the important thing is the bit format and the encryption is the same between their different products.
376600	388900	So unsafe lock does affect more than just a specific safe lock line of locks, and they did mention that in their website, that it does affect a few other brands or a few other lines from Dora Macabre.
389960	395100	And then we also noticed that data seemed to be written to the card in each taff, and so we eventually figured out why that was.
395860	402620	So this gets us into ambience and community, which is the current software that's needed for hotel systems.
402720	407700	This is what they mentioned in the unsafe lock talk that Dora Macabre is trying to move everyone on to.
408040	413200	So it's a web-based solution, but it's locally hosted at the hotel property.
413440	416680	Users guides include what ports need to be forwarded.
416680	425580	So with this information, we can then plug this into Shodan, and we can find a ton of online ambience installs connected to the internet.
425580	431440	Now, this does only work when a server is really egregious and has their database open as well.
431520	444900	If it's just the web interface, the only identifying text of safe lock or ambience or community or any of the kind of real easily identifiable text loads after the fact with JavaScript.
445000	449340	So simple scrapers like what Shodan has don't catch it.
450880	453640	But getting access to these in general is hard.
453640	455760	Like, of course, you could pull up the web interface, but that doesn't help us.
455760	458600	We need access to the actual software to understand how it works.
458600	464520	But we don't need access to ambience and community since the structure is shared across solutions.
464520	471420	We can do the same thing that the original talk creators did and use system 6000 instead where all the fields and the format is still the same.
473100	476340	So this is where we set off on building our own lab.
476340	482480	We acquired a copy of system 6000 online and ordered some parts off eBay.
482500	491180	About $60 for two encoders, $60 for a demo display lock, and $100 for a parts are not working HH6, which actually worked fine.
492140	496520	Ordering the HH6 is always going to be the most difficult part because there's a ton of different names.
496520	500920	It used to be the LPI, then it was the M unit, and now it's the HH6.
500920	502880	So you have to look for all three of those on eBay.
503740	505520	And there's a ton of different variants.
505600	509940	So you want either the 007 or the 009.
510160	512700	That's for programming over serial or NFC.
512700	519200	Or some of those older variants go through different locks such as Oracode and they don't work on SafeLock.
529960	533060	A lot easier to use Firebird editor Pro 32.
533220	535240	That's a completely free program.
535240	536040	You don't have to pay for it.
536040	537120	There's no trial.
537860	551320	You just have to put in the library of the Firebird client that SafeLock itself uses and then plug it into the database and the same username and password that was discussed in the original talk gets you access to the content.
551520	559720	So we were able to set the property ID of system 6000 to the same one as the apartment and that gave us access to start manipulating the data.
560620	564420	From here, we were curious on what more we could learn about the system.
564420	565960	So we started looking at the patents.
566380	574560	I first saw them listed at the bottom of the system 6000 and the MT RFID, that was the lock body type we had, the owner's manuals for them.
574560	577820	It just said protected by patents and it gave a nice list.
577820	579440	So I just looked all of them up.
579440	587220	And I found quite a few patents from early implementations of SafeLock, but all of them still apply to the current system.
587640	590780	So the most recent one was filed in 1993.
590780	598420	Some of them date all the way back to 1977, but that was more of like an experimental system, so that doesn't apply to any current-day systems.
598980	605440	It was extremely useful for finding out the bit fields, because they're all labeled in the patent.
605440	610720	It'll tell you exactly, like, this, the key type needs to be set to 7 for this type of a key.
611060	618920	So I'll show, well, normally we'll show more pictures, so just skip to the next slide on your guys's phones.
619840	621700	But there's some visuals.
621760	624680	The patents really have everything you would ever want on there.
624680	629980	So I'd recommend, if you're interested at all about learning more about SafeLock, check these patents on your own time.
630840	633060	So now this gets us to recreating the exploit.
633060	638460	Now that we knew a ton about the system, we were interested in recreating the emergency keys.
642330	643070	Cool.
643070	648310	So this is the point where we got to where the original UnsafeLock talk was when they finished.
648310	654270	So if you look at the image, those are the first two valid working keys we got to do the exploit.
669350	670150	Testing.
672750	673150	Testing
683730	691680	, check, check, check, check, check, check, one, two, one, two, yep, okay, cool, okay.
691680	701880	Anyway, so we got to the point where the original guys were and had working keys, but for people who haven't seen the original talk, here's a bit about how that exploit works.
702060	705060	So data on the card.
705140	709260	So all data that's important to the cards is stored in 17 bytes.
709260	716780	It's in a red box on that listing of bytes there, stored in sector zero, and the data is encrypted.
717440	719640	So that gets us to the encryption algorithm.
719720	721660	A bunch of rudimentary operations.
721660	725200	It's like a substitution table and some bit shifts and some random other stuff.
725460	727340	And it's the same for every single property.
727340	734040	So every hotel on every card that used the SafeLock before it was patched, all data was encrypted with this stupid thing they invented.
734240	738040	So if you had that algorithm, you could decrypt all the data for every hotel.
738820	743960	And then this is an image of some of the commands run from our tool where you can decrypt some of the data.
745060	747120	So what's actually in that data?
747300	753400	Well, if you look at the next image, it'll show the card format and then kind of like a description of some of the fields.
753660	757820	So there's like your check-in, check-out date, if it overrides the deadbolt, if it opens the door.
758140	760520	But of these fields, we only care about a couple.
760520	763980	So that gets us to the different card levels and different card types.
764300	768040	So the card level defines the purpose of your hotel card.
768080	774480	As you can see in that image, there's like guest key or like suite key or section key or grandmaster.
774720	777840	And that basically tells you like what the card is used for.
778080	780780	And then there's another field that's the card.
780780	782820	The card type is like what the card does.
782820	784980	So not all cards open doors.
784980	786500	Some can program the lock.
786540	789400	Some can inhibit the door or stop certain keys from working.
789640	792580	Some can re-sequence the lock, which we'll get to in a second.
793920	806600	So if we have like a user key, if the hotel gives us a card and you want to make a master key out of that card, theoretically, you could just decrypt the data, change that bit, make it a master key, and then re-encrypt it and put it back on your card.
806920	809820	Except there's one thing stopping us from doing that.
809820	812560	And that is the sequence and combination fields on the card.
812980	816060	So every lock has a different combination value.
816700	820040	And then each level of card has a sequence number.
820040	827700	So like if they give someone a card of sequence number one, the next person checks in sequence number two, that's going to invalidate the previous card of sequence number.
828320	833440	So it will only read a card if that card has the correct sequence and combination field.
833480	835620	But we don't know what that is.
836040	840160	So you can kind of think of it as like a passcode that needs to match for the card to be read.
840300	842640	So how did they exploit this in the original talk?
842760	844800	They used re-sequencing keys.
845240	852400	So re-sequencing cards, they can re-sequence or basically change the sequence number on that lock.
852820	857100	And because the sequence number and combination are meshed together, it changes the whole value.
857100	864040	So if we just imagine the sequence and combination field as like a password for the lock, we're basically changing the password to one that we know.
864040	865200	So our card works.
866000	871680	So the animations, I guess, don't work because it's a PDF, but you can kind of see how it works.
871680	876340	So we have a lock and we know the property ID is five because that's on our card.
876340	885340	We make a re-sequencing key at the emergency level to set the emergency sequence and combination field for that lock to one, two, three, four.
885660	892800	And then now we know it's one, two, three, four, so you can use our attacker emergency key on that door and it will open the door.
893120	897140	So these two keys in combination can open any door in a property.
897140	898760	And that's what they found in the original talk.
900320	901700	So custom tooling.
901860	908700	So when we were also figuring this stuff out and recreating what they did, we wrote up some tools for the Proxmark.
909060	914020	We will submit the PR for these tools after DEF CON for reasons we'll talk about later.
914460	922500	This tool doesn't perform the auto-exploit, it just lets you dump the data and modify the data, but it's pretty easy to exploit a hotel with this tool.
922680	926140	And if you look at these images, HF safe lock, this gives you the list of all the commands.
926900	929420	HF safe lock read will dump all the data from your card.
929560	933500	And modify, you can modify specific fields on a safe lock card.
933500	938080	If you come down to the PSV, we have a booth with this running and you can play with it and test it out.
938560	941100	We also have three safe lock locks you can mess with as well.
941620	950280	One thing we found as well, aside from those 17 bytes on the card, farther down on the card, there's a couple of other things that are stored that they didn't talk about in the original talk.
950580	952300	So there's two things that are stored.
952460	954320	The first is logs.
954840	961220	So if I tap my card on a door and it doesn't work, it will actually write data to the card saying, your card didn't work, here's why.
961460	963300	So our tool will parse that as well.
965320	966820	Both of these are stored unencrypted.
966820	969120	The other thing that's stored is variable keys.
969140	975760	So if I have a key and I want to also open another door, they just store the value of that door unencrypted farther down on the card.
975940	985020	So if I have a card that opens lock five and I want to also have one that opens lock seven, they'll just put seven and some other bits like at the bottom of the card as well.
985160	989000	So they didn't talk about either of these in the talk and our tool will parse both of these.
989200	990540	And then you can see the three images.
990760	994800	The first one in the top right, that's the extra data on the card.
995040	998660	And then on the bottom right, you can see the different fields.
999460	1004440	So it'll tell you like the error codes and the time it was tapped on the door and other stuff.
1004440	1009140	And then you can see their command safelock interrogate, that will tell you the other locks that a door can open.
1010660	1014340	So we thought we'd be the first people to publish a working exploit.
1014900	1023000	However, we saw this, we were reading Dormakaba's website, the manufacturer of safelock, and they released a statement saying somebody released a public exploit for this.
1023000	1024780	And we were wondering who could it be.
1024800	1034240	So we googled around and we managed to find a Flipper full attack tool that's similar to our tool, which was for the Proxmark before the Flipper, three days before their announcement.
1034240	1035780	So we're assuming this is what it was.
1035780	1041480	But somehow it had zero GitHub stars and zero forks and nobody had found it yet, I guess.
1041480	1043200	So I don't think anybody knows about this yet.
1043740	1047320	But story time, the readme is really funny on why this guy made this.
1047320	1055280	So he lived in an apartment complex and the company that managed it managed 25,000 units across Seattle, and every single one of those units was using safelock.
1055280	1060060	So he goes to the management and he says that, hey, these doors are vulnerable, you know, you got to fix this.
1060060	1061300	And they say no.
1061300	1063300	So he makes a master key and he mails it to them.
1063300	1065640	And they say, sorry, we don't believe you, it doesn't work.
1065740	1067680	And then they threaten legal action against them.
1067680	1069220	So he published this full exploit.
1069220	1070520	So we thought that was kind of funny.
1070920	1072320	So check that out later.
1072920	1077620	So yeah, there's an animation we made of like a card going into an envelope and being mailed, but it doesn't work on nothing.
1077840	1084420	So now Noah's going to talk about the HH6 programmer that's used to program locks and get into some more stuff that we found about that.
1087450	1091590	Yeah, so the lock programmer, we'll just call it the HH6.
1091590	1093250	That's the most recent thing they've called it.
1093830	1095590	That's their handheld programmer.
1095930	1102730	It works over NFC and serial primarily, although you can also find models that work over Bluetooth, ZigBee, infrared, and a few others.
1103390	1104310	JTAG was locked.
1104310	1107130	We did try to hook up to the JTAG port that was on the board.
1107130	1108050	That didn't work out.
1108050	1111630	We also tried the lower level serial debugging, and that was locked.
1111710	1114170	However, the MCU does have a known vulnerability.
1114490	1117870	So we don't own a Pico EMP yet, so we couldn't exploit it.
1118310	1122270	However, it is still possible to run that exploit, and that's something we'll be looking into in the future.
1122270	1124250	And I would recommend others do as well.
1125150	1130750	Because the original talk said that the HH6 errors out if there's a mismatched property ID.
1130750	1136470	So if you program it with your own property ID of like one, go to a hotel that has property ID 100, then they shouldn't work.
1136470	1138010	This is actually incorrect.
1138110	1141830	You can interrogate any lock with an HH6, even if it's from another property.
1142430	1147510	And you can get the shift times, so you can know when housekeeping comes and goes and whatnot.
1147510	1150170	So in theory, that could be used for plans of attack.
1150170	1153150	But more importantly, it gives you the property ID.
1153290	1159070	So you actually don't even need to find a discarded hotel key to get the property ID of a facility .
1159250	1164430	Because especially if you've noticed in Vegas, now they've kind of wisened up and they have these return key boxes.
1164430	1167310	They don't even let you just put it in a bucket on the counter anymore.
1167310	1170830	So it has like a slot to try to prevent people from pulling them back out.
1170830	1172170	Well, you don't even need them anymore.
1172170	1175690	You can just go directly up to a lock, plug in, and you're good to go.
1176410	1181490	Now it's significantly easier to exploit because you don't even need hands-on access to a card.
1182310	1190770	And the HH6 does support something called ELPS, the emergency lock power supply mode, where it essentially just emulates an emergency key to the lock and pops it open.
1190770	1195010	So that means it is possible to pop open the lock over that serial interface.
1195570	1209710	So this is actually similar to another exploit that was released in 2012 for a different hospitality lock manufacturer called Onity, where he released a tool for the Arduino where you plug it in and it pops open the lock.
1210550	1215230	Some locks, that's misspelled on there, it's supposed to be S-A-F-F-I-R-E, Sapphire.
1215310	1218990	You can do the whole thing over NFC because that's how they do their programming.
1220090	1224750	And so, yeah, the original talk, their bullet point was errors out if the property ID of the lock is wrong.
1224750	1229030	I'm not sure where they got that from because it's never once happened in our testing.
1236730	1238290	So on to Onity.
1239010	1240750	There's some images here.
1242550	1249870	It was broken by the now Sarah Brocious, I think I'm saying that right, goes by Dakin Online.
1250830	1254650	They worked for a startup, reverse engineering Onity products.
1255570	1264850	It was called the Universal Platform Management Corporation, which went bust and then just sold the exploit they found to law enforcement for $20,000 and did nothing else.
1264850	1266850	So they just completely went under.
1267130	1274210	However, they got a 2012 Black Hat talk out of it called My Arduino Can Beat Up Your Hotel Lock.
1274210	1278630	They also published the full paper on our website.
1279190	1285350	And the technical aspect of this exploit was that the programming port allowed for memory access.
1285790	1295170	So what you would do is you would plug in an Arduino into that port, read the section of memory that contained the hotel's site code, and then you would use that to pop open the door lock.
1295170	1299810	So something very similar to what you could do with an HH6 for SafeLock, which is why we bring it up.
1300330	1307870	At the time, there was a whole huge media frenzy of this $6 tool can open millions of hotel rooms.
1307910	1311370	So it was very much kind of a hot topic for a while.
1311370	1323150	Onity's response was, well, you can get a plastic cover to keep those dastardly hackers out, or fill it with epoxy, or you can pay them for a full PCB swap.
1323150	1326350	And not many places did that predictably.
1326790	1328890	So I think it's kind of interesting.
1328890	1330830	The response at the time was a bit varied.
1330830	1335730	So on one hand, from the hacker community, we got the James Bond marker.
1335890	1340370	And on the other hand, there was a Texas burglary spree using the same exploit.
1340890	1349390	So kind of like the hacker and criminal side, which is why later on we'll talk about why we are waiting until after DEF CON to release our findings.
1350030	1357110	So Dormocaba's response to the original unsafe lock exploit was a little better than Onity's response.
1357110	1362510	So they claimed one year ago that 36% of properties had already been patched.
1362510	1368010	As for what the fix is, Dormocaba released what they called the lock update project.
1368010	1376010	That's kind of their whole collection of materials to update these hotels to be secure.
1376790	1379430	Their mitigation solution, they call it a two-part.
1379430	1384990	The first part is upgrading hotels away from MyFair Classic onto MyFair Ultralight C credentials.
1384990	1391050	And then the second part is using a per-site diversified AES-128 key for that encrypted at-rest data.
1391410	1397150	Unfortunately, a lot of hotels are still stuck on that first step.
1398330	1404070	But yeah, so I mean, every hotel we tested was using Ultralight C.
1404070	1405690	So problem solved.
1405870	1410590	A great example of a company fixing a vulnerability in a decent timeframe with a quality patch.
1411370	1415030	So we're going to do like a fake-out talk ending here, but it doesn't work because you can see all the slides.
1415750	1423650	So basically, in the original talk, they said, if the hotel you're staying at has changed to Ultralight C cards, they are not vulnerable.
1423650	1424950	And that is not true.
1424950	1428110	So we're going to talk about exploiting Ultralight C for fun and profit.
1428350	1429830	So exploiting this in real life.
1429830	1432390	So I went to Noah's house a week before this talk.
1432430	1433230	He's in Minneapolis.
1433230	1434390	You can see the Google Maps.
1434390	1439690	We just looked up hotels online and went on finding vulnerable hotels.
1439690	1440910	So we went on Google.
1440910	1442610	We looked through all the hotels in Minneapolis.
1442830	1448050	And if you look through reviews on hotels, you can eventually find a picture of one of the locks on one of the doors.
1448210	1454310	And we identified a bunch of hotels finding safe lock, and we drove around and went to them to investigate.
1454630	1458550	And you can see some images of Google reviews with red boxes around the locks.
1459010	1460110	So hotel lock war driving.
1460110	1464750	So here's us in the car, driver ground with all of our stuff, and I go into different hotels to mess with stuff.
1465370	1469730	So step one to exploiting ULC safe lock.
1469750	1470790	It's slightly different.
1470790	1472810	Because on MiFair, the cards are cracked.
1472810	1474770	So you can just read all the data off a card.
1475190	1478070	However, with Ultralight C, they are not cracked.
1478070	1480510	You cannot read the cards without a proper key.
1481550	1487590	So what you can do instead is the card uses a handshake that is secure.
1487650	1490790	However, after the handshake, the card will send all data in plain text.
1490790	1500250	So if you look at this image, that's us sniffing the data between the card and the reader, and then us decoding it with our tool, and it's the same data as before, just in a different box.
1501450	1503370	So that's how you get the property ID.
1503670	1506970	Or also you can get the property ID with the HH6, like we said before.
1506970	1513350	So you can just walk into a hotel, plug up to a lock for one second, you can see the image there, 428, and that's the property ID.
1513370	1516830	And that's all you need to make valid cards.
1516990	1519610	So next thing you need to do, step two, encode card data.
1519890	1527650	Just like before, take your bytes that you got from before, and then you can change the level and change the card type and all that to make your two different cards.
1528450	1530950	And then writing it to a card is the next part.
1530950	1535630	And that's also difficult because you don't have the keys to the card, so you can't write back to it.
1536090	1541570	However, people have cracked the KDF for SafeLock ULC.
1541630	1556250	So you can go online and actually just find a dump of a full card that has a valid UID key pair, and then edit that, and then emulate that with a flipper or Proxmark or put that on a UID changeable card, and then success.
1556370	1560330	So two taps, one, two, and then there's a picture of me jumping in the pool at the hotel.
1561570	1566850	There's an alternate method if you own an encoder for SafeLock, one of the cheap encoders.
1566850	1571510	They're super cheap because after the original talk, you could buy them because no hotels wanted them.
1571790	1574630	And even at the hotels we went to, they were using the new encoders.
1574970	1578030	But for some reason, it doesn't fix anything.
1578150	1581210	So you can get the keys from the encoder.
1581210	1594110	So you take the hotel card that you have that you want the keys for, you put that UID on a UID changeable card, and then you write to it with the encoder, and it will write the keys in plain text to that card, and you can sniff that with the Proxmark.
1595990	1603250	And then there's your keys, and then you can read and write to your actual hotel card like you would like a broken BFRAC classic card that you had the keys for.
1603430	1604750	And there's some images of us.
1604750	1611590	You can see the write command, which is A2, and then it's writing some of the key, and then you can see us testing the key, and it works on the card.
1613430	1614450	So yeah, here we go.
1614450	1619600	So the current state of SafeLock.
1619600	1624600	So the good news is in our search, we only saw one facility that was still using MyFairClassic.
1624600	1627000	The vast majority have upgraded to Ultralight-C.
1627000	1632560	But the bad news is almost every hotel that we saw that was using Ultralight-C was using standard security.
1632560	1636120	That's in Dormakaba's two-pronged update solution.
1636120	1639320	They're on step one, so they didn't finish the update.
1641080	1650680	Yeah, it takes less than a minute from the time you would plug into a lock with an HH6 to the time that you could get a working key with Ultralight-C, and that would be a working master key for the entire facility.
1651400	1653540	So the good news is a patch does exist.
1653980	1656720	Even if most hotels haven't done it yet, they always can.
1656720	1665400	And it's, as far as I know, a free patch, so you don't have to explicitly pay them $10,000 to get your per-site diversified key, like with other vendors.
1665980	1673480	So we did want to survey Vegas when we got here, because in the original talk they said everyone was patched, so we wanted to verify that, so we went around the strip.
1673480	1686320	Almost all properties are indeed fully patched, but at least one was still vulnerable, so we were delaying the release of our tool until after DEF CON, just to avoid any potential mishaps and to give them a little more time to patch their system.
1686500	1692300	That's kind of the last push they're going to get, though, because there are already tools out there even besides ours to this day.
1692640	1695580	So really, if you have a hotel, make sure you patch it.
1696440	1703840	But the bottom line is upgrading to Ultra Light C alone is just a real marginal security benefit over MyFairClassic.
1703840	1711480	The KDF isn't known, but you can get around that, and it might take a little bit longer to make a key, but ultimately that's not really secure.
1711800	1717420	Unless you're using enhanced security, in which case then you're fully secure and you don't have anything to worry about at this moment.
1718400	1721640	But yeah, so if you're not using enhanced security, you're still vulnerable.
1721680	1724340	That's kind of what we want people to take away from this talk.
1724380	1736160	In the original security pyramid that Dormakabba released, where they have like standard security, enhanced security, everything that is standard security and below is actually just insecure.
1736160	1738560	They should really just say it's insecure completely.
1738560	1747540	And everything that's that enhanced security and above, then that's the only thing that's even baseline secure, that people can't just walk in and get a master key for your entire facility.
1748320	1752740	Dormakabba really doesn't make this clear enough in all of their update guides for hotel administrators.
1753400	1758260	So new buildings to this day, like we saw with MyApartmentComplex, are installed with MyFairClassic.
1759220	1765000	However, most of the hotels we saw with Ultra Light C, even though they're on standard security, have since upgraded.
1765000	1771200	So it's a bit of a mix, but really just trying to put the word out there that you need to be using Ultra Light C with that enhanced security.
1773720	1777400	So we have been discussing this with a lot of different integrators at conventions.
1777460	1779380	This is not unique to Dormakabba.
1779380	1783740	They've actually been handling this relatively well as far as the industry goes.
1783740	1786080	It's really just an industry-wide problem.
1786560	1793640	Cutting costs really impacts security, especially when hotels will always just buy whatever is the absolute cheapest option there is.
1794440	1799920	So when you have to pay like $10,000 for a per-site key, then a lot of places just won't do it.
1799920	1806300	So there is some props for Dormakabba there for not charging extra for proper security.
1807440	1811400	So going forward, there's a lot more possible research that can be done, even into just SafeLock itself.
1811400	1813180	So we didn't look much into MagStripe.
1813180	1821060	We didn't really find it much, so it might not matter too much, but it does use the same format as the RFID cards, the same encrypted 17 bytes of data.
1821500	1828380	Reverse engineering the HH6 to its completion and checking out more of the variable key possibility.
1828380	1835560	Since variable keys are unencrypted and they do work on Ultralight C, even though Dormakabba says they don't, you can program them on there.
1835560	1844460	That's possibly an attack factor for even an enhanced security system to allow attackers to have a little bit of access to manipulate doors.
1845360	1850880	So if you're interested in learning more, we do have a demo lab set up at the PSP where you can mess around with a fully working install.
1850880	1856220	We have System 6000, an encoder, the HH6, and some locks ready for you to just poke around with if you want.
1856440	1860120	And then we also have our Proxmark tool set up and ready to go there.
1860120	1862680	And then you can ask us any questions you might have.
1863080	1864600	Just look for the green shirts.
1864980	1867220	And then I would also recommend the Iceman RFID Discord.
1867220	1874660	If you're not already in there, that's probably one of the best single resources for anything RFID-related that's out there at the moment.
1874860	1877520	So yeah, any questions?
1880400	1881700	Yes?
1881700	1884460	You talked about sequencing the keys.
1885900	1888960	So I have two aspects to that.
1888960	1891820	How does that work with things like elevators and stuff?
1891820	1896900	Does that mean that everyone who has a Master Key doesn't know that it's sharing the identical key?
1896920	1900940	Or is it sequenced like that with three Masters that have separate sequences?
1900940	1903800	So the sequence is paired with the card ID.
1903920	1907480	And in fact, in their documentation, they call it the duplicate card ID.
1907480	1908740	And that's why it exists.
1908740	1912580	So the card ID is just a number that exists to differentiate one card from another.
1912580	1919100	So when you check into a hotel as a resident, they'll give you usually like two keys.
1919160	1923880	And so those keys will be completely identical, except the card ID will be incremented up one from the other.
1923880	1926720	And so that's the same way they handle staff Master Keys.
1926980	1929900	And then for elevators, you can program locks in different ways.
1929900	1940040	You can program them as areas configurable with what they call the pass authorization field, which gives you 12 bits that you can assign to various areas.
1940040	1947340	Or you can program them to just automatically work on any guest keys that share the facility code for the property.
1950580	1953060	Yes, for the sequence number.
1953180	1954640	For the duplicate card ID.
1954640	1959040	So the duplicate card ID only exists really to differentiate the cards in the logs.
1959040	1962320	So when you log, when you pull the interrogation logs.
1962660	1963160	Yeah.
1966960	1984700	I will say, yeah, we noticed that one hotel never resequenced guest keys.
1984700	1986280	They actually only ever made duplicates.
1986280	1988120	So it was like key ID 85.
1988500	1990360	So that those do exist.
1990360	2001120	Now, technically, that should still be okay if you tap in and you set the card creation date is newer than the previous cards.
2001120	2002360	It should invalidate them.
2002360	2003440	But I'm not certain about that.
2003440	2004960	I haven't tested that.
2006220	2010040	But yeah, you're really supposed to assign a new sequence number for a new key.
2010040	2017200	So whether that's someone lost a key or this is like a new guest, the recommended practice is resequencing the lock.
2023000	2029280	Yeah, well, there are definitely, yeah, there's definitely a few that are still my for classic, but also like other brands.
2030140	2034680	But yeah, there's, it's possible that not all of them are fully patched.
2034680	2038000	So I'd recommend talking to people about that.
2038000	2045160	See if you can push that really press the importance on them of making sure they're fully up to date and patched from the exploit.
2051120	2052460	Yes, we did.
2052460	2056300	I think we only found like two or three total in the two cities.
2056940	2066100	So it's not super common to be fully patched, but there are some that do exist that are fully patched, usually larger locations.
2073440	2075200	Not that I know of.
2075200	2077560	I know some charge more for it.
2077560	2083640	And I believe HID is moving to that, but you still do.
2083640	2084280	Okay.
2106180	2107560	All right.
2107560	2109080	Last call for questions.
2109660	2110960	Oh, yep.
2112260	2114340	HH6 reverse engineering.
2120620	2136620	So, yeah, so the KDF is actually in the encoder.
2136780	2139620	So for ultranight C, this is actually something we didn't mention.
2139860	2148840	Micro classic and some of the other card formats, the KDF is in the system 6000 software, whereas for ultralight C, it's in that encoder box itself.
2148840	2151000	But it is available on a gen one encoder.
2151000	2153460	So those are older, higher likelihood of vulnerabilities.
2153460	2154780	We haven't looked at what MCU they use.
2154780	2156040	We don't know if they're vulnerable.
2156320	2158500	But they are pretty plentiful online.
2158500	2162300	So it's pretty easy to find a device you can use as like an oracle.
2166330	2167010	All right.
2175390	2178450	Yeah, you can...
2178450	2188930	They do support this.
2188930	2193630	A lot of hotels don't use it because the cards on a per card basis are more expensive.
2193690	2197670	But that may end up needing to be changed in the future.
2198050	2206470	Because there have been attacks on ULC key recovery that is apparently from what I hear in the works hasn't been disclosed publicly yet.
2206470	2211170	But there are definitely things on the horizon that don't look too good for ultralight C at the moment.
2211550	2217270	So it's probably pretty likely we're going to see a lot of hotels have to switch to DAS fire pretty soon.
2223730	2224570	Certificate.
2227470	2230910	Some of those do exist.
2230910	2240630	But the problem is the cards themselves cost so much individually that that's essentially the worst nightmare for a hotel because they lose so much already on people taking the keys.
2240630	2244710	That's why they're using ultralight in the first place is they're significantly cheaper than DAS fire cards.
2248640	2252140	All right, if you have no more questions, you can hit us up in the PSP afterwards.
2252140	2257460	And if you just want to mess around with stuff or talk to us, we can also give you the proper presentation.
2257460	2261060	This was really supposed to be a heavily visual presentation to explain a lot of these concepts.
2261060	2263720	We had a lot of diagrams, a lot of interactive visuals.
2263840	2266220	So sorry for the technical issues.
2266600	2269140	Although it's not exactly our fault.
2269820	2271480	But hopefully it showed up fine on the recording.
2271480	2277900	So if you're interested sometime later, you can check out the recording and see how it's kind of meant to be enjoyed.
