WEBVTT

00:00.000 --> 00:02.900
Okay, so hacking hotel locks.

00:04.680 --> 00:06.020
Okay, thank you.

00:07.720 --> 00:13.060
Yeah, so we did our talk on expanding on safe lock vulnerabilities that were discussed last year at DEF CON.

00:13.140 --> 00:20.140
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.

00:20.140 --> 00:27.340
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.

00:27.340 --> 00:28.480
We'll mention this again.

00:30.000 --> 00:31.200
So about us.

00:31.280 --> 00:32.480
My name is Noah Holland.

00:32.480 --> 00:34.380
I'm an undergrad at Michigan Tech.

00:34.380 --> 00:44.200
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.

00:45.740 --> 00:46.560
I'm Josh.

00:46.560 --> 00:48.120
I'm a Michigan Tech alumni.

00:48.460 --> 00:51.940
I co-host the Access Control Village with Noah as well.

00:51.960 --> 00:59.120
We both co-founded BadSec LLC, a recent failed PCT through Hyper, and a proud owner of an HPC 1200.

01:02.220 --> 01:04.160
So about this talk.

01:04.360 --> 01:08.040
This builds on the original unsafe lock presentation from DEF CON 32.

01:08.400 --> 01:13.380
We'll briefly recap how the exploit works, but we're not going to go over, like, everything they covered in the talk.

01:13.380 --> 01:22.920
It's more specific about how this works compared to ULC and how we managed to re-exploit the new patch systems.

01:23.540 --> 01:26.680
I highly recommend watching the original talk, if you haven't seen it already.

01:26.680 --> 01:28.480
It's pretty crucial to understand this talk.

01:28.480 --> 01:31.780
So just afterwards, if you're able to, just check it out on YouTube.

01:32.500 --> 01:34.300
It's very well constructed.

01:36.200 --> 01:42.460
So first, in order to understand really what the issue is with the system, you need to understand PAX.

01:42.460 --> 01:45.540
So PAX is Physical Access Control System.

01:45.540 --> 01:47.080
That's what it stands for.

01:47.080 --> 01:51.940
And the original talk didn't really cover the technicalities of how this works.

01:52.120 --> 01:58.080
So with online PAX, that's what's most common for a lot of commercial systems and organizations.

01:58.080 --> 02:01.780
That's where the credentials just have a facility code and a card number.

02:02.160 --> 02:05.440
Usually this is encoded in something called the WGAN format.

02:05.520 --> 02:09.680
The card numbers are then tied to individuals, usually on the server side.

02:10.340 --> 02:14.920
So it's transmitted from the card to the reader, to the controllers, to the upstream server.

02:15.600 --> 02:19.080
So I do have a nice animation for that, but you guys can't see it, unfortunately.

02:19.840 --> 02:29.560
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.

02:29.760 --> 02:35.500
So the controller just speaks to the server, hey card number 123 wants to open door 100.

02:35.500 --> 02:39.740
Then the server looks up in its own database, oh card number 123, that belongs to Bob.

02:39.740 --> 02:40.820
Accept entry.

02:41.780 --> 02:48.700
And of course, you get centralized audit logging, you can get real-time alerts for if someone tries to tap into a location.

02:49.400 --> 02:51.780
But how does this actually relate to hotels?

02:51.780 --> 02:53.900
Well, it doesn't, and that's the problem.

02:53.900 --> 02:56.320
So this gets us into offline packs.

02:56.320 --> 03:04.160
This is the other form of an access control system where you have just the card and the reader, and they both serve offline.

03:04.160 --> 03:06.220
They don't communicate with the internet.

03:07.440 --> 03:13.560
And so it's a pretty common approach for hospitality systems, the access data is encoded directly on the card itself.

03:14.080 --> 03:19.540
And now, of course, as a security folk, what's one potential issue with this approach?

03:19.540 --> 03:21.800
Well, it's significantly more insecure.

03:22.300 --> 03:32.040
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.

03:32.880 --> 03:36.820
And logs have to be stored either on the cards or the readers.

03:36.820 --> 03:50.380
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.

03:53.020 --> 04:01.300
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.

04:01.300 --> 04:05.720
Although they don't really need it for every single reader, it's still common.

04:05.720 --> 04:08.920
Industry practice is supposed to have all of them offline first.

04:09.860 --> 04:11.640
So first learning of unsafe lock.

04:12.180 --> 04:18.280
The first coverage we heard about it was when it was first brought up in news articles around March 2024.

04:18.360 --> 04:20.240
This was covered in our Red Team meeting.

04:21.500 --> 04:37.280
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.

04:39.540 --> 04:44.840
This is where we understood that it was a fairly popular line of hotel locks.

04:45.140 --> 04:55.460
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.

04:55.940 --> 05:00.640
And they had weak security through obscurity, like encryption, if you can even call it that.

05:01.620 --> 05:09.740
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.

05:11.060 --> 05:18.940
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.

05:18.940 --> 05:24.700
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.

05:25.420 --> 05:29.940
However, this all changed when I moved into a new apartment.

05:30.300 --> 05:32.960
It wasn't even being finished, constructed yet.

05:33.080 --> 05:40.520
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.

05:41.220 --> 05:43.700
And they still use construction cores for all the gates.

05:44.400 --> 05:52.900
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.

05:52.900 --> 05:54.760
And some of this data sounded familiar.

05:54.800 --> 06:03.180
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.

06:03.180 --> 06:04.220
So what does this mean?

06:04.220 --> 06:06.420
Well, this gets into Sapphire locks.

06:06.420 --> 06:09.320
So Dora Macabre has more offerings than just safe lock.

06:09.420 --> 06:11.160
Sapphire is one such offering .

06:11.400 --> 06:16.580
But the important thing is the bit format and the encryption is the same between their different products.

06:16.600 --> 06:28.900
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.

06:29.960 --> 06:35.100
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.

06:35.860 --> 06:42.620
So this gets us into ambience and community, which is the current software that's needed for hotel systems.

06:42.720 --> 06:47.700
This is what they mentioned in the unsafe lock talk that Dora Macabre is trying to move everyone on to.

06:48.040 --> 06:53.200
So it's a web-based solution, but it's locally hosted at the hotel property.

06:53.440 --> 06:56.680
Users guides include what ports need to be forwarded.

06:56.680 --> 07:05.580
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.

07:05.580 --> 07:11.440
Now, this does only work when a server is really egregious and has their database open as well.

07:11.520 --> 07:24.900
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.

07:25.000 --> 07:29.340
So simple scrapers like what Shodan has don't catch it.

07:30.880 --> 07:33.640
But getting access to these in general is hard.

07:33.640 --> 07:35.760
Like, of course, you could pull up the web interface, but that doesn't help us.

07:35.760 --> 07:38.600
We need access to the actual software to understand how it works.

07:38.600 --> 07:44.520
But we don't need access to ambience and community since the structure is shared across solutions.

07:44.520 --> 07:51.420
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.

07:53.100 --> 07:56.340
So this is where we set off on building our own lab.

07:56.340 --> 08:02.480
We acquired a copy of system 6000 online and ordered some parts off eBay.

08:02.500 --> 08:11.180
About $60 for two encoders, $60 for a demo display lock, and $100 for a parts are not working HH6, which actually worked fine.

08:12.140 --> 08:16.520
Ordering the HH6 is always going to be the most difficult part because there's a ton of different names.

08:16.520 --> 08:20.920
It used to be the LPI, then it was the M unit, and now it's the HH6.

08:20.920 --> 08:22.880
So you have to look for all three of those on eBay.

08:23.740 --> 08:25.520
And there's a ton of different variants.

08:25.600 --> 08:29.940
So you want either the 007 or the 009.

08:30.160 --> 08:32.700
That's for programming over serial or NFC.

08:32.700 --> 08:39.200
Or some of those older variants go through different locks such as Oracode and they don't work on SafeLock.

08:49.960 --> 08:53.060
A lot easier to use Firebird editor Pro 32.

08:53.220 --> 08:55.240
That's a completely free program.

08:55.240 --> 08:56.040
You don't have to pay for it.

08:56.040 --> 08:57.120
There's no trial.

08:57.860 --> 09:11.320
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.

09:11.520 --> 09:19.720
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.

09:20.620 --> 09:24.420
From here, we were curious on what more we could learn about the system.

09:24.420 --> 09:25.960
So we started looking at the patents.

09:26.380 --> 09:34.560
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.

09:34.560 --> 09:37.820
It just said protected by patents and it gave a nice list.

09:37.820 --> 09:39.440
So I just looked all of them up.

09:39.440 --> 09:47.220
And I found quite a few patents from early implementations of SafeLock, but all of them still apply to the current system.

09:47.640 --> 09:50.780
So the most recent one was filed in 1993.

09:50.780 --> 09:58.420
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.

09:58.980 --> 10:05.440
It was extremely useful for finding out the bit fields, because they're all labeled in the patent.

10:05.440 --> 10:10.720
It'll tell you exactly, like, this, the key type needs to be set to 7 for this type of a key.

10:11.060 --> 10:18.920
So I'll show, well, normally we'll show more pictures, so just skip to the next slide on your guys's phones.

10:19.840 --> 10:21.700
But there's some visuals.

10:21.760 --> 10:24.680
The patents really have everything you would ever want on there.

10:24.680 --> 10:29.980
So I'd recommend, if you're interested at all about learning more about SafeLock, check these patents on your own time.

10:30.840 --> 10:33.060
So now this gets us to recreating the exploit.

10:33.060 --> 10:38.460
Now that we knew a ton about the system, we were interested in recreating the emergency keys.

10:42.330 --> 10:43.070
Cool.

10:43.070 --> 10:48.310
So this is the point where we got to where the original UnsafeLock talk was when they finished.

10:48.310 --> 10:54.270
So if you look at the image, those are the first two valid working keys we got to do the exploit.

11:09.350 --> 11:10.150
Testing.

11:12.750 --> 11:13.150
Testing

11:23.730 --> 11:31.680
, check, check, check, check, check, check, one, two, one, two, yep, okay, cool, okay.

11:31.680 --> 11:41.880
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.

11:42.060 --> 11:45.060
So data on the card.

11:45.140 --> 11:49.260
So all data that's important to the cards is stored in 17 bytes.

11:49.260 --> 11:56.780
It's in a red box on that listing of bytes there, stored in sector zero, and the data is encrypted.

11:57.440 --> 11:59.640
So that gets us to the encryption algorithm.

11:59.720 --> 12:01.660
A bunch of rudimentary operations.

12:01.660 --> 12:05.200
It's like a substitution table and some bit shifts and some random other stuff.

12:05.460 --> 12:07.340
And it's the same for every single property.

12:07.340 --> 12:14.040
So every hotel on every card that used the SafeLock before it was patched, all data was encrypted with this stupid thing they invented.

12:14.240 --> 12:18.040
So if you had that algorithm, you could decrypt all the data for every hotel.

12:18.820 --> 12:23.960
And then this is an image of some of the commands run from our tool where you can decrypt some of the data.

12:25.060 --> 12:27.120
So what's actually in that data?

12:27.300 --> 12:33.400
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.

12:33.660 --> 12:37.820
So there's like your check-in, check-out date, if it overrides the deadbolt, if it opens the door.

12:38.140 --> 12:40.520
But of these fields, we only care about a couple.

12:40.520 --> 12:43.980
So that gets us to the different card levels and different card types.

12:44.300 --> 12:48.040
So the card level defines the purpose of your hotel card.

12:48.080 --> 12:54.480
As you can see in that image, there's like guest key or like suite key or section key or grandmaster.

12:54.720 --> 12:57.840
And that basically tells you like what the card is used for.

12:58.080 --> 13:00.780
And then there's another field that's the card.

13:00.780 --> 13:02.820
The card type is like what the card does.

13:02.820 --> 13:04.980
So not all cards open doors.

13:04.980 --> 13:06.500
Some can program the lock.

13:06.540 --> 13:09.400
Some can inhibit the door or stop certain keys from working.

13:09.640 --> 13:12.580
Some can re-sequence the lock, which we'll get to in a second.

13:13.920 --> 13:26.600
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.

13:26.920 --> 13:29.820
Except there's one thing stopping us from doing that.

13:29.820 --> 13:32.560
And that is the sequence and combination fields on the card.

13:32.980 --> 13:36.060
So every lock has a different combination value.

13:36.700 --> 13:40.040
And then each level of card has a sequence number.

13:40.040 --> 13:47.700
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.

13:48.320 --> 13:53.440
So it will only read a card if that card has the correct sequence and combination field.

13:53.480 --> 13:55.620
But we don't know what that is.

13:56.040 --> 14:00.160
So you can kind of think of it as like a passcode that needs to match for the card to be read.

14:00.300 --> 14:02.640
So how did they exploit this in the original talk?

14:02.760 --> 14:04.800
They used re-sequencing keys.

14:05.240 --> 14:12.400
So re-sequencing cards, they can re-sequence or basically change the sequence number on that lock.

14:12.820 --> 14:17.100
And because the sequence number and combination are meshed together, it changes the whole value.

14:17.100 --> 14:24.040
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.

14:24.040 --> 14:25.200
So our card works.

14:26.000 --> 14:31.680
So the animations, I guess, don't work because it's a PDF, but you can kind of see how it works.

14:31.680 --> 14:36.340
So we have a lock and we know the property ID is five because that's on our card.

14:36.340 --> 14:45.340
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.

14:45.660 --> 14:52.800
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.

14:53.120 --> 14:57.140
So these two keys in combination can open any door in a property.

14:57.140 --> 14:58.760
And that's what they found in the original talk.

15:00.320 --> 15:01.700
So custom tooling.

15:01.860 --> 15:08.700
So when we were also figuring this stuff out and recreating what they did, we wrote up some tools for the Proxmark.

15:09.060 --> 15:14.020
We will submit the PR for these tools after DEF CON for reasons we'll talk about later.

15:14.460 --> 15:22.500
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.

15:22.680 --> 15:26.140
And if you look at these images, HF safe lock, this gives you the list of all the commands.

15:26.900 --> 15:29.420
HF safe lock read will dump all the data from your card.

15:29.560 --> 15:33.500
And modify, you can modify specific fields on a safe lock card.

15:33.500 --> 15:38.080
If you come down to the PSV, we have a booth with this running and you can play with it and test it out.

15:38.560 --> 15:41.100
We also have three safe lock locks you can mess with as well.

15:41.620 --> 15:50.280
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.

15:50.580 --> 15:52.300
So there's two things that are stored.

15:52.460 --> 15:54.320
The first is logs.

15:54.840 --> 16:01.220
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.

16:01.460 --> 16:03.300
So our tool will parse that as well.

16:05.320 --> 16:06.820
Both of these are stored unencrypted.

16:06.820 --> 16:09.120
The other thing that's stored is variable keys.

16:09.140 --> 16:15.760
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.

16:15.940 --> 16:25.020
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.

16:25.160 --> 16:29.000
So they didn't talk about either of these in the talk and our tool will parse both of these.

16:29.200 --> 16:30.540
And then you can see the three images.

16:30.760 --> 16:34.800
The first one in the top right, that's the extra data on the card.

16:35.040 --> 16:38.660
And then on the bottom right, you can see the different fields.

16:39.460 --> 16:44.440
So it'll tell you like the error codes and the time it was tapped on the door and other stuff.

16:44.440 --> 16:49.140
And then you can see their command safelock interrogate, that will tell you the other locks that a door can open.

16:50.660 --> 16:54.340
So we thought we'd be the first people to publish a working exploit.

16:54.900 --> 17:03.000
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.

17:03.000 --> 17:04.780
And we were wondering who could it be.

17:04.800 --> 17:14.240
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.

17:14.240 --> 17:15.780
So we're assuming this is what it was.

17:15.780 --> 17:21.480
But somehow it had zero GitHub stars and zero forks and nobody had found it yet, I guess.

17:21.480 --> 17:23.200
So I don't think anybody knows about this yet.

17:23.740 --> 17:27.320
But story time, the readme is really funny on why this guy made this.

17:27.320 --> 17:35.280
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.

17:35.280 --> 17:40.060
So he goes to the management and he says that, hey, these doors are vulnerable, you know, you got to fix this.

17:40.060 --> 17:41.300
And they say no.

17:41.300 --> 17:43.300
So he makes a master key and he mails it to them.

17:43.300 --> 17:45.640
And they say, sorry, we don't believe you, it doesn't work.

17:45.740 --> 17:47.680
And then they threaten legal action against them.

17:47.680 --> 17:49.220
So he published this full exploit.

17:49.220 --> 17:50.520
So we thought that was kind of funny.

17:50.920 --> 17:52.320
So check that out later.

17:52.920 --> 17:57.620
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.

17:57.840 --> 18:04.420
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.

18:07.450 --> 18:11.590
Yeah, so the lock programmer, we'll just call it the HH6.

18:11.590 --> 18:13.250
That's the most recent thing they've called it.

18:13.830 --> 18:15.590
That's their handheld programmer.

18:15.930 --> 18:22.730
It works over NFC and serial primarily, although you can also find models that work over Bluetooth, ZigBee, infrared, and a few others.

18:23.390 --> 18:24.310
JTAG was locked.

18:24.310 --> 18:27.130
We did try to hook up to the JTAG port that was on the board.

18:27.130 --> 18:28.050
That didn't work out.

18:28.050 --> 18:31.630
We also tried the lower level serial debugging, and that was locked.

18:31.710 --> 18:34.170
However, the MCU does have a known vulnerability.

18:34.490 --> 18:37.870
So we don't own a Pico EMP yet, so we couldn't exploit it.

18:38.310 --> 18:42.270
However, it is still possible to run that exploit, and that's something we'll be looking into in the future.

18:42.270 --> 18:44.250
And I would recommend others do as well.

18:45.150 --> 18:50.750
Because the original talk said that the HH6 errors out if there's a mismatched property ID.

18:50.750 --> 18:56.470
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.

18:56.470 --> 18:58.010
This is actually incorrect.

18:58.110 --> 19:01.830
You can interrogate any lock with an HH6, even if it's from another property.

19:02.430 --> 19:07.510
And you can get the shift times, so you can know when housekeeping comes and goes and whatnot.

19:07.510 --> 19:10.170
So in theory, that could be used for plans of attack.

19:10.170 --> 19:13.150
But more importantly, it gives you the property ID.

19:13.290 --> 19:19.070
So you actually don't even need to find a discarded hotel key to get the property ID of a facility .

19:19.250 --> 19:24.430
Because especially if you've noticed in Vegas, now they've kind of wisened up and they have these return key boxes.

19:24.430 --> 19:27.310
They don't even let you just put it in a bucket on the counter anymore.

19:27.310 --> 19:30.830
So it has like a slot to try to prevent people from pulling them back out.

19:30.830 --> 19:32.170
Well, you don't even need them anymore.

19:32.170 --> 19:35.690
You can just go directly up to a lock, plug in, and you're good to go.

19:36.410 --> 19:41.490
Now it's significantly easier to exploit because you don't even need hands-on access to a card.

19:42.310 --> 19:50.770
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.

19:50.770 --> 19:55.010
So that means it is possible to pop open the lock over that serial interface.

19:55.570 --> 20:09.710
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.

20:10.550 --> 20:15.230
Some locks, that's misspelled on there, it's supposed to be S-A-F-F-I-R-E, Sapphire.

20:15.310 --> 20:18.990
You can do the whole thing over NFC because that's how they do their programming.

20:20.090 --> 20:24.750
And so, yeah, the original talk, their bullet point was errors out if the property ID of the lock is wrong.

20:24.750 --> 20:29.030
I'm not sure where they got that from because it's never once happened in our testing.

20:36.730 --> 20:38.290
So on to Onity.

20:39.010 --> 20:40.750
There's some images here.

20:42.550 --> 20:49.870
It was broken by the now Sarah Brocious, I think I'm saying that right, goes by Dakin Online.

20:50.830 --> 20:54.650
They worked for a startup, reverse engineering Onity products.

20:55.570 --> 21:04.850
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.

21:04.850 --> 21:06.850
So they just completely went under.

21:07.130 --> 21:14.210
However, they got a 2012 Black Hat talk out of it called My Arduino Can Beat Up Your Hotel Lock.

21:14.210 --> 21:18.630
They also published the full paper on our website.

21:19.190 --> 21:25.350
And the technical aspect of this exploit was that the programming port allowed for memory access.

21:25.790 --> 21:35.170
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.

21:35.170 --> 21:39.810
So something very similar to what you could do with an HH6 for SafeLock, which is why we bring it up.

21:40.330 --> 21:47.870
At the time, there was a whole huge media frenzy of this $6 tool can open millions of hotel rooms.

21:47.910 --> 21:51.370
So it was very much kind of a hot topic for a while.

21:51.370 --> 22:03.150
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.

22:03.150 --> 22:06.350
And not many places did that predictably.

22:06.790 --> 22:08.890
So I think it's kind of interesting.

22:08.890 --> 22:10.830
The response at the time was a bit varied.

22:10.830 --> 22:15.730
So on one hand, from the hacker community, we got the James Bond marker.

22:15.890 --> 22:20.370
And on the other hand, there was a Texas burglary spree using the same exploit.

22:20.890 --> 22:29.390
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.

22:30.030 --> 22:37.110
So Dormocaba's response to the original unsafe lock exploit was a little better than Onity's response.

22:37.110 --> 22:42.510
So they claimed one year ago that 36% of properties had already been patched.

22:42.510 --> 22:48.010
As for what the fix is, Dormocaba released what they called the lock update project.

22:48.010 --> 22:56.010
That's kind of their whole collection of materials to update these hotels to be secure.

22:56.790 --> 22:59.430
Their mitigation solution, they call it a two-part.

22:59.430 --> 23:04.990
The first part is upgrading hotels away from MyFair Classic onto MyFair Ultralight C credentials.

23:04.990 --> 23:11.050
And then the second part is using a per-site diversified AES-128 key for that encrypted at-rest data.

23:11.410 --> 23:17.150
Unfortunately, a lot of hotels are still stuck on that first step.

23:18.330 --> 23:24.070
But yeah, so I mean, every hotel we tested was using Ultralight C.

23:24.070 --> 23:25.690
So problem solved.

23:25.870 --> 23:30.590
A great example of a company fixing a vulnerability in a decent timeframe with a quality patch.

23:31.370 --> 23:35.030
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.

23:35.750 --> 23:43.650
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.

23:43.650 --> 23:44.950
And that is not true.

23:44.950 --> 23:48.110
So we're going to talk about exploiting Ultralight C for fun and profit.

23:48.350 --> 23:49.830
So exploiting this in real life.

23:49.830 --> 23:52.390
So I went to Noah's house a week before this talk.

23:52.430 --> 23:53.230
He's in Minneapolis.

23:53.230 --> 23:54.390
You can see the Google Maps.

23:54.390 --> 23:59.690
We just looked up hotels online and went on finding vulnerable hotels.

23:59.690 --> 24:00.910
So we went on Google.

24:00.910 --> 24:02.610
We looked through all the hotels in Minneapolis.

24:02.830 --> 24:08.050
And if you look through reviews on hotels, you can eventually find a picture of one of the locks on one of the doors.

24:08.210 --> 24:14.310
And we identified a bunch of hotels finding safe lock, and we drove around and went to them to investigate.

24:14.630 --> 24:18.550
And you can see some images of Google reviews with red boxes around the locks.

24:19.010 --> 24:20.110
So hotel lock war driving.

24:20.110 --> 24:24.750
So here's us in the car, driver ground with all of our stuff, and I go into different hotels to mess with stuff.

24:25.370 --> 24:29.730
So step one to exploiting ULC safe lock.

24:29.750 --> 24:30.790
It's slightly different.

24:30.790 --> 24:32.810
Because on MiFair, the cards are cracked.

24:32.810 --> 24:34.770
So you can just read all the data off a card.

24:35.190 --> 24:38.070
However, with Ultralight C, they are not cracked.

24:38.070 --> 24:40.510
You cannot read the cards without a proper key.

24:41.550 --> 24:47.590
So what you can do instead is the card uses a handshake that is secure.

24:47.650 --> 24:50.790
However, after the handshake, the card will send all data in plain text.

24:50.790 --> 25:00.250
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.

25:01.450 --> 25:03.370
So that's how you get the property ID.

25:03.670 --> 25:06.970
Or also you can get the property ID with the HH6, like we said before.

25:06.970 --> 25:13.350
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.

25:13.370 --> 25:16.830
And that's all you need to make valid cards.

25:16.990 --> 25:19.610
So next thing you need to do, step two, encode card data.

25:19.890 --> 25:27.650
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.

25:28.450 --> 25:30.950
And then writing it to a card is the next part.

25:30.950 --> 25:35.630
And that's also difficult because you don't have the keys to the card, so you can't write back to it.

25:36.090 --> 25:41.570
However, people have cracked the KDF for SafeLock ULC.

25:41.630 --> 25:56.250
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.

25:56.370 --> 26:00.330
So two taps, one, two, and then there's a picture of me jumping in the pool at the hotel.

26:01.570 --> 26:06.850
There's an alternate method if you own an encoder for SafeLock, one of the cheap encoders.

26:06.850 --> 26:11.510
They're super cheap because after the original talk, you could buy them because no hotels wanted them.

26:11.790 --> 26:14.630
And even at the hotels we went to, they were using the new encoders.

26:14.970 --> 26:18.030
But for some reason, it doesn't fix anything.

26:18.150 --> 26:21.210
So you can get the keys from the encoder.

26:21.210 --> 26:34.110
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.

26:35.990 --> 26:43.250
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.

26:43.430 --> 26:44.750
And there's some images of us.

26:44.750 --> 26:51.590
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.

26:53.430 --> 26:54.450
So yeah, here we go.

26:54.450 --> 26:59.600
So the current state of SafeLock.

26:59.600 --> 27:04.600
So the good news is in our search, we only saw one facility that was still using MyFairClassic.

27:04.600 --> 27:07.000
The vast majority have upgraded to Ultralight-C.

27:07.000 --> 27:12.560
But the bad news is almost every hotel that we saw that was using Ultralight-C was using standard security.

27:12.560 --> 27:16.120
That's in Dormakaba's two-pronged update solution.

27:16.120 --> 27:19.320
They're on step one, so they didn't finish the update.

27:21.080 --> 27:30.680
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.

27:31.400 --> 27:33.540
So the good news is a patch does exist.

27:33.980 --> 27:36.720
Even if most hotels haven't done it yet, they always can.

27:36.720 --> 27:45.400
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.

27:45.980 --> 27:53.480
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.

27:53.480 --> 28:06.320
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.

28:06.500 --> 28:12.300
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.

28:12.640 --> 28:15.580
So really, if you have a hotel, make sure you patch it.

28:16.440 --> 28:23.840
But the bottom line is upgrading to Ultra Light C alone is just a real marginal security benefit over MyFairClassic.

28:23.840 --> 28:31.480
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.

28:31.800 --> 28:37.420
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.

28:38.400 --> 28:41.640
But yeah, so if you're not using enhanced security, you're still vulnerable.

28:41.680 --> 28:44.340
That's kind of what we want people to take away from this talk.

28:44.380 --> 28:56.160
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.

28:56.160 --> 28:58.560
They should really just say it's insecure completely.

28:58.560 --> 29:07.540
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.

29:08.320 --> 29:12.740
Dormakabba really doesn't make this clear enough in all of their update guides for hotel administrators.

29:13.400 --> 29:18.260
So new buildings to this day, like we saw with MyApartmentComplex, are installed with MyFairClassic.

29:19.220 --> 29:25.000
However, most of the hotels we saw with Ultra Light C, even though they're on standard security, have since upgraded.

29:25.000 --> 29:31.200
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.

29:33.720 --> 29:37.400
So we have been discussing this with a lot of different integrators at conventions.

29:37.460 --> 29:39.380
This is not unique to Dormakabba.

29:39.380 --> 29:43.740
They've actually been handling this relatively well as far as the industry goes.

29:43.740 --> 29:46.080
It's really just an industry-wide problem.

29:46.560 --> 29:53.640
Cutting costs really impacts security, especially when hotels will always just buy whatever is the absolute cheapest option there is.

29:54.440 --> 29:59.920
So when you have to pay like $10,000 for a per-site key, then a lot of places just won't do it.

29:59.920 --> 30:06.300
So there is some props for Dormakabba there for not charging extra for proper security.

30:07.440 --> 30:11.400
So going forward, there's a lot more possible research that can be done, even into just SafeLock itself.

30:11.400 --> 30:13.180
So we didn't look much into MagStripe.

30:13.180 --> 30:21.060
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.

30:21.500 --> 30:28.380
Reverse engineering the HH6 to its completion and checking out more of the variable key possibility.

30:28.380 --> 30:35.560
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.

30:35.560 --> 30:44.460
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.

30:45.360 --> 30:50.880
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.

30:50.880 --> 30:56.220
We have System 6000, an encoder, the HH6, and some locks ready for you to just poke around with if you want.

30:56.440 --> 31:00.120
And then we also have our Proxmark tool set up and ready to go there.

31:00.120 --> 31:02.680
And then you can ask us any questions you might have.

31:03.080 --> 31:04.600
Just look for the green shirts.

31:04.980 --> 31:07.220
And then I would also recommend the Iceman RFID Discord.

31:07.220 --> 31:14.660
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.

31:14.860 --> 31:17.520
So yeah, any questions?

31:20.400 --> 31:21.700
Yes?

31:21.700 --> 31:24.460
You talked about sequencing the keys.

31:25.900 --> 31:28.960
So I have two aspects to that.

31:28.960 --> 31:31.820
How does that work with things like elevators and stuff?

31:31.820 --> 31:36.900
Does that mean that everyone who has a Master Key doesn't know that it's sharing the identical key?

31:36.920 --> 31:40.940
Or is it sequenced like that with three Masters that have separate sequences?

31:40.940 --> 31:43.800
So the sequence is paired with the card ID.

31:43.920 --> 31:47.480
And in fact, in their documentation, they call it the duplicate card ID.

31:47.480 --> 31:48.740
And that's why it exists.

31:48.740 --> 31:52.580
So the card ID is just a number that exists to differentiate one card from another.

31:52.580 --> 31:59.100
So when you check into a hotel as a resident, they'll give you usually like two keys.

31:59.160 --> 32:03.880
And so those keys will be completely identical, except the card ID will be incremented up one from the other.

32:03.880 --> 32:06.720
And so that's the same way they handle staff Master Keys.

32:06.980 --> 32:09.900
And then for elevators, you can program locks in different ways.

32:09.900 --> 32:20.040
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.

32:20.040 --> 32:27.340
Or you can program them to just automatically work on any guest keys that share the facility code for the property.

32:30.580 --> 32:33.060
Yes, for the sequence number.

32:33.180 --> 32:34.640
For the duplicate card ID.

32:34.640 --> 32:39.040
So the duplicate card ID only exists really to differentiate the cards in the logs.

32:39.040 --> 32:42.320
So when you log, when you pull the interrogation logs.

32:42.660 --> 32:43.160
Yeah.

32:46.960 --> 33:04.700
I will say, yeah, we noticed that one hotel never resequenced guest keys.

33:04.700 --> 33:06.280
They actually only ever made duplicates.

33:06.280 --> 33:08.120
So it was like key ID 85.

33:08.500 --> 33:10.360
So that those do exist.

33:10.360 --> 33:21.120
Now, technically, that should still be okay if you tap in and you set the card creation date is newer than the previous cards.

33:21.120 --> 33:22.360
It should invalidate them.

33:22.360 --> 33:23.440
But I'm not certain about that.

33:23.440 --> 33:24.960
I haven't tested that.

33:26.220 --> 33:30.040
But yeah, you're really supposed to assign a new sequence number for a new key.

33:30.040 --> 33:37.200
So whether that's someone lost a key or this is like a new guest, the recommended practice is resequencing the lock.

33:43.000 --> 33:49.280
Yeah, well, there are definitely, yeah, there's definitely a few that are still my for classic, but also like other brands.

33:50.140 --> 33:54.680
But yeah, there's, it's possible that not all of them are fully patched.

33:54.680 --> 33:58.000
So I'd recommend talking to people about that.

33:58.000 --> 34:05.160
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.

34:11.120 --> 34:12.460
Yes, we did.

34:12.460 --> 34:16.300
I think we only found like two or three total in the two cities.

34:16.940 --> 34:26.100
So it's not super common to be fully patched, but there are some that do exist that are fully patched, usually larger locations.

34:33.440 --> 34:35.200
Not that I know of.

34:35.200 --> 34:37.560
I know some charge more for it.

34:37.560 --> 34:43.640
And I believe HID is moving to that, but you still do.

34:43.640 --> 34:44.280
Okay.

35:06.180 --> 35:07.560
All right.

35:07.560 --> 35:09.080
Last call for questions.

35:09.660 --> 35:10.960
Oh, yep.

35:12.260 --> 35:14.340
HH6 reverse engineering.

35:20.620 --> 35:36.620
So, yeah, so the KDF is actually in the encoder.

35:36.780 --> 35:39.620
So for ultranight C, this is actually something we didn't mention.

35:39.860 --> 35:48.840
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.

35:48.840 --> 35:51.000
But it is available on a gen one encoder.

35:51.000 --> 35:53.460
So those are older, higher likelihood of vulnerabilities.

35:53.460 --> 35:54.780
We haven't looked at what MCU they use.

35:54.780 --> 35:56.040
We don't know if they're vulnerable.

35:56.320 --> 35:58.500
But they are pretty plentiful online.

35:58.500 --> 36:02.300
So it's pretty easy to find a device you can use as like an oracle.

36:06.330 --> 36:07.010
All right.

36:15.390 --> 36:18.450
Yeah, you can...

36:18.450 --> 36:28.930
They do support this.

36:28.930 --> 36:33.630
A lot of hotels don't use it because the cards on a per card basis are more expensive.

36:33.690 --> 36:37.670
But that may end up needing to be changed in the future.

36:38.050 --> 36:46.470
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.

36:46.470 --> 36:51.170
But there are definitely things on the horizon that don't look too good for ultralight C at the moment.

36:51.550 --> 36:57.270
So it's probably pretty likely we're going to see a lot of hotels have to switch to DAS fire pretty soon.

37:03.730 --> 37:04.570
Certificate.

37:07.470 --> 37:10.910
Some of those do exist.

37:10.910 --> 37:20.630
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.

37:20.630 --> 37:24.710
That's why they're using ultralight in the first place is they're significantly cheaper than DAS fire cards.

37:28.640 --> 37:32.140
All right, if you have no more questions, you can hit us up in the PSP afterwards.

37:32.140 --> 37:37.460
And if you just want to mess around with stuff or talk to us, we can also give you the proper presentation.

37:37.460 --> 37:41.060
This was really supposed to be a heavily visual presentation to explain a lot of these concepts.

37:41.060 --> 37:43.720
We had a lot of diagrams, a lot of interactive visuals.

37:43.840 --> 37:46.220
So sorry for the technical issues.

37:46.600 --> 37:49.140
Although it's not exactly our fault.

37:49.820 --> 37:51.480
But hopefully it showed up fine on the recording.

37:51.480 --> 37:57.900
So if you're interested sometime later, you can check out the recording and see how it's kind of meant to be enjoyed.

