KR20220129364A - Bus off detection method and electronic control unit performing the same - Google Patents

Bus off detection method and electronic control unit performing the same Download PDF

Info

Publication number
KR20220129364A
KR20220129364A KR1020210034167A KR20210034167A KR20220129364A KR 20220129364 A KR20220129364 A KR 20220129364A KR 1020210034167 A KR1020210034167 A KR 1020210034167A KR 20210034167 A KR20210034167 A KR 20210034167A KR 20220129364 A KR20220129364 A KR 20220129364A
Authority
KR
South Korea
Prior art keywords
bus
electronic control
maximum
control unit
time
Prior art date
Application number
KR1020210034167A
Other languages
Korean (ko)
Other versions
KR102610234B1 (en
Inventor
최원석
이세영
Original Assignee
한성대학교 산학협력단
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 한성대학교 산학협력단 filed Critical 한성대학교 산학협력단
Priority to KR1020210034167A priority Critical patent/KR102610234B1/en
Publication of KR20220129364A publication Critical patent/KR20220129364A/en
Application granted granted Critical
Publication of KR102610234B1 publication Critical patent/KR102610234B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • H04L43/067Generation of reports using time frame reporting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40052High-speed IEEE 1394 serial bus
    • H04L12/40071Packet processing; Packet format
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40052High-speed IEEE 1394 serial bus
    • H04L12/40104Security; Encryption; Content protection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0695Management of faults, events, alarms or notifications the faulty arrangement being the maintenance, administration or management system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Small-Scale Networks (AREA)
  • Electronic Switches (AREA)
  • Input Circuits Of Receivers And Coupling Of Receivers And Audio Equipment (AREA)

Abstract

The present invention pertains to a bus off detection method and an electronic control unit performing the same. An electronic control unit for a vehicle, in which multiple electronic control units transmit and receive data using a CAN bus, and which has a base value of a maximum IFS time, which is a maximum time interval between data frames continuously received during normal vehicle operation, comprises: a counter which repeatedly counts from an EOF field of a preceding data frame to an EOF field of a following data frame received on the CAN bus; and a CAN controller, which, in a case that a time calculated from an output value of the counter has a value larger than the maximum IFS time, determines the case as a bus-off state and notifies the CAN bus. The bus off detection method and the electronic control unit performing the same proposed in the present invention can secure the internal network of the vehicle, enabling safe operation.

Description

버스 오프 감지 방법 및 이를 수행하는 전자제어장치{BUS OFF DETECTION METHOD AND ELECTRONIC CONTROL UNIT PERFORMING THE SAME}BUS OFF DETECTION METHOD AND ELECTRONIC CONTROL UNIT PERFORMING THE SAME

본 발명은 버스 오프 감지 방법 및 이를 수행하는 전자제어장치에 관한 것으로서, 보다 구체적으로는 연속적으로 수신되는 데이터 프레임을 IFS를 이용하여 버스 오프를 감지하는 방법 및 이를 수행하는 전자제어장치에 관한 것이다.The present invention relates to a bus-off detection method and an electronic control apparatus for performing the same, and more particularly, to a method for detecting a bus-off by using IFS for continuously received data frames, and an electronic control apparatus for performing the same.

현재 생산되는 대부분의 차량은 CAN을 통해 ECU를 제어하며 차량의 대부분 기능이 수행된다. 그리고 CAN 표준상으로 ECU의 에러 인지와 관리를 위해 Fault confinement 메커니즘이 정의되어 있으며 ECU들은 해당 메커니즘에 따라 동작한다. Fault confinement 메커니즘 중 CAN Bus의 안전성을 위해 오류 또는 통신 장애가 발생한 ECU를 논리적으로 CAN Bus에서 제외시키기 위해 Bus Off 모드가 정의되어 있다. Most vehicles currently produced control the ECU through CAN, and most functions of the vehicle are performed. And according to the CAN standard, a fault confinement mechanism is defined for error recognition and management of ECUs, and ECUs operate according to the mechanism. For the safety of the CAN bus among the fault confinement mechanisms, the Bus Off mode is defined to logically exclude ECUs with errors or communication failures from the CAN bus.

사용자의 안전성과 주행 편의성을 위해 차량에 더 많은 기능과 외부 통신 인터 페이스가 추가됨에 따라 차량 내부 네트워크를 대상으로 하는 새로운 공격과 취약점이 등장하고 있다. 특히 차량의 안전을 위해 설계된 Fault confinement 메커니즘을 악용하여 ECU를 강제로 Bus Off 시키는 공격이 발표되었다.As more functions and external communication interfaces are added to vehicles for user safety and driving convenience, new attacks and vulnerabilities targeting in-vehicle networks are emerging. In particular, an attack that forcibly turns off the ECU by exploiting the fault confinement mechanism designed for vehicle safety has been announced.

Bus Off 모드인 ECU는 CAN Bus 상으로 어떠한 메시지 송.수신도 수행할 수 없기 때문에 기능에 중요한 ECU가 강제로 Bus Off 모드로 전환될 경우 사용자와 운전자의 생명에 큰 문제가 발생할 수 있다. Since the ECU in Bus Off mode cannot transmit/receive any messages over the CAN Bus, if an ECU, which is important for a function, is forcibly switched to Bus Off mode, a big problem may occur to the lives of users and drivers.

한국공개특허 제10-2014-0047984호 (2014.04.23 공개)Korea Patent Publication No. 10-2014-0047984 (published on April 23, 2014)

본 발명의 목적은 CAN Bus상에 모니터링되는 연속적으로 수신되는 데이터 프레임 사이의 시간 간격을 분석하여 버스 오프 공격을 감지하는 방법 및 이를 수행하는 전자제어장치를 제공하는 것을 목적으로 한다.An object of the present invention is to provide a method for detecting a bus-off attack by analyzing a time interval between continuously received data frames monitored on a CAN bus, and an electronic control device for performing the same.

본 발명의 상기 목적은 복수 개 전자제어장치가 CAN 버스를 이용하여 데이터를 송수신하고, 정상적인 차량 운행 중 연속적으로 생성되는 데이터 프레임 사이의 최대 시간 간격인 최대 IFS 시간을 저장 구비하는 차량용 전자제어장치에서 CAN 버스의 버스 오프를 감지하는 방법으로서, CAN 버스상에서 수신되는 인접된 데이터 프레임 사이의 시간 간격(IFS, Inter-Frame Space)을 측정하는 제1단계와, 상기 제1단계에서 측정된 IFS 시간과 해당 차량에서 허여된 최대 IFS 시간을 비교하여 측정된 IFS 시간이 최대 IFS 시간보다 더 큰값인지 여부를 판별하는 제2단계 및 제2단계의 판별 결과 측정된 IFS 시간이 최대 IFS 시간보다 더 큰 값을 가질 경우 Bus Off가 발생되었다고 판단하고 CAN 버스에 통지하는 제3단계를 포함하는 버스 오프 감지 방법에 의해서 달성 가능하다.The above object of the present invention is to provide an electronic control device for a vehicle in which a plurality of electronic control devices transmit and receive data using a CAN bus and store the maximum IFS time, which is the maximum time interval between data frames continuously generated during normal vehicle operation. A method of detecting bus-off of a CAN bus, comprising: a first step of measuring an inter-frame space (IFS) between adjacent data frames received on a CAN bus; The second step of determining whether the measured IFS time is greater than the maximum IFS time by comparing the maximum IFS time allowed in the vehicle, and the second step of determining whether the measured IFS time is greater than the maximum IFS time If it has, it is determined that Bus Off has occurred and it can be achieved by a bus off detection method including a third step of notifying the CAN bus.

본 발명의 상기 목적은 복수 개 전자제어장치가 CAN 버스를 이용하여 데이터를 송수신하고, 정상적인 차량 운행 중 연속적으로 생성되는 데이터 프레임 사이의 최대 시간 간격인 최대 IFS 시간을 저장 구비하는 차량용 전자제어장치에서 CAN 버스의 버스 오프를 감지하는 방법으로서, CAN 버스상에서 수신되는 선행 데이터 프레임의 EOF 필드부터 카운팅을 시작하는 제1단계와, CAN 버스상에서 수신되는 후행 데이터 프레임의 EOF 필드에서 카운팅을 종료하는 제2단계와, - 후행 데이터 프레임은 상기 선행 데이터 프레임 다음에 연속적으로 수신되는 데이터 프레임임 - 제2단계의 후행 데이터 프레임을 선행 프레임으로 지정하여 상기 제1단계와 상기 제2단계를 반복 수행하는 제3단계와, 카운터의 출력값으로부터 선행 데이터 프레임의 EOF 필드를 수신한 시간부터 경과된 시간을 산출하고, 산출된 시간이 상기 최대 IFS 시간보다 큰 값을 갖는지 여부를 판별하는 제4단계 및 제4단계의 판별 결과 산출된 시간이 최대 IFS 시간보다 더 큰 값을 가질 경우 Bus Off가 발생되었다고 판단하고 CAN 버스에 통지하는 제5단계를 포함하는 버스 오프 감지 방법에 의해서도 달성 가능하다.The above object of the present invention is to provide an electronic control device for a vehicle in which a plurality of electronic control devices transmit and receive data using a CAN bus and store the maximum IFS time, which is the maximum time interval between data frames continuously generated during normal vehicle operation. A method of detecting bus-off of a CAN bus, comprising a first step of starting counting from the EOF field of a preceding data frame received on the CAN bus, and a second step of terminating counting at the EOF field of a subsequent data frame received on the CAN bus a third step of repeatedly performing the first and second steps by designating the following data frame of the second step as the preceding frame; the fourth step and the fourth step of calculating the elapsed time from the time the EOF field of the preceding data frame is received from the output value of the counter, and determining whether the calculated time has a value greater than the maximum IFS time If the time calculated as a result of the determination has a value greater than the maximum IFS time, it is determined that Bus Off has occurred and it can also be achieved by a bus off detection method including a fifth step of notifying the CAN bus.

본 발명의 또 다른 목적은 복수 개 전자제어장치가 CAN 버스를 이용하여 데이터를 송수신하고, 정상적인 차량 운행 중 연속적으로 수신되는 데이터 프레임 사이의 최대 시간 간격인 최대 IFS 시간을 기지의 값으로 구비하는 차량용 전자제어장치에 있어서,Another object of the present invention is for a vehicle having a maximum IFS time, which is a maximum time interval between data frames continuously received during normal vehicle operation, as a known value, in which a plurality of electronic control devices transmit and receive data using a CAN bus. In the electronic control device,

CAN 버스상에서 수신되는 선행 데이터 프레임의 EOF 필드부터 후행 데이터 프레임의 EOF 필드까지를 반복적으로 카운팅하는 카운터를 구비하고,a counter for repeatedly counting from an EOF field of a preceding data frame received on a CAN bus to an EOF field of a subsequent data frame;

- 상기 후행 데이터 프레임은 상기 선행 데이터 프레임 다음에 연속적으로 수신되는 데이터 프레임임 -- the subsequent data frame is a data frame that is continuously received after the preceding data frame;

상기 카운터의 출력값으로부터 산출되는 시간이 상기 최대 IFS 시간보다 더 큰 값을 가질 경우 버스 오프 상태로 판별하고 CAN 버스에 통지하는 CAN 제어부(controller)를 포함하는 것을 특징으로 하는 전자제어장치에 의해서도 달성 가능하다.When the time calculated from the output value of the counter has a value greater than the maximum IFS time, it is determined as a bus-off state and can be achieved by an electronic control device comprising a CAN controller that notifies the CAN bus do.

현재 생산되는 대부분의 차량은 CAN을 통해 ECU를 제어하며 차량의 대부분 기능이 수행된다. 그리고 CAN 표준상으로 ECU의 에러 인지와 관리를 위해 Fault confinement 메커니즘이 정의되어 있으며 ECU들은 해당 메커니즘에 따라 동작한다. Fault confinement 메커니즘 중 CAN Bus의 안전성을 위해 오류 또는 통신 장애가 발생한 ECU를 논리적으로 CAN Bus에서 제외시키기 위해 Bus Off 모드가 정의되어 있다. 최근 이러한 Fault confinement를 악용하여 강제로 ECU를 Bus Of 시키는 공격이 발표되었다. Bus Off 모드인 ECU는 CAN Bus 상으로 어떠한 메시지 송.수신도 수행할 수 없기 때문에 기능에 중요한 ECU가 강제로 Bus Off 모드로 전환된 경우 사용자와 운전자의 생명에 큰 문제가 발생할 수 있다. Most vehicles currently produced control the ECU through CAN, and most functions of the vehicle are performed. And according to the CAN standard, a fault confinement mechanism is defined for error recognition and management of ECUs, and ECUs operate according to the mechanism. For the safety of the CAN bus among the fault confinement mechanisms, the Bus Off mode is defined to logically exclude ECUs with errors or communication failures from the CAN bus. Recently, an attack to force ECU to Bus Off by exploiting this fault confinement has been announced. Since the ECU in Bus Off mode cannot transmit/receive any messages on the CAN Bus, if an ECU, which is important for a function, is forcibly switched to Bus Off mode, a big problem may occur to the lives of users and drivers.

본 발명에서 제시된 버스 오프 감지 방법 및 이를 수행하는 전자제어장치에 의하면 연속적으로 수신되는 데이터 프레임의 IFS 시간을 측정함으로써 효율적인 Bus Off 공격을 탐지할 수 있게 되었다. 또한, 본 발명에서 제시된 버스 오프 감지 방법 및 이를 수행하는 전자제어장치에 의해 차량 내부 네트워크를 보장할 수 있게 되어 안전 운행이 가능하게 되었다.According to the bus-off detection method and the electronic control device performing the bus-off detection method presented in the present invention, it is possible to efficiently detect a bus-off attack by measuring the IFS time of continuously received data frames. In addition, the bus-off detection method presented in the present invention and the electronic control device performing the same can ensure the internal network of the vehicle, thereby enabling safe driving.

도 1은 마이크로 LED 디스플레이의 평면도.
도 2는 차량에서 TEC와 REC의 값에 따라 노드에서 나타나는 세 가지 상태 다이어그램을 표시하는 설명도.
도 3은 공격자가 CAN Bus에서 Bus Off를 발생시키는 경우 시간의 흐름에 따른 데이터 프레임의 전송 방식을 설명하는 설명도.
도 4는 Standard Format 및 Extended Format의 CAN 버스의 데이터 포맷.
도 5는 본 발명에 따른 일 실시예의 Bus Off 공격을 탐지하는 흐름도.
도 6은 본 발명에 따른 일 실시예의 Bus Off 공격을 탐지하는 흐름도.
도 7은 CAN Bus와 이에 연결된 복수 개 전자제어장치의 구성도.
1 is a plan view of a micro LED display;
2 is an explanatory diagram showing three state diagrams appearing in a node according to the values of TEC and REC in the vehicle.
3 is an explanatory diagram illustrating a data frame transmission method according to the passage of time when an attacker generates Bus Off in the CAN Bus.
4 is a data format of a CAN bus in Standard Format and Extended Format.
5 is a flowchart for detecting a Bus Off attack according to an embodiment of the present invention;
6 is a flowchart for detecting a Bus Off attack according to an embodiment of the present invention;
7 is a block diagram of a CAN bus and a plurality of electronic control devices connected thereto.

본 발명에서 사용하는 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 명세서 상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in the present invention are only used to describe specific embodiments, and are not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly dictates otherwise. In the present specification, terms such as “comprise” or “have” are intended to designate that a feature, number, step, operation, component, part, or combination thereof described in the specification exists, but one or more other features It is to be understood that this does not preclude the possibility of the presence or addition of numbers, steps, operations, components, parts, or combinations thereof.

또한, 본 명세서에서, "~ 상에 또는 ~ 상부에" 라 함은 대상 부분의 위 또는 아래에 위치함을 의미하는 것이며, 반드시 중력 방향을 기준으로 상 측에 위치하는 것을 의미하는 것은 아니다. 또한, 영역, 판 등의 부분이 다른 부분 "상에 또는 상부에" 있다고 할 때, 이는 다른 부분 "바로 상에 또는 상부에" 접촉하여 있거나 간격을 두고 있는 경우뿐 아니라 그 중간에 또 다른 부분이 있는 경우도 포함한다.In addition, in this specification, "on or on top of" means to be located above or below the target part, and does not necessarily mean to be located above the direction of gravity. Also, when a part of a region, plate, etc. is said to be "on or on" another part, it means that another part is in contact with or spaced "on or on" another part, as well as another part in between. Including cases where there is

또한, 본 명세서에서, 일 구성요소가 다른 구성요소와 "연결된다" 거나 "접속된다" 등으로 언급된 때에는, 상기 일 구성요소가 상기 다른 구성요소와 직접 연결되거나 또는 직접 접속될 수도 있지만, 특별히 반대되는 기재가 존재하지 않는 이상, 중간에 또 다른 구성요소를 매개하여 연결되거나 또는 접속될 수도 있다고 이해되어야 할 것이다.In addition, in this specification, when a component is referred to as "connected" or "connected" with another component, the component may be directly connected or directly connected to the other component, but in particular It should be understood that, unless there is a description to the contrary, it may be connected or connected through another element in the middle.

또한, 본 명세서에서, 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.Also, in this specification, terms such as first, second, etc. may be used to describe various elements, but the elements should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another.

마이크로엘이디(μLED) 디스플레이는 마이크로 사이즈의 LED를 광원으로 사용하는 디스플레이로서 기존 큰 사이즈의 LED에 비해 반응 속도가 빠르고, 낮은 전력, 높은 휘도를 지원하며, 휘어질 때 깨지지 않는 장점을 갖는다. 이러한 장점에 의해 초경량 무게를 필요로 하는 스마트워치, 스마트 섬유, 머리 착용 디스플레이(HMD) 기기 등에 응용될 수 있는 것으로 알려져 있다. 유기이엘과 비교할 때 마이크로엘이디는 화소영역이 차지하는 개구율이 상대적으로 작기 때문에 전면적으로 형성되는 반사방지막을 채택할 경우 투과도가 현저히 낮아져서 출사되는 영상의 휘도 저하가 두드러지게 나타나게 된다.A microLED (μLED) display is a display that uses a micro-sized LED as a light source. Compared to existing large-sized LEDs, it has a faster response speed, supports low power and high luminance, and does not break when bent. Due to these advantages, it is known that it can be applied to smart watches, smart textiles, and head-wearing display (HMD) devices that require ultra-light weight. Compared to organic EL, micro LED has a relatively small aperture ratio occupied by the pixel area. Therefore, when an anti-reflection film formed over the entire surface is adopted, the transmittance is significantly lowered and the luminance of the output image is markedly lowered.

도 1은 마이크로 LED 디스플레이의 평면도이다. 도 1에 도시된 바와 같이 화소가 형성되는 화소영역을 'A1'이라 부르고, 비화소영역을 'A2'로 부르기로 한다. 실선으로 표시된 화소영역(A1)은 도 1(a)에 도시한 바와 같이 r, g, b 서브 마이크로 LED를 하나의 세트로 지정하도록 형성될 수도 있으며, 도 1(b)에 도시된 바와 같이 각 서브 화소별도 지정될 수도 있음은 물론이다. 비화소영역(A2)는 화소영역(A1)을 제외한 나머지 영역을 의미하며 비화소영역(A2)에는 픽셀 형성 회로부(11)가 대부분 포함된다.1 is a plan view of a micro LED display. As shown in FIG. 1 , the pixel area in which the pixel is formed will be referred to as 'A1', and the non-pixel area will be referred to as 'A2'. The pixel area A1 indicated by a solid line may be formed to designate r, g, and b sub-micro LEDs as one set as shown in FIG. 1(a), and as shown in FIG. 1(b), each It goes without saying that sub-pixels may also be designated. The non-pixel area A2 refers to an area other than the pixel area A1 , and most of the pixel forming circuit unit 11 is included in the non-pixel area A2 .

본 발명은 이러한 Bus Off 공격을 탐지하기 위해서 데이터 프레임 사이의 간격인 IFS를 이용하여 효율적인 Bus Off 공격 탐지 방법을 제시한다. 이를 통해 운전자의 안전성 차량 내부 네트워크 보안성을 확보할 수 있다. The present invention proposes an efficient bus-off attack detection method using IFS, which is the interval between data frames, in order to detect such a bus-off attack. Through this, it is possible to secure the safety of the driver and the security of the network inside the vehicle.

IFS는 CAN Bus상에 데이터 프레임(Frame) 사이의 시간 간격을 나타내는 정보로 연속적인 데이터 프레임을 위해서는 데이터 프레임 사이에 최소 3 bit time의 IFS가 존재해야 한다. 도 1은 정상 동작상태에서 CAN Bus 상에서 시간의 흐름에 따른 데이터 프레임의 전송 방식을 설명하는 설명도이다. 즉, ECU가 CAN Bus 상으로 메시지 프레임 전송을 위해서는 CAN Bus에 이미 전송되고 있는 데이터 프레임이 전송된 이후에 최소 3 bit time 대기 후에 다음 메시지 프레임 전송이 가능하다. 일반적인 CAN 통신의 Bit rate인 50kbps 속도에서 3bit time은 6㎲(microsecond)이다. IFS is information indicating the time interval between data frames on the CAN bus. For continuous data frames, IFS of at least 3 bit time must exist between data frames. 1 is an explanatory diagram illustrating a data frame transmission method according to the passage of time on a CAN bus in a normal operation state. That is, in order for the ECU to transmit a message frame on the CAN Bus, the next message frame can be transmitted after waiting at least 3 bit time after the data frame already being transmitted to the CAN Bus is transmitted. At 50kbps, which is the bit rate of general CAN communication, 3bit time is 6㎲ (microsecond).

Bus Off 공격은 타겟 ECU를 의도적으로 Bus Off 상태가 되도록 만드는 공격이다. 각 ECU에는 CAN 통신 상에 발생하는 에러에 대해 ECU의 상태를 관리하기 위해 TEC(Transmit Error Counter)와 REC(Receive Eror Counter)가 정의되어 있다. 특히 TEC가 256 이상인 경우에 해당 ECU는 Bus Off 상태가 되며 Bus Off 상태인 ECU는 CAN Bus 상으로 어떠한 프레임 전송이나 수신을 할 수 없게 된다.Bus Off attack is an attack that intentionally puts the target ECU into Bus Off state. TEC (Transmit Error Counter) and REC (Receive Error Counter) are defined in each ECU to manage ECU status for errors occurring in CAN communication. In particular, when the TEC is 256 or higher, the corresponding ECU becomes Bus Off, and the ECU in Bus Off state cannot transmit or receive any frame over the CAN Bus.

공격자는 타겟 ECU를 Bus Off 시키기 위해서 타겟 ECU가 전송하는 데이터 프레임 내의 Arbitration field 이후에 bit 에러를 발생시킨다. Bit 에러를 인지한 타겟 ECU는 TEC(Transmit Error Count)를 8 증가시키고 전송에 실패한 데이터 프레임에 대해 재전송을 시도한다. 공격자는 동일한 과정을 반복함으로써 타겟 ECU의 TEC가 256 이상이 되도록 하여 타겟 ECU를 CAN Bus에서 Bus Off 시킨다. In order to Bus Off the target ECU, the attacker generates a bit error after the Arbitration field in the data frame transmitted by the target ECU. The target ECU, recognizing the bit error, increments the TEC (Transmit Error Count) by 8 and tries to retransmit the failed data frame. By repeating the same process, the attacker makes the target ECU's TEC to be 256 or higher, and makes the target ECU Bus Off from the CAN Bus.

CAN 통신 버스 네트워크에 참여하는 모든 노드(ECU)의 CAN 컨트롤러는 2개의 8비트 레지스터를 관리한다. 전송 에러를 카운트하는 레지스터 TEC(Transmission Error Counter)와 수신 에러를 카운트하는 레지스터 REC(Receive Error Counter)이다. 두 개의 레지스터는 CAN BUS에서 결함을 제한하는 목적으로 사용된다(Fault Confinement). The CAN controller of every node (ECU) participating in the CAN communication bus network manages two 8-bit registers. A register TEC (Transmission Error Counter) that counts transmission errors and a register REC (Receive Error Counter) that counts receive errors. Two registers are used for the purpose of limiting faults in CAN BUS (Fault Confinement).

도 2는 차량에서 TEC와 REC의 값에 따라 노드에서 나타나는 세 가지 상태 다이어그램을 표시한다. 에러가 발생하면 카운터는 증가하고 결함이 없는 프레임이면 카운터는 감소된다. TEC나 REC 카운터 중 하나가 특정한 값을 초과하게 되면 해당 노드는 에러를 제어하기 위한 다른 상태모드로 천이된다.Figure 2 shows three state diagrams that appear in a node according to the values of TEC and REC in the vehicle. If an error occurs, the counter is incremented, and if there is no fault, the counter is decremented. When either TEC or REC counter exceeds a certain value, the node transitions to another state mode to control the error.

카운터가 증가하는 규칙을 정리한다.Clean up the rules for incrementing the counter.

<TEC 카운터><TEC Counter>

전송노드가 에러플래그를 전송시 : TEC = TEC + 8When the sending node sends an error flag: TEC = TEC + 8

성공적으로 전송시 : TEC = TEC - 1On successful transmission: TEC = TEC - 1

<REC 카운터><REC counter>

수신노드가 에러플래를 전송시 : REC = REC + 1When the receiving node transmits an error flag: REC = REC + 1

수신노드가 첫 번째 에러플래그를 전송시 : REC = REC + 8When the receiving node transmits the first error flag: REC = REC + 8

성공적으로 전송시 : REC = REC - 1On successful transfer: REC = REC - 1

수신노드가 REC 카운터를 증가시키는 것보다 송신노드가 TEC 카운터를 증가시키는 속도가 빠르다. 이는 송신노드가 직접 메시지를 전송하므로 결함을 찾기가 더 쉽기 때문이다. TEC와 REC 값에 따라 해당 노드는 Error Active, Error Passive, Bus Off 상태 중 하나로 천이된다.The sending node increments the TEC counter faster than the receiving node increments the REC counter. This is because the sending node sends the message directly, so it is easier to find faults. Depending on the TEC and REC values, the node transitions to one of Error Active, Error Passive, and Bus Off states.

Error Active 상태는 일반적인 통신 상태로 에러가 발생하면, 도미넌트 값('0') 6개를 가지는 에러플래그를 버스에 실려준다.Error Active status is a general communication status, and when an error occurs, an error flag with 6 dominant values ('0') is loaded on the bus.

카운터 값이 127을 초과하면 Error Passive 상태로 천이된다. 이 상태에서는 송신에 제약이 따르지만 메시지 송수신을 계속 할 수 있다. Error Passive 상태에서 더 이상의 에러가 발생하지 않으면 다시 Error Active 상태로 돌아간다.If the counter value exceeds 127, it transitions to Error Passive state. In this state, transmission is restricted, but message transmission and reception can continue. If no more errors occur in the Error Passive state, it returns to the Error Active state.

문제의 노드가 에러를 계속 송신하여 카운터값이 255를 초과하게 되면 해당 노드는 네트워크에서 제외되는 Bus off 상태가 된다. 해당 노드를 더 이상 통신에 참여하지 못하게 함으로써 네트워크 결합을 제거하는 것이다. 물론 Bus Off 상태라도 물리적으로 연결이 끊기는 것은 아니다. Bus Off 상태에서 어플리케이션을 다시 시작하거나(Reset) 11비트의 리세시브 값이 128회 반복되면 Bus Off 상태에서 Error Active 상태로 돌아갈 수 있다.If the node in question continues to transmit errors and the counter value exceeds 255, the node is excluded from the network and goes into Bus off state. It removes network coupling by preventing the node from participating in any further communication. Of course, the connection is not physically disconnected even in the Bus Off state. If the application is restarted in Bus Off state (Reset) or the 11-bit recessive value is repeated 128 times, it can return to Error Active state from Bus Off state.

도 3은 공격자가 CAN Bus에서 Bus Off를 발생시키는 경우 시간의 흐름에 따른 데이터 프레임의 전송 방식을 설명하는 설명도이다. 공격자가 타겟 ECU를 Bus Off 시키기 위해서는 두 가지 조건을 만족해야 한다. 첫 번째는 공격 데이터 프레임 전송 타이밍으로 타겟 ECU가 데이터 프레임을 전송하는 타이밍과 동일하게 공격자가 데이터 프레임을 전송해야 한다. 두 번째는 공격 데이터 프레임 내용으로 타겟 ECU가 전송하는 데이터 프레임의 Arbitration field와 동일한 Arbitration field로 이루어져 있으며 Arbitration field 이후에 임의의 위치에서 타겟 데이터 프레임의 1 (recessive) bit 대신에 0 (dominant) bit로 이루어진 데이터 프레임을 전송해야한다. CAN 통신의 경우 데이터 프레임의 정상적으로 전송되어야 하는 0 (dominant) bit를 1 (recessive) bit로 변환하는 것은 어려우므로 공격자는 정상적으로 전송되어야 하는 1 (recessive) bit 대신에 0 (dominant) bit로 변환해서 송부하는 것이다. 3 is an explanatory diagram for explaining a data frame transmission method according to the passage of time when an attacker generates Bus Off in the CAN Bus. In order for an attacker to Bus Off the target ECU, two conditions must be satisfied. The first is the attack data frame transmission timing. The attacker must transmit the data frame at the same timing as the target ECU transmits the data frame. The second is the content of the attack data frame, which consists of the same arbitration field as the arbitration field of the data frame transmitted by the target ECU. After the arbitration field, the 0 (dominant) bit is used instead of the 1 (recessive) bit of the target data frame. The data frame should be transmitted. In the case of CAN communication, it is difficult to convert the 0 (dominant) bit that should normally be transmitted into 1 (recessive) bit of the data frame. will do

도 4는 Standard Format 및 Extended Format의 CAN 버스의 데이터 포맷을 나타낸다. 공격자는 도 4에 도시된 Arbitration field 다음에 전송되는 Control Field, Data Field, CRC Field 및 ACK Field 중에서 선택된 어느 하나 필드(일반적으로는 Data Field)의 비트값을 '1'에서 '0'로 변환하여 공격하는 것이다.4 shows data formats of CAN bus in Standard Format and Extended Format. The attacker converts the bit value of any one field (generally Data Field) selected from among the Control Field, Data Field, CRC Field and ACK Field transmitted after the Arbitration field shown in FIG. 4 from '1' to '0'. will attack

CAN 메세지 포맷에서 데이터 프레임의 각 필드에 대한 설명은 표 1로 정리하였다.The description of each field of the data frame in the CAN message format is summarized in Table 1.

SOF(Start Of Frame)SOF (Start Of Frame) 한 개의 dominant 비트로 구성되어 있으며, 메시지의 처음을 지시하고 모든 노드의 동기화를 위해 사용된다.Consists of one dominant bit, it indicates the beginning of a message and is used to synchronize all nodes. Arbitration Field
(중재 필드)
Arbitration Field
(arbitration field)
11비트 또는 29비트의 크기를 갖는 ID와 1비트의 RTR(Remote Transmission Request) 비트로 구성된다. 이 영역은 둘 이상의 노드에서 메시지의 전송이 동시에 일어날 경우 발생하는 메시지 간의 충돌을 조정하는 데 사용된다. RTR비트의 값은 데이터 프레임인지("d") 리모트 프레임인지("r")를 결정하는 데 사용된다.It consists of an ID having a size of 11 or 29 bits and a Remote Transmission Request (RTR) bit of 1 bit. This area is used to reconcile conflicts between messages that occur when two or more nodes transmit messages at the same time. The value of the RTR bit is used to determine whether it is a data frame ("d") or a remote frame ("r").
Control Field
(제어 필드)
Control Field
(control field)
2비트의 IDE(IDentifier Extension) 비트, 4비트의 데이터 길이 코드(DLC, Data Length Code)로 구성된다. R0는 Reserved 비트(Extended CAN 2.0B R0, R1)이다.It consists of 2-bit IDentifier Extension (IDE) bits and 4-bit Data Length Code (DLC). R0 is a Reserved bit (Extended CAN 2.0B R0, R1).
Data Field
(데이터 필드)
Data Field
(data field)
8bytes까지 사용 가능하며, 데이터를 저장하는 데 사용된다(특정한 노드에서 다른 노드로 전송하는 데이터를 포함).It can use up to 8 bytes and is used to store data (including data transmitted from one node to another).
CRC
(Cyclic Redundancy Check) 필드
CRC
(Cyclic Redundancy Check) field
SOF에서부터 데이터 필드까지의 비트열을 이용해 생성한 15비트의 CRC 시퀀스와 하나의 ‘r’비트의 CRC 델리미터로 구성되어 있다. 이것은 메시지 상의 에러 유무를 검사하는데 사용된다.It consists of a 15-bit CRC sequence generated using the bit string from the SOF to the data field and a CRC delimiter of one ‘r’ bit. This is used to check for errors in the message.
ACK(ACKnowledge) 필드ACK (ACKnowledge) field 한 비트의 ACK 슬롯과 하나의 ACK 델리미터("d")로 구성되어 있다. 임의의 노드에서 올바른 메시지를 수신하게 되면 ACK 필드를 받는 순간 ACK 슬롯의 값을 'd’로 설정해 버스 상에서 계속 전송하게 된다.It consists of one bit ACK slot and one ACK delimiter (“d”). When a correct message is received from any node, the ACK slot value is set to 'd' as soon as the ACK field is received, and transmission continues on the bus. EOF(End Of Frame, 프레임종료)End Of Frame (EOF) 7개의 ‘r’비트로 구성되어 메시지의 끝을 알리는 목적으로 사용된다.It consists of 7 'r' bits and is used to indicate the end of the message.

해당 프레임을 공격자가 타겟 ECU의 전송 시점에 동일하게 전송한 경우, 타겟 ECU는 Arbitration field 이후에 특정 위치에서 1 bit를 보냈지만 0 bit 가 모니터링 되어 bit 에러를 감지하고 TEC를 증가시킨다. 그리고 다시 데이터 프레임 전송을 재시도하며 동일하게 에러를 감지하고 TEC를 증가시킨다. 공격자는 해당 과정을 이용하여 타겟 ECU를 Bus Off 상태가 되도록 유도하는 것이다.If the attacker transmits the same frame at the time of transmission of the target ECU, the target ECU sends 1 bit at a specific location after the Arbitration field, but 0 bit is monitored to detect a bit error and increase the TEC. Then, it re-attempts data frame transmission, detects an error in the same way, and increases the TEC. The attacker uses this process to induce the target ECU to be in Bus Off state.

차량에는 복수 개 전자제어장치(ECU, Electronic Control Unit)가 장착된다. ECU는 자동차에서 사용되는 각 기계 또는 전기 부품을 전자적으로 제어하는 장치들을 지칭하는 용어이다. ECU의 예로는 Airbag Conrol Unit(ACU), Engine Control Unit(ECU), Transmission Control Unit(TCU), Brake Control Unit(BCU) 및 On-Board-Diagnostic(OBD) 등이 있다. 차량의 시동을 켜는 순간부터 각 ECU는 CAN Bus를 이용하여 주기적으로 자신의 상태를 다른 ECU에게 전달한다. 따라서 정상적인 차량 상태에서 데이터 프레임 사이의 최대 IFS 시간은 차량마다 정해져 있다. 이러한 차량별 최대 IFS 시간은 제조사가 제공하거나 또는 제공하지 않더라도 간단한 측정을 통해서 구할 수 있음은 물론이다.A vehicle is equipped with a plurality of electronic control units (ECUs). ECU is a term that refers to devices that electronically control each mechanical or electrical component used in a vehicle. Examples of ECUs include Airbag Control Unit (ACU), Engine Control Unit (ECU), Transmission Control Unit (TCU), Brake Control Unit (BCU), and On-Board-Diagnostic (OBD). From the moment the vehicle is turned on, each ECU periodically transmits its status to other ECUs using the CAN Bus. Therefore, in a normal vehicle state, the maximum IFS time between data frames is determined for each vehicle. It goes without saying that the maximum IFS time for each vehicle can be obtained through simple measurement, whether or not provided by the manufacturer.

본 발명에서는 이러한 버스 오프 공격을 탐지하게 위해 데이터 프레임 사이에 발생되는 IFS를 이용한다. Bus Off 공격 시에는 공격자에 의해 유도된 연속적인 에러 발생과 타겟 ECU의 데이터 프레임 재전송으로 인해 메시지 프레임 사이의 IFS가 길어진다. 따라서 정상 상황에서 데이터 프레임 사이에서 모니터링되는 최대 IFS 시간에 비해 더 긴 IFS 시간이 모니터링된 경우 CAN Bus 상으로 Bus Off 공격이 수행되었음을 탐지할 수 있다. Bus Off 공격 발생시 연속적인 에러 발생과 데이터 프레임 재 전송으로 정상보다 더 긴 IFS가 모니터링 된다.In the present invention, IFS generated between data frames is used to detect such a bus-off attack. In the case of Bus Off attack, IFS between message frames is lengthened due to continuous error induced by attacker and retransmission of data frame of target ECU. Therefore, under normal circumstances, if an IFS time longer than the monitored maximum IFS time is monitored between data frames, it is possible to detect that a Bus Off attack has been performed on the CAN Bus. When a Bus Off attack occurs, an IFS longer than normal is monitored by continuous error occurrence and data frame retransmission.

도 5는 본 발명에 따른 일 실시예의 Bus Off 공격을 탐지하는 흐름도이다. 도 5에 대한 모니터링은 Airbag Conrol Unit(ACU), Engine Control Unit(ECU), Transmission Control Unit(TCU), Brake Control Unit(BCU), On-Board-Diagnostic(OBD) 등에서 선택된 적어도 어느 하나의 전자제어장치(ECU)에서 수행될 수 있음은 물론이고, Bus Off 상태를 감지하기 위한 별도 모니터링용 전자제어장치를 부가하고 이를 통해서도 수행 가능하다.5 is a flowchart for detecting a Bus Off attack according to an embodiment of the present invention. Monitoring for FIG. 5 is at least one electronic control selected from Airbag Control Unit (ACU), Engine Control Unit (ECU), Transmission Control Unit (TCU), Brake Control Unit (BCU), On-Board-Diagnostic (OBD), etc. It can be performed in the ECU (ECU), as well as by adding a separate electronic control device for monitoring for detecting the Bus Off state, and it can also be performed through this.

차량 시동이 켜지면, 본 발명의 모니터링 기능이 부가된 전자제어장치는 카운터를 리셋하여 카운팅을 시작하면서 CAN 버스 모니터링을 수행한다(ST610). 모니터링을 통해 메세지 프레임이 수신되면 해당 메세지 프레임을 디코딩하여 데이터 프레임인지 여부를 체크한다(ST620). ST620 판별 결과 데이터 프레임으로 판별되면 EOF(End Of Frame)를 검출하고, 카운터를 다시 리셋한 후 새롭게 카운팅을 시작시킨 후(ST630), ST610 단계부터 다시 수행하여 ST610 ~ ST630단계를 무한 반복시키다.When the vehicle ignition is turned on, the electronic control device to which the monitoring function of the present invention is added resets the counter to start counting and performs CAN bus monitoring (ST610). When a message frame is received through monitoring, it is checked whether the message frame is a data frame by decoding the message frame (ST620). If it is determined as a data frame as a result of ST620 determination, end of frame (EOF) is detected, the counter is reset again, counting is started anew (ST630), and then steps ST610 ~ ST630 are repeated infinitely by performing again from step ST610.

ST610 ~ ST630단계를 무한 반복하는 과정에서 측정된 카운터값이 최대 IFS에 대응하는 카운터값을 초과하는 이벤트가 발생하는지 여부를 체크한다(ST650). ST650에 해당하는 이벤트가 발생되면 어느 하나의 노드에 Bus Off 공격이 가해졌다고 파악하고 이를 통지한 후(ST660) 종료한다.In the process of infinitely repeating steps ST610 to ST630, it is checked whether an event in which the measured counter value exceeds the counter value corresponding to the maximum IFS occurs (ST650). When an event corresponding to ST650 occurs, it detects that a Bus Off attack has been applied to any one node, notifies it (ST660), and then terminates.

도 5는 본 발명에 따른 일 실시예의 Bus Off 공격을 탐지하는 흐름도이다. 도 5에 대한 모니터링은 Airbag Conrol Unit(ACU), Engine Control Unit(ECU), Transmission Control Unit(TCU), Brake Control Unit(BCU), On-Board-Diagnostic(OBD) 등에서 선택된 적어도 어느 하나의 전자제어장치(ECU)에서 수행될 수 있음은 물론이고, Bus Off 상태를 감지하기 위한 별도 모니터링용 전자제어장치를 부가하고 이를 통해서도 수행 가능하다.5 is a flowchart for detecting a Bus Off attack according to an embodiment of the present invention. Monitoring for FIG. 5 is at least one electronic control selected from Airbag Control Unit (ACU), Engine Control Unit (ECU), Transmission Control Unit (TCU), Brake Control Unit (BCU), On-Board-Diagnostic (OBD), etc. It can be performed in the ECU (ECU), as well as by adding a separate electronic control device for monitoring for detecting the Bus Off state, and it can also be performed through this.

차량 시동이 켜지면, 본 발명의 모니터링 기능이 부가된 전자제어장치는 카운터를 리셋하여 카운팅을 시작한다. 이후 CAN 버스 모니터링을 수행한다(ST610). 모니터링을 통해 메세지 프레임이 수신되면 해당 메세지 프레임을 디코딩하여 데이터 프레임인지 여부를 체크한다(ST620). CAN Bus 상 메시지는 데이터 프레임, 리모트(remote) 프레임, 에러 프레임, 오버로드 프레임이 있다. 본 발명에서는 다른 프레임 종류의 간격과는 무관하며 데이터 프레임 사이의 간격만을 이용하여 Bus Off 상태를 감지한다. ST620 판별 결과 데이터 프레임이 아닌 경우라면 해당 프레임을 버리고 ST610단계를 다시 수행한다. ST620 판별 결과 데이터 프레임으로 판별되면 EOF(End Of Frame)를 검출하고, 카운터를 다시 리셋한 후 새롭게 카운팅을 시작시킨 후(ST630), ST610 단계부터 다시 수행하여 ST610 ~ ST630단계를 무한 반복시키다.When the vehicle ignition is turned on, the electronic control device to which the monitoring function of the present invention is added resets the counter and starts counting. Thereafter, CAN bus monitoring is performed (ST610). When a message frame is received through monitoring, it is checked whether the message frame is a data frame by decoding the message frame (ST620). Messages on CAN Bus include data frame, remote frame, error frame, and overload frame. In the present invention, the Bus Off state is detected using only the interval between data frames, regardless of the interval of other frame types. If it is determined that ST620 is not a data frame, the frame is discarded and step ST610 is performed again. If it is determined as a data frame as a result of ST620 determination, end of frame (EOF) is detected, the counter is reset again, counting is started anew (ST630), and then again from step ST610, and steps ST610 to ST630 are repeated infinitely.

ST610 ~ ST630단계를 무한 반복하는 과정에서 측정된 카운터값이 최대 IFS에 대응하는 카운터값을 초과하는 이벤트가 발생하는지 여부를 체크한다(ST650). ST650에 해당하는 이벤트가 발생되면 어느 하나의 노드에 Bus Off 공격이 가해졌다고 파악하고 이를 통지한 후(ST660) 종료한다.In the process of infinitely repeating steps ST610 to ST630, it is checked whether an event in which the measured counter value exceeds the counter value corresponding to the maximum IFS occurs (ST650). When an event corresponding to ST650 occurs, it detects that a Bus Off attack has been applied to any one node, notifies it (ST660), and then terminates.

도 6은 본 발명에 따른 일 실시예의 Bus Off 공격을 탐지하는 흐름도이다. 차량 시동이 켜지면, 본 발명의 모니터링 기능이 부가된 전자제어장치는 카운터를 리셋하여 카운팅을 시작한다. 이후 CAN 버스 모니터링을 수행한다(ST710). 모니터링을 통해 메세지 프레임이 수신되면 해당 메세지 프레임을 디코딩하여 데이터 프레임인지 여부를 체크한다(ST720). ST720 판별 결과 데이터 프레임이 아닌 경우라면 해당 프레임을 버리고 ST710단계를 다시 수행한다. ST720 판별 결과 데이터 프레임으로 판별되면 EOF(End Of Frame)를 검출하고, IFS를 측정한다(ST730). 이후, 측정된 IFS가 최대 IFS보다 큰 값을 갖는지 여부를 판별하고(ST740), ST740 판별 결과가 참인 경우에는 어느 하나의 노드에 Bus Off 공격이 가해졌다고 판별하고 이를 통지한 후(ST760) 종료한다. ST740 판별 결과가 거짓인 경우에는 카운터를 다시 리셋한 후 새롭게 카운팅을 시작시킨 후(ST7500), ST710 단계부터 다시 수행을 시작한다.6 is a flowchart for detecting a Bus Off attack according to an embodiment of the present invention. When the vehicle ignition is turned on, the electronic control device to which the monitoring function of the present invention is added resets the counter and starts counting. Thereafter, CAN bus monitoring is performed (ST710). When a message frame is received through monitoring, it is checked whether the message frame is a data frame by decoding the message frame (ST720). If it is not a data frame as a result of ST720 determination, the frame is discarded and step ST710 is performed again. If it is determined as a data frame as a result of ST720 determination, an end of frame (EOF) is detected and IFS is measured (ST730). Thereafter, it is determined whether the measured IFS has a value greater than the maximum IFS (ST740), and if the ST740 determination result is true, it is determined that a Bus Off attack has been applied to any one node, and after notifying it (ST760), it ends . If the ST740 determination result is false, the counter is reset and counting starts anew (ST7500), and then starts again from step ST710.

ST730단계에서는 정상적으로 수신된 이전 데이터 프레임 이후부터 다시 새로운 정상적인 데이터 프레임을 전송받을 때까지 걸리는 시간인 IFS 시간(측정 IFS 시간)이 산출되는 것이다. CAN Bus 상에서 바로 전(前)에 전송된 정상적인 데이터 프레임 이후부터 다음의 새로운 정상적인 데이터 프레임을 전송받을 때까지의 IFS를 측정(이를 측정 IFS라 함)하는 것이다.In step ST730, an IFS time (measured IFS time), which is a time taken from the normally received previous data frame until a new normal data frame is received again, is calculated. This is to measure the IFS from the previous normal data frame transmitted on the CAN Bus until the next new normal data frame is transmitted (this is called measurement IFS).

후속 조치로서 Bus Off 공격에 의해 해당 노드가 Bus Off 상태로 진입한 것이라 판별되고, 해당 노드가 Bus Off 상태로 진입되면 해당 노드의 어플리케이션을 다시 시작(Soft Reset) 되도록 처리할 수 있음은 물론이다.As a follow-up measure, it is determined that the node has entered the Bus Off state by the Bus Off attack. Of course, if the node enters the Bus Off state, the application of the node can be restarted (Soft Reset).

구체적인 실시예를 설정하고 본 발명의 실시예의 하나인 도 6에 따라 Bus Off 상황을 감지하는 방식에 대해 좀더 상세히 설명한다. Transmission Control Unit(TCU)에서 본 발명에 따른 Bus off를 감지하는 기능이 구현되는 것으로 가정하고, CAN Bus 상에는 도 3에 도시된 바와 같이 'ID A(정상)', 'ID B(정상)', 'ID C(비정상)' 데이터 프레임이 순차적으로 전송된다고 가정한다. 여기서, 'ID A', 'ID B' 및 'ID C'는 모두 데이터 프레임으로서, TCU를 제외한 다른 전자제어장치에서 생성된 것이라고 가정한다.A specific embodiment will be set and a method of detecting a Bus Off situation according to FIG. 6 which is one of the embodiments of the present invention will be described in more detail. It is assumed that the function of detecting Bus off according to the present invention is implemented in the Transmission Control Unit (TCU), and on the CAN Bus, as shown in FIG. 3 , 'ID A (normal)', 'ID B (normal)', It is assumed that 'ID C (abnormal)' data frames are sequentially transmitted. Here, it is assumed that 'ID A', 'ID B', and 'ID C' are all data frames and are generated by electronic control devices other than the TCU.

차량 시동이 켜지면, TCU는 CAN Bus 상의 모든 데이터 프레임을 모니터링한다. TCU는 수신되는 메세지 프레임이 데이터 프레임인지 여부를 체크하고, 데이터 프레임만 수신하여 디코딩한다.When the vehicle ignition is switched on, the TCU monitors all data frames on the CAN Bus. The TCU checks whether the received message frame is a data frame, and receives and decodes only the data frame.

TCU는 첫 번째 'ID A(정상)'를 수신한 후, 해당 'ID A'의 EOF(End of Frame)를 수신한 시각을 트리거 신호로 이용하여 카운팅을 시작한다. 다시 'ID B'가 수신되면, 해당 'ID B'의 EOF(End of Frame)를 확인하고 카운팅을 종료하고 카운팅값(측정 IFS)과 최대 IFS를 비교한다. 이때 실질적인 비교는 카운팅값을 시간으로 변환하여 측정 IFS 시간을 구하고, 구해진 측정 IFS 시간을 최대 IFS 시간과 비교하는 방식으로 이루어진다.After receiving the first 'ID A (normal)', the TCU starts counting by using the time at which the end of frame (EOF) of the corresponding 'ID A' is received as a trigger signal. When 'ID B' is received again, the EOF (End of Frame) of the 'ID B' is checked, counting is terminated, and the counting value (measured IFS) is compared with the maximum IFS. In this case, the actual comparison is performed by converting the counting value into time to obtain the measured IFS time, and comparing the obtained measured IFS time with the maximum IFS time.

이 경우에는 '측정 IFS 시간 > 최대 IFS 시간'를 만족시키지 못하므로 카운터를 리셋시키고, 새롭게 입력된 'ID B'의 EOF(End of Field)를 수신한 시각을 트리거 신호로 이용하여 새로운 카운팅을 시작하는 것이다. 'ID B' 데이터 프레임 이후에는 EOF 필드가 포함되지 않은 'ID C'가 입력될 것이나, EOF를 가지지 않으므로 연속적으로 입력되는 비정상 'ID C'를 모두 수신하는 동안 카운팅은 계속된다. 비정상 'ID C'를 전송하는 노드는 데이터 프레임에 오류가 있음을 파악하고 오류가 발생될 때마다 '에러 프레임'을 CAN 버스 상에 전송하므로 TCU는 에러 프레임을 확인하고 방금 수신한 'ID C'가 비정상임을 확인할 수 있게 된다.In this case, as the 'measured IFS time > maximum IFS time' is not satisfied, the counter is reset and a new counting starts using the newly inputted EOF (End of Field) of 'ID B' as a trigger signal. will do After the 'ID B' data frame, 'ID C' without an EOF field will be input, but since it does not have an EOF, counting continues while all consecutively input abnormal 'ID C' are received. The node sending the abnormal 'ID C' recognizes that there is an error in the data frame and sends an 'error frame' on the CAN bus whenever an error occurs, so the TCU checks the error frame and checks the 'ID C' just received. It can be confirmed that is abnormal.

이후 다시 정상적인 'ID B'가 입력되면 해당 'ID B'의 EOF(End of Frame)를 확인하고 카운팅을 종료하고 카운팅값(측정 IFS)과 최대 IFS 시간과 비교한다. 이 경우에는 '측정 IFS 시간 > 최대 IFS 시간'를 만족할 것이므로 Bus Off 공격이 가해졌음을 파악하고 이를 통지하고 종료한다.Afterwards, when a normal 'ID B' is input again, the EOF (End of Frame) of the 'ID B' is checked, counting is terminated, and the counting value (measured IFS) is compared with the maximum IFS time. In this case, 'measured IFS time > maximum IFS time' will be satisfied, so the Bus Off attack is identified, notified and terminated.

도 5는 CAN Bus와 이에 연결된 복수 개 전자제어장치의 구성도이다. 도 5에는 Airbag Conrol Unit(ACU), Engine Control Unit(ECU), Transmission Control Unit(TCU) 및 Brake Control Unit(BCU)이 CAN Bus에 연결되어 있다. 각 전자제어장치는 CAN 컨트롤러를 구비하는 DSP(Digital Signal Processor) 또는 마이크로제어기(μC, micro controller)가 구비되고, CAN 트랜시버(Transceiver)가 구비된다. DSP(Digital Signal Processor) 또는 마이크로제어기(μC, micro controller)에는 연속으로 수신되는 데이터 프레임 사이의 시간 간격을 측정하는 카운터를 구비하고, CAN 컨트롤러는 카운터 값을 이용하여 버스 오프 상태를 통지하게 구현할 수 있음은 물론이다.5 is a block diagram of a CAN bus and a plurality of electronic control devices connected thereto. 5, an Airbag Control Unit (ACU), an Engine Control Unit (ECU), a Transmission Control Unit (TCU), and a Brake Control Unit (BCU) are connected to the CAN Bus. Each electronic control device is provided with a DSP (Digital Signal Processor) or microcontroller (μC) having a CAN controller, and a CAN transceiver. A digital signal processor (DSP) or microcontroller (μC) has a counter that measures the time interval between consecutively received data frames, and the CAN controller uses the counter value to notify the bus off state. of course there is

상기에서 본 발명의 바람직한 실시예가 특정 용어들을 사용하여 설명 및 도시되었지만 그러한 용어는 오로지 본 발명을 명확히 설명하기 위한 것일 뿐이며, 본 발명의 실시예 및 기술된 용어는 다음의 청구범위의 기술적 사상 및 범위로부터 이탈되지 않고서 여러가지 변경 및 변화가 가해질 수 있는 것은 자명한 일이다. 이와 같이 변형된 실시예들은 본 발명의 사상 및 범위로부터 개별적으로 이해되어져서는 안되며, 본 발명의 청구범위 안에 속한다고 해야 할 것이다.In the above, preferred embodiments of the present invention have been described and illustrated using specific terms, but such terms are only for clearly describing the present invention, and the embodiments and described terms of the present invention are the spirit and scope of the following claims. It is obvious that various changes and changes can be made without departing from it. Such modified embodiments should not be separately understood from the spirit and scope of the present invention, but should be considered to fall within the scope of the claims of the present invention.

ID A, ID B, ID C: 데이터 프레임
IFS: Inter-Frame Space
ID A, ID B, ID C: data frame
IFS: Inter-Frame Space

Claims (9)

복수 개 전자제어장치가 CAN 버스를 이용하여 데이터를 송수신하고, 정상적인 차량 운행 중 연속적으로 생성되는 데이터 프레임 사이의 최대 시간 간격인 최대 IFS 시간을 저장 구비하는 차량용 전자제어장치에서 CAN 버스의 버스 오프를 감지하는 방법으로서,
CAN 버스상에서 수신되는 인접된 데이터 프레임 사이의 시간 간격(IFS, Inter-Frame Space)을 측정하는 제1단계와,
상기 제1단계에서 측정된 IFS 시간과 해당 차량에서 허여된 최대 IFS 시간을 비교하여 측정된 IFS 시간이 최대 IFS 시간보다 더 큰값인지 여부를 판별하는 제2단계 및
상기 제2단계의 판별 결과 측정된 IFS 시간이 최대 IFS 시간보다 더 큰 값을 가질 경우 Bus Off가 발생되었다고 판단하고 CAN 버스에 통지하는 제3단계를 포함하는 버스 오프 감지 방법.
A plurality of electronic control devices transmit/receive data using the CAN bus and store the maximum IFS time, which is the maximum time interval between data frames continuously generated during normal vehicle operation. As a method of detecting,
A first step of measuring a time interval (IFS, Inter-Frame Space) between adjacent data frames received on a CAN bus;
A second step of determining whether the measured IFS time is greater than the maximum IFS time by comparing the IFS time measured in the first step with the maximum IFS time allowed in the vehicle;
and a third step of determining that Bus Off has occurred and notifying the CAN bus when the measured IFS time has a greater value than the maximum IFS time as a result of the determination in the second step.
제1항에 있어서,
상기 최대 IFS 시간은 차량이 Bus Off가 발생되지 않은 상태에서 측정하여 미리 저장하는 제0단계를 더 포함하고,
상기 제0단계는 상기 제2단계 이전에 수행되는 것을 특징으로 하는 버스 오프 감지 방법.
According to claim 1,
The maximum IFS time further comprises a 0th step of measuring the vehicle in a state in which Bus Off does not occur and storing it in advance,
The 0th step is a bus off detection method, characterized in that it is performed before the 2nd step.
제1항 또는 제2항에 있어서,
상기 제1단계 내지 제3단계는 복수 개 전자제어장치 중 어느 하나의 전자제어장치에서 수행되며,
상기 어느 하나의 전자제어장치는 에어백제어유닛(Airbag Conrol Unit), 엔진제어유닛(Engine Control Unit), 트랜스미션제어유닛(Transmission Control Unit), 브레이크제어유닛(Brake Control Unit) 및 온보드진단기(On-Board-Diagnostic) 중에서 선택되는 것을 특징으로 하는 버스 오프 감지 방법.
3. The method of claim 1 or 2,
The first to third steps are performed in any one electronic control device among a plurality of electronic control devices,
Any one of the electronic control devices is an airbag control unit, an engine control unit, a transmission control unit, a brake control unit, and an on-board diagnostic device. -Diagnostic) bus off detection method, characterized in that selected from.
복수 개 전자제어장치가 CAN 버스를 이용하여 데이터를 송수신하고, 정상적인 차량 운행 중 연속적으로 생성되는 데이터 프레임 사이의 최대 시간 간격인 최대 IFS 시간을 저장 구비하는 차량용 전자제어장치에서 CAN 버스의 버스 오프를 감지하는 방법으로서,
CAN 버스상에서 수신되는 선행 데이터 프레임의 EOF 필드부터 카운팅을 시작하는 제1단계와,
CAN 버스상에서 수신되는 후행 데이터 프레임의 EOF 필드에서 카운팅을 종료하는 제2단계와,
- 상기 후행 데이터 프레임은 상기 선행 데이터 프레임 다음에 연속적으로 수신되는 데이터 프레임임 -
상기 제2단계의 후행 데이터 프레임을 선행 프레임으로 지정하여 상기 제1단계와 상기 제2단계를 반복 수행하는 제3단계와,
상기 카운터의 출력값으로부터 선행 데이터 프레임의 EOF 필드를 수신한 시간부터 경과된 시간을 산출하고, 산출된 시간이 상기 최대 IFS 시간보다 큰 값을 갖는지 여부를 판별하는 제4단계 및
상기 제4단계의 판별 결과 산출된 시간이 최대 IFS 시간보다 더 큰 값을 가질 경우 Bus Off가 발생되었다고 판단하고 CAN 버스에 통지하는 제5단계를 포함하는 버스 오프 감지 방법.
A plurality of electronic control devices transmit/receive data using the CAN bus and store the maximum IFS time, which is the maximum time interval between data frames continuously generated during normal vehicle operation. As a method of detecting,
A first step of starting counting from the EOF field of the preceding data frame received on the CAN bus;
a second step of terminating counting in the EOF field of a subsequent data frame received on the CAN bus;
- the subsequent data frame is a data frame that is received successively after the preceding data frame;
a third step of repeatedly performing the first step and the second step by designating the data frame following the second step as a preceding frame;
a fourth step of calculating a time elapsed from the time the EOF field of the preceding data frame is received from the output value of the counter, and determining whether the calculated time has a value greater than the maximum IFS time; and
and a fifth step of determining that Bus Off has occurred and notifying the CAN bus when the calculated time as a result of the determination of the fourth step has a value greater than the maximum IFS time.
제4항에 있어서,
상기 최대 IFS 시간은 차량이 Bus Off가 발생되지 않은 상태에서 측정하여 미리 저장하는 제0단계를 더 포함하고,
상기 제0단계는 상기 제4단계 이전에 수행되는 것을 특징으로 하는 버스 오프 감지 방법.
5. The method of claim 4,
The maximum IFS time further comprises a 0th step of measuring the vehicle in a state in which Bus Off does not occur and storing it in advance,
The 0th step is a bus off detection method, characterized in that it is performed before the 4th step.
제4항 또는 제5항에 있어서,
상기 제1단계 내지 제5단계는 복수 개 전자제어장치 중 어느 하나의 전자제어장치에서 수행되며,
상기 어느 하나의 전자제어장치는 에어백제어유닛(Airbag Conrol Unit), 엔진제어유닛(Engine Control Unit), 트랜스미션제어유닛(Transmission Control Unit), 브레이크제어유닛(Brake Control Unit) 및 온보드진단기(On-Board-Diagnostic) 중에서 선택되는 것을 특징으로 하는 버스 오프 감지 방법.
6. The method according to claim 4 or 5,
The first to fifth steps are performed in any one electronic control device among a plurality of electronic control devices,
Any one of the electronic control devices is an airbag control unit, an engine control unit, a transmission control unit, a brake control unit, and an on-board diagnostic device. -Diagnostic) bus off detection method, characterized in that selected from.
복수 개 전자제어장치가 CAN 버스를 이용하여 데이터를 송수신하고, 정상적인 차량 운행 중 연속적으로 수신되는 데이터 프레임 사이의 최대 시간 간격인 최대 IFS 시간을 기지의 값으로 구비하는 차량용 전자제어장치에 있어서,
CAN 버스상에서 수신되는 선행 데이터 프레임의 EOF 필드부터 후행 데이터 프레임의 EOF 필드까지를 반복적으로 카운팅하는 카운터를 구비하고,
- 상기 후행 데이터 프레임은 상기 선행 데이터 프레임 다음에 연속적으로 수신되는 데이터 프레임임 -
상기 카운터의 출력값으로부터 산출되는 시간이 상기 최대 IFS 시간보다 더 큰 값을 가질 경우 버스 오프 상태로 판별하고 CAN 버스에 통지하는 CAN 제어부(controller)를 포함하는 것을 특징으로 하는 전자제어장치.
In the electronic control device for a vehicle, the plurality of electronic control devices transmit and receive data using a CAN bus, and the maximum IFS time, which is the maximum time interval between data frames continuously received during normal vehicle operation, is a known value, the electronic control device for a vehicle comprising:
a counter for repeatedly counting from an EOF field of a preceding data frame received on a CAN bus to an EOF field of a subsequent data frame;
- the subsequent data frame is a data frame that is continuously received after the preceding data frame;
and a CAN controller for determining a bus-off state and notifying the CAN bus when the time calculated from the output value of the counter has a value greater than the maximum IFS time.
제7항에 있어서,
상기 최대 IFS 시간은 차량이 Bus Off가 발생되지 않은 상태에서 측정하여 미리 저장하여 구비하는 것을 특징으로 하는 전자제어장치.
8. The method of claim 7,
The electronic control device, characterized in that the maximum IFS time is measured and stored in advance in a state in which Bus Off does not occur in the vehicle.
제8항에 있어서,
상기 전자제어장치는 에어백제어유닛(Airbag Conrol Unit), 엔진제어유닛(Engine Control Unit), 트랜스미션제어유닛(Transmission Control Unit), 브레이크제어유닛(Brake Control Unit) 및 온보드진단기(On-Board-Diagnostic) 중에서 선택된 어느 하나인 것을 특징으로 하는 전자제어장치.
9. The method of claim 8,
The electronic control device includes an airbag control unit, an engine control unit, a transmission control unit, a brake control unit, and an on-board diagnostic device. Electronic control device, characterized in that any one selected from.
KR1020210034167A 2021-03-16 2021-03-16 Bus off detection method and electronic control unit performing the same KR102610234B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210034167A KR102610234B1 (en) 2021-03-16 2021-03-16 Bus off detection method and electronic control unit performing the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210034167A KR102610234B1 (en) 2021-03-16 2021-03-16 Bus off detection method and electronic control unit performing the same

Publications (2)

Publication Number Publication Date
KR20220129364A true KR20220129364A (en) 2022-09-23
KR102610234B1 KR102610234B1 (en) 2023-12-06

Family

ID=83445949

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210034167A KR102610234B1 (en) 2021-03-16 2021-03-16 Bus off detection method and electronic control unit performing the same

Country Status (1)

Country Link
KR (1) KR102610234B1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050119880A (en) * 2004-06-17 2005-12-22 현대자동차주식회사 A diagnosis method of can time out telecommunication error
JP2010081152A (en) * 2008-09-25 2010-04-08 Nec Electronics Corp Communication device, communication system, communication method, and can node
KR20140047984A (en) 2012-10-15 2014-04-23 현대모비스 주식회사 Method for detecting can bus off using message
US20150263938A1 (en) * 1997-02-18 2015-09-17 Emulex Corporation Interconnect system and method for ethernet networks
KR101748272B1 (en) * 2015-12-10 2017-06-27 현대자동차주식회사 Method and apparatus for controlling mass diagnostic communication in vehicle

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150263938A1 (en) * 1997-02-18 2015-09-17 Emulex Corporation Interconnect system and method for ethernet networks
KR20050119880A (en) * 2004-06-17 2005-12-22 현대자동차주식회사 A diagnosis method of can time out telecommunication error
JP2010081152A (en) * 2008-09-25 2010-04-08 Nec Electronics Corp Communication device, communication system, communication method, and can node
KR20140047984A (en) 2012-10-15 2014-04-23 현대모비스 주식회사 Method for detecting can bus off using message
KR101748272B1 (en) * 2015-12-10 2017-06-27 현대자동차주식회사 Method and apparatus for controlling mass diagnostic communication in vehicle

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Habeeb Olufowobi 외 2 명, 'Controller Area Network Intrusion Prevention System Leveraging Fault Recovery,' ACM, (20190.11.19.)* *
Hyun Min Song 외 2 명, 'Intrusion detection system based on the analysis of time intervals of CAN messages for in-vehicle network,' ICOIN, (2016.01.13.)* *

Also Published As

Publication number Publication date
KR102610234B1 (en) 2023-12-06

Similar Documents

Publication Publication Date Title
US10902109B2 (en) Misuse detection method, misuse detection electronic control unit, and misuse detection system
JP5919205B2 (en) Network device and data transmission / reception system
US10693905B2 (en) Invalidity detection electronic control unit, in-vehicle network system, and communication method
US20190140778A1 (en) Information processing method, information processing system, and recording medium
JP4407752B2 (en) FAILURE LOCATION DETECTION DEVICE, COMMUNICATION DEVICE, AND FAILURE LOCATION DETECTION METHOD
CN111147437B (en) Attributing bus disconnect attacks based on erroneous frames
US8432814B2 (en) Node of a distributed communication system, node and monitoring device coupled to such communication system
KR20180021287A (en) Appratus and method for detecting vehicle intrusion
CN103957155A (en) Message transmission method and device and interconnection interface
US20110041025A1 (en) Method of communication, in particular with capability of frame abortion or retransmission indication, between a transmitter and a receiver based on frames and corresponding communication node
US11218501B2 (en) Detector, detection method, and detection program
JP5578207B2 (en) Communication load judgment device
JP2005286589A (en) Network device equipped with ethernet interface
CN101286900B (en) Port fault detecting method, device, and access device
US20150258999A1 (en) Method and apparatus for isolating a fault-active controller in a controller area network
KR20220129364A (en) Bus off detection method and electronic control unit performing the same
CN109068328B (en) Secure network communication method, terminal and system
CN109495463B (en) Link width negotiation method, device and computer readable storage medium
CN101505269B (en) Processing method and apparatus for video server congestion
JP3217397B2 (en) Data transmission method of communication control device
KR20240048200A (en) Method for identifying diagnostic id pairs of of compromised ecu on can and system performing the same
KR20230081562A (en) Method and apparatus for detecting attacking ecu using can traffic monitoring
CN115695258A (en) Communication state diagnosis and processing method based on RSSP-I railway signal
KR20240043982A (en) Method for detecting masquerade attack based on bus-off attack of vehicle network and device to detect it
JP2011229079A (en) Electronic control unit

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right