JP7753961B2 - In-vehicle gateway device and injection attack detection method - Google Patents
In-vehicle gateway device and injection attack detection methodInfo
- Publication number
- JP7753961B2 JP7753961B2 JP2022062495A JP2022062495A JP7753961B2 JP 7753961 B2 JP7753961 B2 JP 7753961B2 JP 2022062495 A JP2022062495 A JP 2022062495A JP 2022062495 A JP2022062495 A JP 2022062495A JP 7753961 B2 JP7753961 B2 JP 7753961B2
- Authority
- JP
- Japan
- Prior art keywords
- error
- transmission
- gateway
- gateway device
- connector
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Description
ここに開示する技術は、車載ゲートウェイ装置及びインジェクション攻撃の検出方法に関する。 The technology disclosed herein relates to an in-vehicle gateway device and a method for detecting injection attacks.
車両ネットワークにおける不正なデータを検出する侵入検知システムの導入が進められている。 Intrusion detection systems are being introduced to detect unauthorized data in vehicle networks.
様々なバリエーションの不正なデータによる攻撃を検出するためには、侵入検知システムとして多様な検出ロジックを搭載する必要がある。一方で、車両のコストダウンのためには、それらのロジックを極力低リソースで実行できることが望ましい。 In order to detect attacks using a wide variety of unauthorized data, an intrusion detection system needs to be equipped with a variety of detection logic. At the same time, to reduce vehicle costs, it is desirable to be able to execute this logic using as few resources as possible.
特許文献1には、情報処理装置間で送られるデータに対応する送信状態(送信実行状態/送信停止状態)を決定し、取得部の取得データに対応する送信状態が送信停止状態である場合に、その取得データに異常があると判定する技術が示されている。具体的に、特許文献1には、所定の周期で送信される周期データが所定期間にわたって取得されないときに、その周期データが送信停止状態であると判断し、送信停止状態中にその周期データが受信されると異常と判定する例が示されている。 Patent Document 1 discloses a technology that determines the transmission state (transmission active state/transmission stopped state) corresponding to data sent between information processing devices, and determines that there is an abnormality in the acquired data if the transmission state corresponding to the data acquired by the acquisition unit is the transmission stopped state. Specifically, Patent Document 1 discloses an example in which, when cyclic data transmitted at a predetermined cycle is not acquired for a predetermined period of time, the cyclic data is determined to be in the transmission stopped state, and an abnormality is determined if the cyclic data is received during the transmission stopped state.
しかしながら、車両内では送受信の周期やタイミング、データ長さ等が異なる多種多様なメッセージのやり取りがなされている。したがって、従来技術のように、各メッセージに対応する送信状態を決定して適用する方式の場合、それぞれのメッセージについて送信状態の設定をするための演算や送信状態を記憶をするために多くの演算リソース(演算回路及び記憶領域を含む)を要するという問題がある。また、近年、車両の自動化、高機能化に伴って、車載ECUの数及びメッセージの種類数やデータ量が増大傾向にあるので、この問題点がより重要になる。 However, a wide variety of messages are exchanged within a vehicle, with different transmission and reception cycles, timing, data lengths, etc. Therefore, in conventional methods that determine and apply a transmission state corresponding to each message, there is a problem in that a large amount of computational resources (including computational circuits and storage areas) are required to perform calculations to set the transmission state for each message and to store the transmission state. Furthermore, in recent years, as vehicles have become more automated and more sophisticated, the number of on-board ECUs and the number of message types and data volumes have tended to increase, making this problem even more important.
また、車両では、車室内の限られた空間に車両制御用の演算リソース、乗員の快適性を向上させるための演算リソース、上記の侵入検知システムのための演算リソース、車両の盗難防止用の演算リソース等の多種多様の目的のための演算リソースを搭載する必要がある。したがって、車両の高性能化、高機能化を進展させてユーザーの満足度を向上させていく上でも、車両制御や快適性等に直接的に影響しない侵入検知システムのための演算リソースをできるだけ削減することには大きな意味がある。 In addition, vehicles need to accommodate a wide variety of computing resources within the limited space inside the vehicle cabin, including computing resources for vehicle control, computing resources for improving occupant comfort, computing resources for the intrusion detection system mentioned above, and computing resources for vehicle theft prevention. Therefore, in order to improve user satisfaction by advancing vehicle performance and functionality, it is of great significance to reduce as much as possible the computing resources for intrusion detection systems, which do not directly affect vehicle control, comfort, etc.
ここで、使用する演算リソースを節約するために、送信状態を設定するデータの種類や量を減らすことも考えられるが、そうすると不正なデータによる攻撃の検出に対する網羅性が低下するという問題がある。 Here, in order to conserve computing resources, it is possible to reduce the type and amount of data for which transmission status is set, but doing so would result in a problem in that it would reduce the comprehensiveness of detecting attacks using fraudulent data.
ここに開示された技術は、斯かる点に鑑みてなされたものであり、その目的とするところは、車載ネットワークに対する不正なデータの注入によるインジェクション攻撃を、より低リソースで検出することにある。 The technology disclosed here was developed in light of these issues, and its purpose is to detect injection attacks that involve the injection of unauthorized data into in-vehicle networks with fewer resources.
前記課題を解決するために、ここに開示された技術の一態様では、車載通信ネットワークに外部装置を接続するためのコネクタと車載のECUとの間に設けられたゲートウェイ装置を対象として、前記コネクタに接続される外部装置と前記ECUとの間の通信を中継するゲートウェイ手段と、前記ゲートウェイ手段から前記コネクタに送信される送信メッセージが前記外部装置に到達したことを示す送信ステータスを監視する監視手段とを備え、前記監視手段は、前記ECUから出力された送信メッセージが前記ゲートウェイ手段を介して前記コネクタに送信された場合において、当該送信メッセージの送信ステータスにエラーが生じたことに基づいて、前記車載通信ネットワークに対して不正な信号が注入されたと判定する、という構成とした。 In order to solve the above-mentioned problems, 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, and includes gateway means for relaying communication between the ECU and the external device connected to the connector, and monitoring means for monitoring a transmission status indicating that a transmission message sent from the gateway means to the connector has reached the external device. When a transmission message output from the ECU is sent to the connector via the gateway means, the monitoring means determines that an unauthorized signal has been injected into the in-vehicle communication network based on an error in the transmission status of the transmission message.
この構成によると、コネクタに外部装置が接続されていない状態で外部装置への送信メッセージを不正に注入する攻撃を従来よりも少ない演算リソース(演算回路及び記憶領域を含む)で検出できる。 This configuration makes it possible to detect attacks that illegally inject messages into external devices when the external device is not connected to the connector, using fewer computing resources (including computing circuits and memory areas) than conventional methods.
具体的には、前述のとおり、各データに対応する送信状態を決定して適用する従来方式の場合、送信状態の設定をするための演算や送信状態を記憶をするために演算リソースを割り当てる必要がある。これに対し、上記態様の構成では、各データに対応する送信状態を決定したり、ECUの状態や車載通信ネットワーク上を流れる信号の状態を記憶する必要がないので、車載通信ネットワークに対して不正な信号が注入されたことを検出するためのリソースを大幅に削減することができる。 Specifically, as mentioned above, in conventional methods that determine and apply a transmission state corresponding to each piece of data, it is necessary to allocate computational resources for the calculations required to set the transmission state and for storing the transmission state. In contrast, with the configuration of the above aspect, there is no need to determine a transmission state corresponding to each piece of data or store the state of the ECU or the state of the signals flowing on the in-vehicle communication network, making it possible to significantly reduce the resources required to detect the injection of unauthorized signals into the in-vehicle communication network.
上記態様において、前記監視手段は、所定の閾値以上の前記送信ステータスのエラーが生じた場合に、前記車載通信ネットワークに対して不正な送信メッセージが注入されたと判定する、としてもよい。 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 equals or exceeds a predetermined threshold.
この態様によると、エラーの判定に対して一定の閾値を設けているので、不正な送信メッセージの誤判定を回避できるようになり、エラー判定の精度を高めることができる。 In this embodiment, a fixed threshold is set for error detection, which makes it possible to avoid erroneous detection of fraudulent sent messages and improve the accuracy of error detection.
前記監視手段は、前記送信メッセージの送信ステータスにエラーが生じたことを検知する異常検出部と、前記異常検出部で前記送信ステータスのエラーが検知された場合に、当該エラーの内容を示すエラー情報に当該エラーに関する付加情報を付加した検知ログを出力する出力部とを備える、としてもよい。 The monitoring means may include an abnormality detection unit that detects an error in the transmission status of the transmitted message, and an output unit that, when the abnormality detection unit detects an error in the transmission status, outputs a detection log that includes error information indicating the content of the error plus additional information related to the error.
ここで、付加情報には、エラーが発生した時刻に関する時刻情報、エラーが発生した場所に関する場所情報が含まれる、としてもよい。 Here, the additional information may include time information regarding the time the error occurred and location information regarding the location where the error occurred.
この態様によると、エラー情報に付加情報を付けて保存するようにしているので、インジェクション攻撃かどうかの判断などのエラーの解析が容易になる。 In this manner, error information is saved with additional information attached, making it easier to analyze errors, such as determining whether they are injection attacks.
ここに開示された技術の他の一態様では、インジェクション攻撃の検出方法を対象として、監視手段が、車載通信ネットワークの内部バスからゲートウェイ装置を経由して当該車載通信ネットワークに外部装置を接続するためのコネクタに送信される送信メッセージの前記外部装置への到達を示す送信ステータスを監視する監視工程と、前記監視手段が、前記送信メッセージの前記送信ステータスにエラーが生じたことに基づいて、前記車載通信ネットワークに対して不正な信号が注入されたと判定する判定工程とを備える、構成とした。 Another aspect of the technology disclosed herein is directed to a method for detecting injection attacks, and is configured to include a monitoring step in which a monitoring means monitors a transmission status indicating that a transmission message sent from an internal bus of an in-vehicle communication network via a gateway device to a connector for connecting an external device to the in-vehicle communication network has reached the external device, and a determination step in which the monitoring means determines that an unauthorized 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.
本態様によると、各データに対応する送信状態を決定したり、ECUの状態や車載通信ネットワーク上を流れる信号の状態を記憶する必要がない。したがって、車載通信ネットワークに対して不正な信号が注入されたことを検出するためのリソースを大幅に削減することができる。 According to this aspect, there is no need to determine the transmission status corresponding to each piece of data or to store the status of the ECU or the status of the signals flowing on the in-vehicle communication network. Therefore, it is possible to significantly reduce the resources required to detect the injection of unauthorized signals into the in-vehicle communication network.
以上説明したように、ここに開示された技術によると、車載ネットワークに対するインジェクション攻撃を、従来よりも低リソースで検出することができる。 As described above, the technology disclosed herein makes it possible to detect injection attacks on in-vehicle networks with fewer resources than conventional methods.
以下、例示的な実施形態について、図面を参照しながら詳細に説明する。図中同一または相当部分には同一の符号を付すものとし、繰り返しの説明を省略する場合がある。また、以下の実施形態では、本開示の内容に関連性の高い構成を中心に説明する。 The following describes exemplary embodiments in detail with reference to the drawings. The same or equivalent parts in the drawings will be designated by the same reference numerals, and repeated explanations may be omitted. Furthermore, the following embodiments will focus on configurations that are highly relevant to the contents of this disclosure.
以下の説明では、外部装置、コネクタ、ECU、センサ、アクチュエータの総括名称として「デバイス」という用語を用いる場合がある。例えば、デバイス間の接続との記載は、外部装置とコネクタとの間の接続や外部装置とECUとの間の接続、ECU、センサ、アクチュエータの相互間の接続等のように、各デバイス同士の接続を広く包含する概念として用いる。 In the following explanation, the term "device" may be used as a general term for external devices, connectors, ECUs, sensors, and actuators. For example, the description of a connection between devices is used as a concept that broadly encompasses connections between devices, such as a connection between an external device and a connector, a connection between an external device and an ECU, or a connection between ECUs, sensors, and actuators.
図1は、本実施形態に係る車載通信ネットワーク1の構成例を示す。 Figure 1 shows an example 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. Hereinafter, the in-vehicle communication network 1 is assumed to be a network conforming to the CAN (Controller Area Network) communication protocol (hereinafter simply referred to as a "CAN network"). Note that the in-vehicle communication network 1 may also be another type of network, such as a network conforming to the Ethernet (registered trademark) protocol.
外部バス領域5では、故障診断機8や充電ステーション等の外部装置を接続するためのコネクタ3が外部バスEBを介して接続されている。この例では、ゲートウェイ装置2よりも車両外側のネットワークを構成するバスを外部バスEBという。 In the external bus area 5, connectors 3 for connecting external devices such as a diagnostic tester 8 and a charging station are connected via an external bus EB. In this example, the bus that constitutes the network outside the vehicle beyond the gateway device 2 is referred to as the external bus EB.
内部バス領域6では、車載のECU4、センサ、アクチュエータ等が内部バスIBを介して接続されている。この例では、ゲートウェイ装置2よりも車両内側のネットワークを構成するバスを内部バスEBという。 In the internal bus area 6, the on-board ECU 4, sensors, actuators, etc. are connected via the internal bus IB. In this example, the bus that constitutes the network inside the vehicle relative to the gateway device 2 is called the 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 internal buses IB. In the following explanation, when there is no particular distinction between the external bus EB and the internal bus IB, they may simply be referred to as "buses."
外部バス領域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 the function of relaying communications between devices in the in-vehicle communication network 1. Furthermore, when an external device is connected to the connector 3, the gateway device 2 relays communications 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 diagnostic tool 8 that diagnoses faults in an ECU 4 is connected to the connector 3, the gateway device 2 relays data communication between the diagnostic tool 8 and the ECU 4 to be diagnosed. In the following explanation, for convenience of explanation, the connector 3 to which an external device such as the diagnostic tool 8 is connected may be designated with the symbol "31" to distinguish it from other connectors 3. Similarly, the ECU 4 to be diagnosed may be designated with the symbol "41" to distinguish it from other ECUs 4. The diagnostic tool 8 is an example of an external device. Note that in FIG. 2, for convenience of illustration, the diagnostic tool 8 and the connector 31 are connected by a line CT. However, this is not intended to limit the connection between the two to a wired connection; the diagnostic tool 8 and the contact-type connector 31 may be directly connected via their terminals.
図2の例において、故障診断機8は、コネクタ31に接続された後、診断対象のECU41に対してリクエストメッセージを送信する。リクエストメッセージは、故障診断機8から出力された後、コネクタ31及び外部バスEBを介してゲートウェイ装置2に入力される。ゲートウェイ装置2では、リクエストメッセージを受信すると、後述するゲートウェイ手段20でルーティングして、ECU41が接続された内部バスIBに出力する。 In the example of Figure 2, after the fault diagnosis device 8 is connected to the connector 31, it sends a request message to the ECU 41 to be diagnosed. The request message is output from the fault diagnosis device 8 and then 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 routes it through the gateway means 20 (described below) and outputs it to the internal bus IB to which the ECU 41 is connected.
別の具体例を挙げると、例えば、コネクタ31に外部装置として急速充電器が接続された場合、急速充電器からECU41に動作ステータスのリクエストメッセージが送信される。 To give another specific example, when a quick charger is connected to connector 31 as an external device, the quick charger sends an operation status request message to ECU 41.
ECU41は、リクエストメッセージを受信すると、リクエストメッセージに対するレスポンスメッセージを内部バスIBを介してゲートウェイ装置2に出力する。ゲートウェイ装置2では、ECU41からのレスポンスメッセージを受信すると、ゲートウェイ手段20でルーティングして、外部バスEBを介してコネクタ31に出力する。故障診断機8は、コネクタ31を介してレスポンスメッセージを受信すると、そのレスポンスメッセージをサーバ9に送信したり、レスポンスメッセージに基づく診断結果をサーバ9に通知したりする。 When the ECU 41 receives a request message, it 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 routes the message through the gateway means 20 and outputs it to the connector 31 via the external bus EB. When the fault diagnosis device 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 results based on the response message.
上記の別の具体例では、例えば、前述の動作ステータスのリクエストメッセージに対して、ECU41は充電許可信号及び電流指令値のレスポンスメッセージを急速充電器に返送する。 In another specific example of the above, for example, in response to the aforementioned operation status request message, the ECU 41 returns a response message of a charging permission signal and a current command value to the rapid charger.
-ゲートウェイ装置-
図3は、ゲートウェイ装置2の構成例を示すブロック図である。なお、図3において、ECU4からコネクタ3に送信する送信メッセージが受信された場合におけるデータフローを矢印で示している。
-Gateway device-
Fig. 3 is a block diagram showing an example of the configuration of the gateway device 2. In Fig. 3, arrows indicate a data flow when a 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 transceiver unit 21 connected to the internal bus IB, a second transceiver unit 22 connected to the external bus EB, a gateway processing unit 23, and a memory unit 24.
第1送受信部21は、内部バスIBを介して受信されたメッセージをゲートウェイ処理部23に転送したり、ゲートウェイ処理部23からECU4に送信するメッセージを内部バスIBに出力する。 The first transceiver unit 21 transfers messages received via the internal bus IB to the gateway processing unit 23, and outputs messages to be sent from the gateway processing unit 23 to the internal bus IB.
第2送受信部22は、ゲートウェイ処理部23からコネクタ3に送信するデータを外部バスEBに出力したり、外部バスEBを介して受信されたデータをゲートウェイ処理部23に転送したりする。 The second transceiver unit 22 outputs data to be sent from the gateway processing unit 23 to the external bus EB, and transfers data received via the external bus EB to the gateway processing unit 23.
ゲートウェイ処理部23は、ルーティングテーブルTBに従って、各ECU4から送信されたメッセージや各コネクタ3を経由して入力されたメッセージを、送信先のデバイスが接続されたバスに転送する機能を有する。 The gateway processing unit 23 has the function of forwarding messages sent from each ECU 4 or messages input via each connector 3 to the bus to which the destination device is connected, according to the routing table TB.
ルーティングテーブルTBは、バスを介して受信されたメッセージの種別や内容に応じた転送先のバスを示すものであり、記憶部24に格納されている。例えば、ルーティングテーブルTBには、前述のレスポンスメッセージの転送先としてコネクタ3が登録されている。 The routing table TB indicates the bus to which a message received via the bus should be forwarded depending on its type and content, and is stored in the memory unit 24. For example, the routing table TB registers Connector 3 as the forwarding destination for the aforementioned response message.
監視手段25は、取得部26と、異常検出部27と、出力部28と、記憶部29とを備える。 The monitoring means 25 includes an acquisition unit 26, an abnormality detection unit 27, an output unit 28, and a memory unit 29.
取得部26は、ゲートウェイ手段20からコネクタ3に送信される送信メッセージの送信ステータスを取得する。送信ステータスは、上記の送信メッセージが外部装置に到達したことを示すステータス情報である。例えば、CANネットワークの場合、ゲートウェイ装置2内のレジスタに各コネクタ3への送信メッセージに関する送信ステータスが反映される。したがって、取得部26は、送信メッセージが送信された後に、そのレジスタの状態を確認することにより送信メッセージの送信ステータスを取得する。 The acquisition unit 26 acquires the transmission status of a transmission message sent from the gateway means 20 to the connector 3. The transmission status is status information indicating that the transmission message has reached an external device. For example, in the case of a CAN network, the transmission status of a transmission message sent to each connector 3 is reflected in a register within 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 has been sent.
例えば、内部バスIBからゲートウェイ手段20を経由してコネクタ31に接続された外部バスEBにメッセージが転送された場合において、外部バスEBに外部装置が接続されていないときには、外部バスEBにメッセージを送信した後に、CANのAck(Acknowledgement)が立たない。そうすると、メッセージの送信エラーに基づいて、ゲートウェイ装置2内部のAckErrorレジスタが立つようになっている。そこで、取得部26において、そのAckErrorレジスタの状態を確認することにより送信メッセージの送信ステータスを取得することができる。 For example, if a message is transferred from internal bus IB via gateway means 20 to external bus EB connected to connector 31, and no external device is connected to external bus EB, a CAN Ack (Acknowledgement) will not be set after the message is sent to external bus EB. In this case, the AckError register within gateway device 2 is set based on a message transmission error. Therefore, the acquisition unit 26 can obtain the transmission status of the transmitted message by checking the state of the AckError register.
また、取得部26は、CANコントローラに搭載されているTEC(Transmit Error Counter:送信エラーカウンター)の値を送信メッセージの送信ステータスとして取得してもよい。具体的には、例えば、送信エラーカウンターは、送信が成功すると減算される一方で、エラーフラグの検出があった場合のように送信メッセージの送信状態に応じて所定のルールにしたがって加算される。そこで、TECのカウント値を参照することで、送信ステータスを把握することができる。 The acquisition unit 26 may also acquire the value of the TEC (Transmit Error Counter) installed in the CAN controller as the transmission status of the transmitted message. Specifically, for example, the transmission error counter is decremented when transmission is successful, and is incremented according to predetermined rules depending on the transmission status of the transmitted message, such as when an error flag is detected. Therefore, the transmission status can be determined by referencing the TEC count value.
なお、取得部26は、例えば、車載通信ネットワーク1が、ハンドシェイク方式のプロトコルを採用している場合、ハンドシェイクの成立状態(相手からの応答返信状態)を示すフラグを送信ステータスとして取得してもよい。 In addition, for example, if the in-vehicle communication network 1 employs a handshake protocol, the acquisition unit 26 may acquire, as the transmission status, a flag indicating whether the handshake has been established (whether a response has been returned from the other party).
異常検出部27は、記憶部29に格納された判定条件に基づいて、取得部26で取得された送信ステータスにエラーが生じたことを検知する。記憶部29には、判定条件として、例えば、前述の送信エラーカウンターの閾値が記憶されている。異常検出部27は、送信エラーカウンターが判定条件で示された所定の閾値以上になった場合に、車載通信ネットワークに対して不正な信号が注入されたと判定する。すわわち、送信ステータスにエラーが生じたことを検知する。異常検出部27での送信ステータスのエラーの検知結果は、出力部28に出力される。 The abnormality detection unit 27 detects that an error has occurred in the transmission status acquired by the acquisition unit 26 based on the judgment conditions stored in the memory unit 29. The memory unit 29 stores, as judgment conditions, for example, the threshold value of the transmission error counter mentioned above. When the transmission error counter reaches or exceeds the predetermined threshold value indicated by the judgment conditions, the abnormality detection unit 27 determines that an invalid signal has been injected into the in-vehicle communication network. In other words, it detects that an error has occurred in the transmission status. The result of the transmission status error detection by the abnormality detection unit 27 is output to the output unit 28.
なお、判定条件は、送信エラーカウンターの値に限定されず、送信エラーカウンター以外の指標を用いてもよい。例えば、前述のハンドシェイク方式の場合、リトライの回数や応答がなかった回数を判定条件として用いてもよい。 Note that the judgment criteria are not limited to the value of the transmission error counter, and indicators other than the transmission error counter may also be used. For example, in the case of the handshake method mentioned above, the number of retries or the number of times no response was received may be used as judgment criteria.
また、図3の例では、記憶部24と記憶部29とを別々に設けた例を示しているが、これらをまとめて1つの記憶部としてもよい。 In addition, in the example of Figure 3, memory unit 24 and memory unit 29 are shown as separate units, but they may also be combined into a single memory unit.
出力部28は、異常検出部27で送信ステータスのエラーが検知された場合に、検知されたエラーの内容を示すエラー情報に、検知されたエラーに関する付加情報を付加した検知ログを出力する。付加情報は、例えば、エラーが発生した時刻を示す時刻情報であったり、エラーが発生した場所を示す場所情報などが含まれる。出力部28から出力された検知ログは、記憶部29に記憶される。このように、エラー情報に付加情報を付けて保存することで、インジェクション攻撃かどうかの判断などのエラーの解析が容易になる。 When the anomaly detection unit 27 detects a transmission status error, the output unit 28 outputs a detection log that includes error information indicating the content of the detected error, plus additional information about the detected error. The additional information includes, for example, time information indicating the time the error occurred and location information indicating the location where the error occurred. The detection log output from the output unit 28 is stored in the memory unit 29. In this way, by storing the error information with the 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 the gateway device>
Next, the operation of the gateway device 2 will be described with reference to Fig. 4. Here, an example in which a response message is transmitted from the ECU 41 to the connector 31 will be described.
-ステップS1-
ステップS1において、異常検出部27は、記憶部29に格納された判定条件を取得する。この例では、異常検出部27は、判定条件として、送信エラーカウンターの閾値(以下、「エラー閾値」という)を取得する。
--Step S1--
In step S1, the abnormality detection unit 27 acquires a judgment condition stored in the storage unit 29. In this example, the abnormality detection unit 27 acquires a threshold value of a transmission error counter (hereinafter referred to as an "error threshold value") as the judgment condition.
-ステップS2-
ステップS2において、取得部26は、内部バスIBからゲートウェイ手段20を経由してコネクタ31に接続された外部バスEBにリクエストメッセージが転送されると、そのリクエストメッセージの送信ステータスを取得する。具体的に、取得部26は、前述の送信エラーカウンターの値を取得する。
--Step S2--
In step S2, when a 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 transmission error counter described above.
-ステップ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 equal to or greater than the error threshold value. If the transmission error counter value is equal to or greater than the error threshold value, the flow proceeds to step S4, and if the transmission error counter value is less than the error threshold value, the flow returns to step S2.
-ステップS4-
ステップS4において、異常検出部27は、出力部28に検知結果を出力する。ここでは、送信エラーカウンタ値がエラー閾値以上になっているので、異常検出部27は、インジェクション攻撃が発生したと判定し、その判定結果を出力部28に通知する。
--Step S4--
In step S4, the anomaly detection unit 27 outputs the detection result to the output unit 28. Here, since the transmission error counter value is equal to or greater than the error threshold, the anomaly 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 a notification of the occurrence of an injection attack from the anomaly detection unit 27 , it generates a detection log by adding additional information to the error information detected by the anomaly detection unit 27 and stores it in the storage unit 29 .
そして、ステップS2からステップS5の動作が繰り返される。 Then, steps S2 to S5 are repeated.
以上のように、本実施形態によると、コネクタ3に外部装置が接続されていない状態で外部装置への送信メッセージを不正に注入する攻撃を従来よりも少ない演算リソース(演算回路及び記憶領域を含む)で検出できる。 As described above, according to this embodiment, attacks that illegally inject messages to external devices when no external device is connected to connector 3 can be detected using fewer computational resources (including computational circuits and memory areas) than conventional methods.
具体的には、各データに対応する送信状態を決定して適用する従来方式の場合、送信状態の設定をするための演算や送信状態を記憶をするために演算リソースを割り当てる必要がある。 Specifically, in the case of conventional methods that determine and apply a transmission state corresponding to each piece of data, it is necessary to allocate computational resources for the calculations required to set the transmission state and for storing the transmission state.
これに対し、本実施形態の構成では、外部装置とECU4とのメッセージのやり取りに対して個々に送信状態を決定したり、ECU4の状態や車載通信ネットワーク1上を流れる信号の状態を記憶する必要がない。これにより、車載通信ネットワーク1に対して不正な信号が注入されたことを検出するためのリソースを大幅に削減することができる。 In contrast, the configuration of this embodiment does not require determining the transmission status for each message exchanged between an external device and the ECU 4, nor does it require storing the status of the ECU 4 or the status of signals flowing over the in-vehicle communication network 1. This significantly reduces the resources required to detect the injection of unauthorized signals into the in-vehicle communication network 1.
-比較例-
比較例として、例えば、リクエストメッセージの識別子(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 pair of a request message identifier (CAN Request ID) and a response message identifier (CAN Response ID) can be considered. In this case, a table of paired identifiers (for example, if there are 35 ECUs to communicate with, then there would be 70 ID tables) would need to be stored in ROM (corresponding to a storage unit), and the received requests would need to be processed and saved in RAM (corresponding to a storage unit). However, this embodiment does not require such a configuration or processing.
(その他の実施形態)
ここに開示された技術は、上記実施形態に限られるものではなく、請求の範囲の主旨を逸脱しない範囲での代用や、構成要素及び処理等の追加や変更などが可能である。
(Other embodiments)
The technology disclosed herein is not limited to the above-described embodiments, and substitutions, additions and modifications of components and processes are possible within the scope of the claims.
例えば、上記の実施形態では、監視手段25がゲートウェイ装置2の内部に設けられている例を示したが、監視手段25の一部または全部の構成をゲートウェイ装置2の外部に設けてもよい。 For example, in the above embodiment, an example was shown in which the monitoring means 25 was provided inside the gateway device 2, but some or all of the components 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 Figure 4, the output unit 28 generates a detection log and stores it in the storage unit 29, but it may also perform processing or operations using this stored detection log. Figure 5 shows an example of an operation using a detection log. In Figure 5, the operations from steps S1 to S5 are the same as those in Figure 4, and the operations of 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 outgoing message in which an error has occurred (the outgoing message gatewayed to an external device) in the detection log.
-ステップS7-
ステップS7において、ゲートウェイ処理部23は、エラーIDが付与された送信メッセージが内部バスIB上に発生した場合に、そのIDが付与されたメッセージ(以下、「不正メッセージ」という)を無効化する。このように、内部バスIB上に発生した不正メッセージ自体を無効化することで、不正メッセージに起因する各種の動作への影響を回避することができる。
--Step S7--
In step S7, if a transmission message with an error ID is generated on the internal bus IB, the gateway processing unit 23 invalidates the message with that ID (hereinafter referred to as an "illegal message"). In this way, by invalidating the illegal message itself generated on the internal bus IB, it is possible to avoid the influence of the illegal message on various operations.
もしくは、ステップ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 with the error ID attached, but because it can recognize that it is a fraudulent message, it can take appropriate action, 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 may include a first gateway device 71 having the same functions as the aforementioned gateway device 2, and a second gateway device 72 having no monitoring functions. 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 connected directly to the first gateway device 71 via internal bus IB1. Other ECUs 4 are connected to the second gateway device 72 via internal bus IB2, and connected to the first gateway device 71 via the second gateway device 72. In this case, the first gateway device 71 has the same configuration as in FIG. 3, and the second gateway device 72 is connected via internal bus NB instead of internal bus IB in FIG. 3.
図6に示す構成においても、第1のゲートウェイ装置72において、前述の実施形態におけるゲートウェイ装置2と同様の処理が実行され、上記実施形態と同様の効果が得られる。 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 those in the above-described embodiment are obtained.
ここに開示された技術は、車載ネットワークに用いられるゲートウェイ装置として有用である。 The technology disclosed here is useful as a gateway device for use 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 machine (external device)
20 Gateway means 21 Monitoring means 27 Abnormality detection unit 28 Output unit
Claims (5)
前記コネクタに接続される外部装置と前記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,
a gateway means for relaying communication between an external device connected to the connector and the ECU;
a monitoring means for monitoring a transmission status indicating that a transmission message sent from the gateway means to the connector has reached the external device;
The monitoring means determines that an unauthorized signal has been injected into the in-vehicle communication network when an error occurs in the transmission status of a transmission message output from the ECU and transmitted to the connector via the gateway means.
請求項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 equals or exceeds a predetermined threshold.
The gateway device according to claim 1 .
前記送信メッセージの送信ステータスにエラーが生じたことを検知する異常検出部と、
前記異常検出部で前記送信ステータスのエラーが検知された場合に、当該エラーの内容を示すエラー情報に当該エラーに関する付加情報を付加した検知ログを出力する出力部とを備える、
請求項1に記載のゲートウェイ装置。 The monitoring means
an abnormality detection unit that detects that an error has occurred in the transmission status of the transmission message;
an output unit that, when the abnormality detection unit detects an error in the transmission status, outputs a detection log in which additional information about the error is added to error information indicating the content of the error.
The gateway device according to claim 1 .
請求項1から3のいずれか1項に記載のゲートウェイ装置。 the external device is a fault diagnosis device 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, comprising:
a monitoring step in which a monitoring means monitors a transmission status indicating that a transmission message transmitted from an internal bus of an in-vehicle communication network via a gateway device to a connector for connecting an external device to the in-vehicle communication network has reached the external device;
a determination step in which the monitoring means determines that an illegal signal has been injected into the in-vehicle communication network based on an error occurring in the transmission status of the transmission message.
How to detect injection attacks.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022062495A JP7753961B2 (en) | 2022-04-04 | 2022-04-04 | In-vehicle gateway device and injection attack detection method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022062495A JP7753961B2 (en) | 2022-04-04 | 2022-04-04 | In-vehicle gateway device and injection attack detection method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2023152461A JP2023152461A (en) | 2023-10-17 |
| JP7753961B2 true JP7753961B2 (en) | 2025-10-15 |
Family
ID=88349534
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2022062495A Active JP7753961B2 (en) | 2022-04-04 | 2022-04-04 | In-vehicle gateway device and injection attack detection method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7753961B2 (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2015168376A (en) | 2014-03-10 | 2015-09-28 | トヨタ自動車株式会社 | COMMUNICATION DEVICE, COMMUNICATION METHOD, AND COMMUNICATION SYSTEM |
| JP2015207937A (en) | 2014-04-22 | 2015-11-19 | 株式会社デンソー | Communication apparatus |
| JP2021083125A (en) | 2016-07-28 | 2021-05-27 | パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America | Gateway device, method, and in-vehicle network system |
-
2022
- 2022-04-04 JP JP2022062495A patent/JP7753961B2/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2015168376A (en) | 2014-03-10 | 2015-09-28 | トヨタ自動車株式会社 | COMMUNICATION DEVICE, COMMUNICATION METHOD, AND COMMUNICATION SYSTEM |
| JP2015207937A (en) | 2014-04-22 | 2015-11-19 | 株式会社デンソー | Communication apparatus |
| JP2021083125A (en) | 2016-07-28 | 2021-05-27 | パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America | Gateway device, method, and in-vehicle network system |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2023152461A (en) | 2023-10-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9537744B2 (en) | Communication system and communication method | |
| JP4407752B2 (en) | FAILURE LOCATION DETECTION DEVICE, COMMUNICATION DEVICE, AND FAILURE LOCATION DETECTION METHOD | |
| JP2018157463A (en) | On-vehicle communication system, communication management device, and vehicle controller | |
| JP7182559B2 (en) | Log output method, log output device and program | |
| JP2002158668A (en) | Abnormality detector of network system for vehicle | |
| JP2014236248A (en) | Electronic control device and electronic control system | |
| US20100050062A1 (en) | Sending device, receiving device, communication control device, communication system, and communication control method | |
| US20180375879A1 (en) | Vehicle network operating protocol and method | |
| WO2021234499A1 (en) | System and method for detection and prevention of cyber attacks at in-vehicle networks | |
| US20250156536A1 (en) | In-vehicle relay device, in-vehicle relay method, and in-vehicle relay program | |
| US20210058372A1 (en) | Determination device, determination system, storage medium storing program, and determination method | |
| US10223319B2 (en) | Communication load determining apparatus | |
| JP5696685B2 (en) | In-vehicle communication system, communication abnormality monitoring method for in-vehicle communication system, and communication abnormality monitoring program for in-vehicle communication system | |
| JP7753961B2 (en) | In-vehicle gateway device and injection attack detection method | |
| CN110784440B (en) | Method and apparatus for identifying irregularities in a computer network | |
| JP6369334B2 (en) | In-vehicle network | |
| EP3661130B1 (en) | A relay device for an in-vehicle network | |
| KR20220081209A (en) | Security system and method for in-vehicle network | |
| JP2022138678A (en) | vehicle system | |
| JP2004234183A (en) | Bus check method and system for computer controller | |
| US12423206B2 (en) | Communication system, relay device, and diagnosis target device | |
| CN119011335B (en) | A control method, device, chip and computer program product | |
| US20240179179A1 (en) | Communication system and relay device | |
| KR20240043982A (en) | Method for detecting masquerade attack based on bus-off attack of vehicle network and device to detect it | |
| JP6611891B1 (en) | Inspection system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20250121 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20250812 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20250902 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250915 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7753961 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |