1 00:00:00,000 --> 00:00:03,460 Hello, my name is Seunghee Han. 2 00:00:03,500 --> 00:00:08,740 I'm a small girl from Korea and the first author of this talk. 3 00:00:09,680 --> 00:00:15,420 It's my first time at DEF CON, so I'm very nervous and so excited. 4 00:00:16,140 --> 00:00:25,500 Anyway, the title of this talk is UDS on CAN attacks, discovering safety, critical risk by fuzzing. 5 00:00:25,500 --> 00:00:35,940 In this presentation, I will talk about the weak points that I found in the latest EV models by fuzzing test. 6 00:00:38,060 --> 00:00:43,300 Before the presentation, let me introduce ourselves. 7 00:00:43,300 --> 00:00:47,660 We are all security researchers at Autocrypt. 8 00:00:47,660 --> 00:00:51,740 Autocrypt is a mobility security company. 9 00:00:51,740 --> 00:00:56,520 Nowadays, we are focusing on vehicle security. 10 00:00:56,520 --> 00:01:05,460 With the 2020 WP.29, it's car cybersecurity rules. 11 00:01:05,460 --> 00:01:10,020 All car makers must get CSMS certification. 12 00:01:10,020 --> 00:01:16,810 So, we have been doing fuzzing tests with many OEMs and tier suppliers. 13 00:01:17,880 --> 00:01:23,440 During the fuzzing test, I found some strange behavior in the car. 14 00:01:23,440 --> 00:01:27,680 The moving car was stopped, or it didn't move. 15 00:01:28,260 --> 00:01:35,820 This video is showing the weak point that I found in the latest EV model. 16 00:01:35,820 --> 00:01:37,480 Let's take a look. 17 00:01:41,260 --> 00:01:43,420 Can we play a sound? 18 00:01:52,840 --> 00:01:55,520 Okay, let's see one more. 19 00:01:57,260 --> 00:01:59,960 The moving car was stopped. 20 00:01:59,960 --> 00:02:01,480 Are you interested? 21 00:02:02,400 --> 00:02:08,940 Now, I will explain why this happened, so please pay attention. 22 00:02:09,780 --> 00:02:12,520 Contents are as follows. 23 00:02:12,520 --> 00:02:16,680 First, I will explain UDS and fuzzing. 24 00:02:16,680 --> 00:02:26,960 Then, I will explain what the type of attacks that I did, and explain how to prevent this weak point. 25 00:02:27,960 --> 00:02:33,600 I told you, I found a weakness during the fuzzing test. 26 00:02:33,600 --> 00:02:38,500 The moving car was stopped, or didn't move at all. 27 00:02:38,500 --> 00:02:45,840 I will explain how these problems are connected to UDS, and what caused them. 28 00:02:46,560 --> 00:02:53,060 First, UDS is a protocol used for communication with vehicles. 29 00:02:53,060 --> 00:02:57,560 It is defined in ISO 14229. 30 00:02:57,560 --> 00:03:07,880 I don't have a car, but if you have one, you probably go to a repair shop when something goes wrong with your car, right? 31 00:03:08,160 --> 00:03:13,400 The tool used to find out what's wrong is UDS. 32 00:03:14,200 --> 00:03:22,520 During this process, the diagnostic tool and the car communicate using UDS to determine the problem. 33 00:03:24,520 --> 00:03:36,940 As I mentioned, UDS services perform important functions, so not everyone can use these services freely. 34 00:03:36,980 --> 00:03:41,320 You can see some of the security measures on this slide. 35 00:03:41,320 --> 00:03:43,900 I will give you more details later. 36 00:03:46,310 --> 00:03:55,070 To ensure that UDS is well protected, many car companies do fuzzing tests. 37 00:03:55,070 --> 00:04:03,280 Fuzzing is a testing method where random or unusual data is fed into a system to find problems. 38 00:04:03,770 --> 00:04:13,410 The goal of this test is to see how the system behaves under stress and to find security issues. 39 00:04:13,410 --> 00:04:21,380 In the vehicle industry, we commonly do black box fuzzing using commercial fuzzers. 40 00:04:21,380 --> 00:04:28,080 There are many talks about CAN, UDS, and UDS fuzzing in CHP. 41 00:04:28,080 --> 00:04:32,740 Check out those talks for more details. 42 00:04:33,640 --> 00:04:40,740 During the UDS fuzzing test, we discovered something is wrong. 43 00:04:40,740 --> 00:04:45,120 The vehicle malfunctioned with two services. 44 00:04:45,120 --> 00:04:52,080 The first is ECU reset, and the second is communication control. 45 00:04:52,220 --> 00:04:58,040 Based on these findings, we made real-world attack scenarios. 46 00:04:58,040 --> 00:05:06,910 The first scenario is sudden stop, and the second is disabling of vehicle usage. 47 00:05:08,610 --> 00:05:16,370 Before explaining the attacks, you need to understand the two services. 48 00:05:16,370 --> 00:05:20,150 The first service is ECU reset. 49 00:05:20,150 --> 00:05:23,550 It is used to reset the ECU. 50 00:05:23,550 --> 00:05:29,420 It is often used for troubleshooting or testing purposes. 51 00:05:37,160 --> 00:05:41,200 This is the actual message that I did. 52 00:05:42,020 --> 00:05:50,080 You can perform hard reset with the first sub-function. 53 00:05:50,780 --> 00:05:54,300 This is the hard reset message. 54 00:05:54,680 --> 00:06:01,020 And you can perform soft reset with the third sub-function. 55 00:06:02,040 --> 00:06:05,200 It's the soft reset message. 56 00:06:12,420 --> 00:06:20,600 With the ECU reset message, you can stop the vehicle's engine. 57 00:06:20,600 --> 00:06:24,440 There are two scenarios that I did. 58 00:06:24,440 --> 00:06:32,280 The first is sending an ECU reset message to a moving vehicle to make it stop suddenly. 59 00:06:32,380 --> 00:06:37,540 And the second scenario is vehicle disabling. 60 00:06:37,540 --> 00:06:45,000 Continuously sending ECU reset messages to disable the vehicle's functions. 61 00:06:45,640 --> 00:06:53,760 The root cause of these issues is that ECU reset is not disabled in drive mode. 62 00:06:54,060 --> 00:07:01,660 Normally, this service is restricted during driving because it can be dangerous. 63 00:07:01,660 --> 00:07:14,980 And ISO 14229 says that the condition of server is ignition is on and system not be in an operational mode. 64 00:07:17,500 --> 00:07:24,800 I tested this on a new Lattice EV SUV model. 65 00:07:24,800 --> 00:07:28,920 And the target ECU is the gateway control unit. 66 00:07:28,920 --> 00:07:34,360 I conducted the test while the vehicle was driving. 67 00:07:37,140 --> 00:07:40,180 Here are the attack steps. 68 00:07:40,180 --> 00:07:46,000 Connect the laptop to the vehicle's OBD port using a CAN interface. 69 00:07:46,260 --> 00:07:49,120 And just start the engine. 70 00:07:49,460 --> 00:07:51,820 Then we send a message. 71 00:07:51,860 --> 00:07:53,940 And observe the vehicle. 72 00:07:53,940 --> 00:07:55,170 It's that simple. 73 00:07:56,890 --> 00:08:01,730 This photo shows the hardware setup. 74 00:08:01,730 --> 00:08:10,270 The OBD cable is connected to the OBD port and the laptop is connected via the CAN interface. 75 00:08:10,270 --> 00:08:15,570 The CAN bus parameters are set to standard values. 76 00:08:16,650 --> 00:08:21,670 The first scenario is sudden stop scenario. 77 00:08:22,730 --> 00:08:33,040 Set up the hardware setting and just we send the ECU reset message to moving vehicle. 78 00:08:34,170 --> 00:08:38,080 Then the moving vehicle comes to a sudden stop. 79 00:08:40,650 --> 00:08:44,550 Let's check it out through the video. 80 00:08:44,730 --> 00:08:49,450 The video is very short, so watch it carefully. 81 00:08:59,170 --> 00:09:01,910 Um... no sounds. 82 00:09:01,910 --> 00:09:02,970 Okay. 83 00:09:05,070 --> 00:09:07,170 Let's see one more. 84 00:09:09,410 --> 00:09:14,530 We sent a message, then the moving car was stopped. 85 00:09:16,810 --> 00:09:18,970 I'm gonna play one more. 86 00:09:18,970 --> 00:09:22,090 This time, please look at the cluster. 87 00:09:27,550 --> 00:09:32,150 After the message, the cluster was turned off. 88 00:09:32,150 --> 00:09:36,030 It was rebooted, but the car shut down. 89 00:09:37,030 --> 00:09:43,300 The video on the left shows the exterior. 90 00:09:50,520 --> 00:09:59,820 You can see the car moving back and forth and back and forth, which shows that the brake pedal was not pressed. 91 00:10:02,100 --> 00:10:07,180 This attack can cause mechanical failure or damage. 92 00:10:07,180 --> 00:10:12,360 At high speeds, this could lead to serious accidents. 93 00:10:15,820 --> 00:10:19,670 The second scenario is vehicle disabling. 94 00:10:20,100 --> 00:10:28,480 It's similar to the first scenario, but in this case, the ECU reset message is sent continuously. 95 00:10:29,520 --> 00:10:33,630 The vehicle cannot be controlled until the attack stops. 96 00:10:37,910 --> 00:10:44,850 The vehicle starts, and the message is sent continuously. 97 00:10:48,890 --> 00:10:55,610 The vehicle will not start, and the gear shifting is disabled. 98 00:10:55,960 --> 00:10:59,420 The vehicle is completely uncontrollable. 99 00:11:07,970 --> 00:11:11,020 Let's watch it one more time. 100 00:11:11,710 --> 00:11:13,670 Again, the cluster. 101 00:11:13,670 --> 00:11:16,050 Please look at the cluster. 102 00:11:19,090 --> 00:11:25,160 The cluster screen turns off, and multiple warnings appear. 103 00:11:29,310 --> 00:11:38,410 Due to the continuous attack, the cluster shuts down, and the vehicle becomes uncontrollable. 104 00:11:39,850 --> 00:11:44,050 The driver appears to be very confused. 105 00:11:48,310 --> 00:11:52,430 Here are the logs of the ECU reset attacks. 106 00:11:52,430 --> 00:11:56,410 Some parts are blurred for security reasons. 107 00:11:56,730 --> 00:12:01,590 You can see the logs of both hard reset and soft reset. 108 00:12:03,970 --> 00:12:15,850 To summarize the ECU reset attack, in drive mode, you can stop the engine by using ECU reset message. 109 00:12:16,750 --> 00:12:22,250 Continuous attacks can prevent the driver from controlling the vehicle. 110 00:12:22,250 --> 00:12:29,050 Also, the cluster will reboot and appear multiple warnings. 111 00:12:29,050 --> 00:12:33,570 These attacks can be very dangerous on the road. 112 00:12:33,650 --> 00:12:40,650 Therefore, this service must be operated only in not ready state. 113 00:12:42,190 --> 00:12:45,710 Here is the first service description. 114 00:12:45,710 --> 00:12:46,750 How is it? 115 00:12:46,750 --> 00:12:48,470 Good? 116 00:12:49,110 --> 00:12:52,910 Okay, now I will explain the second service. 117 00:12:55,900 --> 00:13:01,160 The second service is communication control. 118 00:13:02,440 --> 00:13:10,180 This service is used to control the communication functions of the ECU. 119 00:13:11,740 --> 00:13:15,200 This is the actual message that I did. 120 00:13:16,380 --> 00:13:22,460 And also, you can set the control type using the sub-functions. 121 00:13:23,420 --> 00:13:30,460 The strange behavior appears with sub-function 1 and 3. 122 00:13:35,820 --> 00:13:43,260 Use sub-function 1 to enable RX and disable TX of the ECU. 123 00:13:44,960 --> 00:13:49,240 This is the message for sub-function 1. 124 00:13:49,260 --> 00:13:58,460 And you also use sub-function 3 to disable RX and TX. 125 00:13:58,880 --> 00:14:02,260 This is the message for sub-function 3. 126 00:14:03,000 --> 00:14:09,580 You can control the issue's communication type using this method. 127 00:14:12,190 --> 00:14:22,730 An attacker can disable TX and RX of the ECU by transmitting communication control message. 128 00:14:23,070 --> 00:14:26,750 I performed two scenarios. 129 00:14:27,310 --> 00:14:32,450 The first is brief pause and sudden movement. 130 00:14:32,450 --> 00:14:37,170 And second scenario is vehicle disabling. 131 00:14:37,170 --> 00:14:45,510 The root cause of this strange behavior is that communication control is not disabled in drive mode. 132 00:14:46,230 --> 00:14:54,390 And also, this service does not require security authentication. 133 00:14:56,090 --> 00:15:01,650 The first scenario is brief pause and sudden movement. 134 00:15:01,650 --> 00:15:08,510 Set the hardware setting and set the gear to drive. 135 00:15:08,510 --> 00:15:11,130 Then just resend the message. 136 00:15:13,600 --> 00:15:20,200 The driver will release the brake pedal to move forward. 137 00:15:20,720 --> 00:15:29,480 But the vehicle does not move for a few seconds even when the foot is taken off the brake pedal in drive mode. 138 00:15:29,480 --> 00:15:34,760 After a few seconds, the vehicle suddenly moves. 139 00:15:38,090 --> 00:15:41,050 Okay, let's check it out through the video. 140 00:16:02,110 --> 00:16:05,990 I'm sorry, the sound is not playing. 141 00:16:07,310 --> 00:16:09,850 I'm going to play one more. 142 00:16:10,430 --> 00:16:12,270 Please check the cluster. 143 00:16:15,210 --> 00:16:17,950 The gear is set to drive. 144 00:16:17,950 --> 00:16:19,770 Then we send a message. 145 00:16:20,770 --> 00:16:25,070 The vehicle doesn't move even when the brake pedal is released. 146 00:16:25,330 --> 00:16:29,970 Then, after a few seconds, it suddenly moves. 147 00:16:30,330 --> 00:16:33,010 It's an interesting symptom. 148 00:16:36,050 --> 00:16:39,370 I will explain the second scenario. 149 00:16:39,370 --> 00:16:43,870 The second scenario is vehicle disabling attack. 150 00:16:44,830 --> 00:16:50,390 It's similar to the first, but this time we send a message continuously. 151 00:16:50,390 --> 00:16:59,730 When attack messages are sent in succession, the driver loses complete control over the vehicle. 152 00:17:02,370 --> 00:17:04,030 Let's take a look. 153 00:17:24,650 --> 00:17:27,770 We send messages continuously. 154 00:17:37,890 --> 00:17:43,910 Yeah, the driver sets the gear to drive. 155 00:17:45,050 --> 00:17:47,330 Then we send a message. 156 00:17:48,650 --> 00:17:52,210 We send messages continuously. 157 00:17:55,290 --> 00:18:00,750 The scariest part is that we don't know when the attacker will stop. 158 00:18:01,390 --> 00:18:11,810 When we stop the attack, the vehicle suddenly starts moving. 159 00:18:13,090 --> 00:18:17,990 If the driver is pressing the gas, it's very, very dangerous. 160 00:18:19,110 --> 00:18:25,230 Okay, let me summarize the communication control attack. 161 00:18:25,230 --> 00:18:32,190 This type of attack can disable the transmission and reception of the ECU. 162 00:18:32,190 --> 00:18:41,210 As shown in the previous video, it can control the vehicle either briefly or continuously. 163 00:18:42,210 --> 00:18:52,270 Unlike on previous attack ECU reset, this attack doesn't turn off the ECU. 164 00:18:52,610 --> 00:18:58,510 So, when the attack stops, the vehicle could suddenly move. 165 00:19:00,960 --> 00:19:07,270 Therefore, this service should be operated only if not ready. 166 00:19:08,470 --> 00:19:13,230 Here are the logs of communication attacks. 167 00:19:13,290 --> 00:19:18,390 Some parts are blurred for security reasons too. 168 00:19:20,350 --> 00:19:26,430 So, how could these attacks happen in real life? 169 00:19:26,430 --> 00:19:28,330 You might wonder. 170 00:19:28,750 --> 00:19:31,390 Here are some examples. 171 00:19:31,390 --> 00:19:42,550 First, an attacker secretly enters the vehicle and connects the wireless OBD device. 172 00:19:44,090 --> 00:19:48,930 Some OEMs use wireless diagnostic tools. 173 00:19:48,950 --> 00:19:55,590 Since drivers usually don't check the OBD port, the vehicle could be unprotected. 174 00:19:56,590 --> 00:20:06,740 And second, attacks can happen from a short distance using wireless communication like Wi-Fi or Bluetooth. 175 00:20:07,870 --> 00:20:13,790 Some OEMs use Wi-Fi to connect diagnostic tools. 176 00:20:14,890 --> 00:20:20,710 Vehicles without security measures are very vulnerable to these types of attacks. 177 00:20:20,710 --> 00:20:24,530 That's why such attacks could happen at any time. 178 00:20:25,590 --> 00:20:31,410 So, I'll suggest two countermeasures for these attacks. 179 00:20:31,410 --> 00:20:41,650 The first, important services like ECU reset and communication control must be operated only in not ready state. 180 00:20:41,650 --> 00:20:44,770 It's meaning when the engine is off. 181 00:20:44,950 --> 00:20:53,850 The second, these services should only be possible after security access authorization is granted. 182 00:20:53,850 --> 00:20:58,270 I shortly mentioned the security access service earlier. 183 00:21:01,610 --> 00:21:10,110 To time restrictions, I will explain just one thing about the security access authorization. 184 00:21:10,470 --> 00:21:13,310 There is the security access service. 185 00:21:13,310 --> 00:21:19,970 This service uses a seed and key to provide security procedure. 186 00:21:19,970 --> 00:21:26,410 It only unlocks security when the correct seed and the key. 187 00:21:26,990 --> 00:21:35,150 If authentication fails, it locks the ECU for a certain time to enhance security. 188 00:21:36,430 --> 00:21:45,150 There is also, when connecting a diagnostic tool, some OEMs use security algorithms. 189 00:21:46,550 --> 00:21:51,210 And another measure is the gateway safety function. 190 00:21:53,790 --> 00:22:05,790 Previously, various data could be accessed without filtering, but now the gateway filters the data, allowing only certain information to be accessed. 191 00:22:06,370 --> 00:22:11,330 So, I discovered this weak point in April. 192 00:22:11,330 --> 00:22:18,190 After conducting additional tests, I reported on June 10th. 193 00:22:18,190 --> 00:22:28,670 But I was told that the vulnerability is not actionable in reality and that it works as it is designed. 194 00:22:28,670 --> 00:22:34,590 However, I still believe it is a weakness. 195 00:22:34,590 --> 00:22:42,650 I believe that after hearing my presentation today, you will agree with me. 196 00:22:44,010 --> 00:22:47,570 Okay, finally, let me summarize. 197 00:22:48,050 --> 00:22:54,050 Some diagnostic services can have a significant impact on vehicle driving. 198 00:22:54,590 --> 00:23:03,550 If an attacker transmits the diagnostic message to a driving vehicle, a serious accident may occur. 199 00:23:03,550 --> 00:23:09,990 So, security for diagnostic services is essential. 200 00:23:10,810 --> 00:23:14,510 That's all for my presentation. 201 00:23:14,510 --> 00:23:16,050 Thank you for listening. 202 00:23:18,740 --> 00:23:21,580 Okay, my name is Seunghee Han. 203 00:23:21,580 --> 00:23:25,180 I'm from South Korea, not North. 204 00:23:25,180 --> 00:23:26,340 Thank you!