KR102746386B1 - Method for identifying diagnostic id pairs of of compromised ecu on can and system performing the same - Google Patents
Method for identifying diagnostic id pairs of of compromised ecu on can and system performing the same Download PDFInfo
- Publication number
- KR102746386B1 KR102746386B1 KR1020220127696A KR20220127696A KR102746386B1 KR 102746386 B1 KR102746386 B1 KR 102746386B1 KR 1020220127696 A KR1020220127696 A KR 1020220127696A KR 20220127696 A KR20220127696 A KR 20220127696A KR 102746386 B1 KR102746386 B1 KR 102746386B1
- Authority
- KR
- South Korea
- Prior art keywords
- diagnostic
- message
- ecu
- bus
- attack
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/14—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
- H04L63/1408—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
- H04L63/1416—Event detection, e.g. attack signature detection
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/14—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
- H04L63/1408—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
- H04L63/1425—Traffic logging, e.g. anomaly detection
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L2012/40208—Bus networks characterized by the use of a particular bus standard
- H04L2012/40215—Controller Area Network CAN
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L2012/40267—Bus for use in transportation systems
- H04L2012/40273—Bus for use in transportation systems the transportation system being a vehicle
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
Abstract
본 발명은 CAN 버스 통신에서 위변조 ECU의 진단 ID 식별 방법 및 이를 수행하는 시스템에 관한 것이다.
본 발명에서는 침입이 탐지될 경우 침입 탐지를 일으킨 공격 CAN ID 메시지에 대해서 N번의 에러를 발생시키고, 임의로 선택된 진단 요청 ID 메시지를 전송하고 이에 대응되는 진단 응답 ID 메시지가 모니터링될 경우 해당 진단 응답 ID 메시지에 대해서 M번의 에러를 발생시키는 동작을 통해 위변조 ECU가 Bus off로 천이되는지 여부 판별을 통해 위변조 ECU의 진단 ID 식별 방법 및 이를 수행하는 시스템이 개시된다.
본 발명에서 제안하는 CAN 버스 통신에서 위변조 ECU의 진단 ID 식별 방법 및 이를 수행하는 시스템에 의하면 진단 ID pair 식별을 통한 위변조 ECU 식별을 가능하게 되었다. 따라서 차량 내부 네트워크 공격 탐지 IDS 기술과 무선 펌 웨어 업데이트 기능인 FOTA(Firmware Over The Air) 기술을 연결하는 핵심 기술로 향후 적용할 수 있게 되었으며 위변조 ECU에 대한 식별을 통해 차량 내부 네트워크의 보안성을 향상시킬 수 있게 되었다.The present invention relates to a method for identifying a diagnostic ID of a falsified ECU in CAN bus communication and a system for performing the same.
In the present invention, a method for identifying the diagnostic ID of a counterfeit ECU and a system for performing the same are disclosed by determining whether the counterfeit ECU has transitioned to Bus off through an operation of generating N errors for an attack CAN ID message that caused an intrusion detection when an intrusion is detected, transmitting a randomly selected diagnostic request ID message, and generating M errors for the corresponding diagnostic response ID message when the corresponding diagnostic response ID message is monitored.
According to the method for identifying a diagnostic ID of a counterfeit ECU in CAN bus communication and the system for performing the same proposed in the present invention, it is possible to identify a counterfeit ECU through identification of a diagnostic ID pair. Therefore, it can be applied in the future as a core technology connecting the IDS technology for detecting attacks on an in-vehicle network and the FOTA (Firmware Over The Air) technology, which is a wireless firmware update function, and it is possible to enhance the security of the in-vehicle network through identification of a counterfeit ECU.
Description
본 발명은 CAN 버스 통신에서 위변조 ECU의 진단 ID 식별 방법 및 이를 수행하는 시스템에 관한 것으로서, 보다 구체적으로는 진단 요청 메시지를 이용하여 IDS 공격을 당하고 있는 ECU의 진단 요청 CAN ID 및 진단 응답 CAN ID를 파악하는 CAN 버스 통신에서 위변조 ECU의 진단 ID 식별 방법 및 이를 수행하는 시스템에 관한 것이다.The present invention relates to a method for identifying a diagnostic ID of a counterfeit ECU in CAN bus communication and a system for performing the same, and more specifically, to a method for identifying a diagnostic ID of a counterfeit ECU in CAN bus communication by using a diagnostic request message to identify a diagnostic request CAN ID and a diagnostic response CAN ID of an ECU subject to an IDS attack and a system for performing the same.
차량 및 운전자의 안전성 및 편의성을 위해 차량 내에는 여러 ECU(EIectronic ControI Unit)들이 탑재되고 있다. 대표적인 차량 내부 네트워크인 CAN(Controller Area Network)은 Bus 형태의 통신 프로토콜로 CAN Bus에 연결된 모든 ECU들은 브로드캐스트(Broadcast) 방식으로 서로 메시지를 교환하며 통신한다. 도 1은 일반적으로 ECU간 통신에 사용되는 CAN 메시지(데이터 프레임)의 구조를 보여준다. 특히, CAN 메시지내 ID Field는 해당 메시지의 CAN lD를 나타내는 11 bits 값이다. 특정 CAN ID 메시지는 특정 ECU에서만 보내도록 설계되어 있다.For the safety and convenience of vehicles and drivers, various ECUs (Electronic Control Units) are installed in vehicles. CAN (Controller Area Network), a representative in-vehicle network, is a bus-type communication protocol in which all ECUs connected to the CAN Bus exchange messages with each other in a broadcast manner. Figure 1 shows the structure of a CAN message (data frame) generally used for communication between ECUs. In particular, the ID Field in a CAN message is an 11-bit value that indicates the CAN ID of the corresponding message. Specific CAN ID messages are designed to be sent only by specific ECUs.
초기 CAN 통신은 보안에 대한 고려없이 설계되었기 때문에 CAN 네트워크에 전송되는 CAN 메시지에 대해 어떤 ECU가 전송하였는지에 대한 인증 기능을 제공하지 않는다. 따라서 공격자가 CAN 네트워크에 유선으로 접근하거나 임의의 ECU를 위변조한 경우, 악의적인 CAN 메시지를 전송함으로써 차량의 오동작을 유발할 수 있다. 따라서, CAN 네트워크 상 공격 CAN 메시지를 탐지하기 위하여 수 많은 침입 탐지 시스템(Instrusion Detection System, IDS)이 제시되고 있다. 그러나 공격 탐지 외에도 해당 공격 메시지를 전송한 ECU에 대한 펌웨어 업데이트를 위해서는 위변조 ECU를 식별할 필요성이 대두되고 있다.Since the initial CAN communication was designed without considering security, it does not provide an authentication function for which ECU transmitted the CAN message transmitted on the CAN network. Therefore, if an attacker accesses the CAN network through a wire or falsifies a random ECU, he can cause the vehicle to malfunction by transmitting a malicious CAN message. Therefore, many intrusion detection systems (IDS) have been proposed to detect attack CAN messages on the CAN network. However, in addition to attack detection, there is a growing need to identify falsified ECUs in order to update the firmware of the ECU that transmitted the attack message.
본 발명은 상기와 같은 필요성을 해소하고자 하는 것으로서, 침입 탐지 시스템(IDS)에 의해 공격을 당한 ECU의 특정이 가능한 CAN 버스 통신에서 위변조 ECU의 진단 ID 식별 방법 및 이를 수행하는 시스템을 제공하는 것을 목적으로 한다.The present invention is intended to solve the above-mentioned need, and an object of the present invention is to provide a method for identifying a diagnostic ID of a falsified ECU in CAN bus communication capable of identifying an ECU attacked by an intrusion detection system (IDS), and a system for performing the same.
본 발명에서는 CAN 네트워크에서 침입 탐지 시스템에 의한 공격이 탐지된 경우, 해당 공격 CAN 메시지를 전송한 위변조 ECU의 진단 ID pair 식별을 통하여 위변조 ECU를 식별하는 방법 내지는 장치를 제공하는 것을 목적으로 한다.The purpose of the present invention is to provide a method or device for identifying a counterfeit ECU by identifying a diagnostic ID pair of the counterfeit ECU that transmitted the attack CAN message when an attack is detected by an intrusion detection system in a CAN network.
본 발명의 상기 목적은 CAN 버스 상에서 침입 공격을 받은 ECU를 특정하는 CAN 버스 통신에서 위변조 ECU의 진단 ID 식별 방법에 있어서, 침입 탐지가 발생할 경우 CAN 버스 상에서 침입 탐지를 발생시킨 메시지의 CAN ID(이하, '공격 CAN ID'라 함)를 파악하는 제1단계와, 상기 공격 CAN ID를 갖는 메시지(이하, '공격 CAN ID 메시지'라 함)가 CAN 버스 상에서 모니터링되는 경우 에러를 발생시키는 제2단계와, 상기 제2단계를 N번 반복 수행하는 제3단계와, 선택된 진단 요청 ID 메시지를 CAN 버스 상에 전송하는 제4단계와, 상기 진단 요청 ID 메시지에 대응되는 진단 응답 ID 메시지가 모니터링되는 경우 에러를 발생시키는 제5단계와, 상기 제5단계를 M번 반복 수행하는 제6단계와, - N과 M은 합이 32 이상인 자연수로 구성함 - 상기 제3단계 및 상기 제6단계가 완료된 이후 CAN 버스 상에 공격 CAN ID 메시지 또는 상기 진단 응답 ID 메시지가 모니터링되지 않는 경우 상기 진단 요청 ID 및 상기 진단 응답 ID를 진단 ID Pair로 특정하는 제7단계를 더 구비하는 것을 특징으로 하는 CAN 버스 통신에서 위변조 ECU의 진단 ID 식별 방법에 의해서 달성 가능하다.The above object of the present invention is to provide a method for identifying a diagnostic ID of a falsified ECU in CAN bus communication that specifies an ECU that has been subjected to an intrusion attack on a CAN bus, the method comprising: a first step of identifying a CAN ID (hereinafter referred to as 'attack CAN ID') of a message that has caused an intrusion detection on the CAN bus when an intrusion detection occurs; a second step of generating an error when a message having the attack CAN ID (hereinafter referred to as 'attack CAN ID message') is monitored on the CAN bus; a third step of repeatedly performing the second step N times; a fourth step of transmitting a selected diagnostic request ID message on the CAN bus; a fifth step of generating an error when a diagnostic response ID message corresponding to the diagnostic request ID message is monitored; a sixth step of repeatedly performing the fifth step M times; - N and M are natural numbers whose sum is 32 or more - If the attack CAN ID message or the diagnostic response ID message is not monitored on the CAN bus after the third and sixth steps are completed, the diagnostic request ID and the diagnostic response ID are monitored. This can be achieved by a method for identifying a diagnostic ID of a counterfeit ECU in CAN bus communication, characterized by further comprising a seventh step of specifying a diagnostic ID Pair.
바람직하게는 제2단계 및 제3단계는 제4단계 내지 제6단계와는 무관하게 독립적으로 순차 수행되는 것을 특징으로 하고, 제3단계 및 제6단계가 완료된 이후에도 CAN 버스 상에 공격 CAN ID 메시지 또는 진단 응답 ID 메시지가 모니터링되는 경우에는 진단 요청 ID 메시지와는 상이한 진단 요청 ID 메시지를 선택하여 제4단계 내지 상기 제6단계를 수행하는 제8단계를 더 구비되도록 하는 것이 바람직하다.Preferably, the second and third steps are sequentially performed independently from the fourth to sixth steps, and, if an attack CAN ID message or a diagnostic response ID message is monitored on the CAN bus even after the third and sixth steps are completed, it is preferable to further provide an eighth step of selecting a diagnostic request ID message different from the diagnostic request ID message and performing the fourth to sixth steps.
또한, 제8단계는 CAN 버스에 연결된 모든 ECU에 할당된 진단 요청 ID에 대해서 적어도 한 번씩은 수행되도록 하여 모든 ECU에 할당된 진단 요청이 발송되도록 하는 것이 좋다.Additionally, it is recommended that step 8 be performed at least once for each diagnostic request ID assigned to every ECU connected to the CAN bus, ensuring that the assigned diagnostic request is sent to all ECUs.
본 발명의 또 다른 목적은 CAN 버스 통신에서 침입 공격을 받은 위변조 ECU를 특정하는 시스템으로서, CAN 버스를 모니터링하는 CAN Bus 모니터링부와, 침입 여부를 탐지하는 침입 탐지 감지부와, CAN 버스에 연결된 각 ECU별로 할당된 진단 요청 ID 및 진단 응답 ID로 이루어지는 진단 Pair ID를 저장하는 진단 Pair ID 저장부와, 침입 탐지 감지부에서 침입이 감지될 경우 침입 탐지에 사용된 공격 메시지의 CAN ID를 저장하는 공격 CAN ID 저장부와, CAN 버스 상에 상기 공격 CAN ID를 갖는 메시지가 모니터링 되는 경우 에러 생성 신호를 발생시키는 공격 CAN ID 제어부와, 진단 Pair ID 저장부에 저장된 하나의 진단 요청 ID를 선택하고, 상기 선택된 진단 요청 ID에 대한 메시지를 생성하여 전송하는 진단 요청 메시지 생성부와, CAN 버스 상에 상기 진단 요청 ID 메시지에 대응되는 진단 응답 ID 메시지가 모니터링 되는 경우 에러 생성 신호를 발생시키는 진단 응답 제어부 및 공격 CAN ID 제어부에서 N번의 에러를 발생시키고, 진단 응답 제어부에서 M번의 에러를 발생시킨 경우에도 CAN 버스에 상기 공격 CAN ID 메시지 또는 상기 진단 응답 ID 메시지가 모니터링되지 않을 경우 선택된 진단 요청 ID 및 진단 응답 ID를 진단 Pair ID로 특정하는 Pair ID 특정부를 - N과 M은 합이 32 이상인 자연수들로 구성함 -포함하는 것을 특징으로 하는 위변조 ECU를 특정하는 시스템에 의해서 달성 가능하다.Another object of the present invention is a system for specifying a falsified ECU that has been attacked in CAN bus communication, comprising: a CAN Bus monitoring unit for monitoring a CAN bus; an intrusion detection and detection unit for detecting whether an intrusion has occurred; a diagnostic Pair ID storage unit for storing a diagnostic Pair ID composed of a diagnostic request ID and a diagnostic response ID assigned to each ECU connected to the CAN bus; an attack CAN ID storage unit for storing a CAN ID of an attack message used for intrusion detection when an intrusion is detected by the intrusion detection and detection unit; an attack CAN ID control unit for generating an error generation signal when a message having the attack CAN ID is monitored on the CAN bus; a diagnostic request message generation unit for selecting one diagnostic request ID stored in the diagnostic Pair ID storage unit and generating and transmitting a message for the selected diagnostic request ID; a diagnostic response control unit for generating an error generation signal when a diagnostic response ID message corresponding to the diagnostic request ID message is monitored on the CAN bus; and a diagnostic response control unit for generating an error generation signal when the attack CAN ID control unit generates N errors and the diagnostic response control unit generates M errors, and when the attack CAN ID message or the diagnostic response ID message is not monitored on the CAN bus, the selected diagnostic request ID message is transmitted. This can be achieved by a system for specifying a counterfeit ECU, characterized in that it includes a Pair ID specification part that specifies a diagnostic request ID and a diagnostic response ID as a diagnostic Pair ID - N and M are natural numbers whose sum is 32 or greater.
대표적인 차량 내부 네트워크인 CAN 상에 공격 메시지가 전송된 경우, 해당 공격 메시지를 전송한 위변조 ECU의 정상적인 펌웨어 업데이트 등에 대응하기 위해서는 위변조 ECU에 대한 식별이 필수적이다. When an attack message is transmitted on CAN, a typical in-vehicle network, identification of the counterfeit ECU that transmitted the attack message is essential in order to respond to normal firmware updates of the counterfeit ECU.
본 발명에서 제안하는 CAN 버스 통신에서 위변조 ECU의 진단 ID 식별 방법 및 이를 수행하는 시스템에 의하면 진단 ID pair 식별을 통한 위변조 ECU 식별을 가능하게 되었다. 따라서 차량 내부 네트워크 공격 탐지 IDS 기술과 무선 펌 웨어 업데이트 기능인 FOTA(Firmware Over The Air) 기술을 연결하는 핵심 기술로 향후 적용할 수 있게 되었으며 위변조 ECU에 대한 식별을 통해 차량 내부 네트워크의 보안성을 향상시킬 수 있게 되었다.According to the method for identifying a diagnostic ID of a counterfeit ECU in CAN bus communication and the system for performing the same proposed in the present invention, it is possible to identify a counterfeit ECU through identification of a diagnostic ID pair. Therefore, it can be applied in the future as a core technology connecting the IDS technology for detecting attacks on an in-vehicle network and the FOTA (Firmware Over The Air) technology, which is a wireless firmware update function, and it is possible to enhance the security of the in-vehicle network through identification of a counterfeit ECU.
도 1은 일반적으로 ECU간 통신에 사용되는 CAN 메시지(데이터 프레임)의 구조도.
도 2는 CAN 통신을 수행하는 ECU의 TEC 및 REC 값에 따른 ECU의 에러 상태 천이도.
도 3은 CAN 데이터 프레임을 활용한 UDS 서비스 메시지 구조도.
도 4는 진단기기를 이용하여 CAN Bus에 연결된 하나의 ECU를 진단하는 서비스를 수행하는 흐름도.
도 5는 본 발명에 따른 일 실시예로서, IDS 공격 대상인 위변조 ECU의 진단 Pair ID를 파악하는 흐름도.
도 6은 본 발명에서 제시하는 위변조 ECU 식별장치가 CAN Bus 상에 구현된 예시도.
도 7은 본 발명에 따른 일 실시예의 위변조 ECU 식별장치(500)의 논리적 구성도.Figure 1 is a structural diagram of a CAN message (data frame) generally used for communication between ECUs.
Figure 2 is an error state transition diagram of an ECU according to the TEC and REC values of the ECU performing CAN communication.
Figure 3 is a UDS service message structure diagram using CAN data frames.
Figure 4 is a flow chart for performing a service to diagnose one ECU connected to a CAN Bus using a diagnostic device.
FIG. 5 is a flowchart illustrating one embodiment of the present invention for identifying a diagnostic Pair ID of a counterfeit ECU that is a target of an IDS attack.
Figure 6 is an example diagram of a counterfeit ECU identification device proposed in the present invention implemented on a CAN Bus.
Figure 7 is a logical configuration diagram of a counterfeit ECU identification device (500) according to one embodiment of the present invention.
본 발명에서 사용하는 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 명세서 상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used herein is only used to describe specific embodiments and is not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this specification, the terms "comprises" or "has" and the like are intended to specify that a feature, number, step, operation, component, part or combination thereof described in the specification is present, but should be understood to not exclude in advance the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts or combinations thereof.
또한, 본 명세서에서, "~ 상에 또는 ~ 상부에" 라 함은 대상 부분의 위 또는 아래에 위치함을 의미하는 것이며, 반드시 중력 방향을 기준으로 상 측에 위치하는 것을 의미하는 것은 아니다. 또한, 영역, 판 등의 부분이 다른 부분 "상에 또는 상부에" 있다고 할 때, 이는 다른 부분 "바로 상에 또는 상부에" 접촉하여 있거나 간격을 두고 있는 경우뿐 아니라 그 중간에 또 다른 부분이 있는 경우도 포함한다.Also, in this specification, "on or above" means located above or below a target portion, and does not necessarily mean located above the direction of gravity. Also, when a portion such as a region or plate is said to be "on or above" another portion, this includes not only cases where it is in contact with or has a gap therebetween, but also cases where there is another portion in between.
또한, 본 명세서에서, 일 구성요소가 다른 구성요소와 "연결된다" 거나 "접속된다" 등으로 언급된 때에는, 상기 일 구성요소가 상기 다른 구성요소와 직접 연결되거나 또는 직접 접속될 수도 있지만, 특별히 반대되는 기재가 존재하지 않는 이상, 중간에 또 다른 구성요소를 매개하여 연결되거나 또는 접속될 수도 있다고 이해되어야 할 것이다.In addition, when a component is referred to as being "connected" or "connected" to another component in this specification, it should be understood that the component may be directly connected or directly connected to the other component, but may also be connected or connected via another component in between, unless otherwise specifically stated.
또한, 본 명세서에서, 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.Additionally, in this specification, the terms first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another.
도 2는 CAN 통신을 수행하는 ECU의 TEC 및 REC 값에 따른 ECU의 에러 상태 천이도이다. CAN 네트워크는 ECU간 통신 중 발생한 에러를 처리하기 위해 Error Handling과 Fault confinement 메커니즘이 정의되어 있다. CAN 통신 중 에러를 인지한 ECU는 즉시 데이터 프레임 전송을 중지하고 Error 프레임을 CAN Bus에 전송한다. Error 프레임 전송 이후에는 이전에 전송 실패한 데이터 프레임에 대해 재전송을 시도한다. 또한, ECU에는 에러 발생과 인지에 대한 처리를 위해 Fault confinement 메커니즘이 정의되어 있다. 도 2에 제시된 바와 같이 ECU는 TEC(Transmit Error Counter)와 REC(Receive Error Counter)를 이용하여 세 가지 상태(state)로 정의된다. ECU가 CAN 메시지 전송 중에 Error를 탐지한 경우 TEC가 8 증가시키고, ECU가 CAN 메시지를 수신 중일 때 Error를 인지하면 REC가 1 증가한다. Fig. 2 is an error state transition diagram of an ECU according to its TEC and REC values performing CAN communication. The CAN network defines Error Handling and Fault confinement mechanisms to handle errors that occur during communication between ECUs. An ECU that recognizes an error during CAN communication immediately stops transmitting data frames and transmits an Error frame to the CAN Bus. After transmitting the Error frame, it attempts to retransmit data frames that have previously failed to be transmitted. In addition, a Fault confinement mechanism is defined in the ECU to handle error occurrence and recognition. As shown in Fig. 2, the ECU is defined into three states using the Transmit Error Counter (TEC) and the Receive Error Counter (REC). If the ECU detects an Error during transmission of a CAN message, the TEC increases by 8, and if the ECU recognizes an Error while receiving a CAN message, the REC increases by 1.
CAN 통신을 수행하는 ECU는 초기에는 TEC(Transmit Error Counter)와 REC(Receive Error Counter)가 모두 0 인 Error Active 상태에 놓여진다. 이후, TEC 또는 REC가 128 이상인 상태가 되면 Error Passive 상태로 천이된다. Error Passive 상태에서 TEC 또는 REC가 128 이상인 경우에는 계속 해당 상태에 머물고, 두 개의 카운터가 모두 127 이하로 감소하면 Error Active 상태로 돌아간다. Error Passive 상태에서 TEC가 256 이상이 되면 Bus Off 상태로 천이되고 메시지 전송이 중단된다. Bus Off 상태에서 Time-out되거나 특정 복구 메커니즘(Recovery mechanism)에 따라 다시 Error Active 상태로 천이된다. CAN 표준에서는 이러한 복구 메커니즘으로 Bus Off 이후 128번의 연속된 11개의 recessive bit '1'이 모니터링 되는 경우 자동적으로 복구된다고 나타나 있다.The ECU performing CAN communication is initially placed in the Error Active state where both the Transmit Error Counter (TEC) and the Receive Error Counter (REC) are 0. Thereafter, if the TEC or REC exceeds 128, it transitions to the Error Passive state. In the Error Passive state, if the TEC or REC is 128 or higher, it remains in that state, and if both counters decrease below 127, it returns to the Error Active state. If the TEC exceeds 256 in the Error Passive state, it transitions to the Bus Off state and message transmission is stopped. In the Bus Off state, it transitions back to the Error Active state when a time-out occurs or a specific recovery mechanism is used. The CAN standard states that this recovery mechanism automatically recovers when 11 consecutive recessive bits of '1' are monitored 128 times after the Bus Off.
진단 서비스(Unified Diagnostic Services, UDS)는 차량 진단을 위해 정의된 프로토콜로서 차량 및 특정 ECU의 진단을 위해 IS0 14229로 표준화 되어 있다. UDS에는 다양한 진단 서비스가 정의되어 있으며 각 제조사는 ECU에 정의된 진단 서비스 이외에도 고유의 진단 서비스를 구현할 수 있다. 제조사에 의해 인증된 진단기기는 UDS를 통해 ECU 진단 외에도 ECU의 펨 웨어 업데이트나 초기화 등 다양한 서비스를 이용할 수 있다. 진단 서비스를 위한 메시지는 CAN 메시지와 동일한 형태이다. 다만 사용되는 CAN ID는 진단 요청 및 응답을 위한 CAN ID로 대체되며, 데이터 필드는 요청한 서비스를 위한 Service ID(SID)와 관련 파라미터(Sub-function, Prameter 등)가 포함된다.Unified Diagnostic Services (UDS) is a protocol defined for vehicle diagnosis and is standardized as IS0 14229 for vehicle and specific ECU diagnosis. Various diagnostic services are defined in UDS, and each manufacturer can implement its own diagnostic services in addition to the diagnostic services defined for the ECU. Diagnostic devices certified by the manufacturer can use various services such as firmware update or initialization of the ECU in addition to ECU diagnosis through UDS. Messages for diagnostic services are the same format as CAN messages. However, the CAN ID used is replaced with the CAN ID for diagnostic requests and responses, and the data field includes the Service ID (SID) for the requested service and related parameters (Sub-function, Pram, etc.).
UDS 통신은 차량 외부 진단기기가 서버(server) 역할을 수행하고 차량 내 ECU가 클라이언트(client) 역할을 수행한다. 진단기기는 차량 내 OBD-Ⅱ 포트를 통해 CAN Bus와 연결되어 특정 ECU들과 진단 서비스를 수행한다. 각 ECU마다 진단을 위한 진단 요청 CAN ID와 진단 응답 CAN ID가 정의되어 있으며 통상적으로 이를 통칭하여 진단 ID Pair라고 부른다. 진단기기가 특정 진단 요청 CAN ID로 이루어진 CAN 데이터 프레임(CAN 메시지)을 CAN Bus에 전송하는 경우, 이와 매칭되는 ECU는 진단 응답 CAN ID로 이루어진 CAN 메시지로 응답 메시지를 전송한다.In UDS communication, an external diagnostic device acts as a server and an in-vehicle ECU acts as a client. The diagnostic device is connected to the CAN Bus through the OBD-Ⅱ port in the vehicle and performs diagnostic services with specific ECUs. For each ECU, a diagnostic request CAN ID and a diagnostic response CAN ID are defined, which are usually collectively called a diagnostic ID pair. When a diagnostic device transmits a CAN data frame (CAN message) consisting of a specific diagnostic request CAN ID to the CAN Bus, the matching ECU transmits a response message with a CAN message consisting of a diagnostic response CAN ID.
도 3은 CAN 데이터 프레임을 활용한 UDS 서비스 메시지 구조를 도시하며, 도 4는 진단기기를 이용하여 CAN Bus에 연결된 하나의 ECU를 진단하는 서비스를 수행하는 흐름도이다. 진단기기에는 해당 차량에 구비되는 복수 개 ECU에 대한 진단 ID Pair가 저장 구비된다. CAN Bus에 연결된 각 ECU에는 진단 요청 및 응답 CAN ID가 할당되며, 도 4에 제시된 ECU에는 0x7E0와 0x7E8이 할당된 예이다. 도 4에서 진단기기는 CAN ID 7E0에 해당하는 진단 요청 CAN 메시지를 전송하면 특정 ECU는 이를 수신하고 자신에 할당된 진단 요청 ID인지 확인한다. 자신에게 할당된 진단 요청 CAN ID인 경우 매칭되는 진단 응답 CAN ID 7E8로 이루어진 진단 응답 CAN 메시지를 전송한다. 진단기기는 CAN ID 7E8를 갖는 진단 응답 메시지를 이용하여 해당 ECU의 상태를 진단할 수 있는 것이다.FIG. 3 illustrates a UDS service message structure utilizing a CAN data frame, and FIG. 4 is a flowchart illustrating a service for diagnosing one ECU connected to a CAN Bus using a diagnostic device. The diagnostic device stores diagnostic ID pairs for multiple ECUs installed in the vehicle. Each ECU connected to the CAN Bus is assigned a diagnostic request and response CAN ID, and the ECU illustrated in FIG. 4 is an example in which 0x7E0 and 0x7E8 are assigned. In FIG. 4, when the diagnostic device transmits a diagnostic request CAN message corresponding to CAN ID 7E0, a specific ECU receives it and checks whether it is a diagnostic request ID assigned to it. If it is a diagnostic request CAN ID assigned to it, it transmits a diagnostic response CAN message consisting of a matching diagnostic response CAN ID 7E8. The diagnostic device can diagnose the status of the corresponding ECU using the diagnostic response message having CAN ID 7E8.
침입 탐지 시스템(Instrusion Detection System, IDS)을 통해 ECU가 공격을 받고 있는지 여부를 탐지하는 기술은 전술한 바와 같이 많은 연구가 진행되었다. 또한, IDS는 본 발명의 관심 대상이 아니므로 상세한 설명을 생략하는 것으로 하며, 인터넷 사전인 '나무위키'에서 제시된 범위에서 간략히 소개하기로 한다.As mentioned above, much research has been conducted on the technology of detecting whether an ECU is under attack through an Intrusion Detection System (IDS). In addition, since IDS is not a subject of interest in the present invention, a detailed description thereof will be omitted, and a brief introduction will be given within the scope presented in the Internet dictionary, 'Namu Wiki'.
IDS는 ECU의 회로적 특성을 이용한 방법이 주목받고 있다. 첫 번째 방법은 CAN 프레임의 전위차를 이용하는 것이다. Bit를 CAN bus에 송신하기 위해서는 두 전선에 전위차를 발생시키는 회로가 필요하다. 하지만, 같은 Dominant bit라 하더라도, 개별 ECU마다 사용된 회로와 소자가 다르며, 같은 소자여도 품질에 따른 오차가 존재하기 때문에 실제로는 정확히 5V의 전위차를 낼 수 없다. 이 오차는 회로적 특성에 기인하므로, 오차와 CAN 데이터 프레임간의 상관관계를 도출할 수 있다. 만약 어떠한 CAN Frame이 CAN ID에 해당하는 오차를 내지 않으면서 Frame을 전송한다면, 공격으로 간주하는 방식이다. 두 번째 방법은 데이터 프레임의 전송주기 오차를 이용하는 것이다. 많은 데이터 프레임은 주기적으로 전송된다. 이 때 '주기'는 ECU가 클럭으로 계산해내는데, 클럭은 크리스털에 의존하므로, 크리스털의 소자적 특성으로 ECU를 구분할 수 있다. IDS는 두 가지 태생적인 한계를 지닌다: (1) 공격을 탐지할 뿐 방어할 수 없고 (2) 탐지오차(i.e., false negative and false positive)가 존재한다.IDS is drawing attention for its method of utilizing the circuit characteristics of ECUs. The first method is to utilize the potential difference of CAN frames. In order to transmit a bit to the CAN bus, a circuit that generates a potential difference in two wires is required. However, even for the same dominant bit, the circuit and components used in each ECU are different, and even for the same components, there is an error due to quality, so in reality, it is impossible to generate exactly 5V of potential difference. Since this error is due to the circuit characteristics, it is possible to derive a correlation between the error and the CAN data frame. If a CAN frame transmits a frame without generating an error corresponding to the CAN ID, it is considered an attack. The second method is to utilize the transmission cycle error of the data frame. Many data frames are transmitted periodically. At this time, the 'cycle' is calculated by the ECU using a clock, and since the clock depends on the crystal, the ECU can be distinguished by the component characteristics of the crystal. IDSs have two inherent limitations: (1) they can only detect attacks, not prevent them, and (2) they are subject to detection errors (i.e., false negatives and false positives).
도 5는 본 발명에 따른 일 실시예로서, IDS 공격 대상인 위변조 ECU의 진단 Pair ID를 파악하는 흐름도이다. FIG. 5 is a flowchart illustrating an embodiment of the present invention for identifying a diagnostic Pair ID of a counterfeit ECU that is a target of an IDS attack.
CAN bus에 연결된 IDS에 의한 공격 CAN 메시지가 탐지되는 경우, 해당 공격 CAN ID (IDA)를 저장한다(ST510). 프로그램을 운영하기 위한 임시 변수(i, j)들을 초기화한다(ST520). 예로서, 초기화에 의해서 해당 변수는 '1'로 세팅된다. 해당 차량에 구비된 복수 개 진단 요청 CAN ID ()를 선택하고 진단 요청 메시지를 전송한다(ST530).If an attack CAN message is detected by the IDS connected to the CAN bus, the attack CAN ID (ID A ) is stored (ST510). Temporary variables (i, j) for operating the program are initialized (ST520). For example, the variable is set to '1' by initialization. Multiple diagnostic request CAN IDs ( ) and send a diagnostic request message (ST530).
CAN bus 모니터링을 하면서(ST540), 공격 CAN ID (IDA) 메시지 또는 진단 요청 CAN ID () 메시지에 대한 진단 응답 CAN ID () 메시지가 있는지 여부를 판별하고(ST550), ST550 단계의 판별 결과가 참인 경우 해당 메시지가 공격 CAN ID (IDA) 메시지인지 여부를 판별한다(ST560). ST550 단계의 판별 결과가 거짓인 경우에는 ST540 단계의 CAN bus 모니터링을 다시 수행한다.While monitoring the CAN bus (ST540), an attack CAN ID (ID A ) message or a diagnostic request CAN ID ( ) Diagnostic response to message CAN ID ( ) message is determined (ST550), and if the determination result of step ST550 is true, it is determined whether the message is an attack CAN ID (ID A ) message (ST560). If the determination result of step ST550 is false, CAN bus monitoring of step ST540 is performed again.
ST560 단계의 판별 결과, 공격 CAN ID (IDA) 메시지라고 판별되면 공격 CAN ID (IDA)에 대한 에러를 발생시킨다(ST571). 임시 변수 i가 N 값에 도달하였는지 판별하고(ST573), ST573 단계의 판별 결과가 거짓인 경우에는 임시 변수 i를 '1'만큼 증가시킨 후(ST575) ST540 단계의 CAN bus 모니터링을 수행하도록 한다. ST571 단계에 의해서 공격 CAN ID (IDA) 메시지를 전송한 ECU는 메시지 전송 중에 에러를 인지하게 되므로 메시지 전송을 중지하고 에러 프레임을 전송한다. 공격 CAN ID (IDA) 메시지를 전송한 ECU는 에러 프레임 이후에 즉시 전송 실패한 CAN ID (IDA) 메시지를 재전송하게 된다. ST540 단계부터 ST573 단계를 N번 반복 완료하면, 공격 CAN ID (IDA) 메시지를 전송한 ECU의 TEC는 수학식 1과 같은 값을 가지게 된다.If it is determined as an attack CAN ID (ID A ) message based on the determination result of step ST560, an error is generated for the attack CAN ID (ID A ) (ST571). It is determined whether the temporary variable i has reached the value N (ST573), and if the determination result of step ST573 is false, the temporary variable i is increased by '1' (ST575), and then the CAN bus monitoring of step ST540 is performed. The ECU that transmitted the attack CAN ID (ID A ) message by step ST571 recognizes an error during message transmission, so it stops message transmission and transmits an error frame. The ECU that transmitted the attack CAN ID (ID A ) message immediately retransmits the CAN ID (ID A ) message that failed transmission after the error frame. If steps ST540 to ST573 are repeated N times, the TEC of the ECU that transmitted the attack CAN ID (ID A ) message will have a value as in Mathematical Expression 1.
ST560 단계의 판별 결과, 공격 CAN ID (IDA) 메시지가 아니라고 판별되면 진단 응답 CAN ID () 메시지이므로 진단 응답 CAN ID () 메시지에 대한 에러를 발생시킨다(ST581). 임시 변수 j가 M 값에 도달하였는지 판별하고(ST583), ST583 단계의 판별 결과가 거짓인 경우에는 임시 변수 j를 '1'만큼 증가시킨 후(ST575) ST540 단계의 CAN bus 모니터링을 수행하도록 한다. ST581 단계에 의해서 진단 응답 CAN ID () 메시지를 전송한 ECU는 메시지 전송 중에 에러를 인지하게 되므로 메시지 전송을 중지하고 에러 프레임을 전송한다. 진단 응답 CAN ID () 메시지를 전송한 ECU는 에러 프레임 이후에 즉시 전송 실패한 진단 응답 CAN ID () 메시지를 재전송하게 된다. ST540 단계부터 ST583 단계를 M번 반복 완료하면, 진단 응답 CAN ID () 메시지를 전송한 ECU의 TEC는 수학식 2과 같은 값을 가지게 된다.If the judgment result of the ST560 step determines that it is not an attack CAN ID (ID A ) message, the diagnostic response CAN ID ( ) message, so the diagnostic response CAN ID ( ) generates an error for the message (ST581). Determine whether the temporary variable j has reached the M value (ST583), and if the determination result of step ST583 is false, increase the temporary variable j by '1' (ST575) and then perform CAN bus monitoring of step ST540. The diagnostic response CAN ID ( ) The ECU that transmitted the message recognizes an error during message transmission, so it stops transmitting the message and transmits an error frame. Diagnostic Response CAN ID ( ) The ECU that transmitted the message immediately sends a failed diagnostic response CAN ID ( ) message will be retransmitted. After repeating steps ST540 to ST583 M times, the diagnostic response CAN ID ( ) The TEC of the ECU that transmitted the message has a value as in mathematical expression 2.
여기서, N 및 M은 자연수이며, 수학식 3을 만족하는 수로 설정한다.Here, N and M are natural numbers and are set to numbers satisfying mathematical expression 3.
임시 변수 i가 N값에 도달하고 또한 임시 변수 j가 M값에 도달하였는지 여부를 판별한다(ST593). 달리 표현하면, 공격 CAN ID (IDA) 메시지에 대해 N번의 에러를 발생시키고 진단 응답 CAN ID () 메시지에 대해 M번의 에러를 발생시켰는지 여부를 판별한다. 어느 한 쪽의 임시 변수가 해당 횟수에 도달하지 않았다면 두 개의 임시 변수가 각각 셋팅된 횟수(N, M)만큼 수행을 완료할 때까지 기다린다(ST594). Determine whether the temporary variable i reaches the value N and also whether the temporary variable j reaches the value M (ST593). In other words, generate N errors for the attack CAN ID (ID A ) message and the diagnostic response CAN ID ( ) determines whether an error has occurred M times for the message. If neither temporary variable has reached the corresponding number of times, wait until the two temporary variables have each completed the set number of times (N, M) of execution (ST594).
ST593 단계의 판별 결과가 참인 경우, 공격 CAN ID (IDA) 메시지를 송신한 ECU와 진단 응답 CAN ID () 메시지를 송신한 ECU가 동일하다면 해당 ECU는 Bus off 단계로 천이되어야 한다. 그 이유는 "8*(N+M) >= 256"이므로 해당 ECU의 TEC 레지스터는 256 이상의 값이 인가되기 때문입니다.If the determination result of step ST593 is true, the ECU that sent the attack CAN ID (ID A ) message and the diagnostic response CAN ID ( ) If the ECU that sent the message is the same, then that ECU must transition to the Bus off phase. This is because since "8*(N+M) >= 256", the TEC register of that ECU is assigned a value greater than 256.
ST593 단계의 판별 결과가 참인 상태에서 공격 CAN ID (IDA) 메시지 또는 진단 응답 CAN ID () 메시지가 여전히 모니터링되는지 여부를 판별한다(ST595). ST595 단계의 판별 결과가 참인 경우에는 공격 CAN ID (IDA) 메시지를 송신한 ECU와 진단 응답 CAN ID () 메시지를 송신한 ECU는 서로 다른 ECU로 판정할 수 있다. 따라서 다른 진단 요청 CAN ID로 교체한 후(ST597) ST520 단계부터 다시 수행하게 된다. ST520 단계부터 ST583 단계를 반복 수행할 때 ST530단계에서는 ST597 단계에서 교체한 진단 요청 CAN ID를 선택하여 진단 요청 메시지를 전송하는 것으로 이해되어져야 한다.When the determination result of ST593 step is true, the attack CAN ID (ID A ) message or diagnostic response CAN ID ( ) determines whether the message is still being monitored (ST595). If the determination result of step ST595 is true, the ECU that sent the attack CAN ID (ID A ) message and the diagnostic response CAN ID ( ) The ECU that sent the message can be judged as a different ECU. Therefore, after replacing it with a different diagnostic request CAN ID (ST597), the process is repeated from step ST520. When repeating steps ST583 from step ST520, it should be understood that step ST530 selects the diagnostic request CAN ID replaced in step ST597 and transmits the diagnostic request message.
ST595 단계가 거짓인 경우에는 진단 응답 CAN ID () 메시지를 송신한 ECU와 공격 CAN ID (IDA) 메시지를 송신한 ECU가 동일한 ECU라고 판별하고, 진단 요청 CAN ID () 및 진단 응답 CAN ID ()를 인식(진단 Pair ID 인식)로부터 위변조된 ECU를 특정하고(ST599) 종료한다.If ST595 step is false, the diagnostic response CAN ID ( ) determines that the ECU that sent the message and the ECU that sent the attack CAN ID (ID A ) message are the same ECU, and the diagnostic request CAN ID ( ) and diagnostic response CAN ID ( ) identifies the tampered ECU by recognizing (diagnosis Pair ID recognition) (ST599) and terminates.
도 6은 본 발명에서 제시하는 위변조 ECU 식별장치가 CAN Bus 상에 구현된 예시도이며, 도 7은 본 발명에 따른 일 실시예의 위변조 ECU 식별장치(500)의 논리적 구성도이다.FIG. 6 is an exemplary diagram showing a counterfeit ECU identification device proposed in the present invention implemented on a CAN Bus, and FIG. 7 is a logical configuration diagram of a counterfeit ECU identification device (500) of one embodiment according to the present invention.
도 6에 도시된 바와 같이 CAN bus에는 복수 개 ECU(제1 ECU, 제2 ECU, 제3 ECU 및 제N ECU)와 위변조 ECU 식별 장치(500)가 구비된다. 도 6에 도시된 바와 같이 각각의 ECU는 자신에게 할당된 진단 요청 CAN ID 및 진단 응답 CAN ID가 저장 구비됨을 알 수 있다. As illustrated in Fig. 6, the CAN bus is equipped with multiple ECUs (the first ECU, the second ECU, the third ECU, and the Nth ECU) and a counterfeit ECU identification device (500). As illustrated in Fig. 6, it can be seen that each ECU is equipped with a diagnostic request CAN ID and a diagnostic response CAN ID stored therein assigned to it.
도 7에 도시된 바와 같이, 위변조 ECU 식별장치(500)는 CAN bus를 모니터링하는 CAN Bus 모니터링부(510), 외부 침입 여부를 탐지하는 침입 탐지 감지부(520), 각 ECU별로 할당된 진단 Pair ID를 저장하는 진단 Pair ID 저장부(530), 위변조 CAN ID 메시지 또는 진단 응답 메시지가 모니터링 될 경우 제어부(550)의 지시에 따라 에러를 발생시키는 에러 발생부(540), 침입 탐지에 사용된 공격 메시지의 CAN ID를 저장하는 공격 CAN ID 저장부(550), 진단 Pair ID 저장부에 저장된 하나의 진단 요청 ID를 선택하고, 상기 선택된 진단 요청 ID에 대한 메시지를 생성하여 전송하는 진단 요청 메시지 생성부(580), CAN 버스 상에 공격 CAN ID를 갖는 메시지가 모니터링 되는 경우 에러 생성 신호를 발생시키는 공격 CAN ID 제어부(573), CAN 버스 상에 진단 요청 ID 메시지에 대응되는 진단 응답 ID 메시지가 모니터링 되는 경우 에러 생성 신호를 발생시키는 진단 응답 제어부(575) 및 공격 CAN ID 제어부에서 N번의 에러를 발생시키고, 진단 응답 제어부에서 M번의 에러를 발생시킨 경우에도 CAN 버스에 상기 공격 CAN ID 메시지 또는 상기 진단 응답 ID 메시지가 모니터링되지 않을 경우 선택된 진단 요청 ID 및 진단 응답 ID를 진단 Pair ID로 특정하는 Pair ID 특정부(56)로 구성된다. 제어부(570)는 공격 CAN ID가 모니터링될 경우 매번 에러 발생을 N번 반복 지시하는 공격 CAN ID 제어부(573) 및 진단 응답 CAN ID가 모니터링될 경우 매번 에러 발생을 M번 반복 지시하는 진단 응답 제어부(575)로 구성된다.As illustrated in FIG. 7, the counterfeit ECU identification device (500) includes a CAN Bus monitoring unit (510) that monitors the CAN bus, an intrusion detection and detection unit (520) that detects external intrusion, a diagnostic Pair ID storage unit (530) that stores a diagnostic Pair ID assigned to each ECU, an error generation unit (540) that generates an error according to the instruction of the control unit (550) when a counterfeit CAN ID message or a diagnostic response message is monitored, an attack CAN ID storage unit (550) that stores the CAN ID of the attack message used for intrusion detection, a diagnostic request message generation unit (580) that selects one diagnostic request ID stored in the diagnostic Pair ID storage unit and generates and transmits a message for the selected diagnostic request ID, an attack CAN ID control unit (573) that generates an error generation signal when a message having an attack CAN ID is monitored on the CAN bus, a diagnostic response control unit (575) that generates an error generation signal when a diagnostic response ID message corresponding to a diagnostic request ID message is monitored on the CAN bus, and a control unit that generates N times the attack CAN ID control unit. It is composed of a Pair ID specification unit (56) that specifies a selected diagnostic request ID and diagnostic response ID as a diagnostic Pair ID when the attack CAN ID message or the diagnostic response ID message is not monitored on the CAN bus even when an error is generated and M errors are generated in the diagnostic response control unit. The control unit (570) is composed of an attack CAN ID control unit (573) that repeatedly instructs the occurrence of an error N times each time the attack CAN ID is monitored, and a diagnostic response control unit (575) that repeatedly instructs the occurrence of an error M times each time the diagnostic response CAN ID is monitored.
상기에서 본 발명의 바람직한 실시예가 특정 용어들을 사용하여 설명 및 도시되었지만 그러한 용어는 오로지 본 발명을 명확히 설명하기 위한 것일 뿐이며, 본 발명의 실시예 및 기술된 용어는 다음의 청구범위의 기술적 사상 및 범위로부터 이탈되지 않고서 여러가지 변경 및 변화가 가해질 수 있는 것은 자명한 일이다. 이와 같이 변형된 실시예들은 본 발명의 사상 및 범위로부터 개별적으로 이해되어져서는 안되며, 본 발명의 청구범위 안에 속한다고 해야 할 것이다.Although the preferred embodiments of the present invention have been described and illustrated using specific terms above, such terms are only for the purpose of clearly describing the present invention, and it is obvious that the embodiments of the present invention and the described terms may be variously modified and changed without departing from the technical spirit and scope of the following claims. Such modified embodiments should not be understood individually from the spirit and scope of the present invention, but should be considered to fall within the claims of the present invention.
500: 위변조 ECU 식별 장치
510: CAN 버스 모니터링부
520: 침입 탐지 감지부
530: 진단 Pair ID 저장부
540: 에러 발생부
550: CAN ID 저장부
560: Pair ID 특정부
570: 제어부
573: 공격 CAN ID 제어부
575: 진단 응답 제어부
580: 진단 요청 메시지 생성부500: Counterfeit ECU Identification Device
510: CAN Bus Monitoring Unit
520: Intrusion detection sensor
530: Diagnostic Pair ID storage
540: Error generating section
550: CAN ID storage
560: Pair ID specific part
570: Control Unit
573: Attack CAN ID Control Unit
575: Diagnostic Response Control Unit
580: Diagnostic request message generation section
Claims (5)
침입 탐지가 발생할 경우 CAN 버스 상에서 침입 탐지를 발생시킨 메시지의 CAN ID(이하, '공격 CAN ID'라 함)를 파악하는 제1단계와,
상기 공격 CAN ID를 갖는 메시지(이하, '공격 CAN ID 메시지'라 함)가 CAN 버스 상에서 모니터링되는 경우 에러를 발생시키는 제2단계와,
상기 제2단계를 N번 반복 수행하는 제3단계와,
선택된 진단 요청 ID 메시지를 CAN 버스 상에 전송하는 제4단계와,
상기 진단 요청 ID 메시지에 대응되는 진단 응답 ID 메시지가 모니터링되는 경우 에러를 발생시키는 제5단계와,
상기 제5단계를 M번 반복 수행하는 제6단계와,
- N과 M은 합이 32 이상인 자연수들로 구성함 -
상기 제3단계 및 상기 제6단계가 완료된 이후 CAN 버스 상에 공격 CAN ID 메시지 또는 상기 진단 응답 ID 메시지가 모니터링되지 않는 경우 상기 진단 요청 ID 및 상기 진단 응답 ID를 진단 ID Pair로 특정하는 제7단계를 더 구비하는 것을 특징으로 하는 CAN 버스 통신에서 위변조 ECU의 진단 ID 식별 방법.
In a method for identifying a diagnostic ID of a falsified ECU in CAN bus communication that specifies an ECU that has been attacked on the CAN bus,
When an intrusion detection occurs, the first step is to identify the CAN ID of the message that caused the intrusion detection on the CAN bus (hereinafter referred to as the 'attack CAN ID');
A second step of generating an error when a message having the above attack CAN ID (hereinafter referred to as the 'attack CAN ID message') is monitored on the CAN bus,
A third step in which the above second step is repeated N times,
Step 4: transmitting the selected diagnostic request ID message on the CAN bus;
Step 5, which generates an error when a diagnostic response ID message corresponding to the above diagnostic request ID message is monitored;
Step 6, in which the above step 5 is repeated M times,
- N and M are composed of natural numbers whose sum is greater than or equal to 32 -
A method for identifying a diagnostic ID of a falsified ECU in CAN bus communication, characterized in that the method further comprises a seventh step of specifying the diagnostic request ID and the diagnostic response ID as a diagnostic ID Pair if an attack CAN ID message or the diagnostic response ID message is not monitored on the CAN bus after the third and sixth steps are completed.
상기 제2단계 및 상기 제3단계는 상기 제4단계 내지 상기 제6단계와는 무관하게 독립적으로 순차 수행되는 것을 특징으로 하는 CAN 버스 통신에서 위변조 ECU의 진단 ID 식별 방법.
In the first paragraph,
A method for identifying a diagnostic ID of a counterfeit ECU in CAN bus communication, characterized in that the second and third steps are performed sequentially independently from the fourth to sixth steps.
상기 제3단계 및 상기 제6단계가 완료된 이후에도 CAN 버스 상에 상기 공격 CAN ID 메시지 또는 상기 진단 응답 ID 메시지가 모니터링되는 경우에는 상기 진단 요청 ID 메시지와는 상이한 진단 요청 ID 메시지를 선택하여 상기 제4단계 내지 상기 제6단계를 수행하는 제8단계를 더 구비하는 것을 특징으로 하는 CAN 버스 통신에서 위변조 ECU의 진단 ID 식별 방법.
In the first paragraph,
A method for identifying a diagnostic ID of a falsified ECU in CAN bus communication, characterized in that the method further comprises an eighth step of selecting a diagnostic request ID message different from the diagnostic request ID message and performing steps 4 to 6 if the attack CAN ID message or the diagnostic response ID message is monitored on the CAN bus even after the third and sixth steps are completed.
상기 제8단계는 CAN 버스에 연결된 모든 ECU에 할당된 진단 요청 ID에 대해서 적어도 한 번씩은 수행하는 것을 특징으로 하는 CAN 버스 통신에서 위변조 ECU의 진단 ID 식별 방법.
In the third paragraph,
A method for identifying a diagnostic ID of a falsified ECU in CAN bus communication, characterized in that the above step 8 is performed at least once for a diagnostic request ID assigned to all ECUs connected to the CAN bus.
CAN 버스를 모니터링하는 CAN Bus 모니터링부와,
침입 여부를 탐지하는 침입 탐지 감지부와,
CAN 버스에 연결된 각 ECU별로 할당된 진단 요청 ID 및 진단 응답 ID로 이루어지는 진단 Pair ID를 저장하는 진단 Pair ID 저장부와,
상기 침입 탐지 감지부에서 침입이 감지될 경우 침입 탐지에 사용된 공격 메시지의 CAN ID(이하, '공격 CAN ID'라 함)를 저장하는 공격 CAN ID 저장부와,
CAN 버스 상에 상기 공격 CAN ID를 갖는 메시지(이하, '공격 CAN ID 메시지'라 함)가 모니터링 되는 경우 에러 생성 신호를 발생시키는 공격 CAN ID 제어부와,
상기 진단 Pair ID 저장부에 저장된 하나의 진단 요청 ID를 선택하고, 상기 선택된 진단 요청 ID에 대한 메시지를 생성하여 전송하는 진단 요청 메시지 생성부와,
CAN 버스 상에 상기 진단 요청 ID 메시지에 대응되는 진단 응답 ID 메시지가 모니터링 되는 경우 에러 생성 신호를 발생시키는 진단 응답 제어부 및
상기 공격 CAN ID 제어부에서 N번의 에러를 발생시키고, 상기 진단 응답 제어부에서 M번의 에러를 발생시킨 경우에도 CAN 버스에 상기 공격 CAN ID 메시지 또는 상기 진단 응답 ID 메시지가 모니터링되지 않을 경우 선택된 진단 요청 ID 및 진단 응답 ID를 진단 Pair ID로 특정하는 Pair ID 특정부를
- N과 M은 합이 32 이상인 자연수들로 구성함 -
포함하는 것을 특징으로 하는 위변조 ECU를 특정하는 시스템.As a system for identifying counterfeit ECUs that have been attacked in CAN bus communication,
CAN Bus monitoring unit that monitors the CAN bus,
An intrusion detection unit that detects intrusion, and
A diagnostic pair ID storage unit that stores a diagnostic pair ID consisting of a diagnostic request ID and a diagnostic response ID assigned to each ECU connected to the CAN bus, and
An attack CAN ID storage unit that stores the CAN ID of the attack message used for intrusion detection (hereinafter referred to as 'attack CAN ID') when an intrusion is detected by the above intrusion detection unit,
An attack CAN ID control unit that generates an error generation signal when a message having the above attack CAN ID (hereinafter referred to as an 'attack CAN ID message') is monitored on the CAN bus,
A diagnostic request message generation unit that selects one diagnostic request ID stored in the above diagnostic Pair ID storage unit and generates and transmits a message for the selected diagnostic request ID;
A diagnostic response control unit that generates an error generation signal when a diagnostic response ID message corresponding to the diagnostic request ID message is monitored on the CAN bus; and
Even if the above attack CAN ID control unit generates N errors and the above diagnostic response control unit generates M errors, if the above attack CAN ID message or the above diagnostic response ID message is not monitored on the CAN bus, a Pair ID specification unit that specifies the selected diagnostic request ID and diagnostic response ID as a diagnostic Pair ID is used.
- N and M are composed of natural numbers whose sum is greater than or equal to 32 -
A system for identifying a counterfeit ECU, characterized by including:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020220127696A KR102746386B1 (en) | 2022-10-06 | 2022-10-06 | Method for identifying diagnostic id pairs of of compromised ecu on can and system performing the same |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020220127696A KR102746386B1 (en) | 2022-10-06 | 2022-10-06 | Method for identifying diagnostic id pairs of of compromised ecu on can and system performing the same |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| KR20240048200A KR20240048200A (en) | 2024-04-15 |
| KR102746386B1 true KR102746386B1 (en) | 2024-12-26 |
Family
ID=90715719
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| KR1020220127696A Active KR102746386B1 (en) | 2022-10-06 | 2022-10-06 | Method for identifying diagnostic id pairs of of compromised ecu on can and system performing the same |
Country Status (1)
| Country | Link |
|---|---|
| KR (1) | KR102746386B1 (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR102204655B1 (en) | 2018-12-19 | 2021-01-18 | 한림대학교 산학협력단 | A mitigation method against message flooding attacks for secure controller area network by predicting attack message retransfer time |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR102077200B1 (en) | 2012-10-15 | 2020-02-13 | 현대모비스 주식회사 | Method for detecting can bus off using message |
| KR20220014796A (en) * | 2020-07-29 | 2022-02-07 | 현대자동차주식회사 | System and Method for Identifying Compromised Electronic Controller Using Intentionally Induced Error |
| KR102610234B1 (en) * | 2021-03-16 | 2023-12-06 | 한성대학교 산학협력단 | Bus off detection method and electronic control unit performing the same |
-
2022
- 2022-10-06 KR KR1020220127696A patent/KR102746386B1/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR102204655B1 (en) | 2018-12-19 | 2021-01-18 | 한림대학교 산학협력단 | A mitigation method against message flooding attacks for secure controller area network by predicting attack message retransfer time |
Also Published As
| Publication number | Publication date |
|---|---|
| KR20240048200A (en) | 2024-04-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9380070B1 (en) | Intrusion detection mechanism | |
| CN110610092B (en) | In-vehicle network system, gateway device, and abnormality detection method | |
| US11032300B2 (en) | Intrusion detection system based on electrical CAN signal for in-vehicle CAN network | |
| CN111066001B (en) | Log output method, log output device and storage medium | |
| CN107005572A (en) | Method and device for detecting data without reaction | |
| CN103782566A (en) | Communication protocols | |
| CN112347022B (en) | Security module for CAN nodes | |
| KR101972457B1 (en) | Method and System for detecting hacking attack based on the CAN protocol | |
| JP6828632B2 (en) | Detection device, detection method and detection program | |
| JP2014236248A (en) | Electronic control device and electronic control system | |
| CN103414916A (en) | Fault diagnosis system and method | |
| CN114503518B (en) | Testing devices, vehicles, testing methods and testing procedures | |
| CN113169966B (en) | Method for monitoring a data transmission system, data transmission system and motor vehicle | |
| WO2020110446A1 (en) | Vehicle malfunction prediction system, monitoring device, vehicle malfunction prediction method, and vehicle malfunction prediction program | |
| CN112615858A (en) | Internet of things equipment monitoring method, device and system | |
| US20140047146A1 (en) | Communication load determining apparatus | |
| WO2025179771A1 (en) | Edge node deployment method and apparatus, computer device, and storage medium | |
| JPH04334231A (en) | Computer system having separating function from lan | |
| US20250007935A1 (en) | Monitoring device, monitoring method, and monitoring program | |
| KR20080036296A (en) | Method and device for preventing can ID collision in vehicle diagnostic device | |
| KR102746386B1 (en) | Method for identifying diagnostic id pairs of of compromised ecu on can and system performing the same | |
| KR102791245B1 (en) | Apparatus for gateway of a vehicle, system having the same and method for detect invasion thereof | |
| KR20180058537A (en) | Method and Apparatus for Providing In-Vehicle Communication Security | |
| JP7698394B2 (en) | Anomaly detection system, anomaly detection method, and program | |
| CN118613795A (en) | Vehicle diagnostic system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PA0109 | Patent application |
St.27 status event code: A-0-1-A10-A12-nap-PA0109 |
|
| PA0201 | Request for examination |
St.27 status event code: A-1-2-D10-D11-exm-PA0201 |
|
| D13-X000 | Search requested |
St.27 status event code: A-1-2-D10-D13-srh-X000 |
|
| D14-X000 | Search report completed |
St.27 status event code: A-1-2-D10-D14-srh-X000 |
|
| E902 | Notification of reason for refusal | ||
| PE0902 | Notice of grounds for rejection |
St.27 status event code: A-1-2-D10-D21-exm-PE0902 |
|
| PG1501 | Laying open of application |
St.27 status event code: A-1-1-Q10-Q12-nap-PG1501 |
|
| P11-X000 | Amendment of application requested |
St.27 status event code: A-2-2-P10-P11-nap-X000 |
|
| P13-X000 | Application amended |
St.27 status event code: A-2-2-P10-P13-nap-X000 |
|
| R18-X000 | Changes to party contact information recorded |
St.27 status event code: A-3-3-R10-R18-oth-X000 |
|
| R18-X000 | Changes to party contact information recorded |
St.27 status event code: A-3-3-R10-R18-oth-X000 |
|
| E701 | Decision to grant or registration of patent right | ||
| PE0701 | Decision of registration |
St.27 status event code: A-1-2-D10-D22-exm-PE0701 |
|
| PG1601 | Publication of registration |
St.27 status event code: A-4-4-Q10-Q13-nap-PG1601 |
|
| R18-X000 | Changes to party contact information recorded |
St.27 status event code: A-5-5-R10-R18-oth-X000 |