WEBVTT

00:00.000 --> 00:01.720
Cool, I think I'll get started.

00:01.980 --> 00:03.660
My name is Lennart Wouters.

00:03.660 --> 00:07.180
I'm here to present you an attack we did on a Tesla Model S.

00:07.640 --> 00:16.200
And the goal of our research was to figure out how the passive keyless entry system in the Tesla Model S works and to see if there's any vulnerabilities we could exploit.

00:16.800 --> 00:25.360
So in the way a passive keyless entry and start system works is you approach the vehicle with the key fob in your pocket and it automagically unlocks and starts.

00:25.920 --> 00:29.800
So what's actually going on in the back is the car sends a challenge to the key fob.

00:29.980 --> 00:34.100
The key fob computes a cryptographic response and sends it back to the car.

00:34.600 --> 00:38.560
If the cryptographic response is correct, the car will unlock and start.

00:39.760 --> 00:44.040
Now if we take one of these key fobs and we open it up, this is what it looks like.

00:44.280 --> 00:46.820
So this is the PCB from the back side.

00:47.300 --> 00:48.620
There's not much going on here.

00:48.620 --> 00:53.460
You can see a UHF antenna, a low-frequency antenna, and an RF transmitter chip.

00:54.040 --> 00:56.360
The front side is a bit more interesting.

00:56.360 --> 00:58.880
So you can see that there's one interesting chip here.

00:59.420 --> 01:04.360
This is the Texas Instruments TMS37F128.

01:04.660 --> 01:11.920
Now if you take an X-ray of this chip, you can see that there's actually two dies or two distinct chips inside of this one package.

01:12.500 --> 01:15.400
So there's an MSP430 microcontroller.

01:15.400 --> 01:20.480
This is a general-purpose microcontroller which can communicate with the transponder.

01:20.480 --> 01:23.640
So this is a TMS37F126.

01:24.080 --> 01:31.720
And this transponder is actually the part that stores all of the cryptographic material and it performs all of the cryptographic operations.

01:32.400 --> 01:36.740
The microcontroller can talk to the transponder using an SPI interface.

01:38.440 --> 01:42.820
Now usually you would look up the datasheet for one of these chips to figure out what is going on.

01:42.920 --> 01:48.780
In this case, to get a full datasheet, you have to sign NDAs, which is of course something we don't like to do.

01:49.580 --> 01:52.500
Now the things you can find online are like some basics.

01:52.500 --> 02:00.100
So this chip supports an 80-bit DST80 security authentication coprocessor, whatever that may be.

02:00.100 --> 02:05.000
And then it uses a 5-byte challenge and 3-byte response algorithm.

02:05.000 --> 02:07.660
And it also supports mutual authentication.

02:08.400 --> 02:11.780
So let's get started and let's buy some of these ICs.

02:11.860 --> 02:15.960
So I went to DigiKey or Farnell, but couldn't find any of them.

02:15.960 --> 02:19.180
So again, you have to sign NDAs even to buy these chips.

02:19.840 --> 02:23.060
Luckily at my research group, there's a lot of international colleagues.

02:23.060 --> 02:24.800
I also have some Chinese colleagues.

02:24.820 --> 02:27.020
And that makes it easier to get this stuff.

02:27.660 --> 02:30.640
So we went to Taobao, ordered some of these chips.

02:30.640 --> 02:34.900
And once we got them, we noticed that they use a very uncommon package type.

02:34.980 --> 02:37.880
So we designed our own breakout board to get started.

02:38.240 --> 02:42.460
Now the chip we acquired is the TMS37126.

02:42.460 --> 02:46.060
So it's only the transponder without the included microcontroller.

02:47.660 --> 02:51.020
So as I mentioned, you need to sign NDAs to get the datasheets.

02:51.220 --> 02:53.020
There is some public information.

02:53.140 --> 02:56.440
But the public information that is out there is very inconsistent.

02:56.900 --> 03:00.400
So for this one chip, you can easily find two distinct pinouts.

03:00.460 --> 03:03.140
Which makes it quite annoying when you want to connect to them.

03:04.000 --> 03:06.980
My initial goal was to connect an Arduino to this chip.

03:06.980 --> 03:11.140
So I could talk SPI with it and try to figure out what was going on.

03:11.780 --> 03:16.720
So in this case, the Arduino is the SPI master and the transponder is the SPI slave.

03:17.260 --> 03:21.100
When you connect all of this up on a breadboard, it looks somewhat like this.

03:23.360 --> 03:26.500
So SPI usually has three data lines.

03:27.060 --> 03:33.120
We have a clock line, a data line for data going from the slave to the master, and the other way around.

03:33.380 --> 03:38.720
In this case, Texas Instruments decided to add a fourth line, which is called the busy line.

03:38.720 --> 03:47.540
As you can imagine, this line is used by the slave, so in this case the transponder, to indicate to the master when it is ready to receive the next byte of data.

03:48.020 --> 03:54.460
You can also see in this diagram that an SPI packet in this case usually starts with a length byte.

03:54.740 --> 03:58.100
And this byte indicates how many bytes will follow in this packet.

03:58.520 --> 04:00.880
The second byte is the command you want to execute.

04:01.020 --> 04:03.160
And then there might be one or more data bytes.

04:03.720 --> 04:07.400
You can also get a reply back from the transponder, including some data.

04:08.340 --> 04:13.740
Now, as we didn't have the data sheets, we had to figure out ourselves what available SPI commands there are.

04:14.100 --> 04:22.000
And it turns out that this extra SPI busy line is very convenient for this, because it will throw an error when there is something wrong.

04:22.140 --> 04:28.820
So if you provide it with a command that does not exist, it will throw an error by holding this line low or high for an extended period of time.

04:30.040 --> 04:31.540
Then we made two observations.

04:32.140 --> 04:34.840
When the command value is incorrect, it throws an error.

04:35.220 --> 04:41.640
But if you set the length byte to FF, it will throw an error after the correct number of bytes was received.

04:41.840 --> 04:49.800
So you can simply fix the length byte to FF, and then enumerate all of the command bytes to figure out what all of the correct lengths and commands are.

04:50.860 --> 04:54.360
So in that way, we uncovered some commands that we thought were interesting.

04:54.900 --> 04:58.880
So as you can see, we found two commands that perform the DST40 cipher.

04:59.160 --> 05:01.800
I will give some more information on that cipher later on.

05:01.800 --> 05:05.620
And two commands that perform another unknown cipher.

05:06.240 --> 05:09.480
Now, this unknown cipher also works on 40-bit keys.

05:09.660 --> 05:12.300
And we were expecting to find an 80-bit cipher.

05:12.580 --> 05:18.940
So I made the assumption that maybe the 80-bit cipher is a combination of two of these 40-bit ciphers.

05:19.140 --> 05:26.640
Usually, combining two 40-bit ciphers into an 80-bit cipher results in interesting problems.

05:26.760 --> 05:30.280
So I set out to reverse engineer the unknown cipher.

05:30.280 --> 05:37.780
And we did this by providing an input and observing the output, and then making assumptions based on DST40, which we knew how it worked.

05:38.200 --> 05:45.020
So this means that I spent about a month trying to blackbox reverse engineer a cipher, which in the end wasn't used.

05:45.840 --> 05:49.500
We also found two commands that allow you to set a 40-bit key.

05:49.500 --> 05:51.820
So no 80-bit keys, only 40-bit keys.

05:53.640 --> 05:57.680
At this point, I finally got my hands on an actual Tesla Model S key fob.

05:57.680 --> 06:02.380
And as you can see, there are some easily available debug paths.

06:02.560 --> 06:06.940
And I was able to connect a JTAG programmer and figured out that the JTAG fuse wasn't blown.

06:07.220 --> 06:14.800
So this means we can dump the program memory on the microcontroller, throw it into a disassembler, and start looking at the assembly code.

06:15.420 --> 06:20.660
So for the MSP430, the two things to do are first look at the interrupt vector table.

06:20.840 --> 06:22.620
This is stored at the end of Flash.

06:22.700 --> 06:27.240
And it basically teaches you what code will be run after an interrupt occurs.

06:27.240 --> 06:33.040
So in the case of a key fob, for example, which code is run when you press a button on it.

06:33.620 --> 06:36.240
And this helps you narrow down where to look in the assembly.

06:37.200 --> 06:41.500
Secondly, references to special function registers are interesting.

06:41.620 --> 06:47.160
And especially in this case, because we're trying to figure out which SPI commands the Tesla Model S key fob is using.

06:47.880 --> 06:53.080
So I searched for the function which is doing the SPI communication, basically.

06:54.160 --> 06:56.420
And then we went on to dynamic analysis.

06:56.600 --> 07:04.500
So setting breakpoints in the microcontroller at the address where the SPI function starts, basically.

07:04.640 --> 07:06.460
Then you would try to unlock the car.

07:06.460 --> 07:11.840
When the breakpoint is triggered, you dump the memory to see which data was sent and received over SPI.

07:12.440 --> 07:24.120
And by doing this a few times, well, just in the normal way as you would unlock the car normally, we figured out that the only command they were using was 86, which we earlier figured out was DST 40.

07:25.360 --> 07:27.240
Now, what is DST 40?

07:27.580 --> 07:32.120
DST 40 is a cipher introduced back in 2000 by Texas Instruments.

07:32.220 --> 07:37.460
It uses a 40-bit key, which I guess everyone knows is too short by today's standards.

07:37.820 --> 07:41.220
The cipher itself was first reverse engineered back in 2005.

07:41.220 --> 07:46.700
And back then it was used mainly in immobilizers and the ExxonMobil speedpass payment system.

07:48.140 --> 07:51.320
This is a schematic overview of how the cipher works.

07:51.800 --> 07:54.340
So at the bottom you have a 40-bit key register.

07:54.340 --> 07:57.120
At the top you have a 40-bit challenge register.

07:57.340 --> 07:59.620
And then there are some lookup tables in the middle.

07:59.620 --> 08:02.280
These lookup tables produce two bits of output.

08:02.840 --> 08:06.020
This round is executed 200 times.

08:06.360 --> 08:10.320
And the two output bits are shifted into the challenge register every round.

08:10.800 --> 08:17.880
After running the cipher for 200 rounds, the 24 least significant bits of the challenge register are returned as the response.

08:18.880 --> 08:26.960
The important thing to remember here is that we have a 40-bit key, a 40-bit challenge, and the response is actually shorter than the challenge.

08:27.040 --> 08:30.740
And this is important for somewhere next in the presentation.

08:31.600 --> 08:35.120
We know that the key fob is using an old, outdated cipher.

08:35.280 --> 08:39.520
But we still have to figure out how to talk to the vehicle and how to receive messages from the key fob.

08:41.020 --> 08:45.520
If you look at one of these key fobs, you can observe two distinct systems.

08:45.860 --> 08:48.200
There is a remote keyless entry system.

08:48.280 --> 08:52.140
This is a system where you press a button on the key fob and then the car unlocks.

08:52.620 --> 08:55.800
This is one-way communication going from the key fob to the vehicle.

08:56.600 --> 08:58.920
Secondly, there is passive keyless entry and start.

08:58.920 --> 09:03.440
This is two-way communication where you approach the vehicle and it automatically unlocks.

09:03.920 --> 09:08.380
We will start by looking at the one-way communication, so the remote keyless entry.

09:08.380 --> 09:14.420
Because these packets are easier to receive and it is easier to understand how everything works.

09:14.980 --> 09:20.020
In order to receive messages from such a key fob, you need to have a few physical layer parameters.

09:20.040 --> 09:23.860
Like the operating frequency, the modulation and the symbol rate.

09:24.240 --> 09:26.440
These are relatively easy to determine.

09:28.240 --> 09:31.940
Then what you do is, once you can receive one message, you just receive a few.

09:31.940 --> 09:36.780
So you press the button a few times and you look at which parts of the message change.

09:36.780 --> 09:40.600
And in that way you can understand what is going on.

09:41.020 --> 09:43.220
So in this case there is one byte for the command.

09:43.220 --> 09:46.560
And the command is basically do you want to lock or unlock the vehicle.

09:47.060 --> 09:50.460
Then there is a three-byte response, which is the DST40 response.

09:50.580 --> 09:52.220
And there is a two-byte counter.

09:52.980 --> 09:56.080
So the way it works is the key fob stores a 40-bit counter.

09:56.520 --> 09:59.440
Every time you press the button, the counter gets incremented.

09:59.800 --> 10:02.600
And this counter is fed as a challenge to DST40.

10:02.680 --> 10:04.240
And then the response is computed.

10:04.240 --> 10:10.780
The reason they send a long part of the counter is to prevent desynchronization between key fob and car.

10:10.880 --> 10:16.300
So if your kit presses the button too many times, you still want to be able to unlock your vehicle.

10:18.100 --> 10:21.560
So I actually made a challenge for the Capture the Flag in the Car Hacking Village.

10:21.980 --> 10:25.540
Which is based on a real Tesla Model S key fob.

10:25.540 --> 10:31.400
So what I did is, I took one of the key fobs, I removed one of the buttons and I connected an Arduino to it.

10:31.400 --> 10:35.080
And the Arduino will simulate the button press every 15 seconds.

10:35.800 --> 10:39.900
Now, to have a challenge, it's nice if you can have a flag which is fixed.

10:40.620 --> 10:46.820
So what I did is, I reset the key fob right after it transmits, so that the counter is not updated.

10:47.200 --> 10:51.820
So in this way, the packet is fixed and you can have a fixed flag.

10:52.460 --> 10:57.100
If you're having troubles with the challenge and you want some tips, you can come and find me after the talk.

10:57.100 --> 11:00.420
Or you can look at the talk Rapid Radio Reversing by Michael Osman.

11:02.560 --> 11:06.240
Now there should be a short video of a small proof of concept.

11:06.620 --> 11:08.600
And we can show that we can unlock the doors.

11:08.920 --> 11:10.860
We can open the trunk.

11:12.140 --> 11:14.180
And we can also open the trunk.

11:19.650 --> 11:21.310
But the video is not working.

11:24.520 --> 11:28.240
Opening a vehicle is cool, but it's even cooler if you can drive off with it.

11:28.640 --> 11:31.780
And to do that, you have to understand the passive keyless entry part.

11:31.780 --> 11:34.380
As I said before, there's two-way communication.

11:34.380 --> 11:37.480
So low frequency going from the vehicle to the key fob.

11:37.480 --> 11:40.860
And high frequency for data going from the key fob to the car.

11:41.380 --> 11:46.240
And the high frequency part is almost the same as the remote keyless entry scenario.

11:46.940 --> 11:50.960
For the low frequency part, I used the Proxmark tree.

11:51.260 --> 11:54.080
Because it supports the operating frequency.

11:54.440 --> 11:58.200
But it turns out that the modulation is not supported in the Proxmark.

11:58.540 --> 12:00.880
So I had to modify the hardware of the Proxmark.

12:00.880 --> 12:03.400
I had to write my own Verilog code for the FPGA.

12:03.420 --> 12:05.900
And I had to write my own microcontroller code.

12:06.500 --> 12:08.860
So the signals look kind of like this.

12:09.920 --> 12:13.680
So on top you have the signal received by the antenna of the Proxmark.

12:13.740 --> 12:16.440
Then it's routed to an amplification stage.

12:16.660 --> 12:18.640
Then there's an analog peak detect circuit.

12:18.640 --> 12:24.560
And then after the analog peak detect circuit, the FPGA will output a digital signal.

12:24.560 --> 12:27.280
Which can then be interpreted by the microcontroller.

12:28.420 --> 12:32.600
Now receiving these LF signals was kind of a hassle.

12:32.900 --> 12:35.540
So I had to spend a few of my weekends like this.

12:35.780 --> 12:37.640
In the car and around the car.

12:37.900 --> 12:41.660
So basically what I did was I taped the receiving antenna of the Proxmark.

12:41.660 --> 12:44.320
Very close to the transmitting antennas of the car.

12:44.320 --> 12:45.620
And that made it easier.

12:46.220 --> 12:49.680
So in a Tesla Model S there's antennas at the rearview mirrors.

12:49.760 --> 12:51.460
There's one in the center cup holder.

12:51.660 --> 12:52.900
There's one at the trunk.

12:52.900 --> 12:55.660
And there's one in the middle of the windshield.

12:56.880 --> 13:00.360
So at this point we can receive ultra high frequency signals.

13:00.360 --> 13:02.200
We can receive low frequency signals.

13:02.200 --> 13:04.540
So we can build a protocol analyzer.

13:04.980 --> 13:09.820
So I have a simple Python script that controls both the yardstick 1 and the Proxmark.

13:10.060 --> 13:14.460
And it basically gives me a trace of all of the communication between the key fob and the car.

13:15.060 --> 13:16.820
So again what you do is you do the same.

13:16.820 --> 13:19.760
You unlock the car a few times while you have your script running.

13:19.760 --> 13:21.120
And you look at the output.

13:21.120 --> 13:26.620
And then by seeing which parts change you can kind of guess what the protocol looks like.

13:27.060 --> 13:30.980
So I figured out that the car sends a message twice a second.

13:30.980 --> 13:34.080
And it's just pulling to see if a key fob is closed.

13:34.860 --> 13:39.800
And this wait message contains a car identifier which the key fob is looking for.

13:39.920 --> 13:42.280
Now if the key fob is closed it will reply.

13:42.560 --> 13:47.840
And this reply is basically the same message as the wait command but it's an obfuscated version.

13:48.080 --> 13:50.660
I'm not sure why the obfuscation is there.

13:50.660 --> 13:54.940
Because if you receive messages from two vehicles you can easily figure it out.

13:54.940 --> 13:58.560
It's basically a combination of some byte swaps and bit shifts.

13:59.440 --> 14:03.340
So when the key fob replies the car will send a random challenge.

14:04.040 --> 14:06.100
The key fob computes the response.

14:06.400 --> 14:09.040
And if the response was correct the car unlocks.

14:09.660 --> 14:16.100
Now as you can see here you need to send the car identifier along with your challenge to the key fob.

14:16.100 --> 14:18.060
Because otherwise it won't reply.

14:20.180 --> 14:25.480
Now one scenario we were thinking about is could we steal a car without ever seeing the key fob?

14:25.480 --> 14:28.420
Like could we just stand next to it and lock it and drive off?

14:28.980 --> 14:33.160
And it turns out it is possible but it would take you about 97 days.

14:33.440 --> 14:35.560
So it's not really a practical attack.

14:37.700 --> 14:40.540
So we wanted to also have a practical attack of course.

14:42.940 --> 14:48.860
And to get a practical attack the thing you need to do is to recover the 40-bit key as fast as possible.

14:49.460 --> 14:57.020
So to recapitulate, DST40 uses a 40-bit challenge, a 40-bit key, but the output is only 24 bits.

14:57.380 --> 14:59.780
So it's kind of like a compression function.

15:00.280 --> 15:05.160
And this means that you need at least two challenge-response pairs in order to recover the 40-bit key.

15:05.980 --> 15:09.860
What we did was to make a time-memory trade-off table.

15:10.460 --> 15:14.300
And the general idea is that we fixed one challenge.

15:14.300 --> 15:15.720
So we chose one.

15:15.880 --> 15:20.640
And then for every possible key we recorded which response it produced.

15:21.140 --> 15:27.000
So because the response is shorter than a challenge there will be multiple keys that produce the same response.

15:27.320 --> 15:31.060
And we grouped all of the keys that produce the same response into one file.

15:31.340 --> 15:34.380
So we have a 5.4 terabyte lookup table.

15:34.440 --> 15:37.160
Which has 2 to the 24 files.

15:37.160 --> 15:39.420
So one file for each response.

15:39.420 --> 15:43.200
And each of these files contains about 2 to the 16 keys.

15:44.580 --> 15:49.240
So once you have this table, recovering the key from a keyfob is quite easy.

15:49.960 --> 15:56.180
You first have to get the 2-byte car identifier, which you can do by brute force or sniffing it from the vehicle.

15:56.720 --> 15:59.880
Then you send the challenge that you used to make your table.

16:00.460 --> 16:06.080
You record the response and use the value of this response to take the file from your lookup table.

16:06.080 --> 16:09.280
And at that point the keyspace is only 2 to the 16.

16:10.520 --> 16:15.140
So then you send a second random challenge to the keyfob, record the response.

16:15.400 --> 16:18.520
And you test the remaining 2 to the 16 keys.

16:18.880 --> 16:22.420
Testing these 2 to the 16 keys takes 2 seconds on a Raspberry Pi.

16:23.760 --> 16:25.580
So we built this device.

16:27.580 --> 16:31.400
I have it here with me if anyone wants to take a look at it later, just come and find me.

16:32.220 --> 16:33.080
No.

16:35.580 --> 16:38.520
So it basically contains the Proxmark 3 and the UpStick 1.

16:38.560 --> 16:41.720
Then the Raspberry Pi, which is basically the brains of the operation.

16:41.840 --> 16:43.640
And a USB power bank.

16:44.000 --> 16:47.780
So the way I use this is I make a hotspot on my phone.

16:48.040 --> 16:50.200
The Raspberry Pi automatically connects to it.

16:50.400 --> 16:54.480
I SSH into the Raspberry Pi and I can control everything I want.

16:54.820 --> 16:58.960
And using this connection, the Raspberry Pi can also fetch files from a lookup table.

17:00.100 --> 17:05.940
Now after we built this Proof of Concept attack, we of course also notified Tesla.

17:07.080 --> 17:12.420
And then after notifying them, we realized that Tesla didn't build the system themselves, so they bought it.

17:12.540 --> 17:16.260
And they bought it from a company called Pektron, which is based in the UK.

17:17.040 --> 17:21.020
And then looking at FCC documentation, we figured out that they built similar systems...

17:21.720 --> 17:26.460
using the same Texas Instruments chip for McLaren, Karma, and Triumph.

17:26.460 --> 17:28.460
I don't have a McLaren.

17:29.200 --> 17:32.340
This is Vegas, so if anyone has one, let me know.

17:34.780 --> 17:41.280
So we contacted Tesla, and then they worked on fixing the key fob, so they made a new version of this key fob.

17:41.440 --> 17:46.420
And all vehicles produced from June 2018 onwards are using this newer version of the key fob.

17:47.040 --> 17:50.740
Existing customers can also request a new version of the key fob.

17:51.500 --> 17:56.600
They also did some over-the-air software updates that make the attack harder to execute.

17:56.760 --> 18:02.180
So they have a pin-to-drive feature, which is basically a second factor of authentication.

18:02.180 --> 18:04.940
So you have to enter a pin each time you try and start the vehicle.

18:05.400 --> 18:08.540
And a second option is to disable passive keyless entry.

18:09.920 --> 18:14.740
None of these features are enabled by default, so if you have one of these vehicles, you should enable them.

18:15.420 --> 18:22.920
I do want to point out that these features make it more difficult for me to steal your car, but they don't prevent me from doing it.

18:24.260 --> 18:28.920
So if you disable passive keyless entry, this is actually a nice feature, and I think you should enable it.

18:28.920 --> 18:31.420
Because it will stop the more common relay attack.

18:32.520 --> 18:36.760
But in order to start the vehicle, they still have to use passive keyless entry.

18:36.760 --> 18:37.820
There's no other way.

18:38.600 --> 18:46.360
Also, you might disable passive keyless entry on the car side, but the key fob will still reply to messages sent to it.

18:47.320 --> 18:55.060
The pin-to-drive feature is also nice, but again, once I'm inside your vehicle, there's other ways to start it and drive off.

18:56.880 --> 19:05.940
So another mitigation I came up with, and I did on one of the key fobs we have, is I basically added another button that allows me to disable passive entry on the key fob side.

19:05.940 --> 19:08.200
So this makes it impossible to clone the key fob.

19:09.860 --> 19:14.980
Now, Tesla was pretty cool about working with us to fix the issues.

19:15.220 --> 19:20.400
And at some point, they even drove over a Tesla to our university, and we had to show that the attack actually worked.

19:21.160 --> 19:26.120
We also tried contacting some of the other probably affected companies.

19:27.040 --> 19:30.700
Karma and Triumph didn't really engage with us, they didn't really reply.

19:30.700 --> 19:39.040
McLaren did eventually reply, but when we said that we wouldn't remove their name from our paper, they weren't very interested in talking to us anymore.

19:40.180 --> 19:44.480
They did release a public statement online, which is quite funny.

19:45.320 --> 19:53.620
So the statement was on that URL, they removed it from their website, but I indexed it on the Wayback Machine so you can still find it.

19:54.340 --> 19:56.960
I'll point out some interesting facts from the statement.

19:57.300 --> 20:03.440
So it starts by, we have been alerted, which is nice because they acknowledge that we contacted them, so we are off the hook.

20:03.900 --> 20:11.160
And then they continue by saying, the relay attack, and we didn't do any relay attacks, so I'm not sure what they're talking about.

20:11.420 --> 20:18.440
And then they try to explain what a relay attack is, and they say, if you leave your key close to the vehicle, it could be scanned.

20:19.320 --> 20:22.380
Now, a relay attack doesn't work that way at all.

20:22.380 --> 20:28.800
If you leave your key close to your car, I'm going to get in, I'm going to drive off, I don't care about the relay part.

20:30.620 --> 20:42.960
So they continue, and they say, the second attack includes, it takes about 100 days, and it requires a skilled attacker, and skilled assembly and use.

20:42.960 --> 20:47.120
So I was kind of flattered, because it means that they read the paper we sent them.

20:48.020 --> 20:52.700
And then they continue reading, and they again explain how this attack works.

20:53.040 --> 20:57.280
And they say that for this attack, you have to be close to the key fob.

20:57.660 --> 21:00.800
Now, the attack is called a car-only attack.

21:01.380 --> 21:04.180
So I never have to be close to the key fob.

21:04.520 --> 21:06.980
This is a little section from the paper.

21:07.080 --> 21:12.700
So the car-only attack is a little subsection in the paper, because it's not really a practical attack.

21:12.700 --> 21:17.900
And the second sentence basically says, without ever being in proximity of the key fob.

21:18.860 --> 21:21.720
Now, if you own a McLaren, there's no need to worry.

21:22.240 --> 21:26.560
McLaren takes the security of all their vehicles very seriously.

21:29.620 --> 21:33.100
So after this research, we can of course draw some conclusions.

21:33.380 --> 21:37.540
I think everyone here knows, but don't use proprietary cryptography.

21:38.240 --> 21:45.000
And if you're a chip manufacturer, secrecy of data sheets is simply annoying.

21:45.000 --> 21:48.220
And it doesn't really stop any attacker.

21:48.460 --> 21:54.660
It just makes it more difficult for legitimate researchers to find vulnerabilities and fix them.

21:54.960 --> 22:01.140
And if you're a car manufacturer, just buying stuff from a tier 1 or tier 2 supplier is maybe not the best idea.

22:01.140 --> 22:05.400
Maybe you should work with them and try to figure out what you're actually buying from them.

22:06.040 --> 22:13.180
And if you're making a product that has a microcontroller with firmware in it, don't rely on the secrecy of the firmware for security.

22:13.260 --> 22:15.540
There's always a way to get the firmware out.

22:15.700 --> 22:19.180
But that also doesn't mean that you should make it easy to get the firmware out.

22:20.260 --> 22:24.720
Now, there's a few other issues we've seen with similar systems.

22:24.720 --> 22:33.240
So, Flavio Garcia, for example, he showed that Volkswagen was using only 7 keys for all of their remoteless entry systems.

22:33.240 --> 22:37.720
So, this includes Audi, Skoda, I think, and all of the other Volkswagen brands.

22:38.620 --> 22:47.200
And then, of course, if you're one of the designers of such systems, maybe read the papers that people have published about this kind of stuff, so that you know what kind of attacks are out there.

22:47.980 --> 22:51.420
But then, most importantly, this is a tweet from one of my colleagues.

22:51.420 --> 23:00.100
And Tesla got a lot of heat for using only 40-bit keys, but at least they did the effort of fixing it, and they replied to us when we emailed them.

23:00.260 --> 23:02.440
And this cannot be said for the other manufacturers.

23:04.180 --> 23:10.080
So, then I have a video we made to show how the attack works, if I can.

23:12.880 --> 23:17.980
So, I will just talk through the video to explain again how the attack works, just to recapitulate.

23:18.640 --> 23:22.200
So, it's actually quite easy to find these cars if you want to steal them.

23:22.200 --> 23:25.680
They all have to charge, and they all do it in the same location.

23:28.860 --> 23:34.360
So, what you do is you go to a supercharger, you hide there, and you wait for someone to charge their car.

23:38.100 --> 23:42.300
Now, what most people do is it takes like 30 or 45 minutes to charge their vehicle.

23:42.580 --> 23:47.200
So, they'll take a walk, or they'll go to a nearby coffee shop, so it's also easy to find your target.

23:49.000 --> 23:54.680
Now, as an attacker, we need the car identifier, and the easiest way to get it is to just sniff it from the vehicle.

23:54.680 --> 24:01.280
So, you walk up to the vehicle, and you just receive it, basically.

24:03.120 --> 24:06.780
So, the output on top, the terminal output, is recorded from my phone.

24:10.110 --> 24:14.670
Then you walk to your target, you send your chosen challenge, and your random challenge.

24:16.230 --> 24:26.110
You record the responses, you download the candidate key file, you brute force the remaining keys, and in about five seconds you have a perfect copy of the key fob.

24:26.790 --> 24:31.610
You walk back to the car, you unlock it, don't forget to unplug it.

24:40.530 --> 24:45.350
The protocol is the same for unlocking and starting, so once you can unlock it, you can also start the vehicle.

24:45.670 --> 24:47.050
You start it, and you drive off.

