JP2023152461A - On-vehicle gateway device and injection attack detection method - Google Patents

On-vehicle gateway device and injection attack detection method Download PDF

Info

Publication number
JP2023152461A
JP2023152461A JP2022062495A JP2022062495A JP2023152461A JP 2023152461 A JP2023152461 A JP 2023152461A JP 2022062495 A JP2022062495 A JP 2022062495A JP 2022062495 A JP2022062495 A JP 2022062495A JP 2023152461 A JP2023152461 A JP 2023152461A
Authority
JP
Japan
Prior art keywords
error
transmission
gateway
connector
gateway device
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.)
Pending
Application number
JP2022062495A
Other languages
Japanese (ja)
Inventor
敏也 中野
Toshiya Nakano
幸雄 柏島
Yukio Kashiwajima
伸吾 門内
Shingo Kadouchi
晃大 渡邊
Akihiro Watanabe
且暉 三浦
Katsuki Miura
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mazda Motor Corp
Original Assignee
Mazda Motor Corp
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 Mazda Motor Corp filed Critical Mazda Motor Corp
Priority to JP2022062495A priority Critical patent/JP2023152461A/en
Publication of JP2023152461A publication Critical patent/JP2023152461A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

To detect injection attacks on an on-vehicle network using fewer resources.SOLUTION: A gateway device 2 includes gateway means 20 for relaying communication between an ECU 4 and an external device connected to a connector 3, and monitoring means 25 for monitoring the transmission status indicating that a transmission message transmitted from the gateway means 20 to the connector 3 has reached the external device. The monitoring means 25 determines that an incorrect signal has been injected into an on-vehicle communication network 1 based on the occurrence of an error in the transmission status of a transmission message, when the transmission message output from the ECU 4 is transmitted to the connector 3 via the gateway means 20.SELECTED DRAWING: Figure 3

Description

ここに開示する技術は、車載ゲートウェイ装置及びインジェクション攻撃の検出方法に関する。 The technology disclosed herein relates to an in-vehicle gateway device and an injection attack detection method.

車両ネットワークにおける不正なデータを検出する侵入検知システムの導入が進められている。 Intrusion detection systems that detect fraudulent data in vehicle networks are being introduced.

様々なバリエーションの不正なデータによる攻撃を検出するためには、侵入検知システムとして多様な検出ロジックを搭載する必要がある。一方で、車両のコストダウンのためには、それらのロジックを極力低リソースで実行できることが望ましい。 In order to detect attacks based on various variations of fraudulent data, an intrusion detection system must be equipped with a variety of detection logics. On the other hand, in order to reduce vehicle costs, it is desirable to be able to execute these logics with as few resources as possible.

特許文献1には、情報処理装置間で送られるデータに対応する送信状態(送信実行状態/送信停止状態)を決定し、取得部の取得データに対応する送信状態が送信停止状態である場合に、その取得データに異常があると判定する技術が示されている。具体的に、特許文献1には、所定の周期で送信される周期データが所定期間にわたって取得されないときに、その周期データが送信停止状態であると判断し、送信停止状態中にその周期データが受信されると異常と判定する例が示されている。 Patent Document 1 discloses that a transmission state (transmission execution state/transmission stop state) corresponding to data sent between information processing devices is determined, and when the transmission state corresponding to the acquired data of the acquisition unit is the transmission stop state, , a technique for determining that there is an abnormality in the acquired data is shown. Specifically, in Patent Document 1, when periodic data transmitted at a predetermined period is not acquired for a predetermined period, it is determined that the periodic data is in a transmission stopped state, and the periodic data is transmitted during the transmission stopped state. An example is shown in which it is determined that there is an abnormality when the message is received.

特開2019-220770号公報Japanese Patent Application Publication No. 2019-220770

しかしながら、車両内では送受信の周期やタイミング、データ長さ等が異なる多種多様なメッセージのやり取りがなされている。したがって、従来技術のように、各メッセージに対応する送信状態を決定して適用する方式の場合、それぞれのメッセージについて送信状態の設定をするための演算や送信状態を記憶をするために多くの演算リソース(演算回路及び記憶領域を含む)を要するという問題がある。また、近年、車両の自動化、高機能化に伴って、車載ECUの数及びメッセージの種類数やデータ量が増大傾向にあるので、この問題点がより重要になる。 However, in a vehicle, a wide variety of messages are exchanged with different transmission/reception cycles, timings, data lengths, etc. Therefore, in the case of a method that determines and applies the transmission state corresponding to each message as in the conventional technology, many calculations are required to set the transmission state for each message and to memorize the transmission state. There is a problem in that resources (including arithmetic circuits and storage areas) are required. Furthermore, in recent years, as vehicles become more automated and highly functional, the number of in-vehicle ECUs, the number of types of messages, and the amount of data tend to increase, so this problem becomes more important.

また、車両では、車室内の限られた空間に車両制御用の演算リソース、乗員の快適性を向上させるための演算リソース、上記の侵入検知システムのための演算リソース、車両の盗難防止用の演算リソース等の多種多様の目的のための演算リソースを搭載する必要がある。したがって、車両の高性能化、高機能化を進展させてユーザーの満足度を向上させていく上でも、車両制御や快適性等に直接的に影響しない侵入検知システムのための演算リソースをできるだけ削減することには大きな意味がある。 In addition, in a vehicle, the limited space inside the vehicle is used for computing resources for vehicle control, computing resources for improving passenger comfort, computing resources for the above-mentioned intrusion detection system, and computing resources for vehicle theft prevention. It is necessary to install computing resources for a wide variety of purposes, such as resources. Therefore, in order to improve the performance and functionality of vehicles and improve user satisfaction, we will reduce the computational resources for intrusion detection systems that do not directly affect vehicle control and comfort as much as possible. There is great meaning in doing so.

ここで、使用する演算リソースを節約するために、送信状態を設定するデータの種類や量を減らすことも考えられるが、そうすると不正なデータによる攻撃の検出に対する網羅性が低下するという問題がある。 Here, in order to save the computational resources used, it is possible to reduce the type and amount of data used to set the transmission state, but this poses a problem that the comprehensiveness with respect to detection of attacks using fraudulent data will be reduced.

ここに開示された技術は、斯かる点に鑑みてなされたものであり、その目的とするところは、車載ネットワークに対する不正なデータの注入によるインジェクション攻撃を、より低リソースで検出することにある。 The technology disclosed herein has been developed in view of the above, and its purpose is to detect injection attacks by injecting fraudulent data into an in-vehicle network using fewer resources.

前記課題を解決するために、ここに開示された技術の一態様では、車載通信ネットワークに外部装置を接続するためのコネクタと車載のECUとの間に設けられたゲートウェイ装置を対象として、前記コネクタに接続される外部装置と前記ECUとの間の通信を中継するゲートウェイ手段と、前記ゲートウェイ手段から前記コネクタに送信される送信メッセージが前記外部装置に到達したことを示す送信ステータスを監視する監視手段とを備え、前記監視手段は、前記ECUから出力された送信メッセージが前記ゲートウェイ手段を介して前記コネクタに送信された場合において、当該送信メッセージの送信ステータスにエラーが生じたことに基づいて、前記車載通信ネットワークに対して不正な信号が注入されたと判定する、という構成とした。 In order to solve the above problem, one aspect of the technology disclosed herein targets a gateway device provided between a connector for connecting an external device to an in-vehicle communication network and an in-vehicle ECU. gateway means for relaying communication between an external device connected to the ECU and the ECU; and a monitoring means for monitoring a transmission status indicating that a transmission message transmitted from the gateway means to the connector has reached the external device. and the monitoring means, when the transmission message output from the ECU is transmitted to the connector via the gateway means, the monitoring means, based on the occurrence of an error in the transmission status of the transmission message, The system is configured to determine that a fraudulent signal has been injected into the in-vehicle communication network.

この構成によると、コネクタに外部装置が接続されていない状態で外部装置への送信メッセージを不正に注入する攻撃を従来よりも少ない演算リソース(演算回路及び記憶領域を含む)で検出できる。 According to this configuration, an attack that illegally injects a message to be sent to an external device when no external device is connected to the connector can be detected using fewer computational resources (including arithmetic circuits and storage areas) than before.

具体的には、前述のとおり、各データに対応する送信状態を決定して適用する従来方式の場合、送信状態の設定をするための演算や送信状態を記憶をするために演算リソースを割り当てる必要がある。これに対し、上記態様の構成では、各データに対応する送信状態を決定したり、ECUの状態や車載通信ネットワーク上を流れる信号の状態を記憶する必要がないので、車載通信ネットワークに対して不正な信号が注入されたことを検出するためのリソースを大幅に削減することができる。 Specifically, as mentioned above, in the case of the conventional method that determines and applies the transmission state corresponding to each data, it is necessary to allocate calculation resources to set the transmission state and to store the transmission state. There is. On the other hand, in the configuration of the above aspect, there is no need to determine the transmission state corresponding to each data or to store the state of the ECU or the state of the signal flowing on the in-vehicle communication network, so it is not necessary to determine the transmission state corresponding to each data, and therefore it is not necessary to store the state of the ECU or the signal flowing on the in-vehicle communication network. This can significantly reduce the resources required to detect when a signal is injected.

上記態様において、前記監視手段は、所定の閾値以上の前記送信ステータスのエラーが生じた場合に、前記車載通信ネットワークに対して不正な送信メッセージが注入されたと判定する、としてもよい。 In the above aspect, the monitoring means may determine that an unauthorized transmission message has been injected into the in-vehicle communication network when an error in the transmission status equal to or greater than a predetermined threshold occurs.

この態様によると、エラーの判定に対して一定の閾値を設けているので、不正な送信メッセージの誤判定を回避できるようになり、エラー判定の精度を高めることができる。 According to this aspect, since a certain threshold value is provided for error determination, it is possible to avoid erroneous determination of fraudulently transmitted messages, and it is possible to improve the accuracy of error determination.

前記監視手段は、前記送信メッセージの送信ステータスにエラーが生じたことを検知する異常検出部と、前記異常検出部で前記送信ステータスのエラーが検知された場合に、当該エラーの内容を示すエラー情報に当該エラーに関する付加情報を付加した検知ログを出力する出力部とを備える、としてもよい。 The monitoring means includes an abnormality detection unit that detects an error in the transmission status of the transmission message, and an error information indicating the details of the error when the abnormality detection unit detects an error in the transmission status. and an output unit that outputs a detection log to which additional information regarding the error is added.

ここで、付加情報には、エラーが発生した時刻に関する時刻情報、エラーが発生した場所に関する場所情報が含まれる、としてもよい。 Here, the additional information may include time information regarding the time when the error occurred and location information regarding the location where the error occurred.

この態様によると、エラー情報に付加情報を付けて保存するようにしているので、インジェクション攻撃かどうかの判断などのエラーの解析が容易になる。 According to this aspect, additional information is attached to the error information and saved, making it easier to analyze the error, such as determining whether it is an injection attack.

ここに開示された技術の他の一態様では、インジェクション攻撃の検出方法を対象として、監視手段が、車載通信ネットワークの内部バスからゲートウェイ装置を経由して当該車載通信ネットワークに外部装置を接続するためのコネクタに送信される送信メッセージの前記外部装置への到達を示す送信ステータスを監視する監視工程と、前記監視手段が、前記送信メッセージの前記送信ステータスにエラーが生じたことに基づいて、前記車載通信ネットワークに対して不正な信号が注入されたと判定する判定工程とを備える、構成とした。 Another aspect of the technology disclosed herein is directed to a method for detecting an injection attack, and the monitoring means connects an external device to the in-vehicle communication network from an internal bus of the in-vehicle communication network via a gateway device. a monitoring step of monitoring a transmission status indicating that a transmission message transmitted to the connector of the vehicle has arrived at the external device; and a determination step of determining that an unauthorized signal has been injected into the communication network.

本態様によると、各データに対応する送信状態を決定したり、ECUの状態や車載通信ネットワーク上を流れる信号の状態を記憶する必要がない。したがって、車載通信ネットワークに対して不正な信号が注入されたことを検出するためのリソースを大幅に削減することができる。 According to this aspect, there is no need to determine the transmission state corresponding to each data, or to store the state of the ECU or the state of the signal flowing on the in-vehicle communication network. Therefore, resources for detecting that a fraudulent signal is injected into the in-vehicle communication network can be significantly reduced.

以上説明したように、ここに開示された技術によると、車載ネットワークに対するインジェクション攻撃を、従来よりも低リソースで検出することができる。 As described above, according to the technology disclosed herein, an injection attack on an in-vehicle network can be detected with fewer resources than before.

車載ネットワークシステムの構成例を示すブロック図Block diagram showing a configuration example of an in-vehicle network system 車載ネットワークシステムのデータフローの一例を示す図Diagram showing an example of data flow of an in-vehicle network system ゲートウェイ装置の構成例を示すブロック図Block diagram showing a configuration example of a gateway device ゲートウェイ装置の処理の一例を示すフローチャートFlowchart showing an example of processing of the gateway device ゲートウェイ装置の処理の他の例を示すフローチャートFlowchart showing another example of processing of the gateway device 車載ネットワークの他の構成例を示すブロック図Block diagram showing another configuration example of the in-vehicle network

以下、例示的な実施形態について、図面を参照しながら詳細に説明する。図中同一または相当部分には同一の符号を付すものとし、繰り返しの説明を省略する場合がある。また、以下の実施形態では、本開示の内容に関連性の高い構成を中心に説明する。 Hereinafter, exemplary embodiments will be described in detail with reference to the drawings. Identical or corresponding parts in the figures are denoted by the same reference numerals, and repeated explanation may be omitted. Furthermore, in the following embodiments, configurations that are highly relevant to the content of the present disclosure will be mainly described.

以下の説明では、外部装置、コネクタ、ECU、センサ、アクチュエータの総括名称として「デバイス」という用語を用いる場合がある。例えば、デバイス間の接続との記載は、外部装置とコネクタとの間の接続や外部装置とECUとの間の接続、ECU、センサ、アクチュエータの相互間の接続等のように、各デバイス同士の接続を広く包含する概念として用いる。 In the following description, the term "device" may be used as a general name for external devices, connectors, ECUs, sensors, and actuators. For example, the description of connections between devices refers to connections between devices, such as connections between external devices and connectors, connections between external devices and ECUs, connections between ECUs, sensors, and actuators. Use connection as a broadly encompassing concept.

図1は、本実施形態に係る車載通信ネットワーク1の構成例を示す。 FIG. 1 shows an example of the configuration of an in-vehicle communication network 1 according to this embodiment.

図1に示すように、車載通信ネットワーク1は、外部バス領域5と内部バス領域6とを含む。以下では、車載通信ネットワーク1は、CAN(Controller Area Network)通信のプロトコルに準拠したネットワーク(以下、単に「CANネットワーク」という)であるものとする。なお、車載通信ネットワーク1が、イーサネット(登録商標)のプロトコルに準拠したネットワークのように他方式のネットワークであってもよい。 As shown in FIG. 1, the in-vehicle communication network 1 includes an external bus area 5 and an internal bus area 6. In the following description, it is assumed that the in-vehicle communication network 1 is a network that complies with the CAN (Controller Area Network) communication protocol (hereinafter simply referred to as "CAN network"). Note that the in-vehicle communication network 1 may be a network of another type, such as a network based on the Ethernet (registered trademark) protocol.

外部バス領域5では、故障診断機8や充電ステーション等の外部装置を接続するためのコネクタ3が外部バスEBを介して接続されている。この例では、ゲートウェイ装置2よりも車両外側のネットワークを構成するバスを外部バスEBという。 In the external bus area 5, a connector 3 for connecting external devices such as a fault diagnostic machine 8 and a charging station is connected via an external bus EB. In this example, a bus forming a network outside the vehicle than the gateway device 2 is referred to as an external bus EB.

内部バス領域6では、車載のECU4、センサ、アクチュエータ等が内部バスIBを介して接続されている。この例では、ゲートウェイ装置2よりも車両内側のネットワークを構成するバスを内部バスEBという。 In the internal bus area 6, an in-vehicle ECU 4, sensors, actuators, etc. are connected via an internal bus IB. In this example, the bus that forms the network inside the vehicle from the gateway device 2 is referred to as an internal bus EB.

別の言い方をすると、車両外から接続される装置(外部装置)に直接接続されるバスを外部バスEBといい、それ以外のバスを内部バスIBという。なお、以下の説明において、外部バスEBと内部バスIBとを特に区別しない場合に、単に「バス」という場合がある。 In other words, a bus that is directly connected to a device connected from outside the vehicle (external device) is called an external bus EB, and other buses are called an internal bus IB. In the following description, the external bus EB and the internal bus IB may be simply referred to as "buses" when no particular distinction is made.

外部バス領域5と内部バス領域6との間には、ゲートウェイ装置2が設けられる。ゲートウェイ装置2は、車載通信ネットワーク1において、デバイス間の通信を中継する機能を有する。また、コネクタ3に外部装置が接続された場合、ゲートウェイ装置2は、外部装置とECU4との間の通信を中継する。 A gateway device 2 is provided between the external bus area 5 and the internal bus area 6. The gateway device 2 has a function of relaying communication between devices in the in-vehicle communication network 1. Further, when an external device is connected to the connector 3, the gateway device 2 relays communication between the external device and the ECU 4.

例えば、図2に示すように、コネクタ3に対してECU4の故障を診断する故障診断機8が接続された場合に、ゲートウェイ装置2は、故障診断機8と診断対象となるECU4との間のデータ通信を中継する。以下の説明では、説明の便宜上、故障診断機8等の外部装置が接続されたコネクタ3に「31」の符号を付して、他のコネクタ3と区別して説明する場合がある。同様に、診断対象となるECU4に「41」の符号を付して、他のECU4と区別して説明する場合がある。故障診断機8は、外部装置の一例である。なお、図2において、図示の便宜上、故障診断機8とコネクタ31との間を線CTで結んでいるが、両者間を配線で接続することを限定する意図はなく、故障診断機8と接触式のコネクタ31とが端子同士で直接接続されてもよい。 For example, as shown in FIG. 2, when a fault diagnostic machine 8 for diagnosing a fault in the ECU 4 is connected to the connector 3, the gateway device 2 connects the fault diagnostic machine 8 and the ECU 4 to be diagnosed. Relay data communication. In the following description, for convenience of explanation, the connector 3 to which an external device such as the failure diagnosis machine 8 is connected may be designated by the symbol "31" to distinguish it from other connectors 3. Similarly, the ECU 4 to be diagnosed may be given the reference numeral "41" and explained to be distinguished from other ECUs 4. The failure diagnostic machine 8 is an example of an external device. In addition, in FIG. 2, for convenience of illustration, the fault diagnostic device 8 and the connector 31 are connected by a line CT, but there is no intention to limit the connection between the two by wiring, and the fault diagnostic device 8 and the connector 31 are connected by a wire CT. The terminals of the connector 31 may be directly connected to each other.

図2の例において、故障診断機8は、コネクタ31に接続された後、診断対象のECU41に対してリクエストメッセージを送信する。リクエストメッセージは、故障診断機8から出力された後、コネクタ31及び外部バスEBを介してゲートウェイ装置2に入力される。ゲートウェイ装置2では、リクエストメッセージを受信すると、後述するゲートウェイ手段20でルーティングして、ECU41が接続された内部バスIBに出力する。 In the example of FIG. 2, after being connected to the connector 31, the fault diagnostic device 8 transmits a request message to the ECU 41 to be diagnosed. After the request message is output from the fault diagnosis device 8, it is input to the gateway device 2 via the connector 31 and the external bus EB. When the gateway device 2 receives the request message, it is routed by the gateway means 20 described later and output to the internal bus IB to which the ECU 41 is connected.

別の具体例を挙げると、例えば、コネクタ31に外部装置として急速充電器が接続された場合、急速充電器からECU41に動作ステータスのリクエストメッセージが送信される。 To give another specific example, for example, when a quick charger is connected to the connector 31 as an external device, an operation status request message is transmitted from the quick charger to the ECU 41.

ECU41は、リクエストメッセージを受信すると、リクエストメッセージに対するレスポンスメッセージを内部バスIBを介してゲートウェイ装置2に出力する。ゲートウェイ装置2では、ECU41からのレスポンスメッセージを受信すると、ゲートウェイ手段20でルーティングして、外部バスEBを介してコネクタ31に出力する。故障診断機8は、コネクタ31を介してレスポンスメッセージを受信すると、そのレスポンスメッセージをサーバ9に送信したり、レスポンスメッセージに基づく診断結果をサーバ9に通知したりする。 Upon receiving the request message, the ECU 41 outputs a response message to the request message to the gateway device 2 via the internal bus IB. When the gateway device 2 receives a response message from the ECU 41, it is routed by the gateway means 20 and output to the connector 31 via the external bus EB. When the failure diagnostic machine 8 receives the response message via the connector 31, it transmits the response message to the server 9, and notifies the server 9 of the diagnosis result based on the response message.

上記の別の具体例では、例えば、前述の動作ステータスのリクエストメッセージに対して、ECU41は充電許可信号及び電流指令値のレスポンスメッセージを急速充電器に返送する。 In the above-mentioned other specific example, for example, in response to the above-mentioned operation status request message, the ECU 41 returns a charging permission signal and a current command value response message to the quick charger.

-ゲートウェイ装置-
図3は、ゲートウェイ装置2の構成例を示すブロック図である。なお、図3において、ECU4からコネクタ3に送信する送信メッセージが受信された場合におけるデータフローを矢印で示している。
-Gateway device-
FIG. 3 is a block diagram showing a configuration example of the gateway device 2. As shown in FIG. Note that in FIG. 3, arrows indicate data flow when a transmission message to be transmitted from the ECU 4 to the connector 3 is received.

図3に示すように、ゲートウェイ装置2は、ゲートウェイ手段20と、監視手段25とを備える。 As shown in FIG. 3, the gateway device 2 includes a gateway means 20 and a monitoring means 25.

ゲートウェイ手段20は、内部バスIBに接続された第1送受信部21と、外部バスEBに接続された第2送受信部22と、ゲートウェイ処理部23と、記憶部24とを備える。 The gateway means 20 includes a first transmitting/receiving section 21 connected to an internal bus IB, a second transmitting/receiving section 22 connected to an external bus EB, a gateway processing section 23, and a storage section 24.

第1送受信部21は、内部バスIBを介して受信されたメッセージをゲートウェイ処理部23に転送したり、ゲートウェイ処理部23からECU4に送信するメッセージを内部バスIBに出力する。 The first transmitting/receiving unit 21 transfers messages received via the internal bus IB to the gateway processing unit 23, and outputs messages to be transmitted from the gateway processing unit 23 to the ECU 4 to the internal bus IB.

第2送受信部22は、ゲートウェイ処理部23からコネクタ3に送信するデータを外部バスEBに出力したり、外部バスEBを介して受信されたデータをゲートウェイ処理部23に転送したりする。 The second transmitting/receiving section 22 outputs data to be transmitted from the gateway processing section 23 to the connector 3 to the external bus EB, and transfers data received via the external bus EB to the gateway processing section 23.

ゲートウェイ処理部23は、ルーティングテーブルTBに従って、各ECU4から送信されたメッセージや各コネクタ3を経由して入力されたメッセージを、送信先のデバイスが接続されたバスに転送する機能を有する。 The gateway processing unit 23 has a function of transferring messages transmitted from each ECU 4 and messages input via each connector 3 to a bus connected to a destination device according to the routing table TB.

ルーティングテーブルTBは、バスを介して受信されたメッセージの種別や内容に応じた転送先のバスを示すものであり、記憶部24に格納されている。例えば、ルーティングテーブルTBには、前述のレスポンスメッセージの転送先としてコネクタ3が登録されている。 The routing table TB indicates a transfer destination bus according to the type and content of a message received via the bus, and is stored in the storage unit 24. For example, the connector 3 is registered in the routing table TB as a transfer destination of the above-mentioned response message.

監視手段25は、取得部26と、異常検出部27と、出力部28と、記憶部29とを備える。 The monitoring means 25 includes an acquisition section 26 , an abnormality detection section 27 , an output section 28 , and a storage section 29 .

取得部26は、ゲートウェイ手段20からコネクタ3に送信される送信メッセージの送信ステータスを取得する。送信ステータスは、上記の送信メッセージが外部装置に到達したことを示すステータス情報である。例えば、CANネットワークの場合、ゲートウェイ装置2内のレジスタに各コネクタ3への送信メッセージに関する送信ステータスが反映される。したがって、取得部26は、送信メッセージが送信された後に、そのレジスタの状態を確認することにより送信メッセージの送信ステータスを取得する。 The acquisition unit 26 acquires the transmission status of the transmission message transmitted from the gateway means 20 to the connector 3. The transmission status is status information indicating that the above transmission message has reached the external device. For example, in the case of a CAN network, the transmission status regarding the transmission message to each connector 3 is reflected in the register in the gateway device 2. Therefore, the acquisition unit 26 acquires the transmission status of the transmission message by checking the state of the register after the transmission message is transmitted.

例えば、内部バスIBからゲートウェイ手段20を経由してコネクタ31に接続された外部バスEBにメッセージが転送された場合において、外部バスEBに外部装置が接続されていないときには、外部バスEBにメッセージを送信した後に、CANのAck(Acknowledgement)が立たない。そうすると、メッセージの送信エラーに基づいて、ゲートウェイ装置2内部のAckErrorレジスタが立つようになっている。そこで、取得部26において、そのAckErrorレジスタの状態を確認することにより送信メッセージの送信ステータスを取得することができる。 For example, when a message is transferred from the internal bus IB to the external bus EB connected to the connector 31 via the gateway means 20, if no external device is connected to the external bus EB, the message is transferred to the external bus EB. After sending, CAN Ack (Acknowledgement) does not go up. Then, the AckError register inside the gateway device 2 is set based on the message transmission error. Therefore, the acquisition unit 26 can acquire the transmission status of the transmission message by checking the state of the AckError register.

また、取得部26は、CANコントローラに搭載されているTEC(Transmit Error Counter:送信エラーカウンター)の値を送信メッセージの送信ステータスとして取得してもよい。具体的には、例えば、送信エラーカウンターは、送信が成功すると減算される一方で、エラーフラグの検出があった場合のように送信メッセージの送信状態に応じて所定のルールにしたがって加算される。そこで、TECのカウント値を参照することで、送信ステータスを把握することができる。 Further, the acquisition unit 26 may acquire the value of a TEC (Transmit Error Counter) installed in the CAN controller as the transmission status of the transmission message. Specifically, for example, the transmission error counter is decremented when transmission is successful, and is incremented according to a predetermined rule depending on the transmission status of the transmission message, such as when an error flag is detected. Therefore, by referring to the TEC count value, the transmission status can be grasped.

なお、取得部26は、例えば、車載通信ネットワーク1が、ハンドシェイク方式のプロトコルを採用している場合、ハンドシェイクの成立状態(相手からの応答返信状態)を示すフラグを送信ステータスとして取得してもよい。 Note that, for example, when the in-vehicle communication network 1 adopts a handshake protocol, the acquisition unit 26 acquires a flag indicating the handshake establishment state (response return state from the other party) as the transmission status. Good too.

異常検出部27は、記憶部29に格納された判定条件に基づいて、取得部26で取得された送信ステータスにエラーが生じたことを検知する。記憶部29には、判定条件として、例えば、前述の送信エラーカウンターの閾値が記憶されている。異常検出部27は、送信エラーカウンターが判定条件で示された所定の閾値以上になった場合に、車載通信ネットワークに対して不正な信号が注入されたと判定する。すわわち、送信ステータスにエラーが生じたことを検知する。異常検出部27での送信ステータスのエラーの検知結果は、出力部28に出力される。 The abnormality detection unit 27 detects, based on the determination conditions stored in the storage unit 29, that an error has occurred in the transmission status acquired by the acquisition unit 26. The storage unit 29 stores, for example, the aforementioned threshold value of the transmission error counter as a determination condition. The abnormality detection unit 27 determines that an incorrect signal has been injected into the in-vehicle communication network when the transmission error counter exceeds a predetermined threshold value indicated by the determination condition. In other words, it is detected that an error has occurred in the transmission status. The error detection result of the transmission status by the abnormality detection section 27 is output to the output section 28 .

なお、判定条件は、送信エラーカウンターの値に限定されず、送信エラーカウンター以外の指標を用いてもよい。例えば、前述のハンドシェイク方式の場合、リトライの回数や応答がなかった回数を判定条件として用いてもよい。 Note that the determination condition is not limited to the value of the transmission error counter, and an index other than the transmission error counter may be used. For example, in the case of the handshake method described above, the number of retries or the number of times there is no response may be used as the determination condition.

また、図3の例では、記憶部24と記憶部29とを別々に設けた例を示しているが、これらをまとめて1つの記憶部としてもよい。 Further, although the example in FIG. 3 shows an example in which the storage section 24 and the storage section 29 are provided separately, they may be combined into one storage section.

出力部28は、異常検出部27で送信ステータスのエラーが検知された場合に、検知されたエラーの内容を示すエラー情報に、検知されたエラーに関する付加情報を付加した検知ログを出力する。付加情報は、例えば、エラーが発生した時刻を示す時刻情報であったり、エラーが発生した場所を示す場所情報などが含まれる。出力部28から出力された検知ログは、記憶部29に記憶される。このように、エラー情報に付加情報を付けて保存することで、インジェクション攻撃かどうかの判断などのエラーの解析が容易になる。 When an error in the transmission status is detected by the abnormality detection unit 27, the output unit 28 outputs a detection log in which additional information regarding the detected error is added to error information indicating the content of the detected error. The additional information includes, for example, time information indicating the time when the error occurred, location information indicating the location where the error occurred, and the like. The detection log output from the output unit 28 is stored in the storage unit 29. In this way, by saving error information with additional information attached, it becomes easier to analyze the error, such as determining whether it is an injection attack.

<ゲートウェイ装置の動作>
次に、図4を参照しつつ、ゲートウェイ装置2の動作について説明する。ここでは、前述のECU41から前述のコネクタ31にレスポンスメッセージが送信される例について説明する。
<Operation of gateway device>
Next, the operation of the gateway device 2 will be explained with reference to FIG. 4. Here, an example in which a response message is transmitted from the ECU 41 to the connector 31 described above will be described.

-ステップS1-
ステップS1において、異常検出部27は、記憶部29に格納された判定条件を取得する。この例では、異常検出部27は、判定条件として、送信エラーカウンターの閾値(以下、「エラー閾値」という)を取得する。
-Step S1-
In step S1, the abnormality detection unit 27 acquires the determination conditions stored in the storage unit 29. In this example, the abnormality detection unit 27 obtains a threshold value of a transmission error counter (hereinafter referred to as "error threshold value") as a determination condition.

-ステップS2-
ステップS2において、取得部26は、内部バスIBからゲートウェイ手段20を経由してコネクタ31に接続された外部バスEBにリクエストメッセージが転送されると、そのリクエストメッセージの送信ステータスを取得する。具体的に、取得部26は、前述の送信エラーカウンターの値を取得する。
-Step S2-
In step S2, when the request message is transferred from the internal bus IB to the external bus EB connected to the connector 31 via the gateway means 20, the acquisition unit 26 acquires the transmission status of the request message. Specifically, the acquisition unit 26 acquires the value of the above-mentioned transmission error counter.

-ステップS3-
ステップS3において、異常検出部27は、取得部26で取得された送信エラーカウンタ値がエラー閾値以上かどうかを判定する。送信エラーカウンタ値がエラー閾値以上の場合、フローはステップS4に進み、送信エラーカウンタ値がエラー閾値未満の場合、フローはステップS2に戻る。
-Step S3-
In step S3, the abnormality detection unit 27 determines whether the transmission error counter value acquired by the acquisition unit 26 is greater than or equal to the error threshold. If the transmission error counter value is greater than or equal to the error threshold, the flow proceeds to step S4, and if the transmission error counter value is less than the error threshold, the flow returns to step S2.

-ステップS4-
ステップS4において、異常検出部27は、出力部28に検知結果を出力する。ここでは、送信エラーカウンタ値がエラー閾値以上になっているので、異常検出部27は、インジェクション攻撃が発生したと判定し、その判定結果を出力部28に通知する。
-Step S4-
In step S4, the abnormality detection section 27 outputs the detection result to the output section 28. Here, since the transmission error counter value is greater than or equal to the error threshold, the abnormality detection unit 27 determines that an injection attack has occurred, and notifies the output unit 28 of the determination result.

-ステップS5-
出力部28は、異常検出部27からインジェクション攻撃の発生通知を受信すると、異常検出部27で検知されたエラー情報に付加情報を付加した検知ログを生成し、記憶部29に保存する。
-Step S5-
When the output unit 28 receives the injection attack occurrence notification from the abnormality detection unit 27 , it generates a detection log in which additional information is added to the error information detected by the abnormality detection unit 27 , and stores it in the storage unit 29 .

そして、ステップS2からステップS5の動作が繰り返される。 Then, the operations from step S2 to step S5 are repeated.

以上のように、本実施形態によると、コネクタ3に外部装置が接続されていない状態で外部装置への送信メッセージを不正に注入する攻撃を従来よりも少ない演算リソース(演算回路及び記憶領域を含む)で検出できる。 As described above, according to the present embodiment, an attack that illegally injects a message to be sent to an external device when no external device is connected to the connector 3 can be prevented using fewer computing resources (including computing circuits and storage areas) than before. ) can be detected.

具体的には、各データに対応する送信状態を決定して適用する従来方式の場合、送信状態の設定をするための演算や送信状態を記憶をするために演算リソースを割り当てる必要がある。 Specifically, in the case of the conventional method in which a transmission state corresponding to each data is determined and applied, it is necessary to allocate calculation resources to perform calculations for setting the transmission state and to store the transmission state.

これに対し、本実施形態の構成では、外部装置とECU4とのメッセージのやり取りに対して個々に送信状態を決定したり、ECU4の状態や車載通信ネットワーク1上を流れる信号の状態を記憶する必要がない。これにより、車載通信ネットワーク1に対して不正な信号が注入されたことを検出するためのリソースを大幅に削減することができる。 In contrast, in the configuration of the present embodiment, it is necessary to individually determine the transmission state for exchanging messages between the external device and the ECU 4, and to memorize the state of the ECU 4 and the state of signals flowing on the in-vehicle communication network 1. There is no. Thereby, the resources for detecting that a fraudulent signal has been injected into the in-vehicle communication network 1 can be significantly reduced.

-比較例-
比較例として、例えば、リクエストメッセージの識別子(CAN Request ID)とレスポンスメッセージの識別子(CAN Response ID)を対で監視する方法が考えられる。この場合、対となる識別子のテーブル表(例えば、通信対象ECUを35個と想定した場合、70個のID表)をROM(記憶部に相当)に保持する必要があり、かつ、受信したリクエストを処理しRAM(記憶部に相当)に保存する必要があるが、本実施形態ではそのような構成や処理を要しない。
-Comparative example-
As a comparative example, for example, a method of monitoring a request message identifier (CAN Request ID) and a response message identifier (CAN Response ID) as a pair can be considered. In this case, it is necessary to store a table of paired identifiers (for example, 70 ID tables assuming 35 ECUs to communicate with) in the ROM (equivalent to a storage unit), and when a received request Although it is necessary to process and store it in a RAM (corresponding to a storage unit), this embodiment does not require such a configuration or processing.

(その他の実施形態)
ここに開示された技術は、上記実施形態に限られるものではなく、請求の範囲の主旨を逸脱しない範囲での代用や、構成要素及び処理等の追加や変更などが可能である。
(Other embodiments)
The technology disclosed herein is not limited to the embodiments described above, and substitutions, additions and changes of components and processes, etc. can be made without departing from the scope of the claims.

例えば、上記の実施形態では、監視手段25がゲートウェイ装置2の内部に設けられている例を示したが、監視手段25の一部または全部の構成をゲートウェイ装置2の外部に設けてもよい。 For example, in the above embodiment, an example is shown in which the monitoring means 25 is provided inside the gateway device 2, but a part or all of the configuration of the monitoring means 25 may be provided outside the gateway device 2.

例えば、図4の例では、出力部28は、検知ログを生成し、記憶部29に保存するものとしたが、この保存された検知ログを用いた処理や動作を行うようにしてもよい。図5には、検知ログを用いた動作の一例を示している。図5において、ステップS1からステップS5の動作は、図4と同じであり、ここではステップS6及びS7の動作について説明する。 For example, in the example of FIG. 4, the output unit 28 generates a detection log and stores it in the storage unit 29, but the output unit 28 may perform processing or operation using this stored detection log. FIG. 5 shows an example of an operation using a detection log. In FIG. 5, the operations from step S1 to step S5 are the same as those in FIG. 4, and the operations at steps S6 and S7 will be described here.

-ステップS6-
ステップS6において、ゲートウェイ処理部23は、検知ログにおいてエラーが発生している送信メッセージ(外部装置向けにゲートウェイされている送信メッセージ)のID(以下、「エラーID」という)を識別する。
-Step S6-
In step S6, the gateway processing unit 23 identifies the ID (hereinafter referred to as "error ID") of the transmission message in which an error has occurred (transmission message gatewayed to an external device) in the detection log.

-ステップS7-
ステップS7において、ゲートウェイ処理部23は、エラーIDが付与された送信メッセージが内部バスIB上に発生した場合に、そのIDが付与されたメッセージ(以下、「不正メッセージ」という)を無効化する。このように、内部バスIB上に発生した不正メッセージ自体を無効化することで、不正メッセージに起因する各種の動作への影響を回避することができる。
-Step S7-
In step S7, when a transmission message to which an error ID is attached occurs on the internal bus IB, the gateway processing unit 23 invalidates the message to which the error ID is attached (hereinafter referred to as an "invalid message"). In this way, by invalidating the illegal message itself generated on the internal bus IB, it is possible to avoid the influence on various operations caused by the illegal message.

もしくは、ステップS7において、ゲートウェイ処理部23は、エラーIDを各ECU4に対して通知する。各ECU4では、エラーIDが付与された不正メッセージの受信を行うことになるが、不正メッセージであることが認識できるので、制御に使用しないなどの対応をとることができる。 Alternatively, in step S7, the gateway processing unit 23 notifies each ECU 4 of the error ID. Each ECU 4 will receive the fraudulent message to which the error ID has been assigned, but since it can recognize that it is a fraudulent message, it can take measures such as not using it for control.

例えば、図6に示すように、ゲートウェイ装置7として、前述のゲートウェイ装置2と同様の機能を有する第1のゲートウェイ装置71と、監視機能を有さない第2のゲートウェイ装置72とを備えるようにしてもよい。第1のゲートウェイ装置71と第2のゲートウェイ装置72との間は、内部バスNBで接続されている。 For example, as shown in FIG. 6, the gateway device 7 includes a first gateway device 71 having the same function as the gateway device 2 described above, and a second gateway device 72 that does not have a monitoring function. It's okay. The first gateway device 71 and the second gateway device 72 are connected by an internal bus NB.

この場合、一部のECU4は、内部バスIB1を介して直接第1のゲートウェイ装置71に接続される。また、他の一部のECU4は、内部バスIB2を介して第2のゲートウェイ装置72に接続され、第2のゲートウェイ装置72を介して第1のゲートウェイ装置71に接続される。この場合、第1のゲートウェイ装置71が、図3と同様の構成となり、図3の内部バスIBに代えて、内部バスNBを介して第2のゲートウェイ装置72が接続される。 In this case, some of the ECUs 4 are directly connected to the first gateway device 71 via the internal bus IB1. Further, some of the other ECUs 4 are connected to the second gateway device 72 via the internal bus IB2, and are connected to the first gateway device 71 via the second gateway device 72. In this case, the first gateway device 71 has a configuration similar to that in FIG. 3, and the second gateway device 72 is connected via an internal bus NB instead of the internal bus IB in FIG.

図6に示す構成においても、第1のゲートウェイ装置72において、前述の実施形態におけるゲートウェイ装置2と同様の処理が実行され、上記実施形態と同様の効果が得られる。 Also in the configuration shown in FIG. 6, the first gateway device 72 executes the same processing as the gateway device 2 in the above-described embodiment, and the same effects as in the above-described embodiment can be obtained.

ここに開示された技術は、車載ネットワークに用いられるゲートウェイ装置として有用である。 The technology disclosed herein is useful as a gateway device used in an in-vehicle network.

1 車載通信ネットワーク
2 ゲートウェイ装置
3 コネクタ
4 ECU
7 ゲートウェイ装置
8 診断機(外部装置)
20 ゲートウェイ手段
21 監視手段
27 異常検出部
28 出力部
1 In-vehicle communication network 2 Gateway device 3 Connector 4 ECU
7 Gateway device 8 Diagnostic device (external device)
20 Gateway means 21 Monitoring means 27 Abnormality detection section 28 Output section

Claims (5)

車載通信ネットワークに外部装置を接続するためのコネクタと車載のECUとの間に設けられたゲートウェイ装置であって、
前記コネクタに接続される外部装置と前記ECUとの間の通信を中継するゲートウェイ手段と、
前記ゲートウェイ手段から前記コネクタに送信される送信メッセージが前記外部装置に到達したことを示す送信ステータスを監視する監視手段とを備え、
前記監視手段は、前記ECUから出力された送信メッセージが前記ゲートウェイ手段を介して前記コネクタに送信された場合において、当該送信メッセージの送信ステータスにエラーが生じたことに基づいて、前記車載通信ネットワークに対して不正な信号が注入されたと判定する、ゲートウェイ装置。
A gateway device provided between a connector for connecting an external device to an in-vehicle communication network and an in-vehicle ECU,
gateway means for relaying communication between an external device connected to the connector and the ECU;
monitoring means for monitoring a transmission status indicating that a transmission message transmitted from the gateway means to the connector has reached the external device;
When the transmission message output from the ECU is transmitted to the connector via the gateway means, the monitoring means controls the in-vehicle communication network based on the occurrence of an error in the transmission status of the transmission message. A gateway device that determines that a fraudulent signal has been injected into the system.
前記監視手段は、所定の閾値以上の前記送信ステータスのエラーが生じた場合に、前記車載通信ネットワークに対して不正な送信メッセージが注入されたと判定する、
請求項1に記載のゲートウェイ装置。
The monitoring means determines that an unauthorized transmission message has been injected into the in-vehicle communication network when an error in the transmission status equal to or greater than a predetermined threshold occurs.
The gateway device according to claim 1.
前記監視手段は、
前記送信メッセージの送信ステータスにエラーが生じたことを検知する異常検出部と、
前記異常検出部で前記送信ステータスのエラーが検知された場合に、当該エラーの内容を示すエラー情報に当該エラーに関する付加情報を付加した検知ログを出力する出力部とを備える、
請求項1に記載のゲートウェイ装置。
The monitoring means includes:
an abnormality detection unit that detects that an error has occurred in the transmission status of the transmission message;
an output unit that outputs, when an error in the transmission status is detected by the abnormality detection unit, a detection log in which additional information regarding the error is added to error information indicating the content of the error;
The gateway device according to claim 1.
前記外部装置は、前記ECUの故障を診断する故障診断機である、
請求項1から3のいずれか1項に記載のゲートウェイ装置。
The external device is a fault diagnostic machine that diagnoses a fault in the ECU.
The gateway device according to any one of claims 1 to 3.
インジェクション攻撃の検出方法であって、
監視手段が、車載通信ネットワークの内部バスからゲートウェイ装置を経由して当該車載通信ネットワークに外部装置を接続するためのコネクタに送信される送信メッセージの前記外部装置への到達を示す送信ステータスを監視する監視工程と、
前記監視手段が、前記送信メッセージの前記送信ステータスにエラーが生じたことに基づいて、前記車載通信ネットワークに対して不正な信号が注入されたと判定する判定工程とを備える、
インジェクション攻撃の検出方法。
A method for detecting an injection attack, the method comprising:
The monitoring means monitors a transmission status indicating that a transmission message transmitted from an internal bus of the in-vehicle communication network to a connector for connecting an external device to the in-vehicle communication network via the gateway device has reached the external device. monitoring process;
a determination step in which the monitoring means determines that an incorrect signal has been injected into the in-vehicle communication network based on the occurrence of an error in the transmission status of the transmission message;
How to detect injection attacks.
JP2022062495A 2022-04-04 2022-04-04 On-vehicle gateway device and injection attack detection method Pending JP2023152461A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022062495A JP2023152461A (en) 2022-04-04 2022-04-04 On-vehicle gateway device and injection attack detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022062495A JP2023152461A (en) 2022-04-04 2022-04-04 On-vehicle gateway device and injection attack detection method

Publications (1)

Publication Number Publication Date
JP2023152461A true JP2023152461A (en) 2023-10-17

Family

ID=88349534

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022062495A Pending JP2023152461A (en) 2022-04-04 2022-04-04 On-vehicle gateway device and injection attack detection method

Country Status (1)

Country Link
JP (1) JP2023152461A (en)

Similar Documents

Publication Publication Date Title
JP4407752B2 (en) FAILURE LOCATION DETECTION DEVICE, COMMUNICATION DEVICE, AND FAILURE LOCATION DETECTION METHOD
EP3358788B1 (en) Illegality detection electronic control unit, vehicle onboard network system, and communication method
US9537744B2 (en) Communication system and communication method
JP2018157463A (en) On-vehicle communication system, communication management device, and vehicle controller
JP4195272B2 (en) Method for recognizing error in data transmission inside CAN-controller, CAN-controller, program, recording medium, and control device
KR101198724B1 (en) Error Detection Method for robust CAN communication in Vehicles
JP2002158668A (en) Abnormality detector of network system for vehicle
US20110035180A1 (en) Diagnostic apparatus and system adapted to diagnose occurrence of communication error
CN109104352B (en) Vehicle network operation protocol and method
JP2016143963A (en) On-vehicle communication system
CN112347023A (en) Security module for CAN node
JP2004348274A (en) Diagnostic device for communication failure
JP6369334B2 (en) In-vehicle network
CN114244746A (en) Processing device, communication system, and non-transitory storage medium
KR20150015831A (en) Apparatus and method for detecting errors of can communication
JP2023152461A (en) On-vehicle gateway device and injection attack detection method
CN112583786A (en) Method for alarming, transmitter device and receiver device
JP2009111911A (en) Communication apparatus, communication system, and communication method
JP2013236184A (en) In-vehicle communication system, communication abnormality monitoring method of in-vehicle communication system, and communication abnormality monitoring program of in-vehicle communication system
JP2022138678A (en) vehicle system
CN108009069B (en) Operating system and COM module monitoring device and method based on functional security
JP2003097344A (en) Electronic control device for vehicle
JP4243025B2 (en) Method and apparatus for checking the blocking function of a network component transmission blocking device
JP2013107602A (en) Vehicle control device
JP2004234183A (en) Bus check method and system for computer controller