JP2018088616A - Attack detector, attack detection method, and attack detection program - Google Patents

Attack detector, attack detection method, and attack detection program Download PDF

Info

Publication number
JP2018088616A
JP2018088616A JP2016230868A JP2016230868A JP2018088616A JP 2018088616 A JP2018088616 A JP 2018088616A JP 2016230868 A JP2016230868 A JP 2016230868A JP 2016230868 A JP2016230868 A JP 2016230868A JP 2018088616 A JP2018088616 A JP 2018088616A
Authority
JP
Japan
Prior art keywords
message
reception
transmission
periodic
attack
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2016230868A
Other languages
Japanese (ja)
Other versions
JP6798280B2 (en
Inventor
純 矢嶋
Jun Yajima
純 矢嶋
長谷部 高行
Takayuki Hasebe
高行 長谷部
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2016230868A priority Critical patent/JP6798280B2/en
Priority to US15/813,864 priority patent/US10567401B2/en
Priority to DE102017220859.7A priority patent/DE102017220859A1/en
Publication of JP2018088616A publication Critical patent/JP2018088616A/en
Application granted granted Critical
Publication of JP6798280B2 publication Critical patent/JP6798280B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1416Event detection, e.g. attack signature detection
    • 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/40006Architecture of a communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/12Transmitting and receiving encryption devices synchronised or initially set up in a particular manner
    • 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
    • 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 Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve attack detection accuracy.SOLUTION: An attack detector includes a transmission reception unit and a calculation unit. The transmission reception unit receives a message from a communication device in a network. The calculation unit calculates the reception period of a periodic message received after the first message, by using the reception time of the first message of the periodic message transmitted periodically. The transmission reception unit receives a second message, corresponding to the information indicating transmission at a transmission interval shorter than the transmission period, after the first message is received by the transmission reception unit. Thereafter, the calculation unit updates the reception period of the periodic message, received after the second message, by using the reception time and the transmission period of the second message.SELECTED DRAWING: Figure 1

Description

本発明は、攻撃検知装置、攻撃検知方法、および、攻撃検知プログラムに関する。   The present invention relates to an attack detection device, an attack detection method, and an attack detection program.

自動車の車載ネットワークやファクトリーオートメーションなどに使用される装置間で、データや制御情報を送受信するために、CAN(Controller Area Network)と呼ばれるネットワーク技術が使用されることがある。CANが用いられるシステムは、複数のECU(electronic control unit)を含む。ECU同士はデータフレーム(メッセージ)を送受信することにより通信を行う。CANでは、通信に使用されるデータフレームには、データフレームの識別に使用される識別情報(ID)が含まれている。また、各ECUは、受信するデータフレームのIDを予め記憶している。CANでは、データフレームはブロードキャストされるため、複数のデータフレームが同時にCANに接続されたECUに到達する。データフレームの送信タイミングが複数のデータフレームで一致した場合には、データフレームに含まれているIDの値によってデータフレームの優先順位が決定され、優先されるデータフレームが先に送信される。優先されないデータフレームは、優先されるデータフレームの送信後に、ブロードキャストされる。データフレームがブロードキャストされると、各ECUは、ECUが受信するように設定されたIDを含むデータフレームを受信するが、受信対象に設定されていないIDを含むデータフレームは破棄する。   Network technology called CAN (Controller Area Network) may be used to transmit and receive data and control information between devices used in an in-vehicle network or factory automation of an automobile. A system in which CAN is used includes a plurality of ECUs (electronic control units). The ECUs communicate with each other by transmitting and receiving data frames (messages). In CAN, a data frame used for communication includes identification information (ID) used to identify a data frame. Each ECU stores the ID of the received data frame in advance. Since data frames are broadcast in CAN, a plurality of data frames reach the ECU connected to CAN at the same time. When the transmission timings of the data frames coincide with each other in a plurality of data frames, the priority order of the data frames is determined based on the value of the ID included in the data frame, and the priority data frame is transmitted first. Non-prioritized data frames are broadcast after transmission of the prioritized data frame. When a data frame is broadcast, each ECU receives a data frame including an ID set to be received by the ECU, but discards a data frame including an ID not set as a reception target.

しかし、各ECUは、そのECUが受信するように設定されたIDを含むデータフレームを用いてネットワークへの攻撃が行われた場合、攻撃に使用されるフレームを受信してしまう。攻撃に使用されるフレームを受信したECUは、フレームの受信に起因して、本来は行わない動作を行ってしまうおそれがある。そこで、攻撃によって送信されているフレームを特定するための試みが行われてきている。例えば、データフレームの送信周期に関する所定ルールに適合しないデータフレームを受信すると、データフレーム中の特定識別子を検証して、データフレームが攻撃によるものかを判定することが提案されている(例えば、特許文献1)。   However, when an attack to the network is performed using a data frame including an ID set to be received by the ECU, each ECU receives a frame used for the attack. The ECU that has received the frame used for the attack may perform an operation that is not originally performed due to the reception of the frame. Therefore, attempts have been made to identify the frames transmitted by the attack. For example, it has been proposed that when a data frame that does not conform to a predetermined rule regarding the transmission period of the data frame is received, a specific identifier in the data frame is verified to determine whether the data frame is due to an attack (for example, a patent). Reference 1).

国際公開第2015/170451号International Publication No. 2015/170451

周期的に送信されるメッセージと、周期ごとには送信されないメッセージの両方が送信されるシステムでは、攻撃に使用されるフレームの特定が困難な場合がある。背景技術に述べた技術では、送信周期以外で送信されるメッセージの送信後に、そのメッセージの送信時刻を基準として、周期的にメッセージを送信する場合に、周期的に送信されたメッセージを攻撃に使用されるフレームと誤認してしまうことがある。   In a system in which both a periodically transmitted message and a message that is not transmitted every period are transmitted, it may be difficult to specify a frame used for an attack. In the technology described in the background art, when a message is transmitted periodically based on the transmission time of the message after transmission of a message transmitted at a non-transmission period, the periodically transmitted message is used for an attack. May be mistaken for a frame to be received.

本発明は、1つの側面として、攻撃検知の精度を向上することを目的とする。   One object of the present invention is to improve the accuracy of attack detection.

ある1つの態様にかかる攻撃検知装置は、送受信部と計算部を備える。送受信部は、ネットワーク中の通信装置からメッセージを受信する。計算部は、周期的に送信される周期メッセージの第1のメッセージの受信時刻を用いて、前記第1のメッセージ以降に受信する周期メッセージの受信期間を計算する。前記送信周期より短い送信間隔で送信されたことを表わす情報に対応付けられた第2のメッセージを、前記送受信部が前記第1のメッセージの受信後の前記受信期間外に受信する。すると、前記計算部は、前記第2のメッセージの受信時刻と前記送信周期を用いて、前記第2のメッセージ以降に受信する周期メッセージの受信期間を更新する。   An attack detection apparatus according to one aspect includes a transmission / reception unit and a calculation unit. The transmission / reception unit receives a message from a communication device in the network. A calculation part calculates the reception period of the periodic message received after the said 1st message using the reception time of the 1st message of the periodic message transmitted periodically. The transmission / reception unit receives the second message associated with the information indicating that the transmission is performed at a transmission interval shorter than the transmission cycle outside the reception period after the reception of the first message. Then, the calculation unit updates a reception period of a periodic message received after the second message, using the reception time of the second message and the transmission period.

攻撃検知の精度が向上する。   The accuracy of attack detection is improved.

実施形態にかかる攻撃検知方法の例を説明する図である。It is a figure explaining the example of the attack detection method concerning embodiment. 攻撃検知装置の構成の例を説明する図である。It is a figure explaining the example of a structure of an attack detection apparatus. 送信装置の構成の例を説明する図である。It is a figure explaining the example of a structure of a transmitter. ハードウェア構成の例を説明する図である。It is a figure explaining the example of a hardware configuration. ネットワークの例を説明する図である。It is a figure explaining the example of a network. 送受信されるフレームのフォーマットの例を示す図である。It is a figure which shows the example of the format of the flame | frame transmitted / received. 送信装置が保持する情報の例を示す図である。It is a figure which shows the example of the information which a transmission device hold | maintains. 送信処理の例を説明するフローチャートである。It is a flowchart explaining the example of a transmission process. 攻撃検知装置が保持する情報の例を説明する図である。It is a figure explaining the example of the information which an attack detection apparatus hold | maintains. 第1の実施形態にかかる攻撃検知方法の例を説明する図である。It is a figure explaining the example of the attack detection method concerning 1st Embodiment. 攻撃検知装置の処理の例を説明するフローチャートである。It is a flowchart explaining the example of a process of an attack detection apparatus. マージンが適切ではないときに発生する問題の例を説明する図である。It is a figure explaining the example of the problem which arises when a margin is not appropriate. 攻撃検知装置の構成の例を説明する図である。It is a figure explaining the example of a structure of an attack detection apparatus. 第2の実施形態にかかる攻撃検知方法の例を説明する図である。It is a figure explaining the example of the attack detection method concerning 2nd Embodiment. 攻撃検知装置が保持する情報の例を説明する図である。It is a figure explaining the example of the information which an attack detection apparatus hold | maintains. 第2の実施形態にかかる攻撃検知方法の例を説明する図である。It is a figure explaining the example of the attack detection method concerning 2nd Embodiment. 攻撃検知装置の処理の例を説明するフローチャートである。It is a flowchart explaining the example of a process of an attack detection apparatus. 攻撃検知装置の処理の例を説明するフローチャートである。It is a flowchart explaining the example of a process of an attack detection apparatus.

図1は、実施形態にかかる攻撃検知方法の例を説明する図である。図1では、黒い三角(▲)は周期的に送信されるデータフレーム(周期メッセージ)を攻撃検知装置が受信したタイミングを示し、白い三角(△)は周期に関係なく送信されるデータフレーム(非周期メッセージ)を攻撃検知装置が受信したタイミングを示す。ケースC1では、周期的に送信されるメッセージであるメッセージM1とM4の間に、非周期で送信されるメッセージM2とM3が送信され、その後、周期的なメッセージM5とM6が送信されている。このとき、周期の基準は、メッセージM1の送信時点から変更されない。一方、ケースC2では、周期的に送信されるメッセージであるメッセージM11とM12の後に、非周期で送信されるメッセージM13が送信され、その後、メッセージM13の送信時刻を周期の基準として周期的なメッセージM14とM15が送信されている。   FIG. 1 is a diagram illustrating an example of an attack detection method according to the embodiment. In FIG. 1, black triangles (▲) indicate the timing at which the attack detection device receives data frames (periodic messages) that are periodically transmitted, and white triangles (Δ) indicate data frames that are transmitted regardless of the period (non-periods). The timing at which the attack detection device receives a periodic message). In case C1, messages M2 and M3 transmitted aperiodically are transmitted between messages M1 and M4, which are messages transmitted periodically, and thereafter periodic messages M5 and M6 are transmitted. At this time, the reference of the cycle is not changed from the time when the message M1 is transmitted. On the other hand, in the case C2, a message M13 that is transmitted aperiodically is transmitted after the messages M11 and M12 that are periodically transmitted messages, and then a periodic message with the transmission time of the message M13 as a period reference. M14 and M15 are transmitted.

実施形態にかかる方法では、データフレームを送信する通信装置(送信装置)は、送信対象のメッセージを、前回送信したメッセージの送信時刻からの経過時刻が周期よりも短い状態で送信しているかを、攻撃検知装置に認識させるための処理を行う。この処理は、メッセージが周期的に送信されているか、非周期的に送信されているかに関わらず行われる。例えば、送信装置は、送信対象のフレーム中に、周期よりも短い間隔で送信しているメッセージであるかの判定に使用するフラグ(短間隔フラグ)を含めることができる。図1の説明では、送信装置は、周期よりも短い送信間隔で送信するメッセージは短間隔フラグ=1、周期どおりに送信するメッセージは短間隔フラグ=0に設定するとする。   In the method according to the embodiment, the communication device (transmitting device) that transmits the data frame transmits the message to be transmitted in a state where the elapsed time from the transmission time of the previously transmitted message is shorter than the cycle. Performs processing to make the attack detection device recognize. This process is performed regardless of whether the message is transmitted periodically or aperiodically. For example, the transmission apparatus can include a flag (short interval flag) used for determining whether the message is transmitted at an interval shorter than the cycle in the frame to be transmitted. In the description of FIG. 1, it is assumed that the transmission apparatus sets a short interval flag = 1 for a message transmitted at a transmission interval shorter than the cycle, and sets a short interval flag = 0 for a message transmitted according to the cycle.

例えば、送信周期がTである場合、ケースC2では、送信装置は、メッセージM13をメッセージM12の送信時刻からメッセージの送信周期が経過する前に送信している。このため、送信装置は、メッセージM13において、短間隔フラグを1に設定する。一方、送信装置は、メッセージM13の送信時刻から送信周期が経過すると、メッセージM14を送信し、メッセージM14の送信時刻から送信周期が経過するとメッセージM15を送信している。このため、メッセージM14とM15では、短間隔フラグは0に設定される。同様に、メッセージM12でも短間隔フラグは0に設定される。   For example, when the transmission cycle is T, in case C2, the transmission device transmits the message M13 from the transmission time of the message M12 before the message transmission cycle elapses. For this reason, the transmission apparatus sets the short interval flag to 1 in the message M13. On the other hand, the transmission device transmits the message M14 when the transmission cycle elapses from the transmission time of the message M13, and transmits the message M15 when the transmission cycle elapses from the transmission time of the message M14. For this reason, the short interval flag is set to 0 in the messages M14 and M15. Similarly, the short interval flag is set to 0 in the message M12.

攻撃検知装置は、受信メッセージが前回のメッセージの送信時刻からメッセージの送信周期が経過する前に送信されたメッセージである場合、受信メッセージを基準として、以後のメッセージが周期的に送信された場合の受信時刻を予測する。一方、受信メッセージが前回のメッセージの送信時刻からメッセージの送信周期どおりに送信されたメッセージである場合、攻撃検知装置は、メッセージの受信時刻が予測した受信期間内に含まれていれば、攻撃に使用されたフレームではないと判定する。   If the received message is a message sent before the message transmission cycle has elapsed since the previous message transmission time, the attack detection device uses the received message as a reference when the subsequent messages are sent periodically. Predict the reception time. On the other hand, if the received message is a message transmitted according to the message transmission cycle from the previous message transmission time, the attack detection device may attack the attack if the message reception time is within the predicted reception period. It is determined that the frame is not used.

例えば、攻撃検知装置は、メッセージM12の受信後にメッセージM13を受信する。メッセージM13では短間隔フラグ=1であるため、攻撃検知装置は、メッセージM13の受信時刻からメッセージの送信間隔Tが経過した時刻の周辺の期間を、メッセージM13の次に受信するメッセージの受信期間として計算する。ここで、メッセージM13の次に受信するメッセージの受信期間を矢印Pxで表わす。   For example, the attack detection device receives the message M13 after receiving the message M12. Since the short interval flag = 1 in the message M13, the attack detection apparatus sets the period around the time when the message transmission interval T has elapsed from the reception time of the message M13 as the reception period of the message received next to the message M13. calculate. Here, the reception period of the message received next to message M13 is represented by arrow Px.

攻撃検知装置は、メッセージM13の次に、短間隔フラグ=0に設定されているメッセージM14を受信する。ケースC2の例では、メッセージM14の受信時刻は、メッセージM14に対して予測した受信期間(矢印Px)の範囲内である。そこで、攻撃検知装置は、メッセージM14は攻撃用のフレームではないと判定する。すると、攻撃検知装置は、メッセージM14の受信時刻と送信周期Tを用いて、メッセージM14の次に受信するメッセージの受信期間を計算する。ここで、メッセージM14の次に受信するメッセージの受信期間を矢印Pyで表わす。攻撃検知装置は、メッセージM14の次に、短間隔フラグ=0に設定されているメッセージM15を、予測した受信期間(矢印Py)に受信する。そこで、攻撃検知装置は、メッセージM15は攻撃用のフレームではないと判定する。   The attack detection apparatus receives the message M14 in which the short interval flag = 0 is set next to the message M13. In the example of case C2, the reception time of the message M14 is within the range of the reception period (arrow Px) predicted for the message M14. Therefore, the attack detection device determines that the message M14 is not an attack frame. Then, the attack detection device calculates the reception period of the message received next to the message M14 using the reception time of the message M14 and the transmission cycle T. Here, the reception period of the message received next to message M14 is represented by arrow Py. After the message M14, the attack detection device receives the message M15 in which the short interval flag = 0 is set during the predicted reception period (arrow Py). Therefore, the attack detection device determines that the message M15 is not an attack frame.

このように、実施形態にかかる方法では、攻撃検知装置は、受信したメッセージが送信装置から周期よりも短い間隔で送信されたメッセージであるかを、短間隔フラグなどを用いて特定することができる。このため、ケースC2のように、非周期的に送信されたメッセージの後に、非周期的に送信されたメッセージを基準として周期的なメッセージの送信が行われても、周期的なメッセージが攻撃用のフレームであるかを判定できる。車両に搭載されるCANなどでは、ケースC2のように、非周期的に送信されたメッセージを基準として周期的なメッセージの送信が行われるシステムが多いので、実施形態にかかる方法は、車両に搭載されるCANなどに適用しやすい。   As described above, in the method according to the embodiment, the attack detection device can specify whether the received message is a message transmitted from the transmission device at an interval shorter than the cycle by using the short interval flag or the like. . For this reason, as in case C2, even if a periodic message is transmitted based on a non-periodically transmitted message after a non-periodically transmitted message, the periodic message is used for attack. Can be determined. In CAN and the like mounted on a vehicle, there are many systems in which a periodic message is transmitted based on a non-periodically transmitted message as in the case C2. Therefore, the method according to the embodiment is mounted on the vehicle. It is easy to apply to CAN.

実施形態にかかる方法は、ケースC2の場合だけでなく、ケースC1に示すように周期的なメッセージの間に非周期メッセージの送信が行われるケースであっても、周期的なメッセージが攻撃用のフレームであるかを判定できる。   The method according to the embodiment is not limited to the case C2, but even if the aperiodic message is transmitted between the periodic messages as shown in the case C1, the periodic message is used for the attack. Whether it is a frame can be determined.

例えば、送信周期がTである場合、ケースC1では、送信装置は、メッセージM2、M3、M4を、前回のメッセージの送信時刻からメッセージの送信周期が経過する前に送信している。このため、送信装置は、メッセージM2、M3、M4において、短間隔フラグを1に設定する。一方、送信装置は、メッセージM4の送信時刻から送信周期が経過すると、メッセージM5を送信し、メッセージM5の送信時刻から送信周期が経過するとメッセージM6を送信している。このため、メッセージM5とM6では、短間隔フラグは0に設定される。   For example, when the transmission cycle is T, in case C1, the transmission device transmits messages M2, M3, and M4 before the message transmission cycle elapses from the previous message transmission time. For this reason, the transmission device sets the short interval flag to 1 in the messages M2, M3, and M4. On the other hand, the transmission device transmits the message M5 when the transmission cycle elapses from the transmission time of the message M4, and transmits the message M6 when the transmission cycle elapses from the transmission time of the message M5. For this reason, the short interval flag is set to 0 in the messages M5 and M6.

一方、攻撃検知装置は、メッセージM1の受信後にメッセージM2を受信する。メッセージM2では短間隔フラグ=1であるため、攻撃検知装置は、メッセージM2の受信時刻とメッセージの送信間隔Tを用いて、メッセージM2の次に受信するメッセージの受信期間を計算する。攻撃検知装置は、メッセージM2の次にメッセージM3を受信するが、メッセージM3でも短間隔フラグ=1に設定されているので、メッセージM3の次に受信するメッセージの受信期間を計算する。攻撃検知装置は、メッセージM3の次にメッセージM4を受信するが、メッセージM4でも短間隔フラグ=1に設定されているので、メッセージM4の次に受信するメッセージの受信期間を計算する。ここで、メッセージM4の次に受信するメッセージの受信期間を矢印Paで表わす。   On the other hand, the attack detection device receives the message M2 after receiving the message M1. Since the short interval flag = 1 in the message M2, the attack detection apparatus calculates the reception period of the message received next to the message M2, using the reception time of the message M2 and the message transmission interval T. The attack detection device receives the message M3 next to the message M2, but since the short interval flag = 1 is set also in the message M3, the reception period of the message received next to the message M3 is calculated. The attack detection device receives the message M4 next to the message M3, but since the short interval flag = 1 is set also in the message M4, the reception period of the message received next to the message M4 is calculated. Here, the reception period of the message received next to message M4 is represented by arrow Pa.

攻撃検知装置は、メッセージM4の次に、短間隔フラグ=0に設定されているメッセージM5を受信する。ケースC1の例では、メッセージM5の受信時刻はメッセージM5に対して予測した受信期間(矢印Pa)の範囲内であるので、攻撃検知装置は、メッセージM5は攻撃用のフレームではないと判定する。すると、攻撃検知装置は、メッセージM5の受信時刻と送信周期Tを用いて、メッセージM5の次に受信するメッセージの受信期間を計算する。メッセージM5の次に受信するメッセージの受信期間を矢印Pbで表わす。攻撃検知装置は、メッセージM5の次に、短間隔フラグ=0に設定されているメッセージM6を、予測した受信期間(矢印Pb)に受信したとする。すると、攻撃検知装置は、メッセージM6は攻撃用のフレームではないと判定する。   The attack detection apparatus receives the message M5 in which the short interval flag = 0 is set next to the message M4. In the example of case C1, since the reception time of the message M5 is within the range of the reception period (arrow Pa) predicted for the message M5, the attack detection device determines that the message M5 is not an attack frame. Then, the attack detection device calculates the reception period of the message received next to the message M5 using the reception time of the message M5 and the transmission cycle T. A reception period of a message received next to the message M5 is represented by an arrow Pb. It is assumed that the attack detection device receives a message M6 set with the short interval flag = 0 after the message M5 during the predicted reception period (arrow Pb). Then, the attack detection device determines that the message M6 is not an attack frame.

このように、実施形態にかかる方法は、周期メッセージの周期の基準となる時刻が非周期メッセージの送信時刻によって変動するシステムと、周期メッセージの周期の基準となる時刻が非周期メッセージによって変動しないシステムのいずれにも適用できる。このため、周期的に送信されるデータフレームと、周期ごとには送信されないデータフレームの両方が送信されるシステムにおける攻撃検知の精度が向上する。実施形態にかかる方法により、特に、周期メッセージを装った攻撃の検出精度が向上する。   As described above, the method according to the embodiment includes a system in which the time that is the reference of the period of the periodic message varies depending on the transmission time of the aperiodic message and a system in which the time that is the reference of the period of the periodic message does not vary depending on the aperiodic message. It can be applied to any of the above. This improves the accuracy of attack detection in a system in which both data frames that are periodically transmitted and data frames that are not transmitted every period are transmitted. By the method according to the embodiment, in particular, the detection accuracy of an attack posing as a periodic message is improved.

<装置構成とネットワークの例>
図2は、攻撃検知装置10の構成の例を説明する図である。攻撃検知装置10は、送受信部11、制御部20、記憶部30を備える。制御部20は、計算部21と判定部22を備える。記憶部30は、送信条件31、受信状況情報32、受信予測33を保持する。
<Example of device configuration and network>
FIG. 2 is a diagram illustrating an example of the configuration of the attack detection apparatus 10. The attack detection device 10 includes a transmission / reception unit 11, a control unit 20, and a storage unit 30. The control unit 20 includes a calculation unit 21 and a determination unit 22. The storage unit 30 holds a transmission condition 31, reception status information 32, and reception prediction 33.

送信条件31は、攻撃検知装置10が受信する周期メッセージに含まれているIDと、そのIDで識別される周期メッセージの送信周期を対応付けている。受信状況情報32は、攻撃検知装置10が受信した最新のメッセージの受信時刻を記録する。送信条件31と受信状況情報32の例は後述する。   The transmission condition 31 associates the ID included in the periodic message received by the attack detection device 10 with the transmission period of the periodic message identified by the ID. The reception status information 32 records the reception time of the latest message received by the attack detection device 10. An example of the transmission condition 31 and the reception status information 32 will be described later.

計算部21は、送信条件31や受信状況情報32を用いて、IDごとに、周期メッセージの受信予測を計算する。計算部21は、得られた計算結果を受信予測33に格納する。このため、受信予測33もIDごとに生成される。受信予測33の例も後述する。判定部22は、受信したメッセージ中の短間隔フラグと受信予測33を用いて、ネットワークに対する攻撃が発生したかを判定する。   The calculation unit 21 calculates the reception prediction of the periodic message for each ID using the transmission condition 31 and the reception status information 32. The calculation unit 21 stores the obtained calculation result in the reception prediction 33. For this reason, the reception prediction 33 is also generated for each ID. An example of the reception prediction 33 will also be described later. The determination unit 22 determines whether an attack has occurred on the network using the short interval flag and the reception prediction 33 in the received message.

図3は、送信装置40の構成の例を説明する図である。送信装置40は、送受信部11、制御部50、記憶部60を備える。制御部50は、データ生成部51、フラグ設定部52、フレーム生成部53を有する。記憶部60は、送信条件61とフラグ設定条件62を保持する。   FIG. 3 is a diagram illustrating an example of the configuration of the transmission device 40. The transmission device 40 includes a transmission / reception unit 11, a control unit 50, and a storage unit 60. The control unit 50 includes a data generation unit 51, a flag setting unit 52, and a frame generation unit 53. The storage unit 60 holds a transmission condition 61 and a flag setting condition 62.

送信条件61は、送信装置40が送信する周期メッセージに含まれているIDと、そのIDで識別される周期メッセージの送信周期を対応付けている。フラグ設定条件62は、短間隔フラグの設定条件を表わしている。ここで、短間隔フラグは、送信対象のフレームと同じ識別情報を有する前回の送信フレームの送信時刻から、送信する対象のフレームの送信時刻までの経過時間が、送信周期よりも短いかを表わすフラグである。   The transmission condition 61 associates the ID included in the periodic message transmitted by the transmission device 40 with the transmission period of the periodic message identified by the ID. The flag setting condition 62 represents the setting condition of the short interval flag. Here, the short interval flag is a flag indicating whether the elapsed time from the transmission time of the previous transmission frame having the same identification information as the transmission target frame to the transmission time of the transmission target frame is shorter than the transmission cycle. It is.

データ生成部51は、送信フレームに含めるデータを生成する。フラグ設定部52は、短間隔フラグを設定する。フレーム生成部53は、データ生成部51が生成したデータとフラグ設定部52での短間隔フラグの設定結果を用いて、送信対象のフレームを生成する。送受信部11は、他の装置との間でフレームの送受信を行う。   The data generation unit 51 generates data to be included in the transmission frame. The flag setting unit 52 sets a short interval flag. The frame generation unit 53 generates a transmission target frame using the data generated by the data generation unit 51 and the setting result of the short interval flag in the flag setting unit 52. The transmission / reception unit 11 transmits / receives a frame to / from another device.

図4は、攻撃検知装置10と送信装置40のハードウェア構成の例を説明する図である。図4の例では、攻撃検知装置10と送信装置40は、ECU100として実現されている。ECU100は、CANトランシーバ101、CANコントローラ102、処理回路103を含む。処理回路103は、プロセッサ104とメモリ105を備える。   FIG. 4 is a diagram illustrating an example of the hardware configuration of the attack detection device 10 and the transmission device 40. In the example of FIG. 4, the attack detection device 10 and the transmission device 40 are realized as the ECU 100. The ECU 100 includes a CAN transceiver 101, a CAN controller 102, and a processing circuit 103. The processing circuit 103 includes a processor 104 and a memory 105.

CANトランシーバ101は、適宜、バス電圧の調整など、ECU100がCANネットワーク中の他の装置と通信するための処理を行う。CANコントローラ102は、受信したフレームに対するCRC(Cyclic Redundancy Check)チェックやビットスタッフィングなどの処理を行うことにより、データを抽出する。CANコントローラ102は、データをプロセッサ104に出力する。プロセッサ104は、任意の処理回路であり、例えば、CPU(Central Processing Unit)とすることができる。プロセッサは、メモリ105に格納されたプログラムを読み込んで、処理を行う。なお、ECU100は、記憶媒体からプログラムやデータを読み出すための装置を備えていても良い。この場合、プログラムは、任意の記憶媒体に記録されていても良く、ECU100によって、記憶媒体から適宜、読み出される。   The CAN transceiver 101 appropriately performs processing for the ECU 100 to communicate with other devices in the CAN network, such as adjustment of bus voltage. The CAN controller 102 extracts data by performing processing such as CRC (Cyclic Redundancy Check) check and bit stuffing on the received frame. The CAN controller 102 outputs data to the processor 104. The processor 104 is an arbitrary processing circuit, and can be a CPU (Central Processing Unit), for example. The processor reads the program stored in the memory 105 and performs processing. The ECU 100 may include a device for reading a program and data from a storage medium. In this case, the program may be recorded in an arbitrary storage medium, and is appropriately read from the storage medium by the ECU 100.

攻撃検知装置10では、CANトランシーバ101とCANコントローラ102により、送受信部11が実現される。プロセッサ104は、制御部20として動作する。メモリ105は記憶部30として動作する。送信装置40では、CANトランシーバ101とCANコントローラ102により、送受信部11が実現される。プロセッサ104は、制御部50として動作する。メモリ105は記憶部60として動作する。   In the attack detection device 10, the transmission / reception unit 11 is realized by the CAN transceiver 101 and the CAN controller 102. The processor 104 operates as the control unit 20. The memory 105 operates as the storage unit 30. In the transmission device 40, the transmission / reception unit 11 is realized by the CAN transceiver 101 and the CAN controller 102. The processor 104 operates as the control unit 50. The memory 105 operates as the storage unit 60.

<ネットワークとフレームの例>
図5は、ネットワークの例を説明する図である。図5に示すネットワークN1では、複数のECU100(ECU0〜ECUk)が1本のバスで互いにフレームの送受信が可能になるように接続されている。図5のネットワークに含まれるECU100のうちの1つ以上が攻撃検知装置10として動作するものとする。例えば、1つの攻撃検知装置10がネットワーク中で送受信される全ての周期メッセージに対する攻撃を検知しても良い。また、複数の攻撃検知装置10を用いて全ての周期メッセージに対する攻撃を検知するように検知対象が攻撃検知装置10ごとに決められていても良い。また、図5のネットワークに含まれるECU100のうちの1つ以上が送信装置40として動作する。
<Example of network and frame>
FIG. 5 is a diagram illustrating an example of a network. In the network N1 shown in FIG. 5, a plurality of ECUs 100 (ECU0 to ECUk) are connected to each other through a single bus so that frames can be transmitted and received. Assume that one or more of the ECUs 100 included in the network of FIG. For example, one attack detection device 10 may detect an attack on all periodic messages transmitted and received in the network. Further, the detection target may be determined for each attack detection device 10 so as to detect attacks on all periodic messages using a plurality of attack detection devices 10. In addition, one or more of the ECUs 100 included in the network of FIG.

周期メッセージの送信タイミングと、攻撃検知装置10での受信タイミングの例も図5に示す。図5の例では、ECU0が攻撃検知装置10として動作することにより、ID=A、B、Cの各々の周期メッセージに対する攻撃を検知するものとする。この場合、攻撃検知装置10として動作するECU0では、ID=A、B、Cの各々の周期メッセージを受信対象として取得する。一方、ECU1はID=Aの周期メッセージを送信し、ECU2はID=Bの周期メッセージを送信するとする。また、ECU3はID=Cの周期メッセージを送信するものとする。   An example of the transmission timing of the periodic message and the reception timing at the attack detection apparatus 10 are also shown in FIG. In the example of FIG. 5, it is assumed that the ECU 0 operates as the attack detection device 10 to detect an attack on each periodic message of ID = A, B, and C. In this case, the ECU 0 operating as the attack detection device 10 acquires each periodic message of ID = A, B, and C as a reception target. On the other hand, the ECU 1 transmits a periodic message with ID = A, and the ECU 2 transmits a periodic message with ID = B. Moreover, ECU3 shall transmit the periodic message of ID = C.

図5のタイミング図に示すように、ID=A、B、Cの各周期メッセージは送信されたタイミングとほぼ同時に、ECU0で受信される。ECU0では、受信したメッセージの受信タイミングを、そのメッセージ中のIDに対応付けて解析することにより、攻撃を検知する。攻撃の検知の詳細については後述する。   As shown in the timing chart of FIG. 5, the periodic messages of ID = A, B, and C are received by the ECU 0 almost simultaneously with the transmission timing. The ECU 0 detects an attack by analyzing the reception timing of the received message in association with the ID in the message. Details of attack detection will be described later.

図6は、送受信されるフレームのフォーマットの例を示す図である。図6のF11は、一般仕様のフレームのフォーマット例であり、F12は拡張仕様で使用されるフレームのフォーマット例である。   FIG. 6 is a diagram illustrating an example of a format of a frame to be transmitted / received. F11 in FIG. 6 is a frame format example of the general specification, and F12 is a frame format example used in the extended specification.

一般仕様のフレームは、SOF(Start of Frame)、調停(arbitration)フィールド、コントロールフィールド、データフィールド、CRCフィールド、ACKフィールド、EOF(End of Frame)を含む。調停フィールドには、IDとRTR(Remote Transmission Request)が含まれる。ここで、IDは、データフレームの識別に使用される識別情報である。コントロールフィールドには、IDE(Identifier Extension)、予約ビット、DLC(Data Length Code)が含まれる。CRCフィールドは、CRCシーケンスとCRCデリミタを含む。ACKフィールドは、ACKスロットとACKデリミタを含む。なお、各フィールドに含まれる情報要素のビット長は、F11の一番下の行に記載したとおりである。例えば、IDの長さは11ビットであり、データフィールドの長さは0〜64ビットの可変長である。   The general specification frame includes an SOF (Start of Frame), an arbitration field, a control field, a data field, a CRC field, an ACK field, and an EOF (End of Frame). The arbitration field includes ID and RTR (Remote Transmission Request). Here, the ID is identification information used for identifying the data frame. The control field includes IDE (Identifier Extension), reserved bits, and DLC (Data Length Code). The CRC field includes a CRC sequence and a CRC delimiter. The ACK field includes an ACK slot and an ACK delimiter. Note that the bit length of the information element included in each field is as described in the bottom line of F11. For example, the length of the ID is 11 bits, and the length of the data field is a variable length of 0 to 64 bits.

拡張仕様で使用されるデータフレーム(F12)も、SOF、調停フィールド、コントロールフィールド、データフィールド、CRCフィールド、ACKフィールド、EOFを含む。拡張仕様の調停フィールドは、IDベース、SRR(Substitute Remote Request Bit)、IDE、ID拡張、RTRを含む。拡張仕様では、IDベースとして格納されたビット列の次に、ID拡張として格納されたビット列をつなげて得られるビット列により、データフレームの識別情報(ID)を表わす。コントロールフィールドからEOFまでは、拡張仕様のフォーマットでも、一般仕様のフォーマットと同様である。また、各フィールドに含まれる情報要素のビット長は、F12の一番下の行に記載したとおりである。このため、拡張フォーマットでは、送信元の識別情報として、IDベースの11ビットとID拡張の18ビットを合わせた29ビットのビット列が使用される。   The data frame (F12) used in the extended specification also includes an SOF, an arbitration field, a control field, a data field, a CRC field, an ACK field, and an EOF. The arbitration field of the extended specification includes ID base, SRR (Substitute Remote Request Bit), IDE, ID extension, and RTR. In the extended specification, data frame identification information (ID) is represented by a bit string obtained by connecting a bit string stored as an ID base to a bit string stored as an ID extension. From the control field to EOF, the extended specification format is the same as the general specification format. Further, the bit length of the information element included in each field is as described in the bottom line of F12. For this reason, in the extended format, a 29-bit bit string including 11 bits of ID base and 18 bits of ID extension is used as identification information of the transmission source.

システム中で送受信されるフレームのフォーマットがF11とF12のいずれであっても、短間隔フラグは、データフィールド中に含められる。また、送信装置40と攻撃検知装置10は、予め、データフィールド中で短間隔フラグが記録されている領域を記憶しているものとする。例えば、短間隔フラグの設定位置は、送信条件31、送信条件61、フラグ設定条件62などに含まれていても良い。   The short interval flag is included in the data field regardless of whether the format of the frame transmitted and received in the system is F11 or F12. Further, it is assumed that the transmission device 40 and the attack detection device 10 have previously stored an area in which a short interval flag is recorded in the data field. For example, the setting position of the short interval flag may be included in the transmission condition 31, the transmission condition 61, the flag setting condition 62, and the like.

以下、図6のF11に示すフォーマットを用いたデータフレームが送受信される場合を例として、各実施形態で行われる処理の例を説明する。なお、通信に使用されるデータフレームが拡張仕様の場合でも、同様に処理が行われる。   Hereinafter, an example of processing performed in each embodiment will be described by taking as an example a case where a data frame using the format shown in F11 of FIG. 6 is transmitted and received. The same processing is performed even when the data frame used for communication is an extended specification.

<第1の実施形態>
以下、第1の実施形態を、送信装置40からのフレームの送信と、攻撃検知装置10での判定処理に分けて説明する。
<First Embodiment>
Hereinafter, the first embodiment will be described by dividing it into frame transmission from the transmission device 40 and determination processing in the attack detection device 10.

(1)送信装置40からのフレームの送信
図7は、送信装置40が保持する情報の例を示す図である。送信条件61は、送信装置40が送信するメッセージに含まれるID、送信周期、短間隔フラグの位置を含む。送信周期は、エントリ中のIDで識別される周期メッセージが送信される周期である。短間隔フラグの位置は、エントリ中のIDで識別されるメッセージの短間隔フラグとして使用されるデータフィールドの領域を指定する情報である。例えば、図7中の送信条件61には、ID=0x123の周期メッセージが100m秒周期で送信されることと、ID=0x123を有するメッセージでは、データフィールドの先頭ビットが短間隔フラグとして使用されることが示されている。
(1) Transmission of Frame from Transmitting Device 40 FIG. 7 is a diagram illustrating an example of information held by the transmitting device 40. The transmission condition 61 includes the ID included in the message transmitted by the transmission device 40, the transmission cycle, and the position of the short interval flag. The transmission cycle is a cycle in which a periodic message identified by the ID in the entry is transmitted. The position of the short interval flag is information for designating an area of the data field used as a short interval flag of the message identified by the ID in the entry. For example, in the transmission condition 61 in FIG. 7, a periodic message with ID = 0x123 is transmitted at a period of 100 milliseconds, and the first bit of the data field is used as a short interval flag in a message with ID = 0x123. It has been shown.

フラグ設定条件62には、短間隔フラグの値ごとに、その値が設定されるときの条件が対応付けられている。図7の例では、あるIDで識別されるメッセージについて、前回のメッセージの送信時刻から今回のメッセージの送信時刻までの期間が周期と一致する場合は、短間隔フラグ=0に設定されることがフラグ設定条件62に記録されている。一方、あるIDで識別されるメッセージについて、前回のメッセージの送信時刻から今回のメッセージの送信時刻までの期間が周期よりも短い場合は、短間隔フラグ=1に設定される。例えば、フラグ設定部52は、送信処理を行うフレームのIDごとにフレームの送信間隔を計測するためのタイマを保持していて、タイマのカウント値を用いて、短間隔フラグの設定値を決定することできる。   The flag setting condition 62 is associated with a condition for setting the value of each short interval flag. In the example of FIG. 7, for a message identified by a certain ID, if the period from the previous message transmission time to the current message transmission time matches the cycle, the short interval flag = 0 may be set. It is recorded in the flag setting condition 62. On the other hand, for a message identified by a certain ID, if the period from the previous message transmission time to the current message transmission time is shorter than the period, the short interval flag = 1 is set. For example, the flag setting unit 52 holds a timer for measuring a frame transmission interval for each ID of a frame to be transmitted, and determines the setting value of the short interval flag using the count value of the timer. I can.

図8は、送信処理の例を説明するフローチャートである。図8の例では、タイマは、そのタイマで送信間隔の測定を行っているメッセージ(データフレーム)に含まれているIDに対応付けられている送信周期で満了するように設定されているとする。例えば、送信装置40が図7に示す送信条件61を保持している場合、ID=0x123のメッセージの処理に用いられるタイマは100msで満了するように設定されている。   FIG. 8 is a flowchart illustrating an example of transmission processing. In the example of FIG. 8, it is assumed that the timer is set to expire at the transmission cycle associated with the ID included in the message (data frame) for which the transmission interval is measured by the timer. . For example, when the transmission device 40 holds the transmission condition 61 shown in FIG. 7, the timer used for processing the message with ID = 0x123 is set to expire in 100 ms.

フラグ設定部52は、タイマを初期化する(ステップS1)。その後、フラグ設定部52は、タイマが満了しているかを判定する(ステップS2)。タイマが満了していない場合、フラグ設定部52は、メッセージを送信するイベントが発生しているかを判定する(ステップS2でNo、ステップS3)。メッセージを送信するイベントが発生していない場合、フラグ設定部52は、タイマをカウントアップし、ステップS2に戻る(ステップS3でNo、ステップS4)。   The flag setting unit 52 initializes the timer (step S1). Thereafter, the flag setting unit 52 determines whether the timer has expired (step S2). If the timer has not expired, the flag setting unit 52 determines whether an event for transmitting a message has occurred (No in step S2, step S3). When the event for transmitting the message has not occurred, the flag setting unit 52 counts up the timer and returns to Step S2 (No in Step S3, Step S4).

一方、メッセージを送信するイベントが発生している場合、非周期的に送信されるメッセージの送信処理が行われる(ステップS3でYes)。フラグ設定部52は、短間隔フラグを1に設定する(ステップS5)。フラグ設定部52は、短間隔フラグの値をフレーム生成部53に通知する。フレーム生成部53は、データ生成部51で生成されたデータと、フラグ設定部52から取得した短間隔フラグの値、短間隔フラグの位置情報を用いて、送信メッセージを生成する(ステップS7)。送受信部11は、生成されたメッセージを送信し、ステップS1に戻る(ステップS8)。   On the other hand, when the event which transmits a message has generate | occur | produced, the transmission process of the message transmitted aperiodically is performed (Yes in step S3). The flag setting unit 52 sets the short interval flag to 1 (step S5). The flag setting unit 52 notifies the frame generation unit 53 of the value of the short interval flag. The frame generation unit 53 generates a transmission message using the data generated by the data generation unit 51, the value of the short interval flag acquired from the flag setting unit 52, and the position information of the short interval flag (step S7). The transmission / reception unit 11 transmits the generated message and returns to step S1 (step S8).

ステップS2においてタイマが満了している場合、周期的に送信されるメッセージの送信処理が行われる(ステップS2でYes)。フラグ設定部52は、短間隔フラグを0に設定する(ステップS6)。その後、フラグ設定部52は、短間隔フラグの値をフレーム生成部53に通知する。このため、ステップS6の処理後も、ステップS7とS8の処理が行われる。   If the timer has expired in step S2, transmission processing of a periodically transmitted message is performed (Yes in step S2). The flag setting unit 52 sets the short interval flag to 0 (step S6). Thereafter, the flag setting unit 52 notifies the frame generation unit 53 of the value of the short interval flag. For this reason, the process of step S7 and S8 is performed after the process of step S6.

なお、図8は送信装置40の処理の一例であって、実装に応じて変更され得る。例えば、図1のケースC1に示すように、周期メッセージの基準を変更せずに非周期メッセージが送信されるシステムでは、送信装置40の処理は、ステップS8の処理後にステップS2に戻るように変形される。   FIG. 8 is an example of processing of the transmission device 40, and can be changed according to the implementation. For example, as shown in case C1 of FIG. 1, in a system in which a non-periodic message is transmitted without changing the reference of the periodic message, the process of the transmission device 40 is modified so as to return to step S2 after the process of step S8. Is done.

(2)攻撃検知装置10での判定処理
図9は、攻撃検知装置10が保持する情報の例を説明する図である。攻撃検知装置10は、予め、送信条件31を記憶している。送信条件31は、攻撃検知装置10が受信するメッセージに含まれるID、送信周期、マージン、短間隔フラグの位置を含む。送信周期は、エントリ中のIDで識別される周期メッセージが送信される周期である。マージンは、エントリ中のIDで識別される周期メッセージの受信期間を予測する際に、送信周期からずれる範囲の許容値として使用する値である。短間隔フラグの位置は、エントリ中のIDで識別されるメッセージのデータフィールド中で、短間隔フラグとして使用される領域を特定する情報である。
(2) Determination Processing in Attack Detection Device 10 FIG. 9 is a diagram for explaining an example of information held by the attack detection device 10. The attack detection apparatus 10 stores a transmission condition 31 in advance. The transmission condition 31 includes an ID, a transmission cycle, a margin, and a position of a short interval flag included in a message received by the attack detection apparatus 10. The transmission cycle is a cycle in which a periodic message identified by the ID in the entry is transmitted. The margin is a value used as an allowable value in a range deviating from the transmission cycle when the reception period of the periodic message identified by the ID in the entry is predicted. The position of the short interval flag is information for specifying an area used as the short interval flag in the data field of the message identified by the ID in the entry.

図9中の送信条件31には、ID=0x123の周期メッセージが100m秒周期で送信されることと、ID=0x123の周期メッセージについての受信期間の予測には、10m秒のマージンが使用されることが示されている。さらに、ID=0x123を有するメッセージでは、データフィールドの先頭ビットが短間隔フラグとして使用されることも送信条件31に含まれている。   In the transmission condition 31 in FIG. 9, a 10 ms margin is used to transmit a periodic message with ID = 0x123 in a 100 ms cycle and to predict a reception period for the periodic message with ID = 0x123. It has been shown. Further, in the message having ID = 0x123, the transmission condition 31 also includes that the first bit of the data field is used as the short interval flag.

受信状況情報32には、受信期間の計算に使用可能なメッセージの受信時刻が、受信期間の計算に使用可能なメッセージに含まれているIDと対応付けて記録されている。ここで、受信期間の計算に使用可能なメッセージとして、攻撃に使用されていないと判定された周期メッセージと、周期よりも短い間隔で送信されたメッセージが使用される。判定部22は、受信期間の計算に使用可能なメッセージのうちで最後に受信したメッセージの受信時刻を受信状況情報32に記録する。図9に受信状況情報32の記録例を示す。図9の例では、ID=0x123を含むメッセージを攻撃検知装置10が受信した時刻は50msである。なお、判定部22での判定処理については、図10を参照しながら説明する。   In the reception status information 32, the reception time of a message that can be used for calculation of the reception period is recorded in association with the ID included in the message that can be used for calculation of the reception period. Here, as messages that can be used for calculation of the reception period, a periodic message determined not to be used for an attack and a message transmitted at an interval shorter than the period are used. The determination unit 22 records the reception time of the message received last among the messages usable for the calculation of the reception period in the reception status information 32. FIG. 9 shows a recording example of the reception status information 32. In the example of FIG. 9, the time when the attack detection apparatus 10 received a message including ID = 0x123 is 50 ms. The determination process in the determination unit 22 will be described with reference to FIG.

計算部21は、受信状況情報32が更新されると、送信条件31に記録されている送信周期とマージンを用いて、IDごとに、受信予測33を生成する。図9には、ID=0x123の周期メッセージについて生成された受信予測33の例を示している。受信期間の計算に使用可能なメッセージが50msに受信されているので、送信周期Tに従って送信されたメッセージを受信可能な期間(受信期間)は、50ms+100ms±10msと計算される。従って、ID=0x123で短間隔フラグ=0に設定されているメッセージを次に受信する場合、受信するメッセージが攻撃によるフレームでなければ、受信期間である140ms〜160msに受信すると予想される。   When the reception status information 32 is updated, the calculation unit 21 generates a reception prediction 33 for each ID using the transmission cycle and the margin recorded in the transmission condition 31. FIG. 9 shows an example of the reception prediction 33 generated for the periodic message with ID = 0x123. Since a message that can be used for calculation of the reception period is received at 50 ms, the period during which a message transmitted according to the transmission period T can be received (reception period) is calculated as 50 ms + 100 ms ± 10 ms. Therefore, when the next message received with ID = 0x123 and the short interval flag = 0 is received, if the received message is not a frame caused by an attack, it is expected to be received in the reception period of 140 ms to 160 ms.

図10は、第1の実施形態にかかる攻撃検知方法の例を説明する図である。図10では、黒い下向きの三角形(▼)は、短間隔フラグ=0に設定されたメッセージを攻撃検知装置10が受信したタイミングを示し、白い下向きの三角形(▽)は短間隔フラグ=1に設定されたメッセージを攻撃検知装置10が受信したタイミングを示す。なお、図10では、メッセージM21〜M23と攻撃に使用されたフレームAT1のいずれも、ID=0x123で識別されるものとする。   FIG. 10 is a diagram for explaining an example of the attack detection method according to the first embodiment. In FIG. 10, the black downward triangle (▼) indicates the timing at which the attack detection apparatus 10 received a message with the short interval flag = 0, and the white downward triangle (▽) is set to the short interval flag = 1. The timing at which the attack detection apparatus 10 receives the received message is shown. In FIG. 10, it is assumed that both the messages M21 to M23 and the frame AT1 used for the attack are identified by ID = 0x123.

ケースC11の0msの時点において、攻撃検知装置10は受信期間の計算に使用可能なメッセージを1つも受信していないとする。この場合、受信状況情報32と受信予測33には、データが記録されていない。   Assume that the attack detection apparatus 10 has not received any message that can be used for calculation of the reception period at 0 ms in case C11. In this case, no data is recorded in the reception status information 32 and the reception prediction 33.

その後、50msにおいてID=0x123を含むメッセージM21が攻撃検知装置10に到達したとする。この時点では、受信予測33が求められていないので、判定部22は、メッセージM21を攻撃によるフレームではないと判定する。判定部22は、メッセージM21の受信時刻を受信状況情報32(図9)に記録する。   Thereafter, it is assumed that the message M21 including ID = 0x123 reaches the attack detection apparatus 10 in 50 ms. At this time, since the reception prediction 33 has not been obtained, the determination unit 22 determines that the message M21 is not a frame due to an attack. The determination unit 22 records the reception time of the message M21 in the reception status information 32 (FIG. 9).

計算部21は、受信状況情報32が更新されると、送信条件31(図9)に記録されている送信周期とマージンを用いて、送信周期Tに従って送信されたメッセージを受信可能な期間(受信期間)を計算する。なお、送信周期Tに従って送信されたメッセージでは、短間隔フラグ=0である。計算部21は、図9を参照しながら説明した処理により、短間隔フラグ=0を含むメッセージの受信期間を、140ms〜160msと計算する。メッセージM21の次に受信するメッセージについて計算部21が計算した受信期間を、矢印P1で示す。   When the reception status information 32 is updated, the calculation unit 21 uses a transmission period and a margin recorded in the transmission condition 31 (FIG. 9), and can receive a message transmitted according to the transmission period T (reception Period). In the message transmitted according to the transmission cycle T, the short interval flag = 0. The calculation unit 21 calculates the reception period of the message including the short interval flag = 0 as 140 ms to 160 ms by the process described with reference to FIG. The reception period calculated by the calculation unit 21 for the message received next to the message M21 is indicated by an arrow P1.

148msにおいて、ID=0x123で識別されるメッセージM22が攻撃検知装置10に到達したとする。判定部22は、メッセージM22の受信時刻が受信予測33中の情報と合致しているかを判定する。受信予測33は矢印P1で示すように140ms〜160msであるので、メッセージM22の受信時刻が受信予測33中の情報と合致している。そこで、判定部22は、メッセージM22を攻撃によるフレームではないと判定する。判定部22は、メッセージM22の受信時刻を用いて受信状況情報32を更新する。   It is assumed that the message M22 identified by ID = 0x123 reaches the attack detection apparatus 10 at 148 ms. The determination unit 22 determines whether the reception time of the message M22 matches the information in the reception prediction 33. Since the reception prediction 33 is 140 ms to 160 ms as indicated by the arrow P1, the reception time of the message M22 matches the information in the reception prediction 33. Therefore, the determination unit 22 determines that the message M22 is not an attack frame. The determination unit 22 updates the reception status information 32 using the reception time of the message M22.

計算部21は、受信状況情報32が更新されると、送信周期とマージンを用いて、次に受信するメッセージが短間隔フラグ=0である場合の受信期間を計算する。メッセージM22の受信時刻が148msであるので、計算部21は、短間隔フラグ=0を含むメッセージの受信期間を、148ms+100ms±10ms=238ms〜258msと計算したとする。メッセージM22の次に受信するメッセージについて計算部21が計算した受信期間を、矢印P2で示す。計算部21は、得られた計算結果で受信予測33を更新する。   When the reception status information 32 is updated, the calculation unit 21 calculates the reception period when the next message to be received is the short interval flag = 0, using the transmission cycle and the margin. Since the reception time of the message M22 is 148 ms, it is assumed that the calculation unit 21 calculates the reception period of the message including the short interval flag = 0 as 148 ms + 100 ms ± 10 ms = 238 ms to 258 ms. The reception period calculated by the calculation unit 21 for the message received next to the message M22 is indicated by an arrow P2. The calculation unit 21 updates the reception prediction 33 with the obtained calculation result.

ケースC12は、ケースC11の後で、メッセージM23が攻撃検知装置10に到達した場合を示す。200msにID=0x123で識別されるメッセージM23が攻撃検知装置10に到達したとする。判定部22は、メッセージM23の受信時刻が受信予測33中の情報と合致しているかを判定する。受信予測33は矢印P2で示すように238ms〜258msであるので、メッセージM23の受信時刻は受信予測33中の情報と合致していない。   Case C12 shows a case where the message M23 reaches the attack detection device 10 after the case C11. Assume that a message M23 identified by ID = 0x123 reaches the attack detection apparatus 10 in 200 ms. The determination unit 22 determines whether the reception time of the message M23 matches the information in the reception prediction 33. Since the reception prediction 33 is 238 ms to 258 ms as indicated by the arrow P2, the reception time of the message M23 does not match the information in the reception prediction 33.

そこで、判定部22は、メッセージM23に含まれている短間隔フラグの値を特定する。このとき、判定部22は、送信条件31中の短間隔フラグの位置の情報を用いる。短間隔フラグは、メッセージM23のデータフィールドの先頭ビットである。ここで、メッセージM23のデータフィールドの先頭ビットの値が1であるとする。この場合、短間隔フラグの値は1であるので、メッセージM23は、メッセージM22の送信から送信周期である100msが経過する前に送信されている。そこで、判定部22は、メッセージM23を攻撃に使用されているフレームではないと判定する。判定部22は、メッセージM23の受信時刻で受信状況情報32を更新する。換言すると、判定部22は、メッセージM23の受信により、破線の矢印P2に示す期間には、短間隔フラグ=0のメッセージを受信しないことを認識できる。   Therefore, the determination unit 22 specifies the value of the short interval flag included in the message M23. At this time, the determination unit 22 uses information on the position of the short interval flag in the transmission condition 31. The short interval flag is the first bit of the data field of the message M23. Here, it is assumed that the value of the first bit of the data field of the message M23 is 1. In this case, since the value of the short interval flag is 1, the message M23 is transmitted before 100 ms which is the transmission cycle elapses from the transmission of the message M22. Therefore, the determination unit 22 determines that the message M23 is not a frame used for an attack. The determination unit 22 updates the reception status information 32 with the reception time of the message M23. In other words, the determination unit 22 can recognize that the message with the short interval flag = 0 is not received during the period indicated by the dashed arrow P2 by receiving the message M23.

計算部21は、受信状況情報32が更新されると、送信周期とマージンを用いて、次に受信するメッセージが短間隔フラグ=0である場合の受信期間を計算する。メッセージM23の受信時刻が200msであるので、計算部21は、短間隔フラグ=0を含むメッセージの受信期間を、200ms+100ms±10ms=290ms〜310msと計算したとする。メッセージM23の次に受信するメッセージについて計算部21が計算した受信期間を、矢印P3で示す。計算部21は、得られた計算結果で受信予測33を更新する。   When the reception status information 32 is updated, the calculation unit 21 calculates the reception period when the next message to be received is the short interval flag = 0, using the transmission cycle and the margin. Since the reception time of the message M23 is 200 ms, it is assumed that the calculation unit 21 calculates the reception period of the message including the short interval flag = 0 as 200 ms + 100 ms ± 10 ms = 290 ms to 310 ms. The reception period calculated by the calculation unit 21 for the message received next to the message M23 is indicated by an arrow P3. The calculation unit 21 updates the reception prediction 33 with the obtained calculation result.

ケースC13は、ケースC12の後で、攻撃用フレームAT1が攻撃検知装置10に到達した場合を示す。250msにID=0x123で識別される攻撃用フレームAT1が攻撃検知装置10に到達したとする。判定部22は、攻撃用フレームAT1の受信時刻が受信予測33中の情報と合致しているかを判定する。受信予測33は矢印P3で示すように290ms〜310msであるので、攻撃用フレームAT1の受信時刻は受信予測33中の情報と合致していない。   Case C13 shows a case where the attack frame AT1 reaches the attack detection apparatus 10 after case C12. Assume that the attack frame AT1 identified by ID = 0x123 reaches the attack detection apparatus 10 at 250 ms. The determination unit 22 determines whether the reception time of the attack frame AT1 matches the information in the reception prediction 33. Since the reception prediction 33 is 290 ms to 310 ms as indicated by the arrow P3, the reception time of the attack frame AT1 does not match the information in the reception prediction 33.

そこで、判定部22は、攻撃用フレームAT1に含まれている短間隔フラグの値を特定する。攻撃用フレームAT1のデータフィールドの先頭ビットの値が0であるとする。この場合、短間隔フラグの値は0であるので、攻撃用フレームAT1は、メッセージM23の送信から送信周期Tである100msが経過してから送信されていることになるが、攻撃用フレームAT1の受信時間は受信予測33と合致しない。そこで、判定部22は、攻撃用フレームAT1を攻撃に使用されているフレームであると判定する。   Therefore, the determination unit 22 identifies the value of the short interval flag included in the attack frame AT1. It is assumed that the value of the first bit of the data field of the attack frame AT1 is 0. In this case, since the value of the short interval flag is 0, the attack frame AT1 is transmitted after 100 ms, which is the transmission cycle T, from the transmission of the message M23. The reception time does not match the reception prediction 33. Therefore, the determination unit 22 determines that the attack frame AT1 is a frame used for an attack.

図11は、攻撃検知装置の処理の例を説明するフローチャートである。なお、図11は一例であり、実装に応じて処理の順序が変更されうる。例えば、ステップS15とS16の順序は任意に変更され得る。   FIG. 11 is a flowchart illustrating an example of processing of the attack detection apparatus. Note that FIG. 11 is an example, and the processing order can be changed according to the implementation. For example, the order of steps S15 and S16 can be arbitrarily changed.

送受信部11は、メッセージを受信する(ステップS11)。判定部22は、メッセージの受信時刻を用いて、受信予測33として予期された期間中の受信であるかを判定する(ステップS12)。受信予測33として予期された期間中の受信ではない場合、判定部22は、メッセージの短間隔フラグの値が1に設定されているかを判定する(ステップS12でNo、ステップS13)。メッセージの短間隔フラグの値が1に設定されていない場合、判定部22は、メッセージが攻撃用のフレームであると判定して、メッセージを破棄する(ステップS13でNo、ステップS14)。   The transmission / reception unit 11 receives the message (step S11). The determination unit 22 determines whether the reception is during the period expected as the reception prediction 33 using the reception time of the message (step S12). If the reception is not received during the period expected as the reception prediction 33, the determination unit 22 determines whether the value of the short interval flag of the message is set to 1 (No in step S12, step S13). When the value of the short interval flag of the message is not set to 1, the determination unit 22 determines that the message is an attack frame and discards the message (No in step S13, step S14).

一方、メッセージの短間隔フラグの値が1に設定されている場合、計算部21は、メッセージの受信時刻を用いて、次の周期で受信するメッセージの受信時刻を予測する(ステップS13でYes、ステップS15)。この場合、判定部22は、メッセージを正常受信したと判定する(ステップS16)。なお、ステップS12において、受信予測33として予期された期間中の受信であると判定された場合も、ステップS15とS16の処理が行われる。   On the other hand, when the value of the short interval flag of the message is set to 1, the calculation unit 21 predicts the reception time of the message received in the next cycle using the message reception time (Yes in step S13). Step S15). In this case, the determination unit 22 determines that the message has been normally received (step S16). Even if it is determined in step S12 that the reception is predicted during the period expected as the reception prediction 33, the processes in steps S15 and S16 are performed.

なお、図11は、攻撃検知装置10が行う処理の一例であり、実装に応じて処理は変更されうる。例えば、判定部22は、受信予測33として予期された期間中でのメッセージの受信を検出すると(ステップS12でYes)、受信メッセージ中の短間隔フラグの値が0に設定されているかを判定するように設定されても良い。   FIG. 11 is an example of processing performed by the attack detection apparatus 10, and the processing can be changed according to the implementation. For example, when the determination unit 22 detects reception of a message during the period expected as the reception prediction 33 (Yes in step S12), the determination unit 22 determines whether the value of the short interval flag in the received message is set to 0. It may be set as follows.

このように、第1の実施形態にかかる方法では、攻撃検知装置10は、受信したメッセージが送信装置から周期よりも短い間隔で送信されたメッセージであるかを、短間隔フラグを用いて特定することができる。攻撃検知装置10は、受信予測33として予測した期間中に受信したメッセージか、短間隔フラグによって送信周期よりも短い間隔で送信されたことが確認されたメッセージを用いて、次の周期のメッセージの受信時刻を予測する。このため、第1の実施形態にかかる方法では、周期メッセージの周期の基準となる時刻が非周期メッセージの送信時刻によって変動するシステムと、周期メッセージの周期の基準となる時刻が非周期メッセージによって変動しないシステムのいずれにも適用できる。従って、第1の実施形態により、周期的に送信されるメッセージと、周期ごとには送信されないメッセージの両方が送信されるシステムにおける攻撃検知の精度が向上する。   As described above, in the method according to the first embodiment, the attack detection device 10 specifies whether the received message is a message transmitted from the transmission device at an interval shorter than the cycle by using the short interval flag. be able to. The attack detection device 10 uses the message received during the period predicted as the reception prediction 33 or the message that has been confirmed to be transmitted at an interval shorter than the transmission cycle by the short interval flag. Predict the reception time. For this reason, in the method according to the first embodiment, the time that is the reference of the period of the periodic message varies depending on the transmission time of the aperiodic message, and the time that is the reference of the period of the periodic message varies depending on the aperiodic message. It can be applied to any system that does not. Therefore, according to the first embodiment, the accuracy of attack detection in a system in which both messages that are periodically transmitted and messages that are not transmitted every period are transmitted is improved.

<第2の実施形態>
第2の実施形態では、フレームの送信タイミングが重なったことなどに起因して周期メッセージの送信タイミングなどが変動した場合でも、誤検出を防ぐために、マージンを広く取った場合の処理について説明する。
<Second Embodiment>
In the second embodiment, a description will be given of processing when a margin is widened in order to prevent erroneous detection even when the transmission timing of a periodic message fluctuates due to overlapping transmission timings of frames.

図12は、マージンが適切ではないときに発生する問題の例を説明する図である。ケースC21では、いずれのフレームもID=0x123を含むものとする。ケースC21では、100msの周期で周期メッセージが送信され、マージンは10m秒に設定されているとする。攻撃検知装置10は、1つ目の周期メッセージM31を0msに受信したとする。すると、攻撃検知装置10は、マージンを用いて、周期メッセージM31の受信から90ms〜110msの期間(Z1)に周期メッセージM32を受信すれば、周期メッセージM32が攻撃ではないと判定する。攻撃検知装置10は、2つ目の周期メッセージM32を101msに受信したとする。すると、周期メッセージM31と周期メッセージM32の受信時刻の差は、101msであり、マージンを用いて計算した範囲内であるので、攻撃検知装置10は、周期メッセージM32を攻撃では無いと判定する。攻撃検知装置10は、周期メッセージM32の受信時刻に基づいて、3つ目の周期メッセージを受信する期間を、191ms〜211msの期間(Z2)と予測する。   FIG. 12 is a diagram illustrating an example of a problem that occurs when the margin is not appropriate. In case C21, all the frames include ID = 0x123. In case C21, it is assumed that the periodic message is transmitted at a period of 100 ms and the margin is set to 10 milliseconds. Assume that the attack detection apparatus 10 receives the first periodic message M31 at 0 ms. Then, the attack detection apparatus 10 determines that the periodic message M32 is not an attack if the periodic message M32 is received within a period (Z1) of 90 ms to 110 ms from the reception of the periodic message M31 using the margin. Assume that the attack detection apparatus 10 receives the second periodic message M32 in 101 ms. Then, since the difference between the reception times of the periodic message M31 and the periodic message M32 is 101 ms and is within the range calculated using the margin, the attack detection apparatus 10 determines that the periodic message M32 is not an attack. The attack detection apparatus 10 predicts a period for receiving the third periodic message as a period (Z2) of 191 ms to 211 ms based on the reception time of the periodic message M32.

次に、他のメッセージとの送信との関係で、3つ目の周期メッセージM33が送信されるタイミングが遅れたとする。このため、攻撃検知装置10は、3つ目の周期メッセージM33を240msに受信したとする。この場合、周期メッセージM32と周期メッセージM33の受信時刻の差は139msであり、マージンを用いて計算したときに許容される範囲(Z2)に含まれていない。このため、攻撃検知装置10は、周期メッセージM33を攻撃だと誤検知してしまう。さらに、攻撃検知装置10は、周期メッセージM33の受信時刻を基準として、受信間隔を計算する。ケースC21に示すように、4つ目の周期メッセージを301msに受信すると、攻撃検知装置10は周期メッセージM33と周期メッセージM34の受信時刻の差は61msであり、マージンを用いて計算したときに許容される範囲に含まれないと判定する。このため、攻撃検知装置10は、周期メッセージM34も攻撃だと誤検知してしまう。   Next, it is assumed that the timing at which the third periodic message M33 is transmitted is delayed due to the transmission with other messages. For this reason, it is assumed that the attack detection apparatus 10 receives the third periodic message M33 in 240 ms. In this case, the difference between the reception times of the periodic message M32 and the periodic message M33 is 139 ms, which is not included in the range (Z2) allowed when calculated using the margin. For this reason, the attack detection device 10 erroneously detects the periodic message M33 as an attack. Furthermore, the attack detection apparatus 10 calculates the reception interval with reference to the reception time of the periodic message M33. As shown in case C21, when the fourth periodic message is received at 301 ms, the attack detection apparatus 10 has a difference in reception time between the periodic message M33 and the periodic message M34 of 61 ms, which is acceptable when calculated using a margin. It is determined that it is not included in the range. For this reason, the attack detection device 10 erroneously detects that the periodic message M34 is also an attack.

しかし、マージンを広く取ると、誤検出を防止することはできるが、攻撃を見逃してしまう場合もある。ケースC22では、ID=0x123を含むフレームとして、周期メッセージM41、周期メッセージM42、攻撃用フレームAT2、周期メッセージM43、周期メッセージM44が送信されているとする。攻撃検知装置10において、送信周期は100ms、マージンは40msに設定されており、各フレームは以下のタイミングで受信されているとする。
周期メッセージM41:0ms
周期メッセージM42:101ms
攻撃用フレームAT2:161ms
周期メッセージM43:240ms
周期メッセージM44:301ms
However, a wide margin can prevent false detection, but sometimes misses an attack. In case C22, it is assumed that a periodic message M41, a periodic message M42, an attack frame AT2, a periodic message M43, and a periodic message M44 are transmitted as a frame including ID = 0x123. In the attack detection apparatus 10, it is assumed that the transmission cycle is set to 100 ms, the margin is set to 40 ms, and each frame is received at the following timing.
Periodic message M41: 0 ms
Periodic message M42: 101 ms
Attack frame AT2: 161 ms
Periodic message M43: 240 ms
Periodic message M44: 301 ms

ケースC22では、攻撃検知装置10は、2つのフレームの受信時刻の間が送信周期±マージンの期間内であれば、攻撃が発生していないと判定する。送信周期±マージンは60ms〜140msである。攻撃検知装置10は、周期メッセージM41を受信すると、P11に示す期間を、周期メッセージM42の受信期間として予測する。周期メッセージM42の受信時刻は、周期メッセージM41の受信から101msであり、周期メッセージM41の受信時刻から60ms〜140msが経過した期間(P11)に含まれている。このため、攻撃検知装置10は、攻撃が発生していないと判定する。   In case C22, the attack detection device 10 determines that an attack has not occurred if the interval between the reception times of the two frames is within the transmission cycle ± margin period. The transmission cycle ± margin is 60 ms to 140 ms. Upon receiving the periodic message M41, the attack detection device 10 predicts the period indicated by P11 as the reception period of the periodic message M42. The reception time of the periodic message M42 is 101 ms from the reception of the periodic message M41, and is included in a period (P11) in which 60 ms to 140 ms have elapsed from the reception time of the periodic message M41. For this reason, the attack detection apparatus 10 determines that no attack has occurred.

次に、攻撃検知装置10は、周期メッセージM42の受信時刻から60ms〜140msが経過した期間(P12)を、周期メッセージM43の受信期間として予測する。攻撃検知装置10は、攻撃用フレームAT2を受信すると、周期メッセージM42から60msで攻撃用フレームAT2を受信していることから、P12の期間中にフレームを受信したと判定する。このため、攻撃検知装置10は、攻撃が発生していないと判定する。   Next, the attack detection apparatus 10 predicts a period (P12) in which 60 ms to 140 ms have elapsed from the reception time of the periodic message M42 as the reception period of the periodic message M43. Upon receiving the attack frame AT2, the attack detection apparatus 10 determines that the frame has been received during the period P12 because it has received the attack frame AT2 in 60 ms from the periodic message M42. For this reason, the attack detection apparatus 10 determines that no attack has occurred.

攻撃検知装置10は、攻撃用フレームAT2の受信時刻から60ms〜140msが経過した期間(P13)を、周期メッセージM44の受信期間として予測する。攻撃検知装置10は、周期メッセージM43を受信すると、攻撃用フレームAT2の受信から79msで周期メッセージM43を受信していることから、P13の期間中にフレームを受信したと判定する。このため、攻撃検知装置10は、攻撃が発生していないと判定する。   The attack detection apparatus 10 predicts a period (P13) in which 60 ms to 140 ms have elapsed from the reception time of the attack frame AT2 as the reception period of the periodic message M44. Upon receiving the periodic message M43, the attack detection apparatus 10 determines that it has received a frame during the period P13 because it has received the periodic message M43 in 79 ms from the reception of the attack frame AT2. For this reason, the attack detection apparatus 10 determines that no attack has occurred.

同様に、攻撃検知装置10は、周期メッセージM43の受信時刻から60ms〜140msが経過した期間(P14)を、周期メッセージM45の受信期間として予測する。攻撃検知装置10は、周期メッセージM44を受信すると、周期メッセージM43の受信から61msで周期メッセージM44を受信していることから、P14の期間中にフレームを受信したと判定する。このため、攻撃検知装置10は、攻撃が発生していないと判定する。このように、ケースC22の検出方法では、マージンを広くとっているために、攻撃用フレームAT2による攻撃が起こっていることを見逃してしまう。   Similarly, the attack detection apparatus 10 predicts a period (P14) in which 60 ms to 140 ms have elapsed from the reception time of the periodic message M43 as the reception period of the periodic message M45. When receiving the periodic message M44, the attack detection apparatus 10 determines that it has received the frame during the period P14 because it has received the periodic message M44 in 61 ms from the reception of the periodic message M43. For this reason, the attack detection apparatus 10 determines that no attack has occurred. As described above, in the detection method of the case C22, since the margin is wide, it is overlooked that the attack by the attack frame AT2 is occurring.

そこで、第2の実施形態では、マージンを広くとっても、攻撃に使用されているフレームの見落としを防ぎ、攻撃の誤検出も防止可能な攻撃検知方法について説明する。   Therefore, in the second embodiment, an attack detection method that can prevent an oversight of a frame used for an attack and prevent an erroneous detection of the attack even when a wide margin is provided will be described.

図13は、攻撃検知装置70の構成の例を説明する図である。攻撃検知装置70は、送受信部11、制御部71、記憶部75を有する。制御部71は、計算部72、判定部73、基準更新処理部74を備える。記憶部75は、基準時刻76、受信予測77、送信条件31を保持し、オプションとして、受信状況情報32を保持する。   FIG. 13 is a diagram for explaining an example of the configuration of the attack detection device 70. The attack detection device 70 includes a transmission / reception unit 11, a control unit 71, and a storage unit 75. The control unit 71 includes a calculation unit 72, a determination unit 73, and a reference update processing unit 74. The storage unit 75 stores a reference time 76, a reception prediction 77, and a transmission condition 31, and optionally stores reception status information 32.

基準更新処理部74は、受信予測77の計算の基準となるメッセージを選択する。受信予測77の計算の基準となるメッセージとして、送信周期よりも短い間隔で送信されたメッセージが使用される。さらに、基準更新処理部74は、定期的に基準メッセージを更新することによって誤差の蓄積を解消するために、周期メッセージ中から基準メッセージを選択することもある。基準更新処理部74は、基準メッセージとして選択したメッセージの受信時刻を基準時刻76として記憶部75に格納する。   The reference update processing unit 74 selects a message that is a reference for calculation of the reception prediction 77. As a message serving as a reference for calculation of the reception prediction 77, a message transmitted at an interval shorter than the transmission cycle is used. Further, the reference update processing unit 74 may select a reference message from among periodic messages in order to eliminate error accumulation by periodically updating the reference message. The reference update processing unit 74 stores the reception time of the message selected as the reference message in the storage unit 75 as the reference time 76.

計算部72は、基準時刻76と送信条件31を用いて、IDごとに、複数の周期メッセージの受信予測を計算する。計算部72は、得られた計算結果を受信予測77に格納する。このため、受信予測77もIDごとに生成される。受信予測77の例は後述する。   The calculation unit 72 calculates reception predictions for a plurality of periodic messages for each ID using the reference time 76 and the transmission condition 31. The calculation unit 72 stores the obtained calculation result in the reception prediction 77. For this reason, the reception prediction 77 is also generated for each ID. An example of the reception prediction 77 will be described later.

図14は、第2の実施形態にかかる攻撃検知方法の例を説明する図である。ステップS21において、基準更新処理部74は、周期メッセージから選択されたメッセージか、短間隔フラグ=1のメッセージを、基準メッセージとして選択する。基準メッセージは、同じIDの他のメッセージを受信する期間の予測の基準とされるメッセージである。攻撃検知装置70は、基準メッセージと同じIDで識別される複数のメッセージについて、短間隔フラグ=0に設定されている場合の受信期間を計算し、基準メッセージからの順序に対応付ける(ステップS22)。ステップS22での計算には、基準メッセージに含まれているIDに対応付けられた送信周期と基準メッセージの受信時刻が使用される。   FIG. 14 is a diagram illustrating an example of an attack detection method according to the second embodiment. In step S21, the reference update processing unit 74 selects a message selected from the periodic messages or a message with the short interval flag = 1 as the reference message. The reference message is a message used as a reference for prediction of a period in which another message having the same ID is received. The attack detection device 70 calculates the reception period when the short interval flag = 0 is set for a plurality of messages identified by the same ID as the reference message, and associates them with the order from the reference message (step S22). For the calculation in step S22, the transmission cycle associated with the ID included in the reference message and the reception time of the reference message are used.

その後、送受信部11は、基準メッセージと同じIDを有するn番目のメッセージを受信する(ステップS23)。判定部73は、n番目のメッセージの短間隔フラグが1に設定されているかを判定する(ステップS24)。n番目のメッセージの短間隔フラグが1に設定されている場合、基準更新処理部74は、n番目のメッセージを新たな基準メッセージに設定して、ステップS22に戻る(ステップS24でYes、ステップS25)。n番目のメッセージの短間隔フラグが1に設定されていない場合、判定部73は、n番目のメッセージの受信時刻は、n番目の周期メッセージの受信期間として予測された期間中であるかを判定する(ステップS24でNo、ステップS26)。n番目のメッセージの受信時刻が、n番目の周期メッセージの受信期間として予測された期間中に含まれていない場合、判定部73は、攻撃を検出したと判定する(ステップS26でNo、ステップS27)。   Thereafter, the transmission / reception unit 11 receives the nth message having the same ID as the reference message (step S23). The determination unit 73 determines whether or not the short interval flag of the nth message is set to 1 (step S24). When the short interval flag of the nth message is set to 1, the reference update processing unit 74 sets the nth message as a new reference message, and returns to step S22 (Yes in step S24, step S25). ). When the short interval flag of the nth message is not set to 1, the determination unit 73 determines whether the reception time of the nth message is within the period predicted as the reception period of the nth periodic message. (No in step S24, step S26). If the reception time of the nth message is not included in the period predicted as the reception period of the nth periodic message, the determination unit 73 determines that an attack has been detected (No in step S26, step S27). ).

一方、n番目のメッセージの受信時刻がn番目の周期メッセージの受信期間として予測された期間中である場合、判定部73は、攻撃を検出していないと判定し、処理を終了する(ステップS26でYes)。   On the other hand, when the reception time of the nth message is within the period predicted as the reception period of the nth periodic message, the determination unit 73 determines that no attack has been detected and ends the process (step S26). Yes).

図14には、図12と同様にメッセージM41〜M43と攻撃用フレームAT2が送信されたケースを示す。ここで、基準更新処理部74は、メッセージM41を基準メッセージに選択したとする。すると、計算部72は、メッセージM41の受信時刻(0ms)と送信周期(100ms)、マージンを用いて、複数のメッセージについて、各メッセージが短間隔フラグ=0の場合の受信期間を計算する。例えば、メッセージM41から1番目のメッセージは、短間隔フラグ=0の場合に矢印P21に示す期間での受信が予想される。同様に、メッセージM41から2番目の短間隔フラグ=0のメッセージは、矢印P22に示す期間での受信が予想され、メッセージM41から3番目の短間隔フラグ=0のメッセージは、矢印P23に示す期間での受信が予想される。   FIG. 14 shows a case where the messages M41 to M43 and the attack frame AT2 are transmitted as in FIG. Here, it is assumed that the reference update processing unit 74 selects the message M41 as the reference message. Then, the calculation unit 72 calculates the reception period when each message has a short interval flag = 0 for a plurality of messages using the reception time (0 ms) of the message M41, the transmission cycle (100 ms), and the margin. For example, the first message from the message M41 is expected to be received in the period indicated by the arrow P21 when the short interval flag = 0. Similarly, the second short interval flag = 0 message from the message M41 is expected to be received in the period indicated by the arrow P22, and the third short interval flag = 0 message from the message M41 is the period indicated by the arrow P23. Reception is expected at

その後、送受信部11は、メッセージM42を受信したとする。判定部73は、メッセージM42を基準メッセージM41から1番目のメッセージとして扱う。判定部73は、メッセージM42が矢印P21の期間中に受信されているので、攻撃を検出しない。次に、送受信部11は攻撃用フレームAT2を受信したとする。判定部73は、攻撃用フレームAT2を基準メッセージM41から2番目のメッセージとして扱う。判定部73は、攻撃用フレームAT2が矢印P22の期間中に受信されているので、この時点では攻撃を検出しない。さらに、送受信部11はメッセージM43を受信したとする。判定部73は、メッセージM43を基準メッセージM41から3番目のメッセージとして扱う。判定部73は、メッセージM43が矢印P23の期間中に受信されていないので、攻撃を検出する。   Thereafter, it is assumed that the transmission / reception unit 11 receives the message M42. The determination unit 73 treats the message M42 as the first message from the reference message M41. The determination unit 73 does not detect an attack because the message M42 is received during the period indicated by the arrow P21. Next, it is assumed that the transmission / reception unit 11 receives the attack frame AT2. The determination unit 73 treats the attack frame AT2 as the second message from the reference message M41. Since the attacking frame AT2 is received during the period indicated by the arrow P22, the determination unit 73 does not detect an attack at this time. Furthermore, it is assumed that the transmission / reception unit 11 receives the message M43. The determination unit 73 treats the message M43 as the third message from the reference message M41. The determination unit 73 detects an attack because the message M43 has not been received during the period indicated by the arrow P23.

このように、実施形態にかかる方法では、基準とするメッセージから複数周期分後のメッセージの受信期間を予測すると共に、予測した受信期間が基準メッセージから何番目のメッセージであるかを考慮して攻撃の有無を判定する。このため、メッセージの遅延に対応するためにマージンを広く取っていても、攻撃を検出できる。   As described above, in the method according to the embodiment, a message reception period after a plurality of cycles is predicted from a reference message, and an attack is performed in consideration of the numbered message from the reference message. The presence or absence of is determined. For this reason, it is possible to detect an attack even if a wide margin is provided to cope with the delay of the message.

以下、攻撃検知装置70が保持する情報の具体例を用いて、攻撃検知装置70の処理の例を詳しく説明する。   Hereinafter, an example of processing of the attack detection device 70 will be described in detail using a specific example of information held by the attack detection device 70.

図15は、攻撃検知装置70が保持する情報の例を説明する図である。
攻撃検知装置70は、予め、送信条件31を記憶している。送信条件31は、攻撃検知装置10が保持する送信条件31と同様であり、受信対象の周期メッセージに含まれるID、送信周期、マージン、短間隔フラグの位置を含む。図15中の送信条件31には、ID=0x123の周期メッセージが100m秒周期で送信されることと、ID=0x123の周期メッセージについての受信期間の予測には、40m秒のマージンが使用されることが示されている。さらに、ID=0x123を有するメッセージでは、データフィールドの先頭ビットが短間隔フラグとして使用されることも送信条件31に含まれている。
FIG. 15 is a diagram illustrating an example of information held by the attack detection device 70.
The attack detection device 70 stores the transmission condition 31 in advance. The transmission condition 31 is the same as the transmission condition 31 held by the attack detection apparatus 10 and includes the ID, transmission period, margin, and position of the short interval flag included in the periodic message to be received. The transmission condition 31 in FIG. 15 uses a margin of 40 ms for transmitting a periodic message with ID = 0x123 at a period of 100 ms and for predicting a reception period for a periodic message with ID = 0x123. It has been shown. Further, in the message having ID = 0x123, the transmission condition 31 also includes that the first bit of the data field is used as the short interval flag.

基準時刻76は、基準メッセージとして選択されたメッセージの受信時刻を、基準メッセージに含まれているIDと対応付けて記録する。基準メッセージは、送信周期で送信されたメッセージのうちで受信期間の計算の基準点とするメッセージとして基準更新処理部74で選択されたメッセージと、送信周期よりも短い間隔で送信されたメッセージのうち、後に受信されたメッセージである。   The reference time 76 records the reception time of the message selected as the reference message in association with the ID included in the reference message. The reference message includes a message selected by the reference update processing unit 74 as a message to be used as a reference point for calculation of a reception period among messages transmitted at a transmission cycle, and a message transmitted at an interval shorter than the transmission cycle. , A message received later.

計算部72は、基準時刻76が更新されると、送信条件31に記録されている送信周期とマージンを用いて、IDごとに、受信予測77を生成する。図15には、ID=0x123の周期メッセージについて生成された受信予測77の例を示す。基準メッセージが50msに受信されているので、基準メッセージを0番目のメッセージとすると、基準メッセージからn番目に受信する周期メッセージを受信可能な期間(受信期間)は、50ms+100ms×n±40msとなる。従って、基準メッセージの次に受信するID=0x123の周期メッセージの受信期間は、110ms〜190msとなる。同様に、基準メッセージから2番目の周期メッセージの受信期間は210ms〜290ms、基準メッセージから3番目の周期メッセージの受信期間は310ms〜390msとなる。計算部72は、各周期メッセージについて基準メッセージを0番目のメッセージとしたときの基準メッセージからの受信順序と、受信期間を対応付けて、受信予測77に記録する。   When the reference time 76 is updated, the calculation unit 72 generates a reception prediction 77 for each ID using the transmission cycle and the margin recorded in the transmission condition 31. FIG. 15 shows an example of the reception prediction 77 generated for the periodic message with ID = 0x123. Since the reference message is received at 50 ms, assuming that the reference message is the 0th message, the period (reception period) during which the nth periodic message received from the reference message can be received is 50 ms + 100 ms × n ± 40 ms. Therefore, the reception period of the periodic message with ID = 0x123 received after the reference message is 110 ms to 190 ms. Similarly, the reception period of the second periodic message from the reference message is 210 ms to 290 ms, and the reception period of the third periodic message from the reference message is 310 ms to 390 ms. The calculation unit 72 records the reception order in the reception prediction 77 in association with the reception order from the reference message when the reference message is the 0th message for each periodic message.

図16は、第2の実施形態にかかる攻撃検知方法の例を説明する図である。以下、攻撃検知装置70が図15に示す情報を保持している場合を例として説明する。なお、図16では、短間隔フラグ=0に設定されているフレームを黒い三角(▼)で表わし、短間隔フラグ=1に設定されているフレームを白い三角(▽)で表わす。さらに、基準更新処理部74は、短間隔フラグ=1のメッセージの受信時のほかに、基準メッセージを変更しない状態で短間隔フラグ=0のメッセージを10個受信すると、基準メッセージを変更するように設定されているとする。   FIG. 16 is a diagram illustrating an example of an attack detection method according to the second embodiment. Hereinafter, the case where the attack detection apparatus 70 holds the information illustrated in FIG. 15 will be described as an example. In FIG. 16, a frame in which the short interval flag = 0 is represented by a black triangle (▼), and a frame in which the short interval flag = 1 is represented by a white triangle (▽). Further, the reference update processing unit 74 changes the reference message when receiving 10 messages with the short interval flag = 0 without changing the reference message in addition to the reception of the message with the short interval flag = 1. Suppose that it is set.

ケースC31は、攻撃検知装置70が50msにメッセージM51を受信し、メッセージM51が基準メッセージに選択された場合の例である。制御部71は、メッセージM51を基準にしたときの短間隔フラグ=0のメッセージの受信期間を、図15を参照しながら説明した手順で計算し、受信予測77として格納したとする。ケースC31には、メッセージM51から1〜3番目のメッセージについての受信期間の計算値を示す。矢印P52はメッセージM51から1番目のメッセージの受信期間、矢印P53はメッセージM51から2番目のメッセージの受信期間、矢印P53はメッセージM51から3番目のメッセージの受信期間である。   Case C31 is an example in which the attack detection device 70 receives the message M51 in 50 ms and the message M51 is selected as the reference message. It is assumed that the control unit 71 calculates the reception period of the message with the short interval flag = 0 when the message M51 is used as a reference in the procedure described with reference to FIG. Case C31 shows the calculated value of the reception period for the first to third messages from message M51. An arrow P52 is a reception period of the first message from the message M51, an arrow P53 is a reception period of the second message from the message M51, and an arrow P53 is a reception period of the third message from the message M51.

その後、送受信部11が148msにメッセージM52を受信したとする。判定部73は、メッセージM52の短間隔フラグが0に設定されていることを特定すると、予測された期間中にメッセージM52を受信しているかを判定する。判定部73は、メッセージM52の受信時刻が148msであることと、メッセージM51から1番目の短間隔フラグ=0のメッセージの受信期間が110ms〜190msであることから、予測された期間中にメッセージM52を受信したと判定する。すると、判定部73は、攻撃を検出しない。メッセージM52はメッセージM51から1番目の短間隔フラグ=0のメッセージであるため、計算部72は、メッセージM52以降のメッセージの受信期間を更新しない。   Thereafter, it is assumed that the transmission / reception unit 11 receives the message M52 at 148 ms. When determining that the short interval flag of the message M52 is set to 0, the determination unit 73 determines whether the message M52 is received during the predicted period. Since the reception time of the message M52 is 148 ms and the reception period of the message with the first short interval flag = 0 from the message M51 is 110 ms to 190 ms, the determination unit 73 determines that the message M52 is received during the predicted period. Is determined to have been received. Then, the determination unit 73 does not detect an attack. Since the message M52 is a message with the first short interval flag = 0 from the message M51, the calculation unit 72 does not update the reception period of messages after the message M52.

ケースC32において、送受信部11は、200msにメッセージM53を受信する。判定部73は、メッセージM53の短間隔フラグが1に設定されていることを特定する。すると、基準更新処理部74は、メッセージM53を新たな基準メッセージとすると共に、メッセージM51を基準として計算した受信期間を破棄する。このため、ケースC32に点線の矢印で示すように、ケースC31の時点でメッセージM51を基準として計算された矢印P53やP54の受信期間は破棄される。基準更新処理部74は、メッセージM53の受信時刻を基準時刻76に設定する。計算部72は、基準時刻76が更新されたので、メッセージM53を基準として計算した受信期間で受信予測77を更新する。メッセージM53の受信時刻が200msであるので、送信条件31(図15)より、計算部72は、メッセージM53から1番目に受信する短間隔フラグ=0のメッセージの受信期間を、200ms+1×100ms±40ms=260ms〜340msとする。計算部72は、同様の処理により、後続のメッセージについても受信期間を計算する。メッセージM53を新たな基準メッセージとして計算した受信期間の例を、矢印P53aに示す。   In Case C32, the transmission / reception unit 11 receives the message M53 at 200 ms. The determination unit 73 specifies that the short interval flag of the message M53 is set to 1. Then, the reference update processing unit 74 sets the message M53 as a new reference message and discards the reception period calculated based on the message M51. For this reason, as indicated by a dotted arrow in case C32, the reception period of arrows P53 and P54 calculated based on the message M51 at the time of case C31 is discarded. The reference update processing unit 74 sets the reception time of the message M53 to the reference time 76. Since the reference time 76 has been updated, the calculation unit 72 updates the reception prediction 77 in the reception period calculated using the message M53 as a reference. Since the reception time of the message M53 is 200 ms, from the transmission condition 31 (FIG. 15), the calculation unit 72 sets the reception period of the message with the short interval flag = 0 received first from the message M53 to 200 ms + 1 × 100 ms ± 40 ms. = 260 ms to 340 ms. The calculation unit 72 calculates the reception period for subsequent messages by the same process. An example of a reception period in which the message M53 is calculated as a new reference message is indicated by an arrow P53a.

ケースC33において、送受信部11は、250msに攻撃用フレームAT3を受信したとする。判定部73は、攻撃用フレームAT3の短間隔フラグが0に設定されていることを特定すると、予測された期間中に攻撃用フレームAT3を受信しているかを判定する。判定部73は、攻撃用フレームAT3を基準メッセージM53から1番目のメッセージとして扱う。判定部73は、攻撃用フレームAT3の受信時刻が250msであることと、メッセージM53から1番目の短間隔フラグ=0のメッセージの受信期間が260ms〜340msであることから、予測された期間中に攻撃用フレームAT3を受信していないと判定する。すると、判定部73は、攻撃を検出したと判定する。   In case C33, it is assumed that the transmission / reception unit 11 receives the attack frame AT3 at 250 ms. When determining that the short interval flag of the attack frame AT3 is set to 0, the determination unit 73 determines whether the attack frame AT3 is received during the predicted period. The determination unit 73 treats the attack frame AT3 as the first message from the reference message M53. Since the reception time of the attack frame AT3 is 250 ms and the reception period of the message with the first short interval flag = 0 from the message M53 is 260 ms to 340 ms, the determination unit 73 is within the predicted period. It is determined that the attack frame AT3 is not received. Then, the determination unit 73 determines that an attack has been detected.

図17は、攻撃検知装置70の処理の例を説明するフローチャートである。図17では、基準メッセージを変更せずに処理しているメッセージの数の計数を行うために、変数kを用いる。   FIG. 17 is a flowchart for explaining an example of processing of the attack detection device 70. In FIG. 17, the variable k is used to count the number of messages being processed without changing the reference message.

計算部72は、送信周期T、マージンM、予測回数nを取得する(ステップS31)。このとき、計算部72は、送信周期TとマージンMを送信条件31から読み出す。予測回数nは、基準メッセージを変更しない状況で、判定処理を行う短間隔フラグ=0のメッセージの最大数である。その後、送受信部11は、メッセージを受信する。基準更新処理部74は、攻撃検知装置70が起動された後にメッセージを受信すると、最初に受信したメッセージを基準メッセージとし、メッセージの受信時刻をt0に設定する(ステップS32)。   The calculation unit 72 acquires the transmission cycle T, the margin M, and the predicted number of times n (step S31). At this time, the calculation unit 72 reads the transmission cycle T and the margin M from the transmission condition 31. The predicted number of times n is the maximum number of messages with the short interval flag = 0 for performing the determination process in a situation where the reference message is not changed. Thereafter, the transmission / reception unit 11 receives the message. When receiving the message after the attack detection device 70 is activated, the reference update processing unit 74 sets the first received message as the reference message and sets the message reception time to t0 (step S32).

ステップS33において、計算部72は、受信時刻t0とステップS31で取得した情報を用いて、n個分のメッセージが全て送信周期どおりに送信された場合の受信期間を計算する。このとき、x番目のメッセージの受信期間は、r(x)=t0+xT±Mとして計算される。さらに、基準更新処理部74は、変数kを1に設定する。   In step S33, the calculation unit 72 calculates a reception period when all n messages are transmitted according to the transmission cycle, using the reception time t0 and the information acquired in step S31. At this time, the reception period of the xth message is calculated as r (x) = t0 + xT ± M. Further, the reference update processing unit 74 sets the variable k to 1.

送受信部11は、さらにメッセージを受信する。判定部73は、メッセージの受信時刻をt(k)とする(ステップS34)。判定部73は、受信メッセージの短間隔フラグが1に設定されているかを判定する(ステップS35)。受信メッセージの短間隔フラグが1に設定されていない場合、受信メッセージは送信周期に沿って送信されているので、判定部73は、t(k)がr(k)の範囲内に含まれるかを判定する(ステップS35でNo、ステップS36)。t(k)がr(k)の範囲内に含まれていない場合、判定部73は、攻撃を検知する(ステップS36でNo、ステップS40)。   The transmission / reception unit 11 further receives a message. The determination unit 73 sets the message reception time to t (k) (step S34). The determination unit 73 determines whether or not the short interval flag of the received message is set to 1 (step S35). When the short interval flag of the received message is not set to 1, since the received message is transmitted along the transmission cycle, the determination unit 73 determines whether t (k) is included in the range of r (k). (No in step S35, step S36). When t (k) is not included in the range of r (k), the determination unit 73 detects an attack (No in step S36, step S40).

一方、t(k)がr(k)の範囲内に含まれている場合、基準更新処理部74は、変数kが予測回数nと等しいかを判定する(ステップS36でYes、ステップS37)。変数kが予測回数nより小さい間は、変数kは予測回数nと等しくない(ステップS37でNo)。この場合、基準更新処理部74は、変数kを1つインクリメントし、ステップS34に戻る(ステップS38)。ステップS34以降の処理が繰り返されることにより、変数kが予測回数nと等しくなると、基準更新処理部74は、基準メッセージを受信メッセージで更新し、受信時刻t(k)を基準メッセージの受信時刻t(0)に設定する(ステップS37でYes、ステップS39)。このとき、基準更新処理部74は、基準時刻76を更新する。すると、ステップS33の処理が行われる。すなわち、計算部72は、更新後の基準時刻76を用いて、新たな基準メッセージからn個先のメッセージまでが送信周期で送信された場合の受信期間を計算する。また、基準更新処理部74は、変数kを1に更新する。   On the other hand, when t (k) is included in the range of r (k), the reference update processing unit 74 determines whether the variable k is equal to the prediction count n (Yes in step S36, step S37). While the variable k is smaller than the prediction number n, the variable k is not equal to the prediction number n (No in step S37). In this case, the reference update processing unit 74 increments the variable k by 1, and returns to step S34 (step S38). When the process after step S34 is repeated and the variable k becomes equal to the predicted number n, the reference update processing unit 74 updates the reference message with the received message, and sets the reception time t (k) to the reception time t of the reference message. Set to (0) (Yes in step S37, step S39). At this time, the reference update processing unit 74 updates the reference time 76. Then, the process of step S33 is performed. That is, the calculation unit 72 uses the updated reference time 76 to calculate a reception period when a new reference message to n-th message is transmitted in the transmission cycle. In addition, the reference update processing unit 74 updates the variable k to 1.

受信メッセージの短間隔フラグが1に設定されている場合、基準更新処理部74は、基準メッセージを受信メッセージで更新し、受信時刻t(k)を基準メッセージの受信時刻t(0)に設定する(ステップS35でYes、ステップS39)。その後、ステップS33以降の処理が行われる。   When the short interval flag of the received message is set to 1, the reference update processing unit 74 updates the reference message with the received message, and sets the reception time t (k) to the reception time t (0) of the reference message. (Yes in step S35, step S39). Thereafter, the processing after step S33 is performed.

図18は、第2の実施形態の変形例での、攻撃検知装置70の処理の例を説明するフローチャートである。図18では、メッセージの受信時刻が受信期間に含まれているかの判定を、短間隔フラグの値の判定の前に行っている。   FIG. 18 is a flowchart for explaining an example of processing of the attack detection device 70 in a modification of the second embodiment. In FIG. 18, the determination whether the reception time of the message is included in the reception period is performed before the determination of the value of the short interval flag.

ステップS41〜S44の処理は、図17を参照しながら説明したステップS31〜S34と同様である。ステップS45において、判定部73は、t(k)がr(k)の範囲内に含まれるかを判定する。t(k)がr(k)の範囲内に含まれていない場合、判定部73は、受信メッセージの短間隔フラグが1に設定されているかを判定する(ステップS45でNo、ステップS49)。受信メッセージの短間隔フラグが1に設定されていない場合、判定部73は、攻撃を検知する(ステップS49でNo、ステップS51)。   The processing of steps S41 to S44 is the same as steps S31 to S34 described with reference to FIG. In step S45, the determination unit 73 determines whether t (k) is included in the range of r (k). When t (k) is not included in the range of r (k), the determination unit 73 determines whether the short interval flag of the received message is set to 1 (No in step S45, step S49). When the short interval flag of the received message is not set to 1, the determination unit 73 detects an attack (No in step S49, step S51).

一方、受信メッセージの短間隔フラグが1に設定されている場合、判定部73は、基準メッセージを受信メッセージで更新し、受信時刻t(k)を基準メッセージの受信時刻t(0)に設定する(ステップS49でYes、ステップS50)。このとき、基準更新処理部74は、基準時刻76を更新する。すると、ステップS43以降の処理が行われる。   On the other hand, when the short interval flag of the received message is set to 1, the determination unit 73 updates the reference message with the received message, and sets the reception time t (k) to the reception time t (0) of the reference message. (Yes in step S49, step S50). At this time, the reference update processing unit 74 updates the reference time 76. Then, the process after step S43 is performed.

ステップS45において、t(k)がr(k)の範囲内に含まれていると判定した場合も、判定部73は、受信メッセージの短間隔フラグが1に設定されているかを判定する(ステップS45でYes、ステップS46)。受信メッセージの短間隔フラグが1に設定されている場合、判定部73は、基準メッセージを受信メッセージで更新し、受信時刻t(k)を基準メッセージの受信時刻t(0)に設定する(ステップS46でYes、ステップS50)。   Even when it is determined in step S45 that t (k) is included in the range of r (k), the determination unit 73 determines whether the short interval flag of the received message is set to 1 (step S45). Yes in S45, step S46). When the short interval flag of the received message is set to 1, the determination unit 73 updates the reference message with the received message, and sets the reception time t (k) to the reception time t (0) of the reference message (step) Yes in S46, step S50).

t(k)がr(k)の範囲内に含まれていると判定され、さらに、受信メッセージの短間隔フラグが1に設定されていないと判定されると、基準更新処理部74は、変数kが予測回数nと等しいかを判定する(ステップS46でNo、ステップS47)。変数kが予測回数nより小さい間は、変数kは予測回数nと等しくない(ステップS47でNo)。この場合、基準更新処理部74は、変数kを1つインクリメントし、ステップS44に戻る(ステップS48)。ステップS44以降の処理が繰り返されることにより、変数kが予測回数nと等しくなると、基準更新処理部74は、基準メッセージを受信メッセージで更新し、受信時刻t(k)を基準メッセージの受信時刻t(0)に設定する(ステップS47でYes、ステップS50)。ステップS50の処理の後で、ステップS43以降の処理が行われる。   If it is determined that t (k) is included in the range of r (k), and further, it is determined that the short interval flag of the received message is not set to 1, the reference update processing unit 74 determines that the variable It is determined whether k is equal to the predicted number n (No in step S46, step S47). While the variable k is smaller than the prediction number n, the variable k is not equal to the prediction number n (No in step S47). In this case, the reference update processing unit 74 increments the variable k by 1, and returns to step S44 (step S48). When the process after step S44 is repeated and the variable k becomes equal to the predicted number n, the reference update processing unit 74 updates the reference message with the received message, and sets the reception time t (k) to the reception time t of the reference message. It is set to (0) (Yes in step S47, step S50). After the process of step S50, the process after step S43 is performed.

このように、第2の実施形態にかかる方法でも、第1の実施形態と同様に、攻撃検知装置70は、送信装置から周期よりも短い間隔で送信されたメッセージであるかを、短間隔フラグを用いて特定することができる。さらに、攻撃検知装置70は、予測した受信期間中に受信したメッセージから選択されたメッセージか、送信周期よりも短い間隔で送信されたことが確認されたメッセージを用いて、次の周期のメッセージの受信時刻を予測する。このため、第2の実施形態にかかる方法も、周期メッセージの周期の基準となる時刻が非周期メッセージの送信時刻によって変動するシステムと、周期メッセージの周期の基準となる時刻が非周期メッセージによって変動しないシステムのいずれにも適用できる。   As described above, also in the method according to the second embodiment, the attack detection device 70 determines whether the message is transmitted from the transmission device at an interval shorter than the cycle, as in the first embodiment. Can be specified. Furthermore, the attack detection device 70 uses a message selected from messages received during the predicted reception period or a message that has been confirmed to be transmitted at an interval shorter than the transmission period, and Predict the reception time. For this reason, the method according to the second embodiment also has a system in which the time that is the reference of the periodic message period varies depending on the transmission time of the non-periodic message, and the time that is the reference of the periodic message period varies depending on the non-periodic message. It can be applied to any system that does not.

さらに、第2の実施形態では、マージンを広く取ることで誤検出を防止する。このときに、攻撃検知装置70は、基準とするメッセージから複数周期分後のメッセージの受信期間を予測すると共に、予測した受信期間が基準メッセージから何番目のメッセージであるかを考慮して攻撃の有無を判定することで、攻撃の見逃しを防止できる。従って、第2の実施形態により、周期的に送信されるデータフレームと、周期ごとには送信されないデータフレームの両方が送信されるシステムにおける攻撃検知の精度が向上する。   Furthermore, in the second embodiment, erroneous detection is prevented by taking a wide margin. At this time, the attack detection device 70 predicts the message reception period after a plurality of cycles from the reference message, and considers the number of messages from the reference message in consideration of the estimated reception period. By determining the presence or absence, it is possible to prevent an attack from being overlooked. Therefore, according to the second embodiment, the accuracy of attack detection in a system in which both data frames that are periodically transmitted and data frames that are not transmitted every period are transmitted is improved.

<その他>
なお、実施形態は上記に限られるものではなく、様々に変形可能である。以下にその例をいくつか述べる。
<Others>
The embodiment is not limited to the above, and can be variously modified. Some examples are described below.

以上の説明では、データの先頭ビットの値が使用される場合を例として説明したが、短間隔フラグとして使用される情報の位置は、データフィールドの任意の位置である。また、短間隔フラグとして複数のビットが使用されても良い。この場合、送信周期よりも短い間隔でフレームを送信する際に、送信装置40は、短間隔フラグとして使用する領域の値をインクリメントしてもよい。同様に、送信装置40は、送信周期よりも短い間隔でフレームを送信する際に、短間隔フラグとして使用する領域の値をデクリメントしてもよい。また、送信周期よりも短い間隔でフレームを送信する際に、送信装置40は、短間隔フラグとして使用する領域の値を変化させても良い。この場合、送信装置40は、送信周期と同じ間隔でフレームを送信する際に、短間隔フラグとして使用する領域の値が変化しないように設定する。攻撃検知装置10中の判定部22や判定部73は、前に受信したメッセージ中の短間隔フラグの値を記憶しており、新たに受信したメッセージ中の短間隔フラグの値と比較することで、新たに受信したメッセージが送信周期に沿って送信されたかを判定する。   In the above description, the case where the value of the first bit of the data is used has been described as an example, but the position of the information used as the short interval flag is an arbitrary position of the data field. A plurality of bits may be used as the short interval flag. In this case, when transmitting frames at intervals shorter than the transmission cycle, the transmission device 40 may increment the value of the area used as the short interval flag. Similarly, the transmission device 40 may decrement the value of the area used as the short interval flag when transmitting frames at intervals shorter than the transmission cycle. In addition, when transmitting frames at intervals shorter than the transmission cycle, the transmission device 40 may change the value of the area used as the short interval flag. In this case, when transmitting frames at the same interval as the transmission cycle, the transmission device 40 is set so that the value of the area used as the short interval flag does not change. The determination unit 22 or the determination unit 73 in the attack detection device 10 stores the value of the short interval flag in the previously received message, and compares it with the value of the short interval flag in the newly received message. Then, it is determined whether or not the newly received message is transmitted along the transmission cycle.

さらに、判定部73は、予め対応付けられている他のIDにおいて、周期が変動したことを短間隔フラグとして用いても良い。例えば、常にID=0x110の一定時間後にID=0x123のメッセージを受信する性質がある場合、ID=0x110の受信後に一定時間後±マージンの範囲外で0x123のメッセージを受信した場合に、短間隔であると判断しても良い。例えば、ID=0x110でのメッセージの送信周期を判定部73がモニタしているとする。この場合、判定部73は、ID=0x110でのメッセージの送信周期の変動が発生した直後に受信したID=0x123でのメッセージは、送信周期よりも短い周期で送信されていると判定しても良い。また、ID=0x110でのメッセージのデータ中の特定の領域が短間隔フラグとして用いられ、ID=0x110で短間隔フラグ=1と設定された場合に、判定部73は、ID=0x123でのメッセージは、送信周期よりも短い周期で送信されていると判定しても良い。   Furthermore, the determination unit 73 may use the fact that the cycle has changed in other IDs associated in advance as a short interval flag. For example, when there is a property of always receiving a message with ID = 0x123 after a certain time of ID = 0x110, when receiving a message with 0x123 outside the range of ± margin after a certain time after receiving ID = 0x110, at short intervals. You may judge that there is. For example, it is assumed that the determination unit 73 monitors the transmission cycle of a message with ID = 0x110. In this case, the determination unit 73 determines that the message with ID = 0x123 received immediately after the fluctuation of the transmission cycle of the message with ID = 0x110 is transmitted with a cycle shorter than the transmission cycle. good. In addition, when a specific area in the data of the message with ID = 0x110 is used as the short interval flag and the short interval flag = 1 is set with ID = 0x110, the determination unit 73 sets the message with ID = 0x123. May be determined to be transmitted in a cycle shorter than the transmission cycle.

また、判定部73は、CANネットワークが搭載されている車両などの状態や、CANネットワークと外部の装置との間の接続状態を、短間隔フラグの代用として用いても良い。   Further, the determination unit 73 may use the state of a vehicle or the like on which the CAN network is mounted, or the connection state between the CAN network and an external device as a substitute for the short interval flag.

これらの条件を複数同時に用いても良い。このとき、複数の性質のAND条件でも良いし、OR条件でもよい。   A plurality of these conditions may be used simultaneously. At this time, an AND condition having a plurality of properties or an OR condition may be used.

以上の説明では、攻撃検知装置(10、70)と送信装置40が異なる装置である場合を例として説明したが、1つの装置があるIDに対しては攻撃検知装置10、70として動作し、他のIDに対しては送信装置40として動作しても良い。この場合、攻撃検知とメッセージの送信の両方を行う装置は、攻撃検知装置10と送信装置40の両方として動作するので、送受信部11、制御部20、記憶部30、制御部50、記憶部60を備える。また、攻撃検知装置70としての処理と送信装置40の両方として動作する装置は、送受信部11、制御部71、記憶部75、制御部50、記憶部60を備える。また、本発明で開示した手法はCAN−FD(CAN with Flexible Data Rate)と呼ばれる拡張仕様にも適用可能である。   In the above description, the case where the attack detection device (10, 70) and the transmission device 40 are different devices has been described as an example. However, for one ID, the device operates as the attack detection device 10, 70. For other IDs, the transmitter 40 may operate. In this case, since the device that performs both attack detection and message transmission operates as both the attack detection device 10 and the transmission device 40, the transmission / reception unit 11, the control unit 20, the storage unit 30, the control unit 50, and the storage unit 60. Is provided. The device that operates as both the processing as the attack detection device 70 and the transmission device 40 includes a transmission / reception unit 11, a control unit 71, a storage unit 75, a control unit 50, and a storage unit 60. The technique disclosed in the present invention can also be applied to an extended specification called CAN-FD (CAN with Flexible Data Rate).

上述の第1および第2の実施形態を含む実施形態に関し、以下の付記を開示する。
(付記1)
ネットワーク中の通信装置からメッセージを受信する送受信部と、
周期的に送信される周期メッセージの第1のメッセージの受信時刻を用いて、前記第1のメッセージ以降に受信する周期メッセージの受信期間を計算する計算部
を備え、
前記送信周期より短い送信間隔で送信されたことを表わす情報に対応付けられた第2のメッセージを、前記送受信部が前記第1のメッセージの受信後の前記受信期間外に受信すると、前記計算部は、前記第2のメッセージの受信時刻と前記送信周期を用いて前記第2のメッセージ以降に受信する周期メッセージの受信期間を更新する
ことを特徴とする攻撃検知装置。
(付記2)
前記ネットワークに対する攻撃が発生したかを判定する判定部
をさらに備え、
前記通信装置から送信されるメッセージ中のデータは、当該メッセージが前記送信周期より短い送信間隔で送信されたかを表わすフラグを含み、
前記判定部は、前記送信周期と同じ送信間隔で送信されたことを表すフラグを有するメッセージの受信時刻が前記受信期間に含まれない場合、前記ネットワークに対する攻撃が発生したと判定する
ことを特徴とする付記1に記載の攻撃検知装置。
(付記3)
前記受信期間を記憶する記憶部
をさらに備え、
前記計算部は、前記第2のメッセージを基準として、前記第2のメッセージの後に送信される複数の周期メッセージの受信期間を計算し、
前記記憶部は、前記第2のメッセージの後に送信される前記複数の周期メッセージのそれぞれに対応する前記受信期間を記憶し、
前記判定部は、前記第2のメッセージの後に送信される前記周期メッセージの受信時刻が、対応付けられた受信期間に含まれない場合、前記ネットワークに対する攻撃を検出したと判定する
ことを特徴とする付記2に記載の攻撃検知装置。
(付記4)
ネットワーク中の通信装置からメッセージを受信し、
周期的に送信される周期メッセージの第1のメッセージの受信時刻を用いて、前記第1のメッセージ以降に受信する周期メッセージの受信期間を計算し、
前記送信周期より短い送信間隔で送信されたことを表わす情報に対応付けられた第2のメッセージを、前記第1のメッセージの受信後の前記受信期間外に受信すると、前記第2のメッセージの受信時刻と前記送信周期を用いて、前記第2のメッセージ以降に受信する周期メッセージの受信期間を更新する
処理を攻撃検知装置が行うことを特徴とする攻撃検知方法。
(付記5)
前記通信装置から送信されるメッセージ中のデータは、当該メッセージが前記送信周期より短い送信間隔で送信されたかを表わすフラグを含み、
前記攻撃検知装置は、前記送信周期と同じ送信間隔で送信されたことを表すフラグを有するメッセージの受信時刻が前記受信期間に含まれない場合、前記ネットワークに対する攻撃が発生したと判定する
ことを特徴とする付記4に記載の攻撃検知方法。
(付記6)
前記攻撃検知装置は、
前記第2のメッセージを基準として、前記第2のメッセージの後に送信される複数の周期メッセージの受信期間を計算し、
前記第2のメッセージの後に送信される前記複数の周期メッセージのそれぞれに対応する前記受信期間を記憶し、
前記第2のメッセージの後に送信される前記周期メッセージの受信時刻が、対応付けられた受信期間に含まれない場合、前記ネットワークに対する攻撃を検出したと判定する
ことを特徴とする付記4または5に記載の攻撃検知方法。
(付記7)
ネットワーク中の通信装置からメッセージを受信し、
周期的に送信される周期メッセージの第1のメッセージの受信時刻を用いて、前記第1のメッセージ以降に受信する周期メッセージの受信期間を計算し、
前記送信周期より短い送信間隔で送信されたことを表わす情報に対応付けられた第2のメッセージを、前記第1のメッセージの受信後の前記受信期間外に受信すると、前記第2のメッセージの受信時刻と前記送信周期を用いて前記第2のメッセージ以降に受信する周期メッセージの受信期間を更新する
処理を攻撃検知装置に行わせることを特徴とする攻撃検知プログラム。
(付記8)
前記通信装置から送信されるメッセージ中のデータは、当該メッセージが前記送信周期より短い送信間隔で送信されたかを表わすフラグを含み、
前記攻撃検知装置に、前記送信周期と同じ送信間隔で送信されたことを表すフラグを有するメッセージの受信時刻が前記受信期間に含まれない場合、前記ネットワークに対する攻撃が発生したと判定する
処理を行わせることを特徴とする付記7に記載の攻撃検知プログラム。
(付記9)
前記攻撃検知装置に、
前記第2のメッセージを基準として、前記第2のメッセージの後に送信される複数の周期メッセージの受信期間を計算し、
前記第2のメッセージの後に送信される前記複数の周期メッセージのそれぞれに対応する受信期間を記憶し、
前記第2のメッセージの後に送信される前記周期メッセージの受信時刻が、対応付けられた受信期間に含まれない場合、前記ネットワークに対する攻撃を検出したと判定する
処理を行わせることを特徴とする付記7または8に記載の攻撃検知プログラム。
The following additional notes are disclosed regarding the embodiment including the first and second embodiments described above.
(Appendix 1)
A transmission / reception unit for receiving a message from a communication device in the network;
A calculation unit that calculates a reception period of a periodic message received after the first message by using a reception time of the first message of the periodic message transmitted periodically;
When the transmission / reception unit receives the second message associated with the information indicating that it has been transmitted at a transmission interval shorter than the transmission cycle outside the reception period after the reception of the first message, the calculation unit Updates the reception period of periodic messages received after the second message by using the reception time of the second message and the transmission period.
(Appendix 2)
A determination unit that determines whether an attack has occurred on the network;
The data in the message transmitted from the communication device includes a flag indicating whether the message is transmitted at a transmission interval shorter than the transmission cycle,
The determination unit determines that an attack on the network has occurred when a reception time of a message having a flag indicating that it has been transmitted at the same transmission interval as the transmission cycle is not included in the reception period. The attack detection apparatus according to appendix 1.
(Appendix 3)
A storage unit for storing the reception period;
The calculating unit calculates a reception period of a plurality of periodic messages transmitted after the second message with reference to the second message;
The storage unit stores the reception period corresponding to each of the plurality of periodic messages transmitted after the second message;
The determination unit determines that an attack on the network is detected when the reception time of the periodic message transmitted after the second message is not included in the associated reception period. The attack detection device according to attachment 2.
(Appendix 4)
Receive messages from communication devices in the network,
Using the reception time of the first message of the periodic message transmitted periodically, the reception period of the periodic message received after the first message is calculated,
When the second message associated with the information indicating that it has been transmitted at a transmission interval shorter than the transmission cycle is received outside the reception period after the reception of the first message, the second message is received. An attack detection method, wherein the attack detection device performs processing for updating a reception period of a periodic message received after the second message by using time and the transmission cycle.
(Appendix 5)
The data in the message transmitted from the communication device includes a flag indicating whether the message is transmitted at a transmission interval shorter than the transmission cycle,
The attack detection device determines that an attack has occurred on the network when a reception time of a message having a flag indicating that the message is transmitted at the same transmission interval as the transmission cycle is not included in the reception period. The attack detection method according to appendix 4.
(Appendix 6)
The attack detection device includes:
Calculating a reception period of a plurality of periodic messages transmitted after the second message on the basis of the second message;
Storing the reception period corresponding to each of the plurality of periodic messages transmitted after the second message;
According to appendix 4 or 5, wherein when the reception time of the periodic message transmitted after the second message is not included in the associated reception period, it is determined that an attack on the network has been detected. The attack detection method described.
(Appendix 7)
Receive messages from communication devices in the network,
Using the reception time of the first message of the periodic message transmitted periodically, the reception period of the periodic message received after the first message is calculated,
When the second message associated with the information indicating that it has been transmitted at a transmission interval shorter than the transmission cycle is received outside the reception period after the reception of the first message, the second message is received. An attack detection program for causing an attack detection device to perform a process of updating a reception period of a periodic message received after the second message using time and the transmission period.
(Appendix 8)
The data in the message transmitted from the communication device includes a flag indicating whether the message is transmitted at a transmission interval shorter than the transmission cycle,
When the reception time of a message having a flag indicating that it has been transmitted to the attack detection device at the same transmission interval as the transmission cycle is not included in the reception period, processing is performed to determine that an attack has occurred on the network The attack detection program according to appendix 7, characterized in that:
(Appendix 9)
In the attack detection device,
Calculating a reception period of a plurality of periodic messages transmitted after the second message on the basis of the second message;
Storing a reception period corresponding to each of the plurality of periodic messages transmitted after the second message;
Note that when a reception time of the periodic message transmitted after the second message is not included in the associated reception period, a process for determining that an attack on the network is detected is performed. 9. The attack detection program according to 7 or 8.

10、70 攻撃検知装置
11 送受信部
20、50、71 制御部
21、72 計算部
22、73 判定部
30、60、75 記憶部
31、61 送信条件
32 受信状況情報
33、77 受信予測
40 送信装置
51 データ生成部
52 フラグ設定部
53 フレーム生成部
62 フラグ設定条件
74 基準更新処理部
76 基準時刻
100 ECU
101 CANトランシーバ
102 CANコントローラ
103 処理回路
104 プロセッサ
105 メモリ
10, 70 Attack detection device 11 Transmission / reception unit 20, 50, 71 Control unit 21, 72 Calculation unit 22, 73 Determination unit 30, 60, 75 Storage unit 31, 61 Transmission condition 32 Reception status information 33, 77 Reception prediction 40 Transmission device 51 Data Generation Unit 52 Flag Setting Unit 53 Frame Generation Unit 62 Flag Setting Condition 74 Reference Update Processing Unit 76 Reference Time 100 ECU
101 CAN Transceiver 102 CAN Controller 103 Processing Circuit 104 Processor 105 Memory

Claims (5)

ネットワーク中の通信装置からメッセージを受信する送受信部と、
周期的に送信される周期メッセージの第1のメッセージの受信時刻を用いて、前記第1のメッセージ以降に受信する周期メッセージの受信期間を計算する計算部
を備え、
前記送信周期より短い送信間隔で送信されたことを表わす情報に対応付けられた第2のメッセージを、前記送受信部が前記第1のメッセージの受信後の前記受信期間外に受信すると、前記計算部は、前記第2のメッセージの受信時刻と前記送信周期を用いて前記第2のメッセージ以降に受信する周期メッセージの受信期間を更新する
ことを特徴とする攻撃検知装置。
A transmission / reception unit for receiving a message from a communication device in the network;
A calculation unit that calculates a reception period of a periodic message received after the first message by using a reception time of the first message of the periodic message transmitted periodically;
When the transmission / reception unit receives the second message associated with the information indicating that it has been transmitted at a transmission interval shorter than the transmission cycle outside the reception period after the reception of the first message, the calculation unit Updates the reception period of periodic messages received after the second message by using the reception time of the second message and the transmission period.
前記ネットワークに対する攻撃が発生したかを判定する判定部
をさらに備え、
前記通信装置から送信されるメッセージ中のデータは、当該メッセージが前記送信周期より短い送信間隔で送信されたかを表わすフラグを含み、
前記判定部は、前記送信周期と同じ送信間隔で送信されたことを表すフラグを有するメッセージの受信時刻が前記受信期間に含まれない場合、前記ネットワークに対する攻撃が発生したと判定する
ことを特徴とする請求項1に記載の攻撃検知装置。
A determination unit that determines whether an attack has occurred on the network;
The data in the message transmitted from the communication device includes a flag indicating whether the message is transmitted at a transmission interval shorter than the transmission cycle,
The determination unit determines that an attack on the network has occurred when a reception time of a message having a flag indicating that it has been transmitted at the same transmission interval as the transmission cycle is not included in the reception period. The attack detection apparatus according to claim 1.
前記受信期間を記憶する記憶部
をさらに備え、
前記計算部は、前記第2のメッセージを基準として、前記第2のメッセージの後に送信される複数の周期メッセージの受信期間を計算し、
前記記憶部は、前記第2のメッセージの後に送信される前記複数の周期メッセージのそれぞれに対応する前記受信期間を記憶し、
前記判定部は、前記第2のメッセージの後に送信される前記周期メッセージの受信時刻が、対応付けられた受信期間に含まれない場合、前記ネットワークに対する攻撃を検出したと判定する
ことを特徴とする請求項2に記載の攻撃検知装置。
A storage unit for storing the reception period;
The calculating unit calculates a reception period of a plurality of periodic messages transmitted after the second message with reference to the second message;
The storage unit stores the reception period corresponding to each of the plurality of periodic messages transmitted after the second message;
The determination unit determines that an attack on the network is detected when the reception time of the periodic message transmitted after the second message is not included in the associated reception period. The attack detection apparatus according to claim 2.
ネットワーク中の通信装置からメッセージを受信し、
周期的に送信される周期メッセージの第1のメッセージの受信時刻を用いて、前記第1のメッセージ以降に受信する周期メッセージの受信期間を計算し、
前記送信周期より短い送信間隔で送信されたことを表わす情報に対応付けられた第2のメッセージを、前記第1のメッセージの受信後の前記受信期間外に受信すると、前記第2のメッセージの受信時刻と前記送信周期を用いて、前記第2のメッセージ以降に受信する周期メッセージの受信期間を更新する
処理を攻撃検知装置が行うことを特徴とする攻撃検知方法。
Receive messages from communication devices in the network,
Using the reception time of the first message of the periodic message transmitted periodically, the reception period of the periodic message received after the first message is calculated,
When the second message associated with the information indicating that it has been transmitted at a transmission interval shorter than the transmission cycle is received outside the reception period after the reception of the first message, the second message is received. An attack detection method, wherein the attack detection device performs processing for updating a reception period of a periodic message received after the second message by using time and the transmission cycle.
ネットワーク中の通信装置からメッセージを受信し、
周期的に送信される周期メッセージの第1のメッセージの受信時刻を用いて、前記第1のメッセージ以降に受信する周期メッセージの受信期間を計算し、
前記送信周期より短い送信間隔で送信されたことを表わす情報に対応付けられた第2のメッセージを、前記第1のメッセージの受信後の前記受信期間外に受信すると、前記第2のメッセージの受信時刻と前記送信周期を用いて前記第2のメッセージ以降に受信する周期メッセージの受信期間を更新する
処理を攻撃検知装置に行わせることを特徴とする攻撃検知プログラム。
Receive messages from communication devices in the network,
Using the reception time of the first message of the periodic message transmitted periodically, the reception period of the periodic message received after the first message is calculated,
When the second message associated with the information indicating that it has been transmitted at a transmission interval shorter than the transmission cycle is received outside the reception period after the reception of the first message, the second message is received. An attack detection program for causing an attack detection device to perform a process of updating a reception period of a periodic message received after the second message using time and the transmission period.
JP2016230868A 2016-11-29 2016-11-29 Attack detection device, attack detection method, and attack detection program Active JP6798280B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2016230868A JP6798280B2 (en) 2016-11-29 2016-11-29 Attack detection device, attack detection method, and attack detection program
US15/813,864 US10567401B2 (en) 2016-11-29 2017-11-15 Device and method for detecting attack in network
DE102017220859.7A DE102017220859A1 (en) 2016-11-29 2017-11-22 Apparatus and method for detecting an attack in a network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016230868A JP6798280B2 (en) 2016-11-29 2016-11-29 Attack detection device, attack detection method, and attack detection program

Publications (2)

Publication Number Publication Date
JP2018088616A true JP2018088616A (en) 2018-06-07
JP6798280B2 JP6798280B2 (en) 2020-12-09

Family

ID=62118072

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016230868A Active JP6798280B2 (en) 2016-11-29 2016-11-29 Attack detection device, attack detection method, and attack detection program

Country Status (3)

Country Link
US (1) US10567401B2 (en)
JP (1) JP6798280B2 (en)
DE (1) DE102017220859A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021024786A1 (en) * 2019-08-07 2021-02-11 株式会社日立製作所 Information processing device and authorized communication determination method
US20220174073A1 (en) * 2020-11-27 2022-06-02 Robert Bosch Gmbh Method for checking a message in a communication system
JP7444223B2 (en) 2021-03-01 2024-03-06 株式会社オートネットワーク技術研究所 In-vehicle device, program and information processing method

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11711384B2 (en) * 2018-08-27 2023-07-25 Lear Corporation Method and system for detecting message injection anomalies
CN110912860B (en) * 2018-09-18 2022-02-18 北京数安鑫云信息技术有限公司 Method and device for detecting pseudo periodic access behavior
EP3923519A4 (en) * 2019-02-08 2022-07-27 Panasonic Intellectual Property Corporation of America Abnormality determination method, abnormality determination device, and program
JP7138083B2 (en) * 2019-06-21 2022-09-15 国立大学法人東海国立大学機構 In-vehicle communication system, in-vehicle communication device, and transmission cycle calculation method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012239143A (en) * 2011-05-13 2012-12-06 Toyota Motor Corp Electronic control unit, on-vehicle network and data transmission method
WO2015170451A1 (en) * 2014-05-08 2015-11-12 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ In-vehicle network system, electronic control unit, and irregularity detection method
WO2016080422A1 (en) * 2014-11-20 2016-05-26 国立大学法人名古屋大学 Communication control device and communication system

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19950433A1 (en) * 1999-10-19 2001-04-26 Philips Corp Intellectual Pty Network has nodes for media access checking with test signal generators for providing test signals outside allocated time slots, detectors of faults in associated and/or other node(s)
US7475426B2 (en) * 2001-11-30 2009-01-06 Lancope, Inc. Flow-based detection of network intrusions
US20050041585A1 (en) * 2003-08-24 2005-02-24 Sam Shiaw-Shiang Jiang Method of controlling a receiver and a transmitter in a wireless communication system to handle a transmission window size change procedure
US20060050679A1 (en) * 2004-09-09 2006-03-09 Sam Shiaw-Shiang Jiang Method for On-Line Recovery of Parameter Synchronization for Ciphering Applications
CN102204174A (en) * 2008-11-04 2011-09-28 株式会社自动网络技术研究所 Communication device, relay device, communication system, and communication method
JP4941500B2 (en) * 2009-04-17 2012-05-30 株式会社デンソー Node device and vehicle network system
US8542069B2 (en) * 2011-09-23 2013-09-24 Infineon Technologies Ag Method for trimming an adjustable oscillator to match a CAN-bus and a CAN-bus communication controller
JP5664799B2 (en) * 2011-12-22 2015-02-04 トヨタ自動車株式会社 Communication system and communication method
JP6085962B2 (en) * 2012-12-13 2017-03-01 東芝ライテック株式会社 Management apparatus and address management method
US9241016B2 (en) * 2013-03-05 2016-01-19 Cisco Technology, Inc. System and associated methodology for detecting same-room presence using ultrasound as an out-of-band channel
US9203476B2 (en) * 2013-03-15 2015-12-01 Google Inc. System and method for code communication
US20150312279A1 (en) * 2014-04-29 2015-10-29 Qualcomm Incorporated Remote station protection
US9794335B2 (en) * 2014-06-02 2017-10-17 The Boeing Company Computer system synchronization
JP6601085B2 (en) * 2015-09-15 2019-11-06 株式会社リコー Data management system and data management method
US9705697B1 (en) * 2016-03-14 2017-07-11 Cypress Semiconductor Corporation Transceiver for communication and method for controlling communication

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012239143A (en) * 2011-05-13 2012-12-06 Toyota Motor Corp Electronic control unit, on-vehicle network and data transmission method
WO2015170451A1 (en) * 2014-05-08 2015-11-12 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ In-vehicle network system, electronic control unit, and irregularity detection method
WO2016080422A1 (en) * 2014-11-20 2016-05-26 国立大学法人名古屋大学 Communication control device and communication system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021024786A1 (en) * 2019-08-07 2021-02-11 株式会社日立製作所 Information processing device and authorized communication determination method
JP2021027518A (en) * 2019-08-07 2021-02-22 株式会社日立製作所 Information processing device and regular communication determination method
US11824687B2 (en) 2019-08-07 2023-11-21 Hitachi, Ltd. Information processing apparatus and legitimate communication determination method
US20220174073A1 (en) * 2020-11-27 2022-06-02 Robert Bosch Gmbh Method for checking a message in a communication system
JP7444223B2 (en) 2021-03-01 2024-03-06 株式会社オートネットワーク技術研究所 In-vehicle device, program and information processing method

Also Published As

Publication number Publication date
JP6798280B2 (en) 2020-12-09
DE102017220859A1 (en) 2018-05-30
US10567401B2 (en) 2020-02-18
US20180152464A1 (en) 2018-05-31

Similar Documents

Publication Publication Date Title
JP6798280B2 (en) Attack detection device, attack detection method, and attack detection program
US10432421B2 (en) Communication control device and communication system
JP7172043B2 (en) Attack detection device and attack detection method
KR101936450B1 (en) Method and device for serial data transmission which is adapted to memory sizes
JP6488702B2 (en) COMMUNICATION CONTROL DEVICE, COMMUNICATION CONTROL METHOD, AND COMMUNICATION CONTROL PROGRAM
JP6891671B2 (en) Attack detection device and attack detection method
US10491530B2 (en) Communication system and communication device
US20180314571A1 (en) Communication device, communication method and communication program
JP6525825B2 (en) Communication device
JP2018046515A (en) Relay device, communication system, transmission method, and computer program
CN105940751A (en) Wireless communication system, wireless communication device, wireless communication method, and program
JP2016116132A (en) Communication control device, communication control method, and communication control program
US10567400B2 (en) Attack detection device, attack detection method, and non-transitory computer-readable recording medium
KR101334017B1 (en) Apparatus of checking a validity of message on network for a vehicle and method of thereof
JP7006295B2 (en) Attack detection device and attack detection method
JP2016100842A (en) Device, method and program for communication control
US11057748B1 (en) Prioritized communication windows in a wireless mesh network
JP7223590B2 (en) Attack detection device and attack detection method
JP2018056980A (en) Attack detection device, attack detection method, and attack detection program
JP7110950B2 (en) network system
CN100593293C (en) Method for synchronizing memory areas in a transmitter apparatus and a receiver apparatus, and corresponding receiver apparatus
JP2021064921A (en) Unauthorized signal detection device
JP7453061B2 (en) Communication control system and communication control method
CN116483678B (en) Information processing method and related device
JP2022115669A (en) Electronic control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190807

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: 20201020

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20201102

R150 Certificate of patent or registration of utility model

Ref document number: 6798280

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150