Hello, my name is Jonghyuk Song. I'm a second author of this talk and I'm going to present today instead of the first author. The title of this talk is Smart Black Box Forging of UDSCAM. It will describe how to do UDSCAM forgingware in the black box environment. So, who we are? We are all Red Team and Blue Team members in Autocrypt. Autocrypt is a mobility security company and recently we focus on the automotive cybersecurity. We have conducted project tests and pen tests with automakers and tier suppliers. Also, currently we are developing a virtual specialized for vehicles. So, let's get started. So, in this talk, I would like to share tips and know-how that we have experienced during the forging test in the automotive industry. So, first let's talk about forging tests in the automotive industry. Automakers often have no choice but to perform black box forging because the tier suppliers don't provide the codes to automakers. So, let's get started. Also, automakers should test the completed vehicle. Since about hundreds of issues are connected in the completed vehicle, it is very hard to get all issues source codes and instrument them and build them again for forging. So, it's inevitable to do black box forging tests in the completed vehicle. So, it's inevitable to do black box forging tests in the completed vehicle. However, black box forging for vehicle is not easy. First, we cannot do coverage-guided forging because there is no source code. Second, we cannot do crash triage in detail because we can't connect into the inside of ECUs. The only way we can monitor status and obtain the information about the target vehicle is the OBDII port or ECU. Third, we cannot test the test in the completed vehicle with a black box forging. You know we cannot do much things only using this lines. But we have to do in black box forging. In this talk, we defined three black box forging challenges. First, test case generation. In black box forging, coverage-guided forging is impossible. So, we can't monitor code coverage as a test case generation. achieved by the test case. Then how to generate effective test case? Second, fail detection. In black box fuzzing, there is no way to connect into the target by SSH T-shell or debug port. So we can't directly monitor the fuzzing process. Then how to monitor target and how to know other fuzzing issues? Third, reset. Fuzzer should continue to fuzzing even if the target is dead. In order to do that, fuzzer should automatically initialize the target. But again, there is no way to connect into the SUT. Then how to reset or reboot SUT when it is dead? Can you solve these challenges only using the HANA scan lines or OBD port? So this talk proposed how to do smart black box fuzzing for UDS scan. To do smart fuzzing, we solved the previous challenges by using UDS features. This talk will be a practical guide for people who want to do automotive fuzzing tests in the black box. So let's go to the black box settings. This is the overview of this presentation. So until now it was introduction. Next, I'm gonna explain how to solve each challenges, test case generation, mail detection, and target reset. And finally, I'll conclude the talk. Okay, let's talk about test case generation first. Test case generation is most important part of fuzzing. We consider three things to generate effective test case. First, it's efficient to generate the test case only for the available UDS service. Second, fuzzer should transmit the test case complying with the message sequence. Third, fuzzer should transmit multiple frames, when a test case is solved. To effective fuzzing, fuzzer should consider the above UDS scan features. So I'm gonna explain the details of each item in the next slide. Before that, I'm gonna describe the basic rules of test case generation. Fuzzer sets the target issue and generates test case for each UDS service. It means that can ID and service ID are fixed, and other fields are mutated. Of course, you can mutate can ID and service ID, but it is not effective because most issues filter wrong can ID and service ID. There are total 26 services in UDS, and each service has their own service ID. Fuzzer doesn't need to generate and test the all UDS services, because not all services are available in the issue. In my experience, usually about 10 services are available in the issue. So it is efficient to generate test cases only for the available services in the target issue, and test only them. So, before start fuzzing, fuzzer should check the available services on the target. To check the available service, first, fuzzer sends a valid care message of each UDS service. This valid message is the request that issue must send a response. Second, fuzzer checks the response to the request. Then, fuzzer decides the availability of the service depends on the response. If it is a positive response, the service is available. Or if there is no response, the service is unavailable. And if a negative response is received, fuzzer decides depends on the negative response code, which is NRC. It means that fuzzer doesn't decide that the service is unavailable, even if the negative response is returned. Some negative responses are decided as available. I'm going to show some examples in the next slide. First, this is the example of positive response and no response. If a positive response is returned, we can know that the service is available. It's very trivial. In this example, fuzzer checks diagonal stick section control service. When a positive response is returned, we can know that diagonal stick section control service is available. Second, if there is no response within a timeout period, fuzzer decides that the service is unavailable. Because there is no response to the message that should be answered, it means that the service is unavailable in the issue. Last case is negative response. As I said, not all negative responses are determined as unavailable. Fuzzer should decide depends on the NRC. For example, sub function not supported negative response is decided as available. Because it means that service is available, but just sub function is wrong. So, if we can fix the sub function value, it returns a positive response. However, service not supported negative response is decided as unavailable. Because it means the service is not supported. So, fuzzer should make a difference decision for each NRC. Next, fuzzer should consider the message sequence when it generates test cases. Some UGS services have the message sequence. It means that there are some services that should be proceeded before the target service is requested. Fuzzer should follow the message sequence. For example, if fuzzer wants to test write memory by address service, the test case should be transmitted after both diagonal succession control and security assess are passed. If the fuzzer doesn't pass one of the two services, the target issue will ignore the write memory by address request. So, the test case becomes meaningless. Therefore, fuzzer must know the message sequence of all UGS services. Next, fuzzer should also follow the multi-frame transmission rule, which is ISO-TP. If test case payload exceeds 8 bytes, the test case should be transmitted in multi-frames, and it should follow the ISO-TP rule. The large payload should be divided into multi-frames, and fuzzer should transmit the first frame at first, then fuzzer should transmit the consecutive frames after receiving the flow control frame. If fuzzer doesn't follow this rule and just transmits the large payload, the target issue will ignore the test case. Until now, I talked about test case generation. Now, I'm going to talk about how to detect a failure caused by fuzzing test. The fuzzer must decide pass or fail at each time whenever it sends a test case. We introduced four failure criteria. First, no response to the valid request. After test case transmission, fuzzer sends the valid request to the issue and checks the response. If there is no response within a timeout period, it's a fail. Second, specific negative response to the valid request. If fuzzer receives some specific negative response to the valid request, it's also a fail. But not all negative responses are a fail. First and second criteria are the same as the way used in the services availability check. Third one is diagnostic trouble code, which is DTC occurrence. Fuzzer periodically checks whether DTC occurs. If new DTC occurs, it reports as fail. Last one is user-specified cam message occurrence. If tester specifies a certain cam message as fail, the fuzzer report fail when that cam message occurs. So, now I will describe the details of each criteria. First one is no response. Fuzzer sends a valid request after test case transmission to check target state. If there is a positive response, it's pass. But there is no response within a timeout period, fuzzer reports fail. In UDS, the default timeout period is 15 milliseconds. Next, negative response. If there is a negative response to the valid request, fuzzer reports fail. Depending on the NRC. As it is service availability check, certain NRCs are decided as pass, not fail. This example is same as service availability checking. Even if sub-function not supported negative response is returned, it's pass. But if service not supported negative response is returned, it's fail. So, fuzzer should decide depending on the NRC. Third one is diagnostic trouble call. If a new DTC occurs, it's fail. Fuzzer can detect the occurrence of new DTC by sending read DTC information request. If there is a new DTC, the ECU will return the response with new DTC information. If there is no new DTC, it's pass. But if there is a new DTC occurs, it'll be fail. Last one is is user-specified cam-message occurrence. Tester can specify a certain cam-message occurrence as failed. Then if the cam-message occurs, further reports fail. But there is a precondition to use this method. Further, must be able to monitor the cam-message to be transmitted. So, this example shows the overview. For example, when we do forging test to the head-unit issue, we can define the following cam-message occurrence as failed, such as brake press or accelerator pedal press, or any other cam-message that have no relation with head-unit. And can cause the dangerous situation while driving. It's a kind of custom rule, so tester just specify some cam-message which are prohibited occurrence when forging test is conducted. But as I said, it requires a precondition. To monitor the occurrence of cam-messages, further should be able to monitor the cam-bus. So, we've talked about how to detect fail. When fail occurs, further should initialize the target. Now I'm going to talk about how to reset the target issue. When fail occurs, it means that the target is dead or some trouble occurs. In that case, further should initialize the target to continue the forging test. If the further cannot initialize the target, the forging test will be terminated or meaningless test will be conducted. Test can manually initialize SUT, but it's a very tough task to do whenever fail occurs because tester should keep an eye on the SUT while the forging is in progress. You know, forging test is a very time-consuming task. So, people cannot stay during the whole time. So, automatic SUT reset is required. So, this is the reset overview. Left figure shows the example when there is no automatic reset, and right one shows the example when there is a reset process. If further transmits the test case, even if the SUT is dead, dead will be a meaningless test because SUT is dead. So, we should reset or reboot the target when fail occurs. So, right figure shows the example with reset. When further detects fail, it executes reset process to initialize the target. After target is reset, after reset, the test will be continued. Then, how to reset? We can use two UDS services, issue reset and clear diagnostic information. First, issue reset service can do reset issue. If subfunction value is 1, hard reset is performed. Hard reset is performing power on or start up the target, the issue. And if subfunction value is 3, soft reset is performed. Soft reset is just restart the application program. So, in my experience, hard reset, I recommend hard reset. But sometimes, soft reset also works. And second one is clear diagnostic information service. This service clear all diagnostic trouble code data, which is DTC. You can specify the data you want clear using the parameters. But we, I recommend to clear all DTC data by setting all parameters as FF. So, in the slide, I just write 04, 14, and 3 FF. That 3 FF means choose all all data to be clear. So, when, as I've said before, the fuzzer can detect fail. By detecting DTC occurs. So, when DTC occurs, the fuzzer detect as fail. And then, fuzzer should clear that DTC to continue the next test case. So, I'm going to conclude this talk. In automotive industry, black box, fuzzing, black box fuzzing testing is often required. To do smart black box fuzzing, fuzzer should consider the features of UDS scan as each step. First, at test case generation, fuzzer should check the available services and generate test cases for only the available services. This is more efficient. And the test case should be generated and transmitted with the consideration about message sequences. Also, frame types. If a payload is over 8 bytes, the payload should be transmitted in multi-frames. And there are four methods to detect fail. First one is no response. Second one is negative response. After test case transmission, fuzzer will transmit a valid request. And if there is no response or some negative response is returned, that will be fail. But not all negative responses are fail. So, fuzzer should decide depends on the energy. And third one is dynamic travel code. And also, user-specified canned message occurrence can be fail criteria. Tester can specify some canned message occurrence to be a fail. And in the reset process, fuzzer should be, fuzzer should automatically reset the target. Fuzzer can, fuzzer can reset the issue by using issue reset and clear diagnostic information service. So, when fuzzer detect a fail, the fuzzer should automatically reset by using both service. After reset is confirmed, then fuzzer should transmit the next test case. So, this is end of my presentation. Thank you very much. Thank you. you you you you you you you you