[go: up one dir, main page]

WO2021065068A1 - 検知装置、車両、検知方法および検知プログラム - Google Patents

検知装置、車両、検知方法および検知プログラム Download PDF

Info

Publication number
WO2021065068A1
WO2021065068A1 PCT/JP2020/019704 JP2020019704W WO2021065068A1 WO 2021065068 A1 WO2021065068 A1 WO 2021065068A1 JP 2020019704 W JP2020019704 W JP 2020019704W WO 2021065068 A1 WO2021065068 A1 WO 2021065068A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
target message
message
detection
reference time
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.)
Ceased
Application number
PCT/JP2020/019704
Other languages
English (en)
French (fr)
Inventor
濱田芳博
上田浩史
足立直樹
相羽慎一
上口翔悟
石川史也
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.)
Sumitomo Wiring Systems Ltd
AutoNetworks Technologies Ltd
Sumitomo Electric Industries Ltd
Original Assignee
Sumitomo Wiring Systems Ltd
AutoNetworks Technologies Ltd
Sumitomo Electric Industries 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 Sumitomo Wiring Systems Ltd, AutoNetworks Technologies Ltd, Sumitomo Electric Industries Ltd filed Critical Sumitomo Wiring Systems Ltd
Priority to US17/622,122 priority Critical patent/US11849324B2/en
Priority to CN202080042121.6A priority patent/CN113994635A/zh
Priority to JP2021551126A priority patent/JP7435616B2/ja
Publication of WO2021065068A1 publication Critical patent/WO2021065068A1/ja
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/10Integrity
    • H04W12/106Packet or message integrity
    • 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/1425Traffic logging, e.g. anomaly 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud
    • H04W12/121Wireless intrusion detection systems [WIDS]; Wireless intrusion prevention systems [WIPS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud
    • H04W12/121Wireless intrusion detection systems [WIDS]; Wireless intrusion prevention systems [WIPS]
    • H04W12/122Counter-measures against attacks; Protection against rogue devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • H04W4/48Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for in-vehicle communication

Definitions

  • the present disclosure relates to detection devices, vehicles, detection methods and detection programs. This application claims priority on the basis of Japanese Application Japanese Patent Application No. 2019-178177 filed on September 30, 2019, and incorporates all of its disclosures herein.
  • Patent Document 1 Japanese Unexamined Patent Publication No. 2014-146868 discloses the following network devices. That is, the network device has a communication unit for receiving data, a time management unit for managing the reception time for receiving data, and a control unit for processing the received data, and periodically receives and processes the data.
  • the control unit records the reception time in the time management unit for each identifier of the data received by the communication unit, and the interval at which data having the same identifier as the reference data is received is a predetermined cycle.
  • the cycle abnormality occurs.
  • the predetermined processing is performed on the first data.
  • Patent Document 2 Japanese Unexamined Patent Publication No. 2018-182725 discloses the following method for determining an unauthorized communication detection standard. That is, the fraudulent communication detection standard determination method is a reference message used for detecting fraudulent communication in a network and an in-vehicle network system including one or more electronic control units connected to the network, which is executed in an information processing system including a storage unit.
  • the communication pattern identification step for identifying the communication pattern indicating the characteristics of the attack message from the information about the attack message for the in-vehicle network system, and the message sent to the network are the communication pattern identification step.
  • the communication pattern determination step of determining whether or not the communication pattern is matched to the communication pattern identified in the above, and the reference message used as a criterion for determining whether or not the message sent to the network is an attack message are used for determining the communication pattern. Includes a reference message determination step that is determined using the determination result in the step.
  • the detection device of the present disclosure is a detection device that detects an unauthorized message in an in-vehicle network, and includes a monitoring unit that monitors a legitimate message that is periodically transmitted and the malicious message as a target message in the in-vehicle network.
  • a generation unit that generates a reference time used for detection processing for detecting an invalid message, a time corresponding to a transmission time of the target message based on the monitoring result by the monitoring unit, and the reference time generated by the generation unit.
  • the generation unit is provided with an update unit that updates the statistical value of the above, and the generation unit is based on a value obtained by adding the latest statistical value to the reference time when the target message is determined to be abnormal in the detection process. , A new reference time used for the detection process for the target message transmitted after the target message determined to be abnormal is generated.
  • the detection method of the present disclosure is a detection method in a detection device that detects an unauthorized message in an in-vehicle network, and includes a step of monitoring a legitimate message periodically transmitted in the in-vehicle network and the malicious message as a target message. Based on the time difference between the step of generating the reference time used for the detection process for detecting the malicious message, the time corresponding to the transmission time of the target message based on the monitoring result of the target message, and the generated reference time. The statistical value of the time difference is updated by using the step of performing the detection process and the time difference between the time corresponding to the transmission time of the target message determined to be normal in the detection process and the reference time. In the step of generating the reference time, the latest statistical value is added to the reference time when the target message is determined to be abnormal in the detection process. A new reference time used for the detection process for the target message transmitted after the target message determined to be abnormal is generated.
  • the detection program of the present disclosure is a detection program used in a detection device that detects an unauthorized message in an in-vehicle network, and is a detection program for a computer, a legitimate message periodically transmitted in the in-vehicle network, and a target message for the malicious message.
  • a monitoring unit that monitors the program
  • a generation unit that generates a reference time used for the detection process for detecting the malicious message, a time corresponding to the transmission time of the target message based on the monitoring result by the monitoring unit, and the generation unit. Based on the time difference from the reference time generated by, the detection unit that performs the detection process, the time corresponding to the transmission time of the target message determined to be normal in the detection process, and the reference time.
  • One aspect of the present disclosure can be realized as a semiconductor integrated circuit that realizes a part or all of the detection device, or can be realized as a system including the detection device. Further, one aspect of the present disclosure can be realized as a semiconductor integrated circuit that realizes a part or all of a system including a detection device, or as a program for causing a computer to execute a processing step in a system including a relay device. Can be done.
  • FIG. 1 is a diagram showing a configuration of an in-vehicle communication system according to an embodiment of the present disclosure.
  • FIG. 2 is a diagram showing a configuration of a bus connection device group according to the embodiment of the present disclosure.
  • FIG. 3 is a diagram showing a configuration of a gateway device in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 4 is a diagram showing an example of the hardware configuration of the control device and the gateway device in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 5 is a diagram showing an example of the distribution of the reception time of the target message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 1 is a diagram showing a configuration of an in-vehicle communication system according to an embodiment of the present disclosure.
  • FIG. 2 is a diagram showing a configuration of a bus connection device group according to the embodiment of the present disclosure.
  • FIG. 3 is a diagram showing a
  • FIG. 6 is a diagram showing an example of the frequency distribution of the Mahalanobis distance calculated when all the target messages in the in-vehicle communication system according to the embodiment of the present disclosure are regarded as legitimate messages.
  • FIG. 7 is a diagram showing another example of the distribution of the reception time of the target message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 8 is a diagram showing another example of the distribution of the reception time of the target message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 9 is a diagram showing another example of the distribution of the reception time of the target message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 7 is a diagram showing another example of the distribution of the reception time of the target message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 8 is a diagram showing another example of the distribution of the reception time of the target message in the in-vehicle communication system according
  • FIG. 10 is a diagram showing another example of the distribution of the reception time of the target message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 11 is a diagram showing another example of the distribution of the reception time of the target message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 12 is a flowchart defining an example of an operation procedure when the gateway device performs detection processing in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 13 is a flowchart defining an example of detection processing in the gateway device of the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 12 is a flowchart defining an example of an operation procedure when the gateway device performs detection processing in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 13 is a flowchart defining an example of detection processing in the gateway device of the in-vehicle communication system according to the embodiment of the present
  • FIG. 14 is a flowchart defining an example of processing for generating a reference time in the gateway device of the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 15 is a flowchart defining an example of processing for generating the first reference time in the gateway device of the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 16 is a diagram showing an example of the connection topology of the vehicle-mounted network according to the embodiment of the present disclosure.
  • the present disclosure has been made to solve the above-mentioned problems, and an object thereof is to provide a detection device, a vehicle, a detection method, and a detection program capable of more accurately detecting a malicious message in an in-vehicle network. is there.
  • the detection device is a detection device that detects an unauthorized message in an in-vehicle network, and is a target message for a legitimate message periodically transmitted in the in-vehicle network and the malicious message.
  • the monitoring unit that monitors the message
  • the generation unit that generates the reference time used for the detection process for detecting the malicious message, the time corresponding to the transmission time of the target message based on the monitoring result by the monitoring unit, and the generation unit.
  • the detection unit Based on the time difference from the reference time generated by, the detection unit that performs the detection process, the time corresponding to the transmission time of the target message determined to be normal in the detection process, and the reference time.
  • the generation unit includes an update unit that updates the statistical value of the time difference using the time difference, and the generation unit uses the latest statistical value as the reference when the target message is determined to be abnormal in the detection process. Based on the value added to the time, a new reference time used for the detection process for the target message transmitted after the target message determined to be abnormal is generated.
  • the statistical value is updated using the time difference between the time corresponding to the transmission time of the target message determined to be normal in the detection process and the reference time, and the target message is determined to be abnormal in the detection process. If this is the case, it is possible to avoid performing detection processing based on the time corresponding to the transmission time of the invalid message by configuring to generate a new reference time based on the value obtained by adding the statistical value of the time difference to the reference time. Therefore, it is possible to suppress erroneous determination in the detection process for the target message transmitted next to the target message determined to be abnormal. Therefore, it is possible to more accurately detect an unauthorized message in the in-vehicle network.
  • the detection unit has a time difference between the time corresponding to the transmission time of the first target message, which is the target message, and the reference time, and the target transmitted after the first target message.
  • An abnormality related to the first target message is detected based on the time difference between the time corresponding to the transmission time of the second target message, which is the message, and the reference time.
  • a plurality of target messages are transmitted within the time determined to be normal, and the malicious message included in the plurality of target messages is a legitimate message. Even if it is erroneously determined, it can be determined that the plurality of target messages may be abnormal. As a result, a malicious message that could not be detected in the detection process can be determined in gray, for example.
  • the generation unit is normal based on the time corresponding to the transmission time of the target message determined to be normal.
  • a new reference time used for the detection process for the target message transmitted after the target message determined to be is generated.
  • the generation unit uses the delay time due to the arbitration process when the target message is transmitted in the generation of the reference time.
  • the vehicle according to the embodiment of the present disclosure is provided with the detection device.
  • the detection method is a detection method in a detection device that detects an unauthorized message in an in-vehicle network, and is a legitimate message periodically transmitted in the in-vehicle network and the malicious message.
  • a target message As a target message, a step of generating a reference time used for the detection process for detecting the malicious message, and a time corresponding to the transmission time of the target message based on the monitoring result of the target message.
  • the latest statistical value is used as the reference time. Based on the value added to, a new reference time used for the detection process for the target message transmitted after the target message determined to be abnormal is generated.
  • the statistical value is updated using the time difference between the time corresponding to the transmission time of the target message determined to be normal in the detection process and the reference time, and the target message is determined to be abnormal in the detection process. If this is the case, it is possible to avoid performing detection processing based on the time corresponding to the transmission time of the malicious message by a method of generating a new reference time based on the value obtained by adding the statistical value of the time difference to the reference time. Therefore, it is possible to suppress erroneous determination in the detection process for the target message transmitted next to the target message determined to be abnormal. Therefore, it is possible to more accurately detect an unauthorized message in the in-vehicle network.
  • the detection program according to the embodiment of the present disclosure is a detection program used in a detection device that detects an unauthorized message in an in-vehicle network, and is a legitimate message that is periodically transmitted from a computer to the in-vehicle network.
  • a monitoring unit that monitors the malicious message as a target message
  • a generation unit that generates a reference time used for the detection process for detecting the malicious message
  • a transmission time of the target message based on the monitoring result by the monitoring unit.
  • the detection unit that performs the detection process and the transmission time of the target message determined to be normal in the detection process based on the time difference between the corresponding time and the reference time generated by the generation unit.
  • the statistical value is updated using the time difference between the time corresponding to the transmission time of the target message determined to be normal in the detection process and the reference time, and the target message is determined to be abnormal in the detection process. If this is the case, it is possible to avoid performing detection processing based on the time corresponding to the transmission time of the invalid message by configuring to generate a new reference time based on the value obtained by adding the statistical value of the time difference to the reference time. Therefore, it is possible to suppress erroneous determination in the detection process for the target message transmitted next to the target message determined to be abnormal. Therefore, it is possible to more accurately detect an unauthorized message in the in-vehicle network.
  • FIG. 1 is a diagram showing a configuration of an in-vehicle communication system according to an embodiment of the present disclosure.
  • the vehicle-mounted communication system 301 includes a gateway device 101, a plurality of vehicle-mounted communication devices 111, and a plurality of bus connection device groups 121.
  • the gateway device 101 is an example of a detection device.
  • the in-vehicle communication system 301 is mounted on the vehicle 1.
  • FIG. 2 is a diagram showing a configuration of a bus connection device group according to the embodiment of the present disclosure.
  • the bus connection device group 121 includes a plurality of control devices 122.
  • the bus connection device group 121 is not limited to the configuration including a plurality of control devices 122, and may be configured to include one control device 122.
  • the vehicle-mounted network 12 includes a plurality of vehicle-mounted devices that are devices inside the vehicle 1. Specifically, the vehicle-mounted network 12 includes a plurality of vehicle-mounted communication devices 111 and a plurality of control devices 122, which are examples of vehicle-mounted devices.
  • the in-vehicle network 12 may be configured to include a plurality of in-vehicle communication devices 111 and not to include the control device 122 as long as it includes a plurality of in-vehicle devices, or may not include the in-vehicle communication device 111 and a plurality of them. It may be configured to include the control device 122 of the above, or may be configured to include one in-vehicle communication device 111 and one control device 122.
  • the vehicle-mounted communication device 111 communicates with, for example, a device outside the vehicle 1.
  • the in-vehicle communication device 111 is, for example, a TCU (Telematics Communication Unit), a short-range wireless terminal device, and an ITS (Intelligent Transport Systems) radio.
  • the TCU can perform wireless communication with the wireless base station device and can communicate with the gateway device 101 according to a communication standard such as LTE (Long Term Evolution) or 3G.
  • the TCU relays information used for services such as navigation, vehicle theft prevention, remote maintenance and FOTA (Firmware Over The Air).
  • the short-range wireless terminal device is, for example, a wireless terminal device such as a smart phone held by a person in the vehicle 1, that is, a passenger, in accordance with communication standards such as Wi-Fi (registered trademark) and Bluetooth (registered trademark). It is possible to perform wireless communication and to communicate with the gateway device 101.
  • the short-range wireless terminal device relays information used for services such as entertainment, for example.
  • the short-range wireless terminal device includes, for example, a wireless terminal device such as a smart key held by a passenger, and a wireless terminal device provided on a tire in accordance with a predetermined communication standard, and an LF (Low Frequency) band or UHF (Ultra). It is possible to perform wireless communication using radio waves in the High Frequency band, and to communicate with the gateway device 101.
  • the short-range wireless terminal device relays information used for services such as smart entry and TPMS (Tire Pressure Monitoring System).
  • the ITS radio can perform road-to-vehicle communication with roadside units such as optical beacons, radio wave beacons, and ITS spots provided near the road, and is capable of inter-vehicle communication with an in-vehicle terminal mounted on another vehicle. It is possible to communicate with the gateway device 101.
  • the ITS radio relays information used for services such as congestion relief, safe driving support, and route guidance.
  • the gateway device 101 can, for example, transmit and receive data such as firmware updates and data accumulated by the gateway device 101 to and from the maintenance terminal device outside the vehicle 1 via the port 112.
  • the gateway device 101 is connected to the in-vehicle device via, for example, buses 13 and 14.
  • the buses 13 and 14 are, for example, CAN (Control Area Network) (registered trademark), FlexRay (registered trademark), MOST (Media Oriented Systems Transport) (registered trademark), Ethernet (registered trademark), and LIN. It is a bus that complies with standards such as (Local Ethernet Network).
  • the in-vehicle communication device 111 is connected to the gateway device 101 via a corresponding bus 14 that complies with the Ethernet standard. Further, each control device 122 in the bus connection device group 121 is connected to the gateway device 101 via a corresponding bus 13 according to the CAN standard.
  • Bus 13 is provided for each system, for example.
  • the bus 13 is, for example, a drive system bus, a chassis / safety system bus, a body / electrical system bus, and an AV / information system bus.
  • An engine control device, an AT (Automatic Transmission) control device, and a HEV (Hybrid Electric Vehicle) control device, which are examples of the control device 122, are connected to the drive system bus.
  • the engine control device, the AT control device, and the HEV control device control the engine, the AT, and the switching between the engine and the motor, respectively.
  • a brake control device, a chassis control device, and a steering control device which are examples of the control device 122, are connected to the chassis / safety system bus.
  • the brake control device, chassis control device and steering control device control the brake, chassis and steering, respectively.
  • An instrument display control device, an air conditioner control device, an anti-theft control device, an airbag control device, and a smart entry control device which are examples of the control device 122, are connected to the body / electrical system bus.
  • the instrument display control device, the air conditioner control device, the anti-theft control device, the airbag control device and the smart entry control device control the instrument, the air conditioner, the anti-theft mechanism, the airbag mechanism and the smart entry, respectively.
  • the AV / information system bus is connected to a navigation control device, an audio control device, an ETC (Electronic Toll Collection System) (registered trademark) control device, and a telephone control device, which are examples of the control device 122.
  • the navigation control device, the audio control device, the ETC control device, and the telephone control device control the navigation device, the audio device, the ETC device, and the mobile phone, respectively.
  • bus 13 is not limited to the configuration in which the control device 122 is connected, and a device other than the control device 122 may be connected.
  • the gateway device 101 is, for example, a central gateway (CGW) and can communicate with the in-vehicle device.
  • CGW central gateway
  • the gateway device 101 is, for example, information exchanged between the control devices 122 connected to different buses 13 in the vehicle 1, information exchanged between the in-vehicle communication devices 111, and exchanged between the control device 122 and the in-vehicle communication device 111. Performs relay processing to relay the information to be received.
  • a message is periodically transmitted from one in-vehicle device to another in-vehicle device according to a predetermined agreement.
  • a message transmitted periodically from one control device 122 to another control device 122 will be described, but a message transmitted between the control device 122 and the in-vehicle communication device 111, and between each in-vehicle communication device 111. The same applies to the message to be sent.
  • the message may be transmitted by broadcasting, by unicast, or by multicast.
  • the message transmitted periodically is also referred to as a periodic message.
  • vehicle 1 in addition to the periodic message, there is a message transmitted irregularly from one control device 122 to another control device 122.
  • the message includes an ID (Identifier) for identifying the content of the message, the sender, the message number, and the like. It is possible to identify whether or not the message is a periodic message by the ID included in the message.
  • the gateway device 101 functions as a detection device and performs detection processing for detecting an unauthorized message in the vehicle-mounted network 12.
  • FIG. 3 is a diagram showing a configuration of a gateway device in the in-vehicle communication system according to the embodiment of the present disclosure.
  • the gateway device 101 includes a communication processing unit 51, a monitoring unit 52, an updating unit 53, a detecting unit 54, a generating unit 55, and a storage unit 56.
  • the communication processing unit 51, the monitoring unit 52, the update unit 53, the detection unit 54, and the generation unit 55 are realized by, for example, a processor such as a CPU (Central Processing Unit) and a DSP (Digital Signal Processor).
  • a processor such as a CPU (Central Processing Unit) and a DSP (Digital Signal Processor).
  • the monitoring unit 52 monitors the legitimate periodic message and the invalid message as the message to be detected in the gateway device 101, that is, the target message M.
  • the detection unit 54 performs a detection process for detecting an unauthorized message.
  • the generation unit 55 generates a reference time used for the detection process.
  • the generation unit 55 notifies the detection unit 54 of the generated reference time.
  • the storage unit 56 stores the statistical value of the time difference X between the reception time of the target message M and the reference time tr.
  • the storage unit 56 is, for example, a flash memory.
  • the storage unit 56 may be provided outside the gateway device 101.
  • the update unit 53 updates the statistical value.
  • the update unit 53 updates the statistical value in the storage unit 56.
  • the communication processing unit 51 performs relay processing for relaying a message transmitted between the control devices 122.
  • the communication processing unit 51 when the communication processing unit 51 receives a message from a certain control device 122 via the corresponding bus 13, the communication processing unit 51 adds a time stamp indicating the reception time of the message to the received message. Then, the communication processing unit 51 transmits the message with the time stamp to the other control device 122 via the corresponding bus 13.
  • the monitoring unit 52 monitors the target message M.
  • FIG. 4 is a diagram showing an example of the hardware configuration of the control device and the gateway device in the in-vehicle communication system according to the embodiment of the present disclosure.
  • control device 122 includes an oscillator 131, a CPU (Central Processing Unit) 132, and a CAN transceiver 133.
  • CPU Central Processing Unit
  • the gateway device 101 includes a CPU 141, a CAN transceiver 142, and an oscillator 143.
  • the CPU 141 realizes a part or all of the monitoring unit 52, the updating unit 53, the detecting unit 54, and the generating unit 55.
  • the CAN transceiver 142 realizes a part or all of the communication processing unit 51.
  • the control device 122 transmits a periodic message in the design transmission cycle T, which is the design transmission cycle. More specifically, the CPU 132 in the control device 122 broadcasts or unicasts a periodic message via the CAN transceiver 133 according to the timing of the clock generated based on the oscillation signal from the oscillator 131.
  • the CAN transceiver 142 in the gateway device 101 adds a time stamp indicating the reception time to the periodic message received from the control device 122 according to the timing of the clock generated based on the oscillation signal from the oscillator 143.
  • control device 122 transmits the target message M that is the target of the detection process in the gateway device 101.
  • a part of the message received by the gateway device 101 from the control device 122 is an invalid message.
  • the monitoring unit 52 monitors the legitimate periodic message and the invalid message from the control device 122 as the target message M.
  • the monitoring unit 52 acquires the reception time ta of the target message M by monitoring the message relayed by the communication processing unit 51.
  • the storage unit 56 stores the ID of the target message M.
  • the ID of the target message M is also referred to as a target ID.
  • the monitoring unit 52 confirms the ID included in the message received by the communication processing unit 51 and the target ID in the storage unit 56.
  • the monitoring unit 52 recognizes that the message received by the communication processing unit 51 is the target message M, and the target message By referring to the time stamp given to M, the reception time ta of the target message M is acquired.
  • the monitoring unit 52 uses the reception information indicating the acquired reception time ta as the reception number N indicating the number of the target message M received by the communication processing unit 51. It is stored in the storage unit 56 in association with each other.
  • the detection unit 54 performs detection processing based on the time difference X between the time corresponding to the transmission time of the target message M based on the monitoring result by the monitoring unit 52 and the reference time tr generated by the generation unit 55. More specifically, the detection unit 54 performs the detection process based on the time difference X between the reception time of the target message M and the reference time tr.
  • FIG. 5 is a diagram showing an example of the distribution of the reception time of the target message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • the horizontal axis represents the time.
  • the detection unit 54 is based on the time difference Xn between the reception time tan of the nth target message Mn in which the reception number N is n and the reference time trq notified from the generation unit 55. , Perform detection processing.
  • n is an integer of 1 or more.
  • the detection unit 54 statistics on the reception time tan, the reference time trq, and the time difference Xn indicated by the reception information. Based on the distance, it is determined whether or not the target message Mn is an invalid message.
  • the detection unit 54 determines whether or not the target message Mn is an invalid message based on the Mahalanobis distance D ⁇ 2 represented by the following equation (1), which is an example of the statistical distance.
  • D ⁇ 2 means the square of D.
  • the detection unit 54 determines that the target message Mn is not an invalid message when the Mahalanobis distance D ⁇ 2 calculated based on the reception time tan of the target message Mn and the reference time trq is equal to or less than the threshold value Th. To do. On the other hand, when the Mahalanobis distance D ⁇ 2 is larger than the threshold value Th, the detection unit 54 determines that the target message Mn is an invalid message.
  • the threshold value Th used for comparison with the Mahalanobis distance D ⁇ 2 is preferably an appropriate value so that it can be accurately determined whether or not the target message Mn is an invalid message.
  • the manufacturer of the vehicle 1 uses the gateway device 101 of the test vehicle of the same type as the vehicle 1 in advance, and uses the time difference Xn calculated when all the target messages Mn are valid messages to use the Mahalanobis distance D. Calculate ⁇ 2.
  • FIG. 6 is a diagram showing an example of the frequency distribution of the Mahalanobis distance calculated when all the target messages in the in-vehicle communication system according to the embodiment of the present disclosure are regarded as legitimate messages.
  • the frequency decreases as the Mahalanobis distance D ⁇ 2 calculated by using the time difference X when all the target messages M are legitimate messages.
  • the storage unit 56 stores the frequency distribution of the Mahalanobis distance D ⁇ 2 shown in FIG.
  • the detection unit 54 acquires the frequency distribution of the Mahalanobis distance D ⁇ 2 shown in FIG. 6 from the storage unit 56 at the time of activation, and the threshold Th1 is the smallest in the range where the FPR (False Positive Rate) becomes zero. Therefore, it is preferable to set the threshold value Th1.
  • FPR is a false positive rate and is represented by false positive / (false positive + true negative).
  • a true negative is the frequency of recognizing a legitimate message as a legitimate message
  • a false positive is a frequency of detecting a legitimate message as a malicious message.
  • the storage unit 55 may be configured to store a threshold value Th1 predetermined by the manufacturer of the vehicle 1. In this case, the detection unit 54 acquires the threshold value Th1 from the storage unit 55 at the time of activation.
  • FIG. 7 is a diagram showing another example of the distribution of the reception time of the target message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • the horizontal axis represents the time.
  • the detection unit 54 when the detection unit 54 is notified of the reference time trq from the generation unit, is the target message M an invalid message based on the notified reference time trq and the threshold Th1? Set the judgment criteria used to judge whether or not.
  • the Mahalanobis distance D ⁇ 2 calculated based on the notified reference time trq and the threshold value Th1 is the threshold value.
  • the threshold times trqA and trqB which are the times indicating the reception time ta when the value becomes equal to Th1, are set.
  • the time range from the threshold time trqA to the threshold time trqB defined by the threshold times trqA and trqB is also referred to as an allowable range Rq.
  • the detection unit 54 determines whether or not the target message M is an invalid message based on the set allowable range Rq.
  • the detection unit 54 determines that the target message Mn is not an invalid message when the reception time tan of the target message Mn is within the allowable range Rq. On the other hand, when the reception time tan of the target message Mn is earlier than the threshold time trqA as in the example of FIG. 7, the detection unit 54 determines that the target message Mn is an invalid message.
  • the detection unit 54 outputs judgment information indicating a judgment result based on the judgment times trqA and trqB and the reception time tan to the communication processing unit 51.
  • the communication processing unit 51 transmits the target message Mn to the transmission destination control device 122.
  • the communication processing unit 51 performs the following processing.
  • the communication processing unit 51 records the target message Mn indicated by the determination information. Further, the communication processing unit 51 transmits alarm information indicating that an illegal message is being transmitted on the bus 13 to a higher-level device inside or outside the vehicle 1.
  • the detection unit 54 has a time difference between the time corresponding to the transmission time of the target message Mn and the reference time trq, and a time and the reference time corresponding to the transmission time of the target message M (n + 1) transmitted after the target message Mn.
  • An abnormality related to the target message Mn is detected based on the time difference from trq.
  • the detection unit 54 targets based on the time difference between the reception time of the target message Mn and the reference time trq, and the time difference between the reception time of the target message M (n + 1) and the reference time trq. Detects an abnormality related to message Mn.
  • FIG. 8 is a diagram showing another example of the distribution of the reception time of the target message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • the horizontal axis represents the time.
  • the detection unit 54 sets the threshold time trqA, trqB and the allowable range Rq based on the reference time trq and the threshold value Th1 notified from the generation unit 55.
  • the detection unit 54 is based on the reception time tan, the set threshold times trqA, trqB, and the allowable range Rq. Therefore, it is determined whether or not the target message Mn is an invalid message.
  • the detection unit 54 determines that the target message Mn is not an invalid message when the reception time tan of the target message Mn is within the allowable range Rq.
  • the detection unit 54 receives the reception time ta (indicated by the new reception information). Based on n + 1), the set threshold times trqA and trqB, and the allowable range Rq, it is determined whether or not the target message M (n + 1) is an invalid message.
  • the detection unit 54 determines that the target message M (n + 1) is not an invalid message when the reception time ta (n + 1) of the target message M (n + 1) is within the allowable range Rq.
  • the detection unit 54 determines that the target message Mn is not an invalid message in the detection process based on the permissible range Rq, and then further determines that the target message M (n + 1) is not an invalid message, the target messages Mn, M ( n + 1) is judged to be abnormal, that is, it is judged to be gray.
  • the storage unit 56 stores the reception time tan of Mn, the reference time trq, and the time difference information indicating the time difference Xn between the reception time tan and the reference time trq.
  • the detection unit 54 has a threshold of Mahalanobis distance D ⁇ 2 calculated based on the time difference Xn between the reception time tan of the target message Mn and the reference time trq.
  • the configuration is such that it is determined whether or not the target message Map is an invalid message based on the comparison result with the value Th, but the present invention is not limited to this.
  • the detection unit 54 may be configured to determine whether or not the target message Mn is an invalid message by using, for example, a support vector machine.
  • the detection unit 54 may use a support vector machine that classifies into one class, or may use a support vector machine that classifies into multiple classes.
  • the detection unit 54 determines that the target message Mn is not an invalid message, while calculating it.
  • the classification score f (Xn) is less than zero, it is determined that the target message Mn is an invalid message.
  • K (x, xi) is a kernel function.
  • the kernel function is a linear kernel, a polynomial kernel, a Gaussian kernel shown in the following equation (3), or a sigmoid kernel.
  • X is a vector of the time difference Xn between the reception time tan of the target message Mn and the reference time trq.
  • xi is a support vector.
  • yi is a value corresponding to each class to be classified. For example, when using a support vector machine that classifies into one class, yi is 1.
  • Wi is a weight vector.
  • b is a bias.
  • xi, yi, Wi and b are parameters obtained in advance by machine learning using the gateway device 101 of the test vehicle of the same type as the vehicle 1 and using a legitimate message.
  • the above parameters are set by unsupervised learning. More specifically, the time difference Xn between the reception time tan of the target message Mn, which is a legitimate message, and the plurality of reference times trq is calculated, and the calculated time difference Xn is classified into a learning data set and a verification data set. ..
  • f (Xn) of the data set for verification is calculated using the parameters obtained by the machine learning and the above-mentioned equation (2), and the classification score is obtained.
  • f (Xn) is greater than or equal to zero or less than or equal to zero. That is, it is confirmed whether the data set for verification is determined to be a legitimate message or an invalid message.
  • the parameters are appropriately adjusted so that the false positive rate of the determination result of the verification data set becomes a desired value, and machine learning using the learning data set is performed again.
  • the above parameters are set by supervised learning. More specifically, the time difference Xn between the reception time tan of the target message Mn, which is a legitimate message, and the plurality of reference times trq is calculated, and the calculated time difference Xn is used as the normal data group.
  • an invalid data group which is a data group of a plurality of time differences Xnr larger than the time difference Xn of the normal data group and a data group of a plurality of time differences Xns smaller than the time difference Xn of the normal data group are generated.
  • the normal data group and the invalid data group are classified into a training data set and a verification data set.
  • the classification score f (Xn) of the verification data set is calculated using the parameters obtained by the machine learning and the above-mentioned equation (2), and the classification is performed. It is confirmed whether the data set for verification is determined to be a legitimate message or an invalid message based on the score f (Xn). Then, the values of the time difference Xns and Xnr of the invalid data group, that is, the gap between the invalid data group and the normal data group, and the parameters are appropriately set so that the false positive rate of the judgment result of the data set for verification becomes a desired value. Adjust and perform machine learning again using the training data set.
  • the detection unit 54 may be configured to determine whether or not the target message Ma is an invalid message by using, for example, a decision tree.
  • Decision tree algorithms are, for example, CART (Classification And Regression Trees) and C4.5.
  • the parameters of the decision tree are set by supervised learning. More specifically, the time difference Xn between the reception time tan of the target message Mn, which is a legitimate message, and the plurality of reference times trq is calculated, and the calculated time difference Xn is used as the normal data group.
  • an invalid data group which is a data group of a plurality of time differences Xnr larger than the time difference Xn of the normal data group and a data group of a plurality of time differences Xns smaller than the time difference Xn of the normal data group are generated.
  • the normal data group and the invalid data group are classified into a training data set and a verification data set.
  • machine learning of the decision tree using algorithms such as CART and C4.5 is performed using the data set for training, and when the decision tree obtained by machine learning is used, the data set for verification is obtained. Check whether it is determined to be a legitimate message or an invalid message. Then, learning of the time difference Xns, Xnr value of the invalid data group, that is, the gap between the invalid data group and the normal data group, and the decision tree so that the false positive rate of the judgment result of the data set for verification becomes a desired value. Adjust the parameters appropriately, and perform machine learning again using the data set for training.
  • new reception information including the reception time ta (n + 2) of the target message M (n + 2) is stored in the storage unit 56, and the reception time ta (n + 2) indicated by the new reception information is set to the threshold time trqB. If the time is later, the generation unit 55 is notified of a generation request indicating that a new reference time tr (q + 1) should be generated.
  • the detection unit 54 notifies the generation unit 55 of a request for generation of contents according to the determination result in the detection process using the reference time trq.
  • the detection unit 54 when the detection unit 54 detects an invalid message in the detection process using the reference time trq, or detects an abnormality related to the target message M, that is, makes a gray determination, the detection unit 54 sets the reference time trq as a generation request.
  • the generation request Y1 indicating that an abnormality has occurred in the detection process using the above is notified to the generation unit 55.
  • the detection unit 54 does not detect an invalid message in the detection process using the reference time trq and does not make a gray determination, an abnormality occurs in the detection process using the reference time trq as a generation request.
  • the generation request Y2 indicating that the occurrence has not occurred is notified to the generation unit 55.
  • the generation unit 55 when the generation unit 55 receives the generation request Y1 or the generation request Y2 from the detection unit 54, the generation unit 55 detects a new reference time tr (q + 1) as a response to the received generation request Y1 or generation request Y2. Notify to.
  • the detection unit 54 uses the notified reference time tr (q + 1) to set the new threshold time tr (q + 1) A, tr (q + 1).
  • the permissible range R (q + 1) defined by B is set.
  • the detection unit 54 determines whether or not the target message M (n + 2) is an invalid message based on the set allowable range R (q + 1).
  • the detection unit 54 indicates that the initial value, the first reference time tr1, should be generated in order to start the detection process.
  • the generation request Y3 is notified to the generation unit 55.
  • the detection unit 54 sets the reception time ta (n-1) of the immediately preceding target message M (n-1) as the provisional reference time tr by the target message Mn.
  • the generation unit 55 is notified of the reception time ta of the K target messages M and the generation request Y3.
  • FIG. 9 is a diagram showing another example of the distribution of the reception time of the target message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • the horizontal axis represents the time.
  • FIG. 9 shows the case where K is 4.
  • the detection unit 54 uses the reception time ta1 of the first target message M1 from the control device 122 as the provisional reference time tra, and is based on the provisional reference time tra and the threshold Th1. , Threshold time traA, traB and tolerance Ra are set.
  • the detection unit 54 uses the reception time ta2 as the provisional reference time trb and sets it as the provisional reference time trb. Based on the threshold value Th1, the threshold time trbA, trbB and the allowable range Rb are set.
  • the detection unit 54 uses the reception time ta3 as the provisional reference time trc to set the provisional reference time trc. Based on the threshold value Th1, the threshold time trcA, trcB and the allowable range Rc are set.
  • the detection unit 54 may receive the target messages M1, M2, M3, M4 at the reception times ta1, ta2, ta3, ta4. And the generation request Y3 is notified to the generation unit 55.
  • the target message Mn is the immediately preceding target message in the third and subsequent consecutive K target messages M.
  • the above processing is repeated until the reception time ta (n-1) of M (n-1) is within the allowable range R (n-1) set by using the temporary reference time tr (n-1). ..
  • the generation unit 55 when the generation unit 55 receives the generation request Y3 from the detection unit 54, the generation unit 55 notifies the detection unit 54 of the first reference time tr1 as a response to the received generation request Y3.
  • the storage unit 56 stores the statistical value of the time difference X between the reception time of the target message M and the reference time tr.
  • the update unit 53 updates the statistical value in the storage unit 56 by using the time difference between the time corresponding to the transmission time of the target message Mn determined to be normal in the detection process and the reference time tr. More specifically, the update unit 53 updates the statistical value in the storage unit 56 by using the time difference X between the reception time ta of the target message M determined to be normal and the reference time tr.
  • the storage unit 56 stores, as the statistical value of the time difference X, the average value Xave of the time difference X between the reception time ta of the target message M and the reference time tr, which is determined not to be an invalid message in the detection process.
  • the update unit 53 updates the average value Xave in the storage unit 56 by using the time difference X indicated by the time difference information in the storage unit 56. That is, the update unit 53 learns the reception cycle of the target message M by using the time difference X between the reception time ta of the legitimate target message M and the reference time tr.
  • the update unit 53 has the following equation (based on the time difference Xn indicated by the time difference information and the average value Xave in the storage unit 56).
  • the update value V is calculated according to 4), and the average value Xave in the storage unit 56 is updated to the calculated update value V.
  • u is an attenuation coefficient, which is a value greater than or equal to zero and less than or equal to 1.
  • u is set in advance according to, for example, the design transmission cycle T of the target message M.
  • the average value Xave changes slowly as the update unit 53 repeats the update, so that the time required for the average value Xave to converge becomes longer, while the average value Xave becomes longer. It is possible to suppress the change and update it to a stable value.
  • the generation unit 55 when the generation unit 55 receives the generation request from the detection unit 54, the generation unit 55 notifies the detection unit 54 of a new reference time tr as a response to the received generation request.
  • FIG. 10 is a diagram showing another example of the distribution of the reception time of the target message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • the horizontal axis represents the time.
  • the generation unit 55 is abnormal based on the value obtained by adding the latest statistical value in the storage unit 56 to the reference time tr.
  • a new reference time tr used for the detection process for the target message M transmitted after the target message M determined to exist is generated.
  • the generation unit 55 when the generation unit 55 receives the generation request Y1 from the detection unit 54, the generation unit 55 refers to the average value Xave in the storage unit 56 and calculates a value obtained by adding the latest average value Xave to the latest reference time trq. The generation unit 55 notifies the detection unit 54 of the calculated value as a new reference time tr (q + 1).
  • reception time tap of the p-th target message Mp is expressed by the following equation (5).
  • E1 is an error in the transmission time of the message based on the jitter of the oscillator 131 in the control device 122.
  • E2 is an error in the reception time of the message based on the jitter of the oscillator 143 in the gateway device 101. Note that E1 and E2 are errors caused by the manufacturing process, usage environment, aging deterioration, etc. of the oscillators 131 and 143, respectively.
  • Ai is a delay time caused by a collision on the bus 13 and a transmission standby delay of the i-th message from the control device 122.
  • the reference time trp used for the detection process for the p-th target message Mp is represented by the following equation (6).
  • the average value Xave is the reception cycle of the target message Mp and is equal to the sum of the design transmission cycle T, the error E1, and the error E2, the time difference Xp between the reception time tap and the reference time trp of the target message Mp. Is expressed by the following equation (7) by subtracting the equation (6) from the equation (5).
  • the sigma term in the equation (7) can be regarded as an error that does not increase monotonically and repeats increasing and decreasing within a certain numerical range. ..
  • the average value Xave included in the time difference Xp between the reception time tap and the reference time trp is affected by the usage environment of the oscillators 131 and 143 and the errors E1 and E2 due to aging deterioration and the like, and therefore varies depending on the usage environment and aging.
  • the generation unit 55 calculates a new reference time tr using the average value Xave in consideration of the change in the time difference Xp according to the change in the errors E1 and E2.
  • the generation unit 55 updates the latest average value Xave updated by the update unit 53 using the time difference X between the reception time ta of the legitimate target message M and the reference time tr.
  • the value added to the reference time trq is calculated as a new reference time tr (q + 1).
  • the generation unit 55 uses the delay time D due to the arbitration process when the target message M is transmitted in the generation of the new reference time tr (q + 1).
  • the generation unit 55 when the generation unit 55 receives the generation request Y1 from the detection unit 54, the generation unit 55 refers to the average value Xave in the storage unit 56, and adds the latest average value Xave and the delay time D to the latest reference time trq. Calculate the value.
  • the generation unit 55 notifies the detection unit 54 of the calculated value as a new reference time tr (q + 1).
  • the storage unit 56 stores a delay calculation model for calculating the delay time D of the target message M from the delay time of the periodic message that has a high correlation with the target message M with respect to the transmission time.
  • the generation unit 55 calculates the delay time D of the target message M from the delay calculation model in the storage unit 56 and the delay time of the periodic message, and sets the latest average value Xave and the delay time D to the latest reference time trq.
  • the added value is calculated as a new reference time tr (q + 1).
  • FIG. 11 is a diagram showing another example of the distribution of the reception time of the target message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • the horizontal axis represents the time.
  • the generation unit 55 is normal based on the reception time of the target message M determined to be normal.
  • a new reference time tr used for the detection process for the target message M transmitted after the target message M determined to be is generated.
  • the generation unit 55 when the generation unit 55 receives the generation request Y2 from the detection unit 54, the generation unit 55 refers to the time difference information in the storage unit 56 and determines that the message is not an invalid message in the detection process using the latest reference time trq. Acquires the reception time tan of the target message Mn of. The generation unit 55 notifies the detection unit 54 of the calculated reception time tan as a new reference time tr (q + 1).
  • Example 4 of generation of reference time When the generation unit 55 receives the reception time ta1, ta2, ta3, ta4 of the target message M1, M2, M3, M4 and the generation request Y3 from the detection unit 54, one of the reception times ta2 and ta3 is used as the initial reference. Notify the detection unit 54 as the time tr1.
  • Each device in the in-vehicle communication system includes a computer including a memory, and an arithmetic processing unit such as a CPU in the computer is a program including a part or all of each step of the following flowchart and sequence. Is read from the memory and executed. The programs of these plurality of devices can be installed from the outside. The programs of these plurality of devices are distributed in a state of being stored in a recording medium.
  • FIG. 12 is a flowchart defining an example of an operation procedure when the gateway device performs detection processing in the in-vehicle communication system according to the embodiment of the present disclosure.
  • the gateway device 101 generates the first reference time tr1 (step S102).
  • the gateway device 101 sets the threshold allowable range R1 based on the reference time tr1 and the threshold value Th1 (step S104).
  • the gateway device 101 monitors the target message M in the vehicle-mounted network 12, listens for the target message M (NO in step S106), for example, receives the target message Mn (YES in step S106), and detects an invalid message. Perform detection processing. Specifically, the gateway device 101 determines whether or not the target message Mn is an invalid message based on the time difference Xn between the reception time tan of the target message Mn and the reference time trq (step S108).
  • the gateway device 101 uses the time difference Xn between the reception time tan and the reference time trq of the target message Mn. Then, the average value Xave in the storage unit 56 is updated (step S112).
  • the gateway device 101 continues to monitor the target message M and waits for the next target message M (n + 1) (NO in step S106).
  • the gateway device 101 determines that the target message Mn is an invalid message as a result of the detection process (YES in step S110), the gateway device 101 provides alarm information indicating that the illegal message is being transmitted in the vehicle 1 or in the vehicle 1. It is transmitted to a higher-level device outside (step S114).
  • the gateway device 101 continues to monitor the target message M and waits for the next target message M (n + 1) (NO in step S106).
  • FIG. 13 is a flowchart defining an example of detection processing in the gateway device of the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 13 shows the details of step S108 in FIG.
  • the gateway device 101 acquires the reception time tan of the target message Mn (step S202).
  • the gateway device 101 compares the acquired reception time tan with the allowable range Rq, that is, the threshold times trqA and trqB set based on the latest reference time trq (step S204).
  • the gateway device 101 when the reception time tan is later than the threshold time trqB (YES in step S206), the gateway device 101 generates a new reference time tr (q + 1) (step S208), and sets the reception time tan. , Compare with the allowable range R (q + 1) based on the newly generated reference time tr (q + 1) (step S204).
  • the gateway device 101 determines that the target message Mn is not an invalid message (step S212).
  • the gateway device 101 determines that the target message Mn is an invalid message (step S214). ..
  • FIG. 14 is a flowchart defining an example of processing for generating a reference time in the gateway device of the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 14 shows the details of step S208 in FIG.
  • the gateway device 101 detects an abnormality in the detection process using the latest reference time trq, specifically, when it detects an invalid message or makes a gray determination (step). YES in S302), the value obtained by adding the latest average value Xave to the latest reference time trq is set as the new reference time tr (q + 1) (step S304).
  • the gateway device 101 does not detect an abnormality in the detection process using the latest reference time trq, specifically, when it does not detect an illegal message and does not make a gray determination (step S302). NO), the reception time tan of the target message Mn determined not to be an invalid message in the detection process using the latest reference time trq is set as the new reference time tr (q + 1) (step S306).
  • FIG. 15 is a flowchart defining an example of processing for generating the first reference time in the gateway device of the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 15 shows the details of step S102 in FIG.
  • the gateway device 101 listens for the target message M (NO in step S402), for example, receives the target message Mn (YES in step S402), the reception time tan of the target message Mn is provisionally set.
  • the allowable range Ra is set by using it as the reference time tra (step S404).
  • the gateway device 101 sets the number of successful receptions f to zero (step S408).
  • the allowable range Ra is set by using the reception time ta (n + 1) as a temporary reference time tra (step S404).
  • the gateway device 101 increments the number of successful receptions f (step S410).
  • the gateway device 101 uses the reception time ta (n + 1) as a temporary reference time tra to set the allowable range Ra (step S404). ..
  • the gateway device 101 receives four consecutive target messages Mn, M (n + 1), M (n + 2), and M (n + 3).
  • the reception time ta (n + 2) is set as the first reference time tr1 (step S414).
  • the gateway device 101 is configured to detect an unauthorized message in the vehicle-mounted network 12, but the present invention is not limited to this.
  • a detection device other than the gateway device 101 may be configured to detect an unauthorized message in the vehicle-mounted network 12.
  • the gateway device 101 functioning as a detection device is directly connected to the bus 13, but the present invention is not limited to this.
  • FIG. 16 is a diagram showing an example of the connection topology of the in-vehicle network according to the embodiment of the present disclosure.
  • the detection device 151 may be connected to the bus 13 via an in-vehicle device such as a control device 122. In this case, the detection device 151 detects an unauthorized message transmitted to the bus 13, for example, by monitoring the message transmitted and received by the in-vehicle device.
  • the monitoring unit 52 of the detection device 151 acquires a time corresponding to the transmission time of the target message M transmitted by the control device 122.
  • the detection unit 54 of the detection device 151 performs the detection process based on the time difference between the transmission time of the target message M based on the monitoring result by the monitoring unit 52 and the reference time tr generated by the generation unit 55.
  • the update unit 53 of the detection device 151 updates the statistical value of the time difference by using the time difference between the transmission time of the target message M determined to be normal in the detection process and the reference time tr.
  • the detection unit 54 is configured to determine whether or not the target message M is an invalid message as the detection process, but the present invention is limited to this. is not it.
  • the detection unit 54 may be configured to calculate the probability that the target message M is an invalid message as the detection process.
  • the detection unit 54 determines that the target message Mn is not an invalid message and then further determines that the target message M (n + 1) is not an invalid message
  • the configuration is such that the target messages Mn and M (n + 1) are determined to be gray
  • the present invention is not limited to this.
  • the detection unit 54 may be configured not to perform gray determination.
  • the detection unit 54 when the detection unit 54 does not detect an illegal message in the detection process using the reference time trq and does not make a gray determination, a generation request is made.
  • the configuration is such that Y2 is notified to the generation unit 55, but the present invention is not limited to this. If the detection unit 54 does not detect an invalid message and does not make a gray determination in the detection process using the reference time trq, the detection unit 54 does not notify the generation request Y2 to the generation unit 55, while generating the generation request Y1. It may be configured to notify the generation unit 55.
  • the generation unit 55 refers to the average value Xave in the storage unit 56, and calculates a value obtained by adding the latest average value Xave to the latest reference time trq.
  • the generation unit 55 notifies the detection unit 54 of the calculated value as a new reference time tr (q + 1).
  • a legitimate cycle is based on the time difference between the transmission time of the periodic message and the transmission time of the next periodic message, based on the periodic message transmitted at a certain time.
  • a method of detecting malicious messages spoofing messages can be considered.
  • next periodic message is an invalid message based on the transmission time of the immediately preceding periodic message
  • the immediately preceding periodic message is an invalid message
  • the invalid message is displayed.
  • the next malicious message may be erroneously determined to be a valid message, or the valid message transmitted according to a predetermined design transmission cycle may be erroneously determined to be a valid message.
  • the monitoring unit 52 monitors the legitimate message and the malicious message periodically transmitted in the vehicle-mounted network 12 as the target message M.
  • the detection unit 54 performs a detection process for detecting an unauthorized message.
  • the generation unit 55 generates the reference time tr used for the detection process.
  • the detection unit 54 performs detection processing based on the time difference Xn between the time corresponding to the transmission time of the target message Mn based on the monitoring result by the monitoring unit 52 and the reference time trq generated by the generation unit 55.
  • the update unit 53 updates the average value Xave of the time difference X by using the time difference X between the time corresponding to the transmission time of the target message M determined to be normal in the detection process and the reference time tr.
  • the generation unit 55 is after the target message Mn determined to be abnormal based on the value obtained by adding the latest average value Xave to the reference time trq.
  • a new reference time tr (q + 1) used for the detection process for the transmitted target message M (n + 1) is generated.
  • the average value Xave is updated using the time difference X between the time corresponding to the transmission time of the target message M determined to be normal in the detection process and the reference time tr, and the target message Mn is set in the detection process.
  • a new reference time tr (q + 1) is generated based on the value obtained by adding the average value Xave of the time difference X to the reference time trq, and the time corresponding to the transmission time of the invalid message is set. Since it is possible to avoid performing the detection process based on the reference, it is possible to suppress erroneous determination in the detection process for the target message M (n + 1) transmitted after the target message Mn determined to be abnormal. ..
  • the gateway device 101 can more accurately detect an unauthorized message in the in-vehicle network.
  • the detection unit 54 determines the time difference Xn between the time corresponding to the transmission time of the target message Mn and the reference time trq, and the target message transmitted after the target message Mn.
  • An abnormality related to the target message Mn is detected based on the time difference X (n + 1) between the time corresponding to the transmission time of M (n + 1) and the reference time trq.
  • a plurality of target messages M are transmitted within the time determined to be normal, and the malicious message included in the plurality of target messages M is justified. Even if it is erroneously determined that the message is a message, it can be determined that the plurality of target messages M may be abnormal. As a result, a malicious message that could not be detected in the detection process can be determined in gray, for example.
  • the generation unit 55 sets the transmission time of the target message Mn determined to be normal. Based on the corresponding time, a new reference time tr (q + 1) used for the detection process for the target message M (n + 1) transmitted after the target message Mn determined to be normal is generated.
  • the target message Mn is transmitted due to communication delay or the like. More accurate detection processing can be performed in consideration of time fluctuations.
  • the generation unit 55 uses the delay time due to the arbitration process when the target message M is transmitted in the generation of the reference time tr.
  • the vehicle 1 includes a gateway device 101.
  • the detection method according to the embodiment of the present disclosure is the detection method in the gateway device 101 that detects an unauthorized message in the in-vehicle network 12.
  • the gateway device 101 monitors the legitimate message and the malicious message periodically transmitted in the vehicle-mounted network 12 as the target message M.
  • the gateway device 101 generates a reference time tr used for the detection process for detecting an invalid message.
  • the gateway device 101 performs detection processing based on the time difference Xn between the time corresponding to the transmission time of the target message Mn based on the monitoring result of the target message M and the generated reference time trq.
  • the gateway device 101 updates the average value Xave of the time difference X by using the time difference X between the time corresponding to the transmission time of the target message M determined to be normal in the detection process and the reference time tr.
  • the gateway device 101 is abnormal based on the value obtained by adding the latest average value Xave to the reference time trq when the target message Mn is determined to be abnormal in the detection process.
  • a new reference time tr (q + 1) used for the detection process for the target message M (n + 1) transmitted after the target message Mn determined to be present is generated.
  • the average value Xave is updated using the time difference X between the time corresponding to the transmission time of the target message M determined to be normal in the detection process and the reference time tr, and the target message Mn is set in the detection process.
  • the time corresponding to the transmission time of the invalid message is set by a method of generating a new reference time tr (q + 1) based on the value obtained by adding the average value Xave of the time difference X to the reference time trq. Since it is possible to avoid performing the detection process based on the reference, it is possible to suppress erroneous determination in the detection process for the target message M (n + 1) transmitted after the target message Mn determined to be abnormal. ..
  • the detection method according to the embodiment of the present disclosure can more accurately detect an unauthorized message in the in-vehicle network.
  • a detection device that detects malicious messages in an in-vehicle network.
  • a monitoring unit that monitors periodically transmitted legitimate messages and malicious messages as target messages in the in-vehicle network.
  • a generator that generates a reference time used in the detection process for detecting the malicious message,
  • a detection unit that performs the detection process based on the time difference between the time corresponding to the transmission time of the target message based on the monitoring result by the monitoring unit and the reference time generated by the generation unit. It is provided with an update unit that updates the statistical value of the time difference by using the time difference between the time corresponding to the transmission time of the target message determined to be normal in the detection process and the reference time.
  • the generation unit of the target message determined to be abnormal based on the latest statistical value added to the reference time.
  • a new reference time used for the detection process for the target message to be transmitted later is generated.
  • the generation unit of the target message determined to be normal based on the transmission time of the target message determined to be normal.
  • a new reference time used for the detection process for the target message to be transmitted later is generated.
  • the detection device, wherein the statistical value of the time difference is an average value of the time difference.
  • a detection device that detects malicious messages in an in-vehicle network.
  • a monitoring unit that monitors periodically transmitted legitimate messages and malicious messages as target messages in the in-vehicle network.
  • a generator that generates a reference time used in the detection process for detecting the malicious message,
  • a detection unit that performs the detection process based on the time difference between the time corresponding to the transmission time of the target message based on the monitoring result by the monitoring unit and the reference time generated by the generation unit. It is provided with an update unit that updates the statistical value of the time difference by using the time difference between the time corresponding to the transmission time of the target message determined to be normal in the detection process and the reference time.
  • the generation unit of the target message determined to be abnormal based on the latest statistical value added to the reference time.
  • a new reference time used for the detection process for the target message to be transmitted later is generated.
  • the monitoring unit, the generating unit, the detecting unit, and the updating unit are detection devices realized by a processor.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Small-Scale Networks (AREA)

Abstract

車載ネットワークにおける不正メッセージをより正しく検知する。検知装置は、車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視する監視部と、前記不正メッセージを検知する検知処理に用いられる基準時刻を生成する生成部と、前記監視部による監視結果に基づく前記対象メッセージの送信時刻に対応する時刻と、前記生成部によって生成された前記基準時刻との時間差に基づいて、前記検知処理を行う検知部と、前記検知処理において正常であると判定された前記対象メッセージの送信時刻に対応する時刻と前記基準時刻との前記時間差を用いて、前記時間差の統計値を更新する更新部とを備え、前記生成部は、前記検知処理において前記対象メッセージが異常であると判定された場合、最新の前記統計値を前記基準時刻に加えた値に基づいて、異常であると判定された前記対象メッセージの後に送信される前記対象メッセージについての前記検知処理に用いられる新たな前記基準時刻を生成する。

Description

検知装置、車両、検知方法および検知プログラム
 本開示は、検知装置、車両、検知方法および検知プログラムに関する。
 この出願は、2019年9月30日に出願された日本出願特願2019-178177号を基礎とする優先権を主張し、その開示のすべてをここに取り込む。
 特許文献1(特開2014-146868号公報)には、以下のようなネットワーク装置が開示されている。すなわち、ネットワーク装置は、データを受信する通信部と、データを受信した受信時間を管理する時間管理部と、受信したデータを処理する制御部とを有し、周期的にデータを受信して処理するネットワーク装置において、前記制御部は、前記通信部で受信したデータが有する識別子毎に前記時間管理部における受信時刻を記録し、基準とするデータと同じ識別子を持つデータを受信した間隔が所定周期より短い第1のデータを受信した場合に、前記基準とするデータを受信した時刻から前記所定周期経過するまでに前記第1のデータと同じ識別子を持つ第2のデータを受信した時には、周期異常検出時処理を行い、前記所定周期経過するまでに前記第1のデータと同じ識別子を持つデータを受信しなかった時には、前記第1のデータについて所定の処理を行う。
 また、特許文献2(特開2018-182725号公報)には、以下のような不正通信検知基準決定方法が開示されている。すなわち、不正通信検知基準決定方法は、記憶部を含む情報処理システムで実行される、ネットワーク及び前記ネットワークに接続される1以上の電子制御ユニットを含む車載ネットワークシステムにおける不正通信の検知に用いる基準メッセージの決定方法であって、前記車載ネットワークシステムに対する攻撃メッセージに関する情報から、前記攻撃メッセージの特徴を示す通信パターンを識別する通信パターン識別ステップと、前記ネットワークに送出されたメッセージが、前記通信パターン識別ステップで識別された通信パターンに適合するか否かを判定する通信パターン判定ステップと、前記ネットワークに送出されるメッセージが攻撃メッセージであるか否かの判定の基準に用いる基準メッセージを、前記通信パターン判定ステップにおける判定結果を用いて決定する基準メッセージ決定ステップとを含む。
特開2014-146868号公報 特開2018-182725号公報
 本開示の検知装置は、車載ネットワークにおける不正メッセージを検知する検知装置であって、前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視する監視部と、前記不正メッセージを検知する検知処理に用いられる基準時刻を生成する生成部と、前記監視部による監視結果に基づく前記対象メッセージの送信時刻に対応する時刻と、前記生成部によって生成された前記基準時刻との時間差に基づいて、前記検知処理を行う検知部と、前記検知処理において正常であると判定された前記対象メッセージの送信時刻に対応する時刻と前記基準時刻との前記時間差を用いて、前記時間差の統計値を更新する更新部とを備え、前記生成部は、前記検知処理において前記対象メッセージが異常であると判定された場合、最新の前記統計値を前記基準時刻に加えた値に基づいて、異常であると判定された前記対象メッセージの後に送信される前記対象メッセージについての前記検知処理に用いられる新たな前記基準時刻を生成する。
 本開示の検知方法は、車載ネットワークにおける不正メッセージを検知する検知装置における検知方法であって、前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視するステップと、前記不正メッセージを検知する検知処理に用いられる基準時刻を生成するステップと、前記対象メッセージの監視結果に基づく前記対象メッセージの送信時刻に対応する時刻と、生成した前記基準時刻との時間差に基づいて、前記検知処理を行うステップと、前記検知処理において正常であると判定された前記対象メッセージの送信時刻に対応する時刻と前記基準時刻との前記時間差を用いて、前記時間差の統計値を更新するステップとを含み、前記基準時刻を生成するステップにおいては、前記検知処理において前記対象メッセージが異常であると判定された場合、最新の前記統計値を前記基準時刻に加えた値に基づいて、異常であると判定された前記対象メッセージの後に送信される前記対象メッセージについての前記検知処理に用いられる新たな前記基準時刻を生成する。
 本開示の検知プログラムは、車載ネットワークにおける不正メッセージを検知する検知装置において用いられる検知プログラムであって、コンピュータを、前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視する監視部と、前記不正メッセージを検知する検知処理に用いられる基準時刻を生成する生成部と、前記監視部による監視結果に基づく前記対象メッセージの送信時刻に対応する時刻と、前記生成部によって生成された前記基準時刻との時間差に基づいて、前記検知処理を行う検知部と、前記検知処理において正常であると判定された前記対象メッセージの送信時刻に対応する時刻と前記基準時刻との前記時間差を用いて、前記時間差の統計値を更新する更新部として機能させるためのプログラムであり、前記生成部は、前記検知処理において前記対象メッセージが異常であると判定された場合、最新の前記統計値を前記基準時刻に加えた値に基づいて、異常であると判定された前記対象メッセージの後に送信される前記対象メッセージについての前記検知処理に用いられる新たな前記基準時刻を生成する、プログラムである。
 本開示の一態様は、検知装置の一部または全部を実現する半導体集積回路として実現され得たり、検知装置を備えるシステムとして実現され得る。また、本開示の一態様は、検知装置を備えるシステムの一部または全部を実現する半導体集積回路として実現され得たり、中継装置を備えるシステムにおける処理のステップをコンピュータに実行させるためのプログラムとして実現され得る。
図1は、本開示の実施の形態に係る車載通信システムの構成を示す図である。 図2は、本開示の実施の形態に係るバス接続装置群の構成を示す図である。 図3は、本開示の実施の形態に係る車載通信システムにおけるゲートウェイ装置の構成を示す図である。 図4は、本開示の実施の形態に係る車載通信システムにおける制御装置およびゲートウェイ装置のハードウェア構成の一例を示す図である。 図5は、本開示の実施の形態に係る車載通信システムにおける対象メッセージの受信時刻の分布の一例を示す図である。 図6は、本開示の実施の形態に係る車載通信システムにおけるすべての対象メッセージを正当メッセージとしたときに算出されるマハラノビス距離の度数分布の一例を示す図である。 図7は、本開示の実施の形態に係る車載通信システムにおける対象メッセージの受信時刻の分布の他の例を示す図である。 図8は、本開示の実施の形態に係る車載通信システムにおける対象メッセージの受信時刻の分布の他の例を示す図である。 図9は、本開示の実施の形態に係る車載通信システムにおける対象メッセージの受信時刻の分布の他の例を示す図である。 図10は、本開示の実施の形態に係る車載通信システムにおける対象メッセージの受信時刻の分布の他の例を示す図である。 図11は、本開示の実施の形態に係る車載通信システムにおける対象メッセージの受信時刻の分布の他の例を示す図である。 図12は、本開示の実施の形態に係る車載通信システムにおいてゲートウェイ装置が検知処理を行う際の動作手順の一例を定めたフローチャートである。 図13は、本開示の実施の形態に係る車載通信システムのゲートウェイ装置における検知処理の一例を定めたフローチャートである。 図14は、本開示の実施の形態に係る車載通信システムのゲートウェイ装置における基準時刻を生成する処理の一例を定めたフローチャートである。 図15は、本開示の実施の形態に係る車載通信システムのゲートウェイ装置における初回の基準時刻を生成する処理の一例を定めたフローチャートである。 図16は、本開示の実施の形態に係る車載ネットワークの接続トポロジの一例を示す図である。
 従来、車載ネットワークにおけるセキュリティを向上させるための技術が開発されている。
 [本開示が解決しようとする課題]
 上述の特許文献1および2に記載の技術を超えて、車載ネットワークにおける不正メッセージをより正しく検知することを可能とする技術が望まれる。
 本開示は、上述の課題を解決するためになされたもので、その目的は、車載ネットワークにおける不正メッセージをより正しく検知することが可能な検知装置、車両、検知方法および検知プログラムを提供することである。
 [本開示の効果]
 本開示によれば、車載ネットワークにおける不正メッセージをより正しく検知することが可能である。
 [本開示の実施形態の説明]
 最初に、本開示の実施形態の内容を列記して説明する。
 (1)本開示の実施の形態に係る検知装置は、車載ネットワークにおける不正メッセージを検知する検知装置であって、前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視する監視部と、前記不正メッセージを検知する検知処理に用いられる基準時刻を生成する生成部と、前記監視部による監視結果に基づく前記対象メッセージの送信時刻に対応する時刻と、前記生成部によって生成された前記基準時刻との時間差に基づいて、前記検知処理を行う検知部と、前記検知処理において正常であると判定された前記対象メッセージの送信時刻に対応する時刻と前記基準時刻との前記時間差を用いて、前記時間差の統計値を更新する更新部とを備え、前記生成部は、前記検知処理において前記対象メッセージが異常であると判定された場合、最新の前記統計値を前記基準時刻に加えた値に基づいて、異常であると判定された前記対象メッセージの後に送信される前記対象メッセージについての前記検知処理に用いられる新たな前記基準時刻を生成する。
 このように、検知処理において正常であると判定された対象メッセージの送信時刻に対応する時刻と基準時刻との時間差を用いて統計値を更新するとともに、検知処理において対象メッセージが異常であると判定された場合、時間差の統計値を基準時刻に加えた値に基づいて新たな基準時刻を生成する構成により、不正メッセージの送信時刻に対応する時刻を基準に検知処理を行うことを回避することができるため、異常であると判定された対象メッセージの次に送信される対象メッセージについての検知処理における誤判定を抑制することができる。したがって、車載ネットワークにおける不正メッセージをより正しく検知することができる。
 (2)好ましくは、前記検知部は、前記対象メッセージである第1の対象メッセージの送信時刻に対応する時刻と前記基準時刻との時間差、および前記第1の対象メッセージの後に送信される前記対象メッセージである第2の対象メッセージの送信時刻に対応する時刻と前記基準時刻との時間差に基づいて、前記第1の対象メッセージに関する異常を検知する。
 このような構成により、たとえば、基準時刻を用いた検知処理において、正常であると判定される時間内に複数の対象メッセージが送信され、当該複数の対象メッセージに含まれる不正メッセージを正当メッセージであると誤判定した場合であっても、当該複数の対象メッセージは異常である可能性があると判断することができる。これにより、検知処理において検知することができなかった不正メッセージを、たとえばグレー判定することができる。
 (3)好ましくは、前記生成部は、前記検知処理において前記対象メッセージが正常であると判定された場合、正常であると判定された前記対象メッセージの送信時刻に対応する時刻に基づいて、正常であると判定された前記対象メッセージの後に送信される前記対象メッセージについての前記検知処理に用いられる新たな前記基準時刻を生成する。
 このような構成により、たとえば、正常であると判定された対象メッセージの実際の送信時刻に対応する時刻を新たな基準時刻とすることにより、通信遅延等による対象メッセージの送信時刻の変動を考慮した、より正確な検知処理を行うことができる。
 (4)好ましくは、前記生成部は、前記基準時刻の生成において、前記対象メッセージが送信される際の調停処理による遅延時間を用いる。
 このような構成により、たとえば、時間差の最新の統計値を基準時刻に加えることにより新たな基準時刻を生成する場合において、通信遅延等による対象メッセージの送信時刻の変動が考慮された基準時刻を用いて、より正確な検知処理を行うことができる。
 (5)本開示の実施の形態に係る車両は、前記検知装置を備える。
 このような構成により、検知装置を備える車両において、車載ネットワークにおける不正メッセージをより正しく検知することができる。
 (6)本開示の実施の形態に係る検知方法は、車載ネットワークにおける不正メッセージを検知する検知装置における検知方法であって、前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視するステップと、前記不正メッセージを検知する検知処理に用いられる基準時刻を生成するステップと、前記対象メッセージの監視結果に基づく前記対象メッセージの送信時刻に対応する時刻と、生成した前記基準時刻との時間差に基づいて、前記検知処理を行うステップと、前記検知処理において正常であると判定された前記対象メッセージの送信時刻に対応する時刻と前記基準時刻との前記時間差を用いて、前記時間差の統計値を更新するステップとを含み、前記基準時刻を生成するステップにおいては、前記検知処理において前記対象メッセージが異常であると判定された場合、最新の前記統計値を前記基準時刻に加えた値に基づいて、異常であると判定された前記対象メッセージの後に送信される前記対象メッセージについての前記検知処理に用いられる新たな前記基準時刻を生成する。
 このように、検知処理において正常であると判定された対象メッセージの送信時刻に対応する時刻と基準時刻との時間差を用いて統計値を更新するとともに、検知処理において対象メッセージが異常であると判定された場合、時間差の統計値を基準時刻に加えた値に基づいて新たな基準時刻を生成する方法により、不正メッセージの送信時刻に対応する時刻を基準に検知処理を行うことを回避することができるため、異常であると判定された対象メッセージの次に送信される対象メッセージについての検知処理における誤判定を抑制することができる。したがって、車載ネットワークにおける不正メッセージをより正しく検知することができる。
 (7)本開示の実施の形態に係る検知プログラムは、車載ネットワークにおける不正メッセージを検知する検知装置において用いられる検知プログラムであって、コンピュータを、前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視する監視部と、前記不正メッセージを検知する検知処理に用いられる基準時刻を生成する生成部と、前記監視部による監視結果に基づく前記対象メッセージの送信時刻に対応する時刻と、前記生成部によって生成された前記基準時刻との時間差に基づいて、前記検知処理を行う検知部と、前記検知処理において正常であると判定された前記対象メッセージの送信時刻に対応する時刻と前記基準時刻との前記時間差を用いて、前記時間差の統計値を更新する更新部として機能させるためのプログラムであり、前記生成部は、前記検知処理において前記対象メッセージが異常であると判定された場合、最新の前記統計値を前記基準時刻に加えた値に基づいて、異常であると判定された前記対象メッセージの後に送信される前記対象メッセージについての前記検知処理に用いられる新たな前記基準時刻を生成する、プログラムである。
 このように、検知処理において正常であると判定された対象メッセージの送信時刻に対応する時刻と基準時刻との時間差を用いて統計値を更新するとともに、検知処理において対象メッセージが異常であると判定された場合、時間差の統計値を基準時刻に加えた値に基づいて新たな基準時刻を生成する構成により、不正メッセージの送信時刻に対応する時刻を基準に検知処理を行うことを回避することができるため、異常であると判定された対象メッセージの次に送信される対象メッセージについての検知処理における誤判定を抑制することができる。したがって、車載ネットワークにおける不正メッセージをより正しく検知することができる。
 以下、本開示の実施の形態について図面を用いて説明する。なお、図中同一または相当部分には同一符号を付してその説明は繰り返さない。また、以下に記載する実施の形態の少なくとも一部を任意に組み合わせてもよい。
 [構成および基本動作]
 図1は、本開示の実施の形態に係る車載通信システムの構成を示す図である。
 図1を参照して、車載通信システム301は、ゲートウェイ装置101と、複数の車載通信機111と、複数のバス接続装置群121とを備える。ゲートウェイ装置101は、検知装置の一例である。車載通信システム301は、車両1に搭載される。
 図2は、本開示の実施の形態に係るバス接続装置群の構成を示す図である。
 図2を参照して、バス接続装置群121は、複数の制御装置122を含む。なお、バス接続装置群121は、複数の制御装置122を備える構成に限らず、1つの制御装置122を含む構成であってもよい。
 車載ネットワーク12は、車両1の内部における装置である車載装置を複数含む。具体的には、車載ネットワーク12は、車載装置の一例である、複数の車載通信機111および複数の制御装置122を含む。なお、車載ネットワーク12は、複数の車載装置を含む構成であれば、複数の車載通信機111を含みかつ制御装置122を含まない構成であってもよいし、車載通信機111を含まずかつ複数の制御装置122を含む構成であってもよいし、1つの車載通信機111および1つの制御装置122を含む構成であってもよい。
 車載ネットワーク12において、車載通信機111は、たとえば、車両1の外部における装置と通信する。具体的には、車載通信機111は、たとえば、TCU(Telematics Communication Unit)、近距離無線端末装置、およびITS(Intelligent Transport Systems)無線機である。
 TCUは、たとえば、LTE(Long Term Evolution)または3G等の通信規格に従って、無線基地局装置と無線通信を行うことが可能であり、かつゲートウェイ装置101と通信を行うことが可能である。TCUは、たとえば、ナビゲーション、車両盗難防止、リモートメンテナンスおよびFOTA(Firmware Over The Air)等のサービスに用いる情報を中継する。
 近距離無線端末装置は、たとえば、Wi-Fi(登録商標)およびBluetooth(登録商標)等の通信規格に従って、車両1に乗車している人間すなわち搭乗者の保持するスマートホン等の無線端末装置と無線通信を行うことが可能であり、かつゲートウェイ装置101と通信を行うことが可能である。当該近距離無線端末装置は、たとえば、エンターテイメント等のサービスに用いる情報を中継する。
 また、近距離無線端末装置は、たとえば、所定の通信規格に従って、搭乗者の保持するスマートキー等の無線端末装置、およびタイヤに設けられた無線端末装置とLF(Low Frequency)帯またはUHF(Ultra High Frequency)帯の電波を用いて無線通信を行うことが可能であり、かつゲートウェイ装置101と通信を行うことが可能である。当該近距離無線端末装置は、たとえば、スマートエントリおよびTPMS(Tire Pressure Monitoring System)等のサービスに用いる情報を中継する。
 ITS無線機は、たとえば、道路の近傍に設けられた光ビーコン、電波ビーコンおよびITSスポット等の路側機と路車間通信を行うことが可能であり、他の車両に搭載された車載端末と車車間通信を行うことが可能であり、かつゲートウェイ装置101と通信を行うことが可能である。ITS無線機は、たとえば、渋滞緩和、安全運転支援およびルートガイダンス等のサービスに用いる情報を中継する。
 ゲートウェイ装置101は、たとえば、ファームウェアのアップデート等のデータ、およびゲートウェイ装置101により蓄積されたデータ等を車両1の外部における整備用端末装置とポート112を介して送受信することが可能である。
 ゲートウェイ装置101は、たとえばバス13,14を介して車載装置と接続する。具体的には、バス13,14は、たとえば、CAN(Controller Area Network)(登録商標)、FlexRay(登録商標)、MOST(Media Oriented Systems Transport)(登録商標)、イーサネット(登録商標)、およびLIN(Local Interconnect Network)等の規格に従うバスである。
 この例では、車載通信機111は、イーサネットの規格に従う対応のバス14を介してゲートウェイ装置101と接続されている。また、バス接続装置群121における各制御装置122は、CANの規格に従う対応のバス13を介してゲートウェイ装置101と接続されている。
 バス13は、たとえば系統別に設けられる。具体的には、バス13は、たとえば、駆動系バス、シャーシ/安全系バス、ボディ/電装系バスおよびAV/情報系バスである。
 駆動系バスには、制御装置122の一例であるエンジン制御装置、AT(Automatic Transmission)制御装置およびHEV(Hybrid Electric Vehicle)制御装置が接続されている。エンジン制御装置、AT制御装置およびHEV制御装置は、エンジン、AT、およびエンジンとモータとの切替をそれぞれ制御する。
 シャーシ/安全系バスには、制御装置122の一例であるブレーキ制御装置、シャーシ制御装置およびステアリング制御装置が接続されている。ブレーキ制御装置、シャーシ制御装置およびステアリング制御装置は、ブレーキ、シャーシおよびステアリングをそれぞれ制御する。
 ボディ/電装系バスには、制御装置122の一例である計器表示制御装置、エアコン制御装置、盗難防止制御装置、エアバック制御装置およびスマートエントリ制御装置が接続されている。計器表示制御装置、エアコン制御装置、盗難防止制御装置、エアバック制御装置およびスマートエントリ制御装置は、計器、エアコン、盗難防止機構、エアバック機構およびスマートエントリをそれぞれ制御する。
 AV/情報系バスには、制御装置122の一例であるナビゲーション制御装置、オーディオ制御装置、ETC(Electronic Toll Collection System)(登録商標)制御装置および電話制御装置が接続されている。ナビゲーション制御装置、オーディオ制御装置、ETC制御装置および電話制御装置は、ナビゲーション装置、オーディオ装置、ETC装置および携帯電話をそれぞれ制御する。
 また、バス13には、制御装置122が接続される構成に限らず、制御装置122以外の装置が接続されてもよい。
 ゲートウェイ装置101は、たとえば、セントラルゲートウェイ(Central Gateway:CGW)であり、車載装置と通信を行うことが可能である。
 ゲートウェイ装置101は、たとえば、車両1において異なるバス13に接続された制御装置122間でやり取りされる情報、各車載通信機111間でやり取りされる情報、制御装置122および車載通信機111間でやり取りされる情報を中継する中継処理を行う。
 より詳細には、車両1では、たとえば、所定の取り決めに従って、ある車載装置から他の車載装置へ周期的にメッセージが送信される。この例では、ある制御装置122から他の制御装置122へ周期的に送信されるメッセージについて説明するが、制御装置122および車載通信機111間において送信されるメッセージ、ならびに各車載通信機111間において送信されるメッセージについても同様である。
 メッセージの送信は、ブロードキャストによって行われてもよいし、ユニキャストによって行われてもよいし、マルチキャストによって行われてもよい。以下、周期的に送信されるメッセージを周期メッセージとも称する。
 車両1では、周期メッセージの他に、ある制御装置122から他の制御装置122へ不定期に送信されるメッセージが存在する。メッセージには、メッセージの内容、送信元およびメッセージ番号等を識別するためのID(Identifier)が含まれる。メッセージに含まれるIDによって、当該メッセージが周期メッセージであるか否かを識別することが可能である。
 ゲートウェイ装置101は、検知装置として機能し、車載ネットワーク12における不正メッセージを検知する検知処理を行う。
 [ゲートウェイ装置の構成]
 図3は、本開示の実施の形態に係る車載通信システムにおけるゲートウェイ装置の構成を示す図である。
 図3を参照して、ゲートウェイ装置101は、通信処理部51と、監視部52と、更新部53と、検知部54と、生成部55と、記憶部56とを備える。通信処理部51、監視部52、更新部53、検知部54および生成部55は、たとえば、CPU(Central Processing Unit)およびDSP(Digital Signal Processor)等のプロセッサによって実現される。
 監視部52は、正当な周期メッセージおよび不正メッセージをゲートウェイ装置101における検知処理の対象となるメッセージすなわち対象メッセージMとして監視する。
 検知部54は、不正メッセージを検知する検知処理を行う。
 生成部55は、検知処理に用いられる基準時刻を生成する。生成部55は、生成した基準時刻を検知部54へ通知する。
 記憶部56は、対象メッセージMの受信時刻と基準時刻trとの時間差Xの統計値を記憶する。記憶部56は、たとえば、たとえばフラッシュメモリである。記憶部56は、ゲートウェイ装置101の外部に設けられてもよい。
 更新部53は、統計値を更新する。たとえば、更新部53は、記憶部56における統計値を更新する。
 [通信処理部]
 通信処理部51は、制御装置122間で伝送されるメッセージを中継する中継処理を行う。
 たとえば、通信処理部51は、ある制御装置122から対応のバス13経由でメッセージを受信すると、受信したメッセージに、当該メッセージの受信時刻を示すタイムスタンプを付与する。そして、通信処理部51は、タイムスタンプが付与されたメッセージを他の制御装置122へ対応のバス13経由で送信する。
 [監視部]
 監視部52は、上述したように、対象メッセージMを監視する。
 図4は、本開示の実施の形態に係る車載通信システムにおける制御装置およびゲートウェイ装置のハードウェア構成の一例を示す図である。
 図4を参照して、制御装置122は、発振器131と、CPU(Central Processing Unit)132と、CANトランシーバ133とを備える。
 ゲートウェイ装置101は、CPU141と、CANトランシーバ142と、発振器143とを備える。CPU141は、監視部52、更新部53、検知部54および生成部55の一部または全部を実現する。CANトランシーバ142は、通信処理部51の一部または全部を実現する。
 制御装置122は、設計上の送信周期である設計送信周期Tで周期メッセージを送信する。より詳細には、制御装置122におけるCPU132は、発振器131からの発振信号に基づいて生成されるクロックのタイミングに従って、CANトランシーバ133経由で周期メッセージをブロードキャストまたはユニキャストする。
 ゲートウェイ装置101におけるCANトランシーバ142は、発振器143からの発振信号に基づいて生成されるクロックのタイミングに従って、制御装置122から受信した周期メッセージに受信時刻を示すタイムスタンプを付与する。
 以下では、制御装置122が、ゲートウェイ装置101における検知処理の対象となる対象メッセージMを送信するものとする。
 たとえば、ゲートウェイ装置101が制御装置122から受信するメッセージの一部は、不正メッセージである。監視部52は、制御装置122からの正当な周期メッセージおよび不正メッセージを対象メッセージMとして監視する。
 監視部52は、通信処理部51によって中継されるメッセージを監視することにより、対象メッセージMの受信時刻taを取得する。
 たとえば、記憶部56は、対象メッセージMのIDを記憶している。以下、対象メッセージMのIDを対象IDとも称する。
 監視部52は、中継処理を行うべきメッセージを通信処理部51が受信すると、通信処理部51によって受信されたメッセージに含まれるID、ならびに記憶部56における対象IDを確認する。
 そして、監視部52は、通信処理部51によって受信されたメッセージに含まれるIDが対象IDと一致する場合、通信処理部51によって受信されたメッセージが対象メッセージMであると認識し、当該対象メッセージMに付与されたタイムスタンプを参照することにより、対象メッセージMの受信時刻taを取得する。
 監視部52は、対象メッセージMの受信時刻taを取得すると、取得した受信時刻taを示す受信情報を、通信処理部51によって何番目に受信された対象メッセージMであるかを示す受信番号Nと対応付けて記憶部56に保存する。
 [検知部]
 検知部54は、監視部52による監視結果に基づく対象メッセージMの送信時刻に対応する時刻と、生成部55によって生成された基準時刻trとの時間差Xに基づいて、検知処理を行う。より詳細には、検知部54は、当該対象メッセージMの受信時刻と、当該基準時刻trとの時間差Xに基づいて、検知処理を行う。
 図5は、本開示の実施の形態に係る車載通信システムにおける対象メッセージの受信時刻の分布の一例を示す図である。図5において、横軸は時刻を示す。
 図5を参照して、たとえば、検知部54は、受信番号Nがnであるn回目の対象メッセージMnの受信時刻tanと、生成部55から通知された基準時刻trqとの時間差Xnに基づいて、検知処理を行う。ここで、nは、1以上の整数である。
 より詳細には、検知部54は、対象メッセージMnの受信時刻tanを含む新たな受信情報が記憶部56に保存されると、当該受信情報が示す受信時刻tanと基準時刻trqと時間差Xnの統計距離に基づいて、対象メッセージMnが不正メッセージであるか否かを判定する。
 たとえば、検知部54は、統計距離の一例である、以下の式(1)により表されるマハラノビス距離D^2に基づいて、対象メッセージMnが不正メッセージであるか否かを判定する。なお、「D^2」は、Dの2乗を意味する。
Figure JPOXMLDOC01-appb-M000001
 たとえば、検知部54は、対象メッセージMnの受信時刻tanと基準時刻trqとに基づいて算出されるマハラノビス距離D^2がしきい値Th以下である場合、対象メッセージMnは不正メッセージではないと判断する。一方、検知部54は、マハラノビス距離D^2がしきい値Thより大きい場合、対象メッセージMnは不正メッセージであると判断する。
 マハラノビス距離D^2との比較に用いるしきい値Thは、対象メッセージMnが不正メッセージであるか否かを正確に判断することができるよう、適切な値であることが好ましい。
 たとえば、車両1の製造者は、予め、車両1と同じ種類のテスト車両のゲートウェイ装置101を用いて、すべての対象メッセージMnを正当メッセージとしたときに算出される時間差Xnを用いてマハラノビス距離D^2を算出する。
 図6は、本開示の実施の形態に係る車載通信システムにおけるすべての対象メッセージを正当メッセージとしたときに算出されるマハラノビス距離の度数分布の一例を示す図である。
 図6を参照して、すべての対象メッセージMが正当メッセージであるときの時間差Xを用いて算出されるマハラノビス距離D^2が大きくなるほど、度数が減少する。
 たとえば、記憶部56は、図6に示すマハラノビス距離D^2の度数分布を記憶している。
 たとえば、検知部54は、起動時において、図6に示すマハラノビス距離D^2の度数分布を記憶部56から取得し、FPR(False Positive Rate)がゼロとなる範囲でしきい値Th1が最も小さくなるように、しきい値Th1を設定することが好ましい。ここで、FPRは偽陽性率であり、偽陽性/(偽陽性+真陰性)で表される。真陰性とは、正当メッセージを正当メッセージとして認識した度数であり、偽陽性とは、正当メッセージを不正メッセージとして検知した度数である。なお、記憶部55は、車両1の製造者によって予め決定されたしきい値Th1を記憶している構成であってもよい。この場合、検知部54は、起動時において、当該しきい値Th1を記憶部55から取得する。
 図7は、本開示の実施の形態に係る車載通信システムにおける対象メッセージの受信時刻の分布の他の例を示す図である。図7において、横軸は時刻を示す。
 図7を参照して、たとえば、検知部54は、生成部から基準時刻trqを通知されると、通知された基準時刻trqとしきい値Th1とに基づいて、対象メッセージMが不正メッセージであるか否かの判定に用いる判断基準を設定する。
 より詳細には、検知部54は、生成部55から基準時刻trqを通知されると、通知された基準時刻trqとしきい値Th1とに基づいて、算出されるマハラノビス距離D^2がしきい値Th1と等しい値となるときの受信時刻taを示す時刻であるしきい時刻trqA,trqBを設定する。以下では、しきい時刻trqA,trqBにより規定される、しきい時刻trqAからしきい時刻trqBまでの時間範囲を、許容範囲Rqとも称する。
 検知部54は、設定した許容範囲Rqに基づいて、対象メッセージMが不正メッセージであるか否かを判断する。
 より詳細には、検知部54は、対象メッセージMnの受信時刻tanが許容範囲Rq内である場合、対象メッセージMnは不正メッセージではないと判断する。一方、検知部54は、図7の例のように対象メッセージMnの受信時刻tanがしきい時刻trqAより前の時刻である場合、対象メッセージMnは不正メッセージであると判断する。
 検知部54は、判定時刻trqA,trqBおよび受信時刻tanに基づく判断結果を示す判断情報を通信処理部51へ出力する。
 通信処理部51は、検知部54から受けた判断情報が、対象メッセージMnが不正メッセージではないことを示す場合、当該対象メッセージMnを送信先の制御装置122へ送信する。
 一方、通信処理部51は、検知部54から受けた判断情報が、対象メッセージMnが不正メッセージであることを示す場合、以下の処理を行う。
 すなわち、通信処理部51は、判断情報が示す対象メッセージMnを記録する。また、通信処理部51は、バス13において不正メッセージが伝送されていることを示す警報情報を車両1内または車両1外における上位装置へ送信する。
 [検知処理の他の例]
 (グレー判定)
 たとえば、検知部54は、対象メッセージMnの送信時刻に対応する時刻と基準時刻trqとの時間差、および対象メッセージMnの後に送信される対象メッセージM(n+1)の送信時刻に対応する時刻と基準時刻trqとの時間差に基づいて、対象メッセージMnに関する異常を検知する。より詳細には、検知部54は、当該対象メッセージMnの受信時刻と当該基準時刻trqとの時間差、および当該対象メッセージM(n+1)の受信時刻と当該基準時刻trqとの時間差に基づいて、対象メッセージMnに関する異常を検知する。
 図8は、本開示の実施の形態に係る車載通信システムにおける対象メッセージの受信時刻の分布の他の例を示す図である。図8において、横軸は時刻を示す。
 図8を参照して、上述したように、検知部54は、生成部55から通知された基準時刻trqとしきい値Th1とに基づいて、しきい時刻trqA,trqBおよび許容範囲Rqを設定する。
 検知部54は、対象メッセージMnの受信時刻tanを含む受信情報が監視部52により記憶部56に保存されると、受信時刻tanと、設定したしきい時刻trqA,trqBおよび許容範囲Rqとに基づいて、対象メッセージMnが不正メッセージであるか否かを判定する。
 たとえば、検知部54は、対象メッセージMnの受信時刻tanが許容範囲Rq内である場合、対象メッセージMnは不正メッセージではないと判断する。
 そして、検知部54は、対象メッセージM(n+1)の受信時刻ta(n+1)を含む新たな受信情報が監視部52により記憶部56に保存されると、新たな受信情報が示す受信時刻ta(n+1)と、設定したしきい時刻trqA,trqBおよび許容範囲Rqとに基づいて、対象メッセージM(n+1)が不正メッセージであるか否かを判定する。
 たとえば、検知部54は、対象メッセージM(n+1)の受信時刻ta(n+1)が許容範囲Rq内である場合、対象メッセージM(n+1)は不正メッセージではないと判断する。
 検知部54は、許容範囲Rqに基づく検知処理において、対象メッセージMnが不正メッセージではないと判断した後、さらに対象メッセージM(n+1)も不正メッセージではないと判断した場合、対象メッセージMn,M(n+1)は異常である可能性があると判断する、すなわちグレー判定する。
 検知部54は、対象メッセージMnが不正メッセージではなく、かつグレー判定されたメッセージではないと判断した場合、すなわち対象メッセージMnが正当メッセージであると判断した場合、正当メッセージであると判断した対象メッセージMnの受信時刻tan、基準時刻trq、および受信時刻tanと基準時刻trqとの時間差Xnを示す時間差情報を記憶部56に保存する。
 (サポートベクターマシンを用いた検知処理)
 なお、本開示の実施の形態に係るゲートウェイ装置101では、検知部54は、対象メッセージMnの受信時刻tanと基準時刻trqとの時間差Xnに基づいて算出されるマハラノビス距離D^2と、しきい値Thとの比較結果に基づいて、対象メッセージMapが不正メッセージであるか否かを判定する構成であるとしたが、これに限定するものではない。
 検知部54は、たとえばサポートベクターマシンを用いて、対象メッセージMnが不正メッセージであるか否かを判定する構成であってもよい。検知部54は、1クラスに分類するサポートベクターマシンを用いてもよいし、多クラスに分類するサポートベクターマシンを用いてもよい。
 より詳細には、検知部54は、以下の式(2)に従って算出される分類スコアf(Xn)がゼロ以上である場合、対象メッセージMnは不正メッセージではないと判断する一方で、算出される分類スコアf(Xn)がゼロ未満である場合、対象メッセージMnは不正メッセージであると判断する。
Figure JPOXMLDOC01-appb-M000002
 ここで、K(x,xi)は、カーネル関数である。カーネル関数は、具体的には、線形カーネル、多項式カーネル、以下の式(3)に示すガウスカーネル、またはシグモイドカーネルである。
Figure JPOXMLDOC01-appb-M000003
 xは、対象メッセージMnの受信時刻tanと基準時刻trqとの時間差Xnのベクトルである。xiは、サポートベクトルである。yiは、分類すべき各クラスに対応する値である。たとえば1クラスに分類するサポートベクターマシンを用いる場合、yiは1である。Wiは、重みベクトルである。bは、バイアスである。xi,yi,Wiおよびbは、予め、車両1と同じ種類のテスト車両のゲートウェイ装置101を用いて、正当メッセージを用いて機械学習により求められるパラメータである。
 1クラスに分類するサポートベクターマシンを用いる場合、上記パラメータは、教師無し学習によって設定される。より詳細には、正当メッセージである対象メッセージMnの受信時刻tanと複数の基準時刻trqとの時間差Xnを算出し、算出した時間差Xnを学習用のデータセットと検証用のデータセットとに分類する。
 そして、学習用のデータセットを用いて機械学習を行い、機械学習により得られたパラメータおよび上述した式(2)を用いて検証用のデータセットの分類スコアf(Xn)を算出し、分類スコアf(Xn)がゼロ以上となるか、またはゼロ未満となるかを確認する。すなわち、検証用のデータセットが正当メッセージであると判定されるか、または不正メッセージであると判定されるかを確認する。そして、検証用のデータセットの判定結果の偽陽性率が所望の値となるようパラメータを適切に調整し、再度、学習用のデータセットを用いた機械学習を行う。
 多クラスに分類するサポートベクターマシンを用いる場合、上記パラメータは、教師有り学習によって設定される。より詳細には、正当メッセージである対象メッセージMnの受信時刻tanと複数の基準時刻trqとの時間差Xnを算出し、算出した時間差Xnを正常データ群とする。
 そして、正常データ群の時間差Xnより大きい複数の時間差Xnrのデータ群である不正データ群、および正常データ群の時間差Xnより小さい複数の時間差Xnsのデータ群である不正データ群を生成する。正常データ群および不正データ群を、学習用のデータセットと検証用のデータセットとに分類する。
 次に、学習用のデータセットを用いて機械学習を行い、機械学習により得られたパラメータおよび上述した式(2)を用いて検証用のデータセットの分類スコアf(Xn)を算出し、分類スコアf(Xn)に基づいて検証用のデータセットが正当メッセージであると判定されるか、または不正メッセージであると判定されるかを確認する。そして、検証用のデータセットの判定結果の偽陽性率が所望の値となるように、不正データ群の時間差Xns,Xnrの値すなわち不正データ群と正常データ群とのギャップ、およびパラメータを適切に調整し、再度、学習用のデータセットを用いた機械学習を行う。
 (決定木を用いた検知処理)
 検知部54は、たとえば決定木を用いて、対象メッセージMaが不正メッセージであるか否かを判定する構成であってもよい。決定木のアルゴリズムは、たとえば、CART(Classification And Regression Trees)およびC4.5等である。
 決定木のパラメータは、教師有り学習によって設定される。より詳細には、正当メッセージである対象メッセージMnの受信時刻tanと複数の基準時刻trqとの時間差Xnを算出し、算出した時間差Xnを正常データ群とする。
 そして、正常データ群の時間差Xnより大きい複数の時間差Xnrのデータ群である不正データ群、および正常データ群の時間差Xnより小さい複数の時間差Xnsのデータ群である不正データ群を生成する。正常データ群および不正データ群を、学習用のデータセットと検証用のデータセットとに分類する。
 次に、学習用のデータセットを用いて、CARTおよびC4.5等のアルゴリズムを用いる決定木の機械学習を行い、機械学習により得られた決定木を用いた場合において、検証用のデータセットが正当メッセージであると判定されるか、または不正メッセージであると判定されるかを確認する。そして、検証用のデータセットの判定結果の偽陽性率が所望の値となるように、不正データ群の時間差Xns,Xnrの値すなわち不正データ群と正常データ群とのギャップ、および決定木の学習用パラメータを適切に調整し、再度、学習用のデータセットを用いた機械学習を行う。
 (新たな基準時刻の生成要求)
 検知部54は、対象メッセージM(n+2)の受信時刻ta(n+2)を含む新たな受信情報が記憶部56に保存され、新たな受信情報が示す受信時刻ta(n+2)が、しきい時刻trqBより後の時刻である場合、新たな基準時刻tr(q+1)を生成すべき旨を示す生成要求を生成部55へ通知する。
 たとえば、検知部54は、基準時刻trqを用いた検知処理おける判定結果に応じた内容の生成要求を生成部55へ通知する。
 より詳細には、検知部54は、基準時刻trqを用いた検知処理において、不正メッセージを検知した場合、または対象メッセージMに関する異常を検知した場合すなわちグレー判定した場合、生成要求として、基準時刻trqを用いた検知処理において異常が発生した旨を示す生成要求Y1を生成部55へ通知する。
 一方、検知部54は、基準時刻trqを用いた検知処理において、不正メッセージを検知しなかった場合、かつグレー判定をしなかった場合、生成要求として、基準時刻trqを用いた検知処理において異常が発生しなかった旨を示す生成要求Y2を生成部55へ通知する。
 生成部55は、後述するように、検知部54から生成要求Y1または生成要求Y2を受けると、受けた生成要求Y1または生成要求Y2に対する応答として、新たな基準時刻tr(q+1)を検知部54へ通知する。
 検知部54は、生成部55から新たな基準時刻tr(q+1)を通知されると、通知された基準時刻tr(q+1)を用いて、新たなしきい時刻tr(q+1)A,tr(q+1)Bで規定される許容範囲R(q+1)を設定する。
 そして、検知部54は、設定した許容範囲R(q+1)に基づいて、対象メッセージM(n+2)が不正メッセージであるか否かを判断する。
 (初回の基準時刻の生成要求)
 検知部54は、通信処理部51によって制御装置122から1番目の対象メッセージMが受信された際、検知処理を開始するために、初期値である初回の基準時刻tr1を生成すべき旨を示す生成要求Y3を生成部55へ通知する。
 より詳細には、検知部54は、連続するK個の対象メッセージMにおいて、対象メッセージMnが、直前の対象メッセージM(n-1)の受信時刻ta(n-1)を仮の基準時刻tr(n-1)として用いて設定される許容範囲R(n-1)内である場合、K個の対象メッセージMの受信時刻taおよび生成要求Y3を生成部55へ通知する。
 図9は、本開示の実施の形態に係る車載通信システムにおける対象メッセージの受信時刻の分布の他の例を示す図である。図9において、横軸は時刻を示す。図9は、Kが4の場合を示している。
 図9を参照して、検知部54は、制御装置122からの1番目の対象メッセージM1の受信時刻ta1を仮の基準時刻traとして用いて、仮の基準時刻traとしきい値Th1とに基づいて、しきい時刻traA,traBおよび許容範囲Raを設定する。
 そして、検知部54は、制御装置122からの2番目の対象メッセージM2の受信時刻ta2が許容範囲Ra内である場合、受信時刻ta2を仮の基準時刻trbとして用いて、仮の基準時刻trbとしきい値Th1とに基づいて、しきい時刻trbA,trbBおよび許容範囲Rbを設定する。
 さらに、検知部54は、制御装置122からの3番目の対象メッセージM3の受信時刻ta3が許容範囲Rb内である場合、受信時刻ta3を仮の基準時刻trcとして用いて、仮の基準時刻trcとしきい値Th1とに基づいて、しきい時刻trcA,trcBおよび許容範囲Rcを設定する。
 さらに、検知部54は、制御装置122からの4番目の対象メッセージM4の受信時刻ta4が許容範囲Rc内である場合、対象メッセージM1,M2,M3,M4の受信時刻ta1,ta2,ta3,ta4および生成要求Y3を生成部55へ通知する。
 一方、検知部54は、たとえば3番目の対象メッセージM3の受信時刻ta3が許容範囲Rb外である場合、3番目以降の連続するK個の対象メッセージMにおいて、対象メッセージMnが、直前の対象メッセージM(n-1)の受信時刻ta(n-1)を仮の基準時刻tr(n-1)として用いて設定される許容範囲R(n-1)内となるまで、上述の処理を繰り返す。
 生成部55は、後述するように、検知部54から生成要求Y3を受けると、受けた生成要求Y3に対する応答として、初回の基準時刻tr1を検知部54へ通知する。
 [更新部]
 上述したように、記憶部56は、対象メッセージMの受信時刻と基準時刻trとの時間差Xの統計値を記憶する。
 更新部53は、検知処理において正常であると判定された対象メッセージMnの送信時刻に対応する時刻と基準時刻trとの時間差を用いて、記憶部56における統計値を更新する。より詳細には、更新部53は、正常であると判定された対象メッセージMの受信時刻taと基準時刻trとの時間差Xを用いて、記憶部56における統計値を更新する。
 たとえば、記憶部56は、時間差Xの統計値として、検知処理において不正メッセージではないと判断された対象メッセージMの受信時刻taと基準時刻trとの時間差Xの平均値Xaveを記憶する。
 更新部53は、記憶部56における時間差情報が示す時間差Xを用いて、記憶部56における平均値Xaveを更新する。すなわち、更新部53は、正当な対象メッセージMの受信時刻taと基準時刻trとの時間差Xを用いて、対象メッセージMの受信周期を学習する。
 より詳細には、更新部53は、検知部54によって記憶部56に時間差情報が新たに保存されると、時間差情報が示す時間差Xnおよび記憶部56における平均値Xaveに基づいて、以下の式(4)に従って更新値Vを算出し、記憶部56における平均値Xaveを、算出した更新値Vに更新する。
Figure JPOXMLDOC01-appb-M000004
 ここで、uは減衰係数であり、ゼロ以上1以下の値である。uは、たとえば、対象メッセージMの設計送信周期Tに応じて予め設定される。
 uがゼロに近い値である場合、更新部53が更新を繰り返すことにより平均値Xaveは緩やかに変化することから、平均値Xaveが収束するまでに要する時間が長くなる一方で、平均値Xaveの変化を抑制して安定した値に更新することができる。
 一方、uが1に近い値である場合、算出される更新値Vにおける時間差Xnの比重が大きくなるため、平均値Xaveが収束するまでに要する時間が短くなる一方で、対象メッセージMの受信周期の揺らぎに起因する平均値Xaveの変動幅が大きくなる。
 [生成部]
 生成部55は、上述したように、検知部54から生成要求を受けると、受けた生成要求に対する応答として、新たな基準時刻trを検知部54へ通知する。
 (基準時刻の生成例1)
 図10は、本開示の実施の形態に係る車載通信システムにおける対象メッセージの受信時刻の分布の他の例を示す図である。図10において、横軸は時刻を示す。
 図10を参照して、生成部55は、検知処理において対象メッセージMが異常であると判定された場合、記憶部56における最新の統計値を基準時刻trに加えた値に基づいて、異常であると判定された対象メッセージMの後に送信される対象メッセージMについての検知処理に用いられる新たな基準時刻trを生成する。
 たとえば、生成部55は、検知部54から生成要求Y1を受けると、記憶部56における平均値Xaveを参照し、最新の基準時刻trqに最新の平均値Xaveを加えた値を算出する。生成部55は、算出した値を、新たな基準時刻tr(q+1)として検知部54へ通知する。
 ここで、p回目の対象メッセージMpの受信時刻tapは、以下の式(5)で表される。
Figure JPOXMLDOC01-appb-M000005
 E1は、制御装置122における発振器131のジッタに基づくメッセージの送信時刻の誤差である。E2は、ゲートウェイ装置101における発振器143のジッタに基づくメッセージの受信時刻の誤差である。なお、E1,E2は、それぞれ、発振器131,143の、製造工程、使用環境および経年劣化等によって生じる誤差である。
 また、Aiは、制御装置122からのi番目のメッセージの、バス13における衝突および送信待機遅延によって生じる遅延時間である。
 p回目の対象メッセージMpについての検知処理に用いる基準時刻trpは、以下の式(6)で表される。
Figure JPOXMLDOC01-appb-M000006
 また、平均値Xaveは、対象メッセージMpの受信周期であり、設計送信周期Tと、誤差E1と、誤差E2との和に等しいため、対象メッセージMpの受信時刻tapと基準時刻trpとの時間差Xpは、式(5)から式(6)を差し引くことにより、以下の式(7)で表される。
Figure JPOXMLDOC01-appb-M000007
 なお、遅延時間Aiは、通信状況に応じて増減を繰り返すことから、式(7)中のシグマ項は、単調に増加することのない、ある数値範囲内において増減を繰り返す誤差とみなすことができる。
 受信時刻tapと基準時刻trpとの時間差Xpに含まれる平均値Xaveは、発振器131,143の使用環境および経年劣化等による誤差E1,E2の影響を受けることから、使用環境および経年により変動する。
 生成部55は、誤差E1,E2の変化に応じた時間差Xpの変化が考慮された平均値Xaveを用いて、新たな基準時刻trを算出する。
 より詳細には、生成部55は、上述のとおり、更新部53によって正当な対象メッセージMの受信時刻taと基準時刻trとの時間差Xを用いて更新された最新の平均値Xaveを、最新の基準時刻trqに加えた値を、新たな基準時刻tr(q+1)として算出する。
 (基準時刻の生成例2)
 たとえば、生成部55は、新たな基準時刻tr(q+1)の生成において、対象メッセージMが送信される際の調停処理による遅延時間Dを用いる。
 より詳細には、生成部55は、検知部54から生成要求Y1を受けると、記憶部56における平均値Xaveを参照し、最新の平均値Xaveと遅延時間Dとを最新の基準時刻trqに加えた値を算出する。生成部55は、算出した値を、新たな基準時刻tr(q+1)として検知部54へ通知する。
 たとえば、記憶部56は、送信時刻に関して対象メッセージMと相関が高い周期メッセージの遅延時間から、対象メッセージMの遅延時間Dを算出するための遅延算出モデルを記憶している。
 生成部55は、記憶部56における遅延算出モデルおよび当該周期メッセージの遅延時間から、対象メッセージMの遅延時間Dを算出し、最新の平均値Xaveと遅延時間Dとを、最新の基準時刻trqに加えた値を、新たな基準時刻tr(q+1)として算出する。
 (基準時刻の生成例3)
 図11は、本開示の実施の形態に係る車載通信システムにおける対象メッセージの受信時刻の分布の他の例を示す図である。図11において、横軸は時刻を示す。
 図11を参照して、たとえば、生成部55は、検知処理において対象メッセージMが正常であると判定された場合、正常であると判定された対象メッセージMの受信時刻に基づいて、正常であると判定された対象メッセージMの後に送信される対象メッセージMについての検知処理に用いられる新たな基準時刻trを生成する。
 より詳細には、生成部55は、検知部54から生成要求Y2を受けると、記憶部56における時間差情報を参照し、最新の基準時刻trqを用いた検知処理において不正メッセージではないと判断した最新の対象メッセージMnの受信時刻tanを取得する。生成部55は、算出した受信時刻tanを、新たな基準時刻tr(q+1)として検知部54へ通知する。
 (基準時刻の生成例4)
 生成部55は、検知部54から対象メッセージM1,M2,M3,M4の受信時刻ta1,ta2,ta3,ta4および生成要求Y3を受けると、受信時刻ta2,ta3のいずれか一方を、初回の基準時刻tr1として検知部54へ通知する。
 [動作の流れ]
 本開示の実施の形態に係る車載通信システムにおける各装置は、メモリを含むコンピュータを備え、当該コンピュータにおけるCPU等の演算処理部は、以下のフローチャートおよびシーケンスの各ステップの一部または全部を含むプログラムを当該メモリから読み出して実行する。これら複数の装置のプログラムは、それぞれ、外部からインストールすることができる。これら複数の装置のプログラムは、それぞれ、記録媒体に格納された状態で流通する。
 図12は、本開示の実施の形態に係る車載通信システムにおいてゲートウェイ装置が検知処理を行う際の動作手順の一例を定めたフローチャートである。
 図12を参照して、まず、ゲートウェイ装置101は、初回の基準時刻tr1を生成する(ステップS102)。
 次に、ゲートウェイ装置101は、基準時刻tr1およびしきい値Th1に基づいて、しきい許容範囲R1を設定する(ステップS104)。
 次に、ゲートウェイ装置101は、車載ネットワーク12における対象メッセージMを監視し、対象メッセージMを待ち受け(ステップS106でNO)、たとえば対象メッセージMnを受信すると(ステップS106でYES)、不正メッセージを検知する検知処理を行う。具体的には、ゲートウェイ装置101は、対象メッセージMnの受信時刻tanと、基準時刻trqとの時間差Xnに基づいて、対象メッセージMnが不正メッセージであるか否かを判断する(ステップS108)。
 次に、ゲートウェイ装置101は、検知処理の結果、対象メッセージMnが不正メッセージではないと判断した場合(ステップS110でNO)、当該対象メッセージMnの受信時刻tanと基準時刻trqとの時間差Xnを用いて、記憶部56における平均値Xaveを更新する(ステップS112)。
 次に、ゲートウェイ装置101は、対象メッセージMの監視を継続し、次の対象メッセージM(n+1)を待ち受ける(ステップS106でNO)。
 一方、ゲートウェイ装置101は、検知処理の結果、対象メッセージMnが不正メッセージであると判断した場合(ステップS110でYES)、不正メッセージが伝送されていることを示す警報情報を車両1内または車両1外における上位装置へ送信する(ステップS114)。
 次に、ゲートウェイ装置101は、対象メッセージMの監視を継続し、次の対象メッセージM(n+1)を待ち受ける(ステップS106でNO)。
 図13は、本開示の実施の形態に係る車載通信システムのゲートウェイ装置における検知処理の一例を定めたフローチャートである。図13は、図12におけるステップS108の詳細を示している。
 図13を参照して、まず、ゲートウェイ装置101は、対象メッセージMnの受信時刻tanを取得する(ステップS202)。
 次に、ゲートウェイ装置101は、取得した受信時刻tanと、最新の基準時刻trqに基づいて設定した許容範囲Rqすなわちしきい時刻trqA,trqBとを比較する(ステップS204)。
 次に、ゲートウェイ装置101は、受信時刻tanがしきい時刻trqBより後の時刻である場合(ステップS206でYES)、新たな基準時刻tr(q+1)を生成し(ステップS208)、受信時刻tanと、新たに生成した基準時刻tr(q+1)に基づく許容範囲R(q+1)とを比較する(ステップS204)。
 一方、ゲートウェイ装置101は、受信時刻tanが許容範囲Rq内である場合(ステップS206でNO、かつステップS210でYES)、対象メッセージMnは不正メッセージではないと判断する(ステップS212)。
 一方、ゲートウェイ装置101は、受信時刻tanがしきい時刻trqAより前の時刻である場合(ステップS206でNO、かつステップS210でNO)、対象メッセージMnは不正メッセージであると判断する(ステップS214)。
 図14は、本開示の実施の形態に係る車載通信システムのゲートウェイ装置における基準時刻を生成する処理の一例を定めたフローチャートである。図14は、図13におけるステップS208の詳細を示している。
 図14を参照して、まず、ゲートウェイ装置101は、最新の基準時刻trqを用いた検知処理において異常を検知した場合、具体的には、不正メッセージを検知した場合またはグレー判定をした場合(ステップS302でYES)、最新の基準時刻trqに最新の平均値Xaveを加えた値を、新たな基準時刻tr(q+1)として設定する(ステップS304)。
 一方、ゲートウェイ装置101は、最新の基準時刻trqを用いた検知処理において異常を検知しなかった場合、具体的には、不正メッセージを検知しなかった場合かつグレー判定をしなかった場合(ステップS302でNO)、最新の基準時刻trqを用いた検知処理において不正メッセージではないと判断した対象メッセージMnの受信時刻tanを、新たな基準時刻tr(q+1)として設定する(ステップS306)。
 図15は、本開示の実施の形態に係る車載通信システムのゲートウェイ装置における初回の基準時刻を生成する処理の一例を定めたフローチャートである。図15は、図12におけるステップS102の詳細を示している。
 図15を参照して、まず、ゲートウェイ装置101は、対象メッセージMを待ち受け(ステップS402でNO)、たとえば対象メッセージMnを受信すると(ステップS402でYES)、対象メッセージMnの受信時刻tanを仮の基準時刻traとして用いて、許容範囲Raを設定する(ステップS404)。
 次に、ゲートウェイ装置101は、次の対象メッセージM(n+1)の受信時刻ta(n+1)が許容範囲Ra外である場合(ステップS406でNO)、受信成功数fをゼロにし(ステップS408)、受信時刻ta(n+1)を仮の基準時刻traとして用いて、許容範囲Raを設定する(ステップS404)。
 一方、ゲートウェイ装置101は、次の対象メッセージM(n+1)の受信時刻ta(n+1)が許容範囲Ra内である場合(ステップS406でYES)、受信成功数fをインクリメントする(ステップS410)。
 次に、ゲートウェイ装置101は、受信成功数fが4未満の場合(ステップS412でNO)、受信時刻ta(n+1)を仮の基準時刻traとして用いて、許容範囲Raを設定する(ステップS404)。
 一方、ゲートウェイ装置101は、受信成功数fが4となると(ステップS412でYES)、連続する4個の対象メッセージMn,M(n+1),M(n+2),M(n+3)の受信時刻tan,ta(n+1),ta(n+2),ta(n+3)のうち、たとえば受信時刻ta(n+2)を初回の基準時刻tr1として設定する(ステップS414)。
 なお、本開示の実施の形態に係る車載通信システム301では、ゲートウェイ装置101が、車載ネットワーク12における不正メッセージを検知する構成であるとしたが、これに限定するものではない。車載通信システム301では、ゲートウェイ装置101とは別の検知装置が、車載ネットワーク12における不正メッセージを検知する構成であってもよい。
 また、本開示の実施の形態に係る車載通信システム301では、検知装置として機能するゲートウェイ装置101がバス13に直接接続される構成であるとしたが、これに限定するものではない。
 図16は、本開示の実施の形態に係る車載ネットワークの接続トポロジの一例を示す図である。
 図16を参照して、検知装置151が、車載装置たとえば制御装置122を介してバス13に接続される構成であってもよい。この場合、検知装置151は、たとえば、当該車載装置が送受信するメッセージを監視することにより、バス13に伝送される不正メッセージを検知する。
 図16に示す例では、たとえば、検知装置151の監視部52は、制御装置122が送信する対象メッセージMの送信時刻に対応する時刻を取得する。検知装置151の検知部54は、監視部52による監視結果に基づく対象メッセージMの送信時刻と、生成部55によって生成された基準時刻trとの時間差に基づいて、検知処理を行う。検知装置151の更新部53は、検知処理において正常であると判定された対象メッセージMの送信時刻と基準時刻trとの時間差を用いて、時間差の統計値を更新する。
 また、本開示の実施の形態に係るゲートウェイ装置101では、検知部54は、検知処理として、対象メッセージMが不正メッセージであるか否かを判定する構成であるとしたが、これに限定するものではない。検知部54は、検知処理として、対象メッセージMが不正メッセージである確率を算出する構成であってもよい。
 また、本開示の実施の形態に係るゲートウェイ装置101では、検知部54は、対象メッセージMnが不正メッセージではないと判断した後、さらに対象メッセージM(n+1)も不正メッセージではないと判断した場合、対象メッセージMn,M(n+1)をグレー判定する構成であるとしたが、これに限定するものではない。検知部54は、グレー判定を行わない構成であってもよい。
 また、本開示の実施の形態に係るゲートウェイ装置101では、検知部54は、基準時刻trqを用いた検知処理において、不正メッセージを検知しなかった場合、かつグレー判定をしなかった場合、生成要求Y2を生成部55へ通知する構成であるとしたが、これに限定するものではない。検知部54は、基準時刻trqを用いた検知処理において、不正メッセージを検知しなかった場合、かつグレー判定をしなかった場合、生成要求Y2を生成部55へ通知しない一方で、生成要求Y1を生成部55へ通知する構成であってもよい。
 この場合、生成部55は、上述したように、記憶部56における平均値Xaveを参照し、最新の基準時刻trqに最新の平均値Xaveを加えた値を算出する。生成部55は、算出した値を、新たな基準時刻tr(q+1)として検知部54へ通知する。
 ところで、車載ネットワークにおける不正メッセージをより正しく検知することを可能とする技術が望まれる。
 たとえば、周期メッセージを監視することにより、ある時刻に送信された周期メッセージを基準として、当該周期メッセージの送信時刻と、次に送信された周期メッセージの送信時刻との時間差に基づいて、正当な周期メッセージになりすました不正メッセージを検知する方法が考えられる。
 このような方法では、基準とした周期メッセージが不正メッセージである場合、次に送信された周期メッセージが不正メッセージであるか否かを正しく判定できない場合がある。
 具体的には、直前の周期メッセージの送信時刻に基づいて、次の周期メッセージが不正メッセージであるか否かを判定する上記方法では、直前の周期メッセージが不正メッセージである場合、当該不正メッセージの送信時刻に基づいて、次の周期メッセージが不正メッセージであるか否かの判定を行うこととなる。その結果、次の不正メッセージを正当メッセージであると誤判定したり、所定の設計送信周期に従って送信された正当メッセージを不正メッセージであると誤判定したりする場合がある。
 これに対して、本開示の実施の形態に係るゲートウェイ装置101では、監視部52は、車載ネットワーク12における、周期的に送信される正当メッセージ、および不正メッセージを対象メッセージMとして監視する。検知部54は、不正メッセージを検知する検知処理を行う。生成部55は、検知処理に用いられる基準時刻trを生成する。検知部54は、監視部52による監視結果に基づく対象メッセージMnの送信時刻に対応する時刻と、生成部55によって生成された基準時刻trqとの時間差Xnに基づいて、検知処理を行う。更新部53は、検知処理において正常であると判定された対象メッセージMの送信時刻に対応する時刻と基準時刻trとの時間差Xを用いて、時間差Xの平均値Xaveを更新する。生成部55は、検知処理において対象メッセージMnが異常であると判定された場合、最新の平均値Xaveを基準時刻trqに加えた値に基づいて、異常であると判定された対象メッセージMnの後に送信される対象メッセージM(n+1)についての検知処理に用いられる新たな基準時刻tr(q+1)を生成する。
 このように、検知処理において正常であると判定された対象メッセージMの送信時刻に対応する時刻と基準時刻trとの時間差Xを用いて平均値Xaveを更新するとともに、検知処理において対象メッセージMnが異常であると判定された場合、時間差Xの平均値Xaveを基準時刻trqに加えた値に基づいて新たな基準時刻tr(q+1)を生成する構成により、不正メッセージの送信時刻に対応する時刻を基準に検知処理を行うことを回避することができるため、異常であると判定された対象メッセージMnの次に送信される対象メッセージM(n+1)についての検知処理における誤判定を抑制することができる。
 したがって、本開示の実施の形態に係るゲートウェイ装置101では、車載ネットワークにおける不正メッセージをより正しく検知することができる。
 また、本開示の実施の形態に係るゲートウェイ装置101では、検知部54は、対象メッセージMnの送信時刻に対応する時刻と基準時刻trqとの時間差Xn、および対象メッセージMnの後に送信される対象メッセージM(n+1)の送信時刻に対応する時刻と基準時刻trqとの時間差X(n+1)に基づいて、対象メッセージMnに関する異常を検知する。
 このような構成により、たとえば、基準時刻trqを用いた検知処理において、正常であると判定される時間内に複数の対象メッセージMが送信され、当該複数の対象メッセージMに含まれる不正メッセージを正当メッセージであると誤判定した場合であっても、当該複数の対象メッセージMは異常である可能性があると判断することができる。これにより、検知処理において検知することができなかった不正メッセージを、たとえばグレー判定することができる。
 また、本開示の実施の形態に係るゲートウェイ装置101では、生成部55は、検知処理において対象メッセージMnが正常であると判定された場合、正常であると判定された対象メッセージMnの送信時刻に対応する時刻に基づいて、正常であると判定された対象メッセージMnの後に送信される対象メッセージM(n+1)についての検知処理に用いられる新たな基準時刻tr(q+1)を生成する。
 このような構成により、たとえば、正常であると判定された対象メッセージMnの実際の送信時刻に対応する時刻を新たな基準時刻tr(q+1)とすることにより、通信遅延等による対象メッセージMnの送信時刻の変動を考慮した、より正確な検知処理を行うことができる。
 また、本開示の実施の形態に係るゲートウェイ装置101では、生成部55は、基準時刻trの生成において、対象メッセージMが送信される際の調停処理による遅延時間を用いる。
 このような構成により、たとえば、時間差Xの最新の平均値Xaveを基準時刻trqに加えることにより新たな基準時刻tr(q+1)を生成する場合において、通信遅延等による対象メッセージMnの送信時刻の変動が考慮された基準時刻tr(q+1)を用いて、より正確な検知処理を行うことができる。
 また、本開示の実施の形態に係る車両1は、ゲートウェイ装置101を備える。
 このような構成により、ゲートウェイ装置101を備える車両1において、車載ネットワーク12における不正メッセージをより正しく検知することができる。
 また、本開示の実施の形態に係る検知方法は、車載ネットワーク12における不正メッセージを検知するゲートウェイ装置101における検知方法である。この検知方法では、まず、ゲートウェイ装置101が、車載ネットワーク12における、周期的に送信される正当メッセージ、および不正メッセージを対象メッセージMとして監視する。次に、ゲートウェイ装置101が、不正メッセージを検知する検知処理に用いられる基準時刻trを生成する。次に、ゲートウェイ装置101が、対象メッセージMの監視結果に基づく対象メッセージMnの送信時刻に対応する時刻と、生成した基準時刻trqとの時間差Xnに基づいて、検知処理を行う。次に、ゲートウェイ装置101が、検知処理において正常であると判定された対象メッセージMの送信時刻に対応する時刻と基準時刻trとの時間差Xを用いて、時間差Xの平均値Xaveを更新する。ゲートウェイ装置101は、基準時刻trを生成するステップにおいては、検知処理において対象メッセージMnが異常であると判定された場合、最新の平均値Xaveを基準時刻trqに加えた値に基づいて、異常であると判定された対象メッセージMnの後に送信される対象メッセージM(n+1)についての前記検知処理に用いられる新たな基準時刻tr(q+1)を生成する。
 このように、検知処理において正常であると判定された対象メッセージMの送信時刻に対応する時刻と基準時刻trとの時間差Xを用いて平均値Xaveを更新するとともに、検知処理において対象メッセージMnが異常であると判定された場合、時間差Xの平均値Xaveを基準時刻trqに加えた値に基づいて新たな基準時刻tr(q+1)を生成する方法により、不正メッセージの送信時刻に対応する時刻を基準に検知処理を行うことを回避することができるため、異常であると判定された対象メッセージMnの次に送信される対象メッセージM(n+1)についての検知処理における誤判定を抑制することができる。
 したがって、本開示の実施の形態に係る検知方法では、車載ネットワークにおける不正メッセージをより正しく検知することができる。
 上記実施の形態は、すべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記説明ではなく請求の範囲によって示され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。
 以上の説明は、以下に付記する特徴を含む。
 [付記1]
 車載ネットワークにおける不正メッセージを検知する検知装置であって、
 前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視する監視部と、
 前記不正メッセージを検知する検知処理に用いられる基準時刻を生成する生成部と、
 前記監視部による監視結果に基づく前記対象メッセージの送信時刻に対応する時刻と、前記生成部によって生成された前記基準時刻との時間差に基づいて、前記検知処理を行う検知部と、
 前記検知処理において正常であると判定された前記対象メッセージの送信時刻に対応する時刻と前記基準時刻との前記時間差を用いて、前記時間差の統計値を更新する更新部とを備え、
 前記生成部は、前記検知処理において前記対象メッセージが異常であると判定された場合、最新の前記統計値を前記基準時刻に加えた値に基づいて、異常であると判定された前記対象メッセージの後に送信される前記対象メッセージについての前記検知処理に用いられる新たな前記基準時刻を生成し、
 前記生成部は、前記検知処理において前記対象メッセージが正常であると判定された場合、正常であると判定された前記対象メッセージの送信時刻に基づいて、正常であると判定された前記対象メッセージの後に送信される前記対象メッセージについての前記検知処理に用いられる新たな前記基準時刻を生成し、
 前記時間差の前記統計値は、前記時間差の平均値である、検知装置。
 [付記2]
 車載ネットワークにおける不正メッセージを検知する検知装置であって、
 前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視する監視部と、
 前記不正メッセージを検知する検知処理に用いられる基準時刻を生成する生成部と、
 前記監視部による監視結果に基づく前記対象メッセージの送信時刻に対応する時刻と、前記生成部によって生成された前記基準時刻との時間差に基づいて、前記検知処理を行う検知部と、
 前記検知処理において正常であると判定された前記対象メッセージの送信時刻に対応する時刻と前記基準時刻との前記時間差を用いて、前記時間差の統計値を更新する更新部とを備え、
 前記生成部は、前記検知処理において前記対象メッセージが異常であると判定された場合、最新の前記統計値を前記基準時刻に加えた値に基づいて、異常であると判定された前記対象メッセージの後に送信される前記対象メッセージについての前記検知処理に用いられる新たな前記基準時刻を生成し、
 前記監視部、前記生成部、前記検知部および前記更新部は、プロセッサにより実現される、検知装置。
 1     車両
 12    車載ネットワーク
 13,14 バス
 51    通信処理部
 52    監視部
 53    更新部
 54    検知部
 55    生成部
 56    記憶部
 101   ゲートウェイ装置
 111   車載通信機
 112   ポート
 121   バス接続装置群
 122   制御装置
 131   発振器
 132   CPU
 133   CANトランシーバ
 141   CPU
 142   CANトランシーバ
 143   発振器
 151   検知装置
 301   車載通信システム
 
 

Claims (7)

  1.  車載ネットワークにおける不正メッセージを検知する検知装置であって、
     前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視する監視部と、
     前記不正メッセージを検知する検知処理に用いられる基準時刻を生成する生成部と、
     前記監視部による監視結果に基づく前記対象メッセージの送信時刻に対応する時刻と、前記生成部によって生成された前記基準時刻との時間差に基づいて、前記検知処理を行う検知部と、
     前記検知処理において正常であると判定された前記対象メッセージの送信時刻に対応する時刻と前記基準時刻との前記時間差を用いて、前記時間差の統計値を更新する更新部とを備え、
     前記生成部は、前記検知処理において前記対象メッセージが異常であると判定された場合、最新の前記統計値を前記基準時刻に加えた値に基づいて、異常であると判定された前記対象メッセージの後に送信される前記対象メッセージについての前記検知処理に用いられる新たな前記基準時刻を生成する、検知装置。
  2.  前記検知部は、前記対象メッセージである第1の対象メッセージの送信時刻に対応する時刻と前記基準時刻との時間差、および前記第1の対象メッセージの後に送信される前記対象メッセージである第2の対象メッセージの送信時刻に対応する時刻と前記基準時刻との時間差に基づいて、前記第1の対象メッセージに関する異常を検知する、請求項1に記載の検知装置。
  3.  前記生成部は、前記検知処理において前記対象メッセージが正常であると判定された場合、正常であると判定された前記対象メッセージの送信時刻に対応する時刻に基づいて、正常であると判定された前記対象メッセージの後に送信される前記対象メッセージについての前記検知処理に用いられる新たな前記基準時刻を生成する、請求項1または請求項2に記載の検知装置。
  4.  前記生成部は、前記基準時刻の生成において、前記対象メッセージが送信される際の調停処理による遅延時間を用いる、請求項1から請求項3のいずれか1項に記載の検知装置。
  5.  請求項1から請求項4のいずれか1項に記載の検知装置を備える、車両。
  6.  車載ネットワークにおける不正メッセージを検知する検知装置における検知方法であって、
     前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視するステップと、
     前記不正メッセージを検知する検知処理に用いられる基準時刻を生成するステップと、
     前記対象メッセージの監視結果に基づく前記対象メッセージの送信時刻に対応する時刻と、生成した前記基準時刻との時間差に基づいて、前記検知処理を行うステップと、
     前記検知処理において正常であると判定された前記対象メッセージの送信時刻に対応する時刻と前記基準時刻との前記時間差を用いて、前記時間差の統計値を更新するステップとを含み、
     前記基準時刻を生成するステップにおいては、前記検知処理において前記対象メッセージが異常であると判定された場合、最新の前記統計値を前記基準時刻に加えた値に基づいて、異常であると判定された前記対象メッセージの後に送信される前記対象メッセージについての前記検知処理に用いられる新たな前記基準時刻を生成する、検知方法。
  7.  車載ネットワークにおける不正メッセージを検知する検知装置において用いられる検知プログラムであって、
     コンピュータを、
     前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視する監視部と、
     前記不正メッセージを検知する検知処理に用いられる基準時刻を生成する生成部と、
     前記監視部による監視結果に基づく前記対象メッセージの送信時刻に対応する時刻と、前記生成部によって生成された前記基準時刻との時間差に基づいて、前記検知処理を行う検知部と、
     前記検知処理において正常であると判定された前記対象メッセージの送信時刻に対応する時刻と前記基準時刻との前記時間差を用いて、前記時間差の統計値を更新する更新部、
    として機能させるためのプログラムであり、
     前記生成部は、前記検知処理において前記対象メッセージが異常であると判定された場合、最新の前記統計値を前記基準時刻に加えた値に基づいて、異常であると判定された前記対象メッセージの後に送信される前記対象メッセージについての前記検知処理に用いられる新たな前記基準時刻を生成する、検知プログラム。
     
     
     
     
PCT/JP2020/019704 2019-09-30 2020-05-19 検知装置、車両、検知方法および検知プログラム Ceased WO2021065068A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US17/622,122 US11849324B2 (en) 2019-09-30 2020-05-19 Detection device, vehicle, detection method, and detection program
CN202080042121.6A CN113994635A (zh) 2019-09-30 2020-05-19 检测装置、车辆、检测方法及检测程序
JP2021551126A JP7435616B2 (ja) 2019-09-30 2020-05-19 検知装置、車両、検知方法および検知プログラム

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019178177 2019-09-30
JP2019-178177 2019-09-30

Publications (1)

Publication Number Publication Date
WO2021065068A1 true WO2021065068A1 (ja) 2021-04-08

Family

ID=75338029

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/019704 Ceased WO2021065068A1 (ja) 2019-09-30 2020-05-19 検知装置、車両、検知方法および検知プログラム

Country Status (4)

Country Link
US (1) US11849324B2 (ja)
JP (1) JP7435616B2 (ja)
CN (1) CN113994635A (ja)
WO (1) WO2021065068A1 (ja)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220255954A1 (en) * 2019-09-30 2022-08-11 Autonetworks Technologies, Ltd. Detection device, vehicle, detection method, and detection program
WO2023199552A1 (ja) * 2022-04-12 2023-10-19 住友電気工業株式会社 検知装置および検知方法
US11849324B2 (en) 2019-09-30 2023-12-19 Autonetworks Technologies, Ltd. Detection device, vehicle, detection method, and detection program
JP7554791B2 (ja) 2022-07-01 2024-09-20 本田技研工業株式会社 信号検出装置、車両及び方法
US12418548B2 (en) 2022-06-30 2025-09-16 Honda Motor Co., Ltd. Illegal signal detection apparatus, vehicle, and illegal signal detection method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018186054A1 (ja) * 2017-04-07 2018-10-11 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 不正通信検知基準決定方法、不正通信検知基準決定システム及びプログラム
WO2019102911A1 (ja) * 2017-11-27 2019-05-31 日本電信電話株式会社 異常通信検知装置、異常通信検知方法、プログラム

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4558094B2 (ja) 2007-04-04 2010-10-06 三菱電機株式会社 通信システム及び管理装置及び通信装置及びコンピュータプログラム
EP2675102B1 (en) * 2011-02-08 2023-11-08 Mitsubishi Electric Corporation Communication system time synchronization method, slave station apparatus, master station apparatus, control apparatus, and program
JP5919205B2 (ja) 2013-01-28 2016-05-18 日立オートモティブシステムズ株式会社 ネットワーク装置およびデータ送受信システム
DE112015005252T5 (de) * 2014-11-20 2017-08-10 Autonetworks Technologies, Ltd. Kommunikationssteuereinrichtung und Kommunikationssystem
JP6594732B2 (ja) * 2015-01-20 2019-10-23 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 不正フレーム対処方法、不正検知電子制御ユニット及び車載ネットワークシステム
EP3249483B1 (en) * 2015-01-21 2020-05-20 Mitsubishi Electric Corporation Information processing device and information processing method
WO2017038005A1 (ja) 2015-08-31 2017-03-09 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 不正検知方法、不正検知電子制御ユニット及び不正検知システム
JP6585001B2 (ja) 2015-08-31 2019-10-02 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 不正検知方法、不正検知電子制御ユニット及び不正検知システム
JP6805667B2 (ja) * 2016-09-15 2020-12-23 住友電気工業株式会社 検知装置、ゲートウェイ装置、検知方法および検知プログラム
JP6494821B2 (ja) 2017-04-07 2019-04-03 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 不正通信検知基準決定方法、不正通信検知基準決定システム及びプログラム
JP6539363B2 (ja) 2017-04-07 2019-07-03 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 不正通信検知方法、不正通信検知システム及びプログラム
JP7121737B2 (ja) 2018-05-23 2022-08-18 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 異常検知装置、異常検知方法およびプログラム
WO2021065068A1 (ja) 2019-09-30 2021-04-08 株式会社オートネットワーク技術研究所 検知装置、車両、検知方法および検知プログラム

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018186054A1 (ja) * 2017-04-07 2018-10-11 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 不正通信検知基準決定方法、不正通信検知基準決定システム及びプログラム
WO2019102911A1 (ja) * 2017-11-27 2019-05-31 日本電信電話株式会社 異常通信検知装置、異常通信検知方法、プログラム

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220255954A1 (en) * 2019-09-30 2022-08-11 Autonetworks Technologies, Ltd. Detection device, vehicle, detection method, and detection program
US11849324B2 (en) 2019-09-30 2023-12-19 Autonetworks Technologies, Ltd. Detection device, vehicle, detection method, and detection program
US11870789B2 (en) * 2019-09-30 2024-01-09 Autonetworks Technologies, Ltd. Detection device, vehicle, detection method, and detection program
WO2023199552A1 (ja) * 2022-04-12 2023-10-19 住友電気工業株式会社 検知装置および検知方法
US12418548B2 (en) 2022-06-30 2025-09-16 Honda Motor Co., Ltd. Illegal signal detection apparatus, vehicle, and illegal signal detection method
JP7554791B2 (ja) 2022-07-01 2024-09-20 本田技研工業株式会社 信号検出装置、車両及び方法
US12413605B2 (en) 2022-07-01 2025-09-09 Honda Motor Co., Ltd. Signal detection apparatus, vehicle, and method

Also Published As

Publication number Publication date
JP7435616B2 (ja) 2024-02-21
US11849324B2 (en) 2023-12-19
US20220264303A1 (en) 2022-08-18
JPWO2021065068A1 (ja) 2021-04-08
CN113994635A (zh) 2022-01-28

Similar Documents

Publication Publication Date Title
JP7435616B2 (ja) 検知装置、車両、検知方法および検知プログラム
US10880415B2 (en) Detecting device, gateway device, and detecting method
CN111033504B (zh) 检测器、检测方法和检测程序
JP7276670B2 (ja) 検知装置、検知方法および検知プログラム
US11392683B2 (en) Detection device, detection method and recording medium
JP7480786B2 (ja) 検知装置、車両、検知方法および検知プログラム
US12003966B2 (en) Local misbehavior prevention system for cooperative intelligent transportation systems
JP7605208B2 (ja) 検知装置、車両、検知方法および検知プログラム
US20210392109A1 (en) Detection device, gateway device, detection method, and detection program
JP7396363B2 (ja) 検知装置、車両、検知方法および検知プログラム
US12463971B2 (en) Detection device, detection method, and detection program
JP2024505423A (ja) 協調型高度道路交通システムのためのローカル誤動作防止システム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20871027

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021551126

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20871027

Country of ref document: EP

Kind code of ref document: A1