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

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

Info

Publication number
WO2021065069A1
WO2021065069A1 PCT/JP2020/019713 JP2020019713W WO2021065069A1 WO 2021065069 A1 WO2021065069 A1 WO 2021065069A1 JP 2020019713 W JP2020019713 W JP 2020019713W WO 2021065069 A1 WO2021065069 A1 WO 2021065069A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
time
detection
target
unit
Prior art date
Application number
PCT/JP2020/019713
Other languages
English (en)
French (fr)
Inventor
濱田芳博
上田浩史
足立直樹
相羽慎一
上口翔悟
石川史也
Original Assignee
株式会社オートネットワーク技術研究所
住友電装株式会社
住友電気工業株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社オートネットワーク技術研究所, 住友電装株式会社, 住友電気工業株式会社 filed Critical 株式会社オートネットワーク技術研究所
Priority to JP2021551127A priority Critical patent/JP7396363B2/ja
Priority to CN202080042112.7A priority patent/CN114245981A/zh
Priority to US17/622,086 priority patent/US11870789B2/en
Publication of WO2021065069A1 publication Critical patent/WO2021065069A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/28Timers or timing mechanisms used in protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R16/00Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
    • B60R16/02Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
    • B60R16/023Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements for transmission of signals between vehicle parts or subsystems
    • 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
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1416Event detection, e.g. attack signature detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/54Store-and-forward switching systems 
    • H04L12/56Packet switching systems
    • H04L12/5601Transfer mode dependent, e.g. ATM
    • H04L2012/5614User Network Interface
    • H04L2012/5618Bridges, gateways [GW] or interworking units [IWU]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/54Store-and-forward switching systems 
    • H04L12/56Packet switching systems
    • H04L12/5601Transfer mode dependent, e.g. ATM
    • H04L2012/5628Testing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

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-178176 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, monitors a legitimate message transmitted periodically in the in-vehicle network and the malicious message as a target message, and periodically. Calculation to calculate the time difference between the monitoring unit that monitors the transmitted reference message and the time corresponding to the transmission time of the target message and the time corresponding to the transmission time of the reference message based on the monitoring result by the monitoring unit.
  • a unit and a detection unit that performs a detection process for detecting the malicious message based on the time difference calculated by the calculation unit are provided.
  • 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 monitors a legitimate message periodically transmitted in the in-vehicle network as a target message, and also monitors the malicious message as a target message.
  • a step of monitoring the reference message transmitted periodically a step of calculating the time difference between the time corresponding to the transmission time of the target message and the time corresponding to the transmission time of the reference message based on the monitoring result, and a step of calculating the time difference. It includes a step of performing a detection process for detecting the malicious message based on the calculated time difference.
  • 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. Corresponds to the time corresponding to the transmission time of the target message and the transmission time of the reference message based on the monitoring result by the monitoring unit and the monitoring unit that monitors the reference message transmitted periodically.
  • This is a program for functioning as a calculation unit that calculates a time difference from the time and a detection unit that performs detection processing for detecting the malicious message based on the time difference calculated by the calculation unit.
  • 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 may 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 detection 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 and the reference 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
  • FIG. 6 is a diagram showing another example of the distribution of the reception time of the target message and the reference 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 and the reference message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 8 is a diagram showing an example of the distribution of the reception time of the target message and the reference message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 9 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. 9 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. 10 is a diagram showing an example of the distribution of the reception time of the reference 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 reference message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 12 is a diagram showing an example of the relationship between the reception time of the target message and the reception time of the reference message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 13 is a diagram showing another example of the relationship between the reception time of the target message and the reception time of the reference message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 14 is a diagram showing another example of the relationship between the reception time of the target message and the reception time of the reference message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 15 is a diagram showing an example of the distribution of the reception time of the target message and the reference message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 16 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. 17 is a flowchart defining another example of the operation procedure when the gateway device performs the detection process in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 18 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. 19 is a flowchart defining another example of the detection process in the gateway device of the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 20 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. Corresponds to the time corresponding to the transmission time of the target message and the transmission time of the reference message based on the monitoring result by the monitoring unit and the monitoring unit that monitors the reference message transmitted periodically. It includes a calculation unit that calculates a time difference from the time, and a detection unit that performs detection processing for detecting the fraudulent message based on the time difference calculated by the calculation unit.
  • the detection process is performed based on the time difference between the time corresponding to the transmission time of the target message and the time corresponding to the transmission time of the reference message, and the detection process is performed based on the time corresponding to the transmission time of the reference message. Since the processing can be performed, it is possible to avoid the occurrence of false detection due to the detection processing based on the reception time of the malicious message included in the target message. Therefore, it is possible to more accurately detect an unauthorized message in the in-vehicle network.
  • the transmission cycle of the legitimate message and the transmission cycle of the reference message are different from each other, and the detection unit determines, as the detection process, whether or not the target message is the malicious message according to the determination criteria. Then, the detection unit performs the detection process while switching a plurality of the determination criteria.
  • the number of the determination criteria used by the detection unit in the detection process is based on the least common multiple of the transmission cycle of the legitimate message and the transmission cycle of the reference message, and the transmission cycle of the legitimate message. Will be decided.
  • the detection device further includes an abnormality detection unit that detects an abnormality in the reference message based on the monitoring result by the monitoring unit and performs a predetermined process when the abnormality is detected.
  • the detection unit has the time difference between the time corresponding to the transmission time of the first target message, which is the target message, and the time corresponding to the transmission time of the reference message, and the first target. Anomalies related to the first target message based on the time difference between the time corresponding to the transmission time of the second target message, which is the target message transmitted after the message, and the time corresponding to the transmission time of the reference message. Is detected.
  • the monitoring unit monitors the target message received by the detection device and the reference message received by the detection device, and the detection unit performs the detection process such that the target message is fraudulent. Whether or not it is a message is determined according to a determination criterion, and the determination criterion is set based on the jitter generated by the oscillator in the vehicle-mounted device that transmits the reference message and the jitter generated by the oscillator in the detection device.
  • the vehicle according to the embodiment of the present disclosure is provided with the detection device.
  • the detection method according to the embodiment of the present disclosure 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 and a step of monitoring the reference message transmitted periodically, and based on the monitoring result, a time corresponding to the transmission time of the target message and a time corresponding to the transmission time of the reference message.
  • a step of calculating the time difference of the above and a step of performing a detection process for detecting the malicious message based on the calculated time difference are included.
  • the time corresponding to the transmission time of the reference message is detected as a reference. Since the processing can be performed, it is possible to avoid the occurrence of false detection due to the detection processing based on the reception time of the malicious message included in the target message. 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.
  • the monitoring unit that monitors the malicious message as the target message and monitors the reference message that is periodically transmitted, and the time corresponding to the transmission time of the target message based on the monitoring result by the monitoring unit.
  • a calculation unit that calculates the time difference from the time corresponding to the transmission time of the reference message and a detection unit that performs detection processing to detect the malicious message based on the time difference calculated by the calculation unit.
  • the detection process is performed based on the time difference between the time corresponding to the transmission time of the target message and the time corresponding to the transmission time of the reference message, and the detection process is performed based on the time corresponding to the transmission time of the reference message. Since the processing can be performed, it is possible to avoid the occurrence of false detection due to the detection processing based on the reception time of the malicious message included in the target message. 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.
  • 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, a calculation unit 53, a detection unit 54, a storage unit 55, and an abnormality detection unit 56.
  • the storage unit 55 is, for example, a flash memory.
  • the communication processing unit 51, the monitoring unit 52, the calculation unit 53, the detection unit 54, and the abnormality detection unit 56 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 gateway device 101 functions as a detection device and performs detection processing for detecting an unauthorized message in the vehicle-mounted network 12.
  • 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 legitimate periodic message and the illegal message as the message to be detected in the gateway device 101, that is, the target message Ma, and also monitors the reference message Mb transmitted periodically.
  • the monitoring unit 52 monitors two types of periodic messages M1 and M2 in the in-vehicle network 12.
  • the periodic messages M1 and M2 are messages having different IDs. Specifically, at least one of the source address and the destination address of the periodic messages M1 and M2 is different from each other. Alternatively, the periodic messages M1 and M2 have different port numbers in the IP header.
  • 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 122A which is an example of the control device 122, includes an oscillator 131A, a CPU (Central Processing Unit) 132A, and a CAN transceiver 133A.
  • control device 122B which is an example of the control device 122, includes an oscillator 131B, a CPU 132B, and a CAN transceiver 133B.
  • 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 calculation unit 53, and the detection unit 54.
  • the CAN transceiver 142 realizes a part or all of the communication processing unit 51.
  • the control device 122A transmits the periodic message M1 in the transmission cycle Ta. More specifically, the CPU 132A in the control device 122A broadcasts or unicasts the periodic message M1 via the CAN transceiver 133A according to the timing of the clock generated based on the oscillation signal from the oscillator 131A.
  • the control device 122B transmits the periodic message M2 in the transmission cycle Tb. More specifically, the CPU 132B in the control device 122B broadcasts or unicasts the periodic message M2 via the CAN transceiver 133B according to the timing of the clock generated based on the oscillation signal from the oscillator 131B.
  • the CAN transceiver 142 in the gateway device 101 adds a time stamp indicating the reception time to the periodic message M1 received from the control device 122A according to the timing of the clock generated based on the oscillation signal from the oscillator 143. Further, the CAN transceiver 142 adds a time stamp indicating the reception time to the periodic message M2 received from the control device 122B according to the timing of the clock generated based on the oscillation signal from the oscillator 143.
  • the message received from the control device 122A and the message received from the control device 122B is the target message Ma, and the other of the periodic messages M1 and M2 is an invalid message in the detection process.
  • the message used for that is, the reference message Mb.
  • the message received from the control device 122A is referred to as the target message Ma
  • the message received from the control device 122B is referred to as the reference message Mb.
  • a part of the message received by the gateway device 101 from the control device 122A is an invalid message.
  • the monitoring unit 52 monitors the legitimate periodic message M1 and the invalid message from the control device 122A as the target message Ma, and monitors the periodic message M2 from the control device 122B as the reference message Mb.
  • the monitoring unit 52 acquires the reception time ta of the target message Ma and the reception time tb of the reference message Mb by monitoring the message relayed by the communication processing unit 51.
  • the storage unit 55 stores the ID of the target message Ma and the ID of the reference message Mb.
  • the ID of the target message Ma is also referred to as a target ID
  • the ID of the reference message Mb is also referred to as a reference ID.
  • the monitoring unit 52 confirms the ID included in the message received by the communication processing unit 51, and the target ID and the reference ID in the storage unit 55.
  • the monitoring unit 52 recognizes that the message received by the communication processing unit 51 is the target message Ma, and the target message By referring to the time stamp given to Ma, the reception time ta of the target message Ma is acquired.
  • the monitoring unit 52 When the monitoring unit 52 acquires the reception time ta, the monitoring unit 52 stores the reception information indicating the acquired reception time ta in association with the reception number N1 indicating the number of the target message Ma received by the communication processing unit 51. Store in part 55.
  • the monitoring unit 52 recognizes that the message received by the communication processing unit 51 is the reference message Mb, and the monitoring unit 52 recognizes that the message is the reference message Mb.
  • the reception time tb of the reference message Mb is acquired.
  • the monitoring unit 52 When the monitoring unit 52 acquires the reception time tb, the monitoring unit 52 stores the reception information indicating the acquired reception time tb in association with the reception number N2 indicating the number of the reference message Mb received by the communication processing unit 51. Store in part 55.
  • the calculation unit 53 calculates the time difference between the time corresponding to the transmission time of the target message Ma and the time corresponding to the transmission time of the reference message Mb based on the monitoring result by the monitoring unit 52.
  • the calculation unit 53 calculates the time difference between the reception time ta of the target message Ma and the reception time tb of the reference message Mb based on the reception information stored in the storage unit 55.
  • FIG. 5 is a diagram showing an example of the distribution of the reception time of the target message and the reference message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • the horizontal axis represents the time.
  • FIG. 5 shows a case where the transmission cycle Ta of the target message Ma and the transmission cycle Tb of the reference message Mb are equal to each other when all the target message Ma are legitimate messages.
  • the calculation unit 53 sets the reception time tap of the p-th target message Map in which the reception number N1 is p and the reception number N2 based on the reception information stored in the storage unit 55.
  • p is an integer of 1 or more.
  • q is an integer greater than or equal to 1.
  • q is equal to p.
  • the reception time tap of the p-th target message Map is expressed by the following equation (1).
  • reception time tbq of the qth reference message Mbq is expressed by the following equation (2).
  • E1 is an error in the transmission time of the message based on the jitter caused by the oscillator 131A in the control device 122A.
  • E2 is an error in the transmission time of the message based on the jitter caused by the oscillator 131B in the control device 122B.
  • E3 is an error in the reception time of the message based on the jitter caused by the oscillator 143 in the gateway device 101. Note that E1, E2, and E3 are errors caused by the manufacturing process, usage environment, aging deterioration, and the like of the oscillators 131A, 131B, 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 122A.
  • Bi is the delay time caused by the collision and transmission standby delay on the bus 13 of the i-th message from the control device 122A.
  • S1 is a phase difference, that is, an offset between the transmission cycle Ta of the target message Ma and the transmission cycle Tb of the reference message Mb.
  • time difference Xp is expressed by the following equation (3) by subtracting the equation (2) from the equation (1).
  • q p.
  • the transmission cycle Ta and the transmission cycle Tb are equal to each other. Further, since the delay times Ai and Bi each repeat increasing and decreasing independently according to the communication status, the sigma term in the equation (3) does not increase monotonically within a certain numerical range. It can be replaced with an error Errr1 that repeats increasing and decreasing. Further, assuming that the error E1 based on the error of the oscillation signal of the oscillator 131A and the error E2 based on the error of the oscillation signal of the oscillator 131B are equal, the time difference Xp can be expressed by the following equation (4).
  • the time difference Xp is a value that does not depend on the reception numbers N1 and N2, and the probability distribution of the time difference Xp is, for example, a normal distribution.
  • the calculation unit 53 calculates and calculates the time difference Xp between the reception time tap and the reception time tbp based on the reception information stored in the storage unit 55.
  • the time difference information indicating the time difference Xp is stored in the storage unit 55.
  • FIG. 6 is a diagram showing another example of the distribution of the reception time of the target message and the reference message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • the horizontal axis represents the time.
  • FIG. 6 shows a case where the transmission cycle Tb of the reference message Mb is shorter than the transmission cycle Ta of the target message Ma when all the target message Ma are legitimate messages.
  • FIG. 6 shows a case where the transmission cycle Tb is 3 seconds and the transmission cycle Ta is 7 seconds.
  • the calculation unit 53 receives the reception time tap of the p-th target message Map and the q-th reception immediately before the reception time tap based on the reception information stored in the storage unit 55.
  • the time difference Xp from the reception time tbq of the reference message Mbq of is calculated.
  • the time difference between the transmission time of the target message Map and the transmission time of the reference message Mbq theoretically changes in a cycle of the least common multiple L of the transmission cycle Ta and the transmission cycle Tb.
  • the least common multiple L is 21 seconds.
  • the reception time ta (L1 ⁇ k + 1) of the target message Ma (L1 ⁇ k + 1) at the (L1 ⁇ k + 1) th time is expressed by the following equation (5).
  • the reception time tb (L2 ⁇ k + 1) of the (L2 ⁇ k + 1) th reference message Mb (L2 ⁇ k + 1) is expressed by the following equation (6). ..
  • E4 is an error in the transmission time of the message based on the jitter caused by the oscillator 131A in the control device 122A.
  • E5 is an error in the transmission time of the message based on the jitter caused by the oscillator 131B in the control device 122B.
  • E6 is an error in the reception time of the message based on the jitter caused by the oscillator 143 in the gateway device 101. Note that E4, E5, and E6 are errors caused by the manufacturing process, usage environment, aging deterioration, and the like of the oscillators 131A, 131B, and 143, respectively.
  • Ci 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 122A.
  • Di is the delay time caused by the collision and transmission standby delay on the bus 13 of the i-th message from the control device 122A.
  • S2 is a phase difference, that is, an offset between the transmission cycle Ta of the target message Ma and the transmission cycle Tb of the reference message Mb.
  • time difference X (L1 ⁇ k + 1) is expressed by the following equation (7) by subtracting the equation (6) from the equation (5).
  • the sigma term in the equation (7) does not increase monotonically within a certain numerical range. It can be replaced with an error Errr2 that repeats increasing and decreasing in. Further, assuming that the error E4 based on the error of the oscillation signal of the oscillator 131A and the error E5 based on the error of the oscillation signal of the oscillator 131B are equal, the time difference X (L1 ⁇ k + 1) is expressed by the following equation (8). be able to.
  • the time difference X (L1 ⁇ k + 1) becomes a value independent of the reception numbers N1 and N2, and the probability distribution of the time difference X (L1 ⁇ k + 1) becomes, for example, a normal distribution.
  • the calculation unit 53 calculates and calculates the time difference Xp between the reception time tap and the reception time tbq based on the reception information stored in the storage unit 55.
  • the time difference information indicating the time difference Xp is stored in the storage unit 55.
  • FIG. 7 is a diagram showing another example of the distribution of the reception time of the target message and the reference message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • the horizontal axis represents the time.
  • FIG. 7 shows a case where the transmission cycle Ta of the target message Ma is shorter than the transmission cycle Tb of the reference message Mb when all the target message Ma are legitimate messages.
  • FIG. 7 shows a case where the transmission cycle Ta is 3 seconds and the transmission cycle Tb is 7 seconds.
  • the calculation unit 53 receives the reception time tap of the p-th target message Map and the q-th reception immediately before the reception time tap based on the reception information stored in the storage unit 55.
  • the time difference Xp from the reception time tbq of the reference message Mbq of is calculated.
  • p is an integer of 1 or more.
  • q is an integer greater than or equal to 1.
  • the time difference between the transmission time of the target message Map and the transmission time of the reference message Mbq theoretically changes in a cycle of the least common multiple L seconds of the transmission cycle Ta and the transmission cycle Tb.
  • the least common multiple L is 21.
  • the reception time ta (L1 ⁇ k + 1) of the target message Ma (L1 ⁇ k + 1) at the (L1 ⁇ k + 1) th time is expressed by the following equation (9).
  • the reception time tb (L2 ⁇ k + 1) of the (L2 ⁇ k + 1) th reference message Mb (L2 ⁇ k + 1) is expressed by the following equation (10). ..
  • E7 is an error in the transmission time of the message based on the jitter caused by the oscillator 131A in the control device 122A.
  • E8 is an error in the transmission time of the message based on the jitter caused by the oscillator 131B in the control device 122B.
  • E9 is an error in the reception time of the message based on the jitter caused by the oscillator 143 in the gateway device 101. Note that E7, E8, and E9 are errors caused by the manufacturing process, usage environment, aging deterioration, and the like of the oscillators 131A, 131B, and 143, respectively.
  • Ei is the delay time caused by the collision of the i-th message from the control device 122A and the transmission standby delay on the bus 13.
  • Fi is the delay time caused by the collision and transmission standby delay on the bus 13 of the i-th message from the control device 122A.
  • S2 is a phase difference, that is, an offset between the transmission cycle Ta of the target message Ma and the transmission cycle Tb of the reference message Mb.
  • time difference X (L1 ⁇ k + 1) is expressed by the following equation (11) by subtracting the equation (10) from the equation (9).
  • the sigma term in the equation (11) does not increase monotonically within a certain numerical range. It can be replaced with an error Errr3 that repeats increasing and decreasing in. Further, assuming that the error E7 based on the error of the oscillation signal of the oscillator 131A and the error E8 based on the error of the oscillation signal of the oscillator 131B are equal, the time difference X (L1 ⁇ k + 1) is expressed by the following equation (12). be able to.
  • the time difference X (L1 ⁇ k + 1) becomes a value independent of the reception numbers N1 and N2, and the probability distribution of the time difference X (L1 ⁇ k + 1) becomes, for example, a normal distribution.
  • the calculation unit 53 calculates and calculates the time difference Xp between the reception time tap and the reception time tbq based on the reception information stored in the storage unit 55.
  • the time difference information indicating the time difference Xp is stored in the storage unit 55.
  • FIG. 8 is a diagram showing an example of the distribution of the reception time of the target message and the reference message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • the horizontal axis represents the time.
  • FIG. 8 shows a transmission cycle Ta of the target message Ma, a transmission cycle Tbx of the reference message Mbx, a transmission cycle Tby of the reference message Mby, and a transmission cycle of the reference message Mbz when all the target message Ma are legitimate messages. It shows the case where Tbz is equal.
  • the calculation unit 53 sets the reception time tap of the p-th target message Map and the reception time tbxq of the q-th reference message Mbxq based on the reception information stored in the storage unit 55.
  • the time difference Xxq of is calculated.
  • the calculation unit 53 calculates the time difference Xyq between the reception time taq of the qth target message Maq and the reception time tbyq of the qth reference message Mbyq based on the reception information stored in the storage unit 55.
  • the calculation unit 53 calculates the time difference Xzq between the reception time taq of the qth target message Maq and the reception time tbzq of the qth reference message Mbzq based on the reception information stored in the storage unit 55.
  • the calculation unit 53 calculates and calculates the time difference Xpp, Xyp, Xzp as the time difference Xp based on the reception information stored in the storage unit 55.
  • the time difference information indicating the time difference Xpp, Xyp, Xzp is stored in the storage unit 55.
  • the detection unit 54 performs detection processing for detecting an unauthorized message based on the time difference Xp calculated by the calculation unit 53.
  • the detection unit 54 determines, as the detection process, whether or not the target message Ma is an invalid message according to a determination criterion.
  • the determination criteria are set based on, for example, the jitter caused by the oscillator 131B in the control device 122B that transmits the reference message Mb and the jitter caused by the oscillator 143 in the gateway device 101. Specifically, the determination criteria are set based on, for example, an error in the message transmission time based on the jitter caused by the oscillator 131B and an error in the message reception time based on the jitter caused by the oscillator 143.
  • the detection unit 54 calculates the statistical distance of the time difference Xp indicated by the time difference information, and compares the calculated statistical distance with the threshold value Th. Then, the detection unit 54 determines whether or not the target message Ma is an invalid message based on the comparison result between the statistical distance and the threshold value Th.
  • the detection unit 54 calculates the Mahalanobis distance D ⁇ 2, which is an example of the statistical distance, according to the following equation (13).
  • D ⁇ 2 means the square of D.
  • the detection unit 54 determines that the target message Ma is a legitimate message. On the other hand, when the calculated Mahalanobis distance D ⁇ 2 is larger than the threshold value Th, the detection unit 54 determines that the target message Ma is an invalid message.
  • the threshold value Th used for comparison with the calculated Mahalanobis distance D ⁇ 2 is preferably an appropriate value so that it can be accurately determined whether or not a malicious message exists in the target message Ma. ..
  • 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 Xp calculated by the calculation unit 53 when all the target messages Ma are valid messages. Calculate the Mahalanobis distance D ⁇ 2.
  • FIG. 9 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 using the time difference Xp when all the target message Ma are legitimate messages increases.
  • the detection unit 54 acquires the frequency distribution of the Mahalanobis distance D ⁇ 2 shown in FIG. 9 from the storage unit 55 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.
  • the detection unit 54 outputs judgment information indicating a judgment result based on the Mahalanobis distance D ⁇ 2 and the threshold value Th to the communication processing unit 51.
  • the communication processing unit 51 transmits the target message Ma 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 Ma 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 abnormality detection unit 56 detects an abnormality in the reference message Mb based on the monitoring result by the monitoring unit 52, and performs a predetermined process when the abnormality is detected.
  • the abnormality detection unit 56 detects an abnormality in the reference message Mb based on the received information stored in the storage unit 55 and the transmission cycle Tb of the reference message Mb.
  • the storage unit 55 stores a predetermined threshold value ThB, which is a determination standard used when detecting an abnormality in the reference message Mb.
  • FIG. 10 is a diagram showing an example of the distribution of the reception time of the reference message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • the horizontal axis represents the time.
  • the abnormality detection unit 56 detects the abnormality of the next reference message Mbq based on the reception time tb (q-1) of the reference message Mb (q-1) and the threshold value ThB.
  • the threshold values ThBq1 and ThBq2 that define the permissible range of the reception time tbq of the reference message Mbq are set.
  • the abnormality detection unit 56 compares the reception time tbq in the storage unit 55 with the set threshold values ThBq1 and ThBq2.
  • the reference message Mbq is normal when the reception time tbq is equal to or greater than the threshold value ThBq1 and equal to or less than the threshold value ThBq2, that is, within the permissible range defined by the threshold values ThBq1 and ThBq2.
  • the abnormality detection unit 56 refers to the case where the reception time tbq is less than the threshold value ThBq1 or larger than the threshold value ThBq2, that is, outside the permissible range defined by the threshold values ThBq1 and ThBq2.
  • the message Mbq is determined to be abnormal.
  • the abnormality detection unit 56 determines that the reference message Mbq is abnormal, the abnormality detection unit 56 notifies the calculation unit 53 of the abnormality determination information indicating the reference message Mbq determined to be abnormal.
  • the calculation unit 53 calculates the time difference Xp using the reception time tb of the reference message Mb other than the reference message Mb indicated by the received abnormality determination information.
  • the calculation unit 53 stops the calculation of the time difference Xp.
  • the abnormality detection unit 56 detects an abnormality of each type of reference message Mb. Detect.
  • the abnormality detection unit 56 detects an abnormality related to the reference message Mbq based on the reception time tbq of the reference message Mbq and the reception time tb (q + 1) of the next reference message Mb (q + 1) transmitted after the reference message Mbq. To do.
  • FIG. 11 is a diagram showing another example of the distribution of the reception time of the reference message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • the horizontal axis represents the time.
  • the abnormality detection unit 56 determines that the reference message Mbq whose reception time tbq is within the permissible range defined by the threshold values ThBq1 and ThBq2 is normal, and then transmits the reference message Mbq after the reference message Mbq. If the reception time tb (q + 1) of the next reference message Mb (q + 1) to be performed is within the permissible range specified by the threshold values ThBq1 and ThBq2, the reference messages Mbq and Mb (q + 1) may be abnormal. Judge that there is.
  • the abnormality detection unit 56 determines that the reference messages Mbq and Mb (q + 1) may be abnormal, the abnormality detection unit 56 calculates abnormality determination information indicating the reference messages Mbq and Mb (q + 1) that may be abnormal. Notify to.
  • the calculation unit 53 uses the reception time tb of the reference message Mb other than the reference message Mb that may be abnormal, which is indicated by the received abnormality determination information, and uses the time difference Xp. Is calculated.
  • the transmission cycle Ta of the target message Ma and the transmission cycle Tb of the reference message Mb may be different from each other.
  • the detection unit 54 performs detection processing while switching a plurality of determination criteria.
  • the time difference Xp calculated by the calculation unit 53 changes periodically.
  • the detection unit 54 performs the detection process while switching a plurality of determination criteria according to the periodic change of the time difference Xp.
  • the number of determination criteria used by the detection unit 54 in the detection process is the least common multiple L of the transmission cycle Ta of the target message Ma and the transmission cycle Tb of the reference message Mb when all the target message Ma are legitimate messages, and the target. It is determined based on the transmission cycle Ta of the message Ma. More specifically, the storage unit 55 stores a number of determination criteria, for example, a threshold Th, which is predetermined by the manufacturer of the vehicle 1.
  • the storage unit 55 stores the transmission cycle Ta of the target message Ma, the transmission cycle Tb of the reference message Mb, and the offsets S1, S2, and S3 when all the target message Ma are legitimate messages. Further, the storage unit 55 stores a threshold value Th of the number of values obtained by dividing the least common multiple L by the transmission cycle Ta as a determination standard used by the detection unit 54 in the detection process.
  • FIG. 12 is a diagram showing an example of the relationship between the reception time of the target message and the reception time of the reference message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 12 corresponds to the distribution of the reception times of the target message and the reference message shown in FIG.
  • the time difference Xp between the reception time tap of the target message Map and the reception time tbq of the reference message Mbq to be compared with the target message Map is theoretically 2 seconds, 0 seconds, and 1 second. It changes periodically like 2 seconds.
  • the storage unit 55 has the least common multiple L 21. Is divided by 7, which is the transmission cycle Ta, and three threshold values Th1, Th2, and Th3 are stored.
  • the detection unit 54 performs symbol synchronization processing, which is a process for determining the threshold value Th to be used for comparison with the Mahalanobis distance D ⁇ 2 among the three threshold values Th1, Th2, Th3.
  • the detection unit 54 calculates the theoretical value of the time difference XPs in advance based on the transmission cycles Ta and Tb and the offsets S1, S2 and S3 stored in the storage unit 55. For example, the detection unit 54 calculates a time difference XPs, that is, three time differences Xps, which is the number of values obtained by dividing the least common multiple L by the transmission cycle Ta.
  • the detection unit 54 compares the three time difference Xp stored in the storage unit 55 with the calculated three time difference Xps. Perform matching processing.
  • the detection unit 54 ends the symbol synchronization process. Then, the detection unit 54 performs the detection process while switching the predetermined threshold values Th1, Th2, Th3 corresponding to the three time difference Xps according to the calculated change of the time difference Xps.
  • the detection unit 54 waits until new time difference information is saved in the storage unit 55.
  • the detection unit 54 performs the pattern matching process again.
  • the detection unit 54 repeats the pattern matching process until the difference between the three time difference Xp and the corresponding three time difference Xps becomes equal to or less than a predetermined threshold value.
  • the abnormality detection unit 56 receives the reception time tap of the target message Map and the reception time ta (p-1) of the immediately preceding target message Ma (p-1). ), The abnormality of the received reference message Mb is detected.
  • the abnormality detection unit 56 receives 23 seconds to 30 seconds, which is the reception time of the immediately preceding target message Ma. Based on the reception time tbq of the three reference messages Mb received between, the time difference Xq of the reception time tbq is calculated, and based on the comparison result between the calculated time difference Xq and the threshold value ThB in the storage unit 55. , Detects an abnormality in the reference message Mb.
  • the abnormality detection unit 56 determines that an abnormality has occurred in the reference message Mb, the abnormality detection unit 56 notifies the detection unit 54 of abnormality determination information indicating that the abnormality has been detected.
  • the detection unit 54 When the detection unit 54 receives the abnormality determination information from the abnormality detection unit 56, the detection unit 54 performs the symbol synchronization process again.
  • FIG. 13 is a diagram showing another example of the relationship between the reception time of the target message and the reception time of the reference message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 13 corresponds to the distribution of the reception time of the target message and the reference message shown in FIG.
  • the time difference Xp between the reception time tap of the target message Map and the reception time tbq of the reference message Mbq to be compared with the target message Map is theoretically 0 seconds, 2 seconds, and 1 second. , It changes periodically like 0 seconds.
  • the storage unit 55 has the least common multiple L 21. Is stored divided by 3 which is the transmission cycle Ta, and seven threshold values Th1, Th2, Th3, Th4, Th5, Th6, Th7 are stored.
  • the detection unit 54 is a symbol that determines the threshold value Th to be used for comparison with the Mahalanobis distance D ⁇ 2 among the seven threshold values Th1, Th2, Th3, Th4, Th5, Th6, Th7. Perform synchronous processing.
  • the detection unit 54 calculates the theoretical value of the time difference XPs in advance based on the transmission cycles Ta and Tb and the offsets S1, S2 and S3 stored in the storage unit 55. For example, the detection unit 54 calculates a time difference XPs, that is, seven time differences Xps, which is the number of values obtained by dividing the least common multiple L by the transmission cycle Ta.
  • the detection unit 54 compares the seven time difference Xp stored in the storage unit 55 with the calculated seven time difference Xps.
  • the detection unit 54 ends the symbol synchronization process when the difference between the seven time difference Xp and the corresponding seven time difference Xps is equal to or less than a predetermined threshold value. Then, the detection unit 54 performs detection processing while switching the threshold values Th1, Th2, Th3, Th4, Th5, Th6, Th7 determined in advance corresponding to the seven time difference XPs according to the calculated change of the time difference XPs. I do.
  • the detection unit 54 waits until new time difference information is saved in the storage unit 55.
  • the detection unit 54 performs the pattern matching process again.
  • the detection unit 54 repeats the pattern matching process until the difference between the seven time difference Xp and the corresponding seven time difference Xps becomes equal to or less than a predetermined threshold value.
  • the detection unit 54 complements the reference message Mb by generating a virtual reception time tvb based on the reception time tb of the reference message Mb.
  • FIG. 14 is a diagram showing another example of the relationship between the reception time of the target message and the reception time of the reference message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 14 corresponds to the distribution of the reception time of the target message and the reference message shown in FIG.
  • the detection unit 54 receives the latest reference message Mb when the reception information including the reception time tbp of the target message Map is stored in the storage unit 55 by the monitoring unit 52.
  • f reception time tvbs are generated for the reception time tb of one reference message Mb according to the following equations (14) and (15).
  • f is an integer of 1 or more.
  • Mg is a predetermined margin set in consideration of the delay time of the reference message Mb.
  • the margin Mg is a value obtained by multiplying the maximum delay time that can occur in the reference message Mb by -1.
  • e is the number of reception time tvb already generated by using the reception time tb of a certain reference message Mb.
  • the detection unit 54 receives. Using the reception time tb of the latest reference message Mb, 1 is substituted for e in the equation (15) to generate the reception time tvb again.
  • the detection unit 54 performs detection processing using a preset threshold value Th corresponding to the time difference Xp between the reception time ta of the target message Ma and the generated reception time tvb.
  • the detection unit 54 determines the time difference between the time corresponding to the transmission time of the target message Map and the time corresponding to the transmission time of the reference message Mb, and the transmission time of the target message Ma (p + 1) transmitted after the target message Map. Based on the time difference between the time corresponding to and the time corresponding to the transmission time of the reference message Mb, an abnormality related to the target message Map is detected. More specifically, the detection unit 54 receives the time difference Xp between the reception time tap of the target message Map and the reception time tb of the reference message Mb, and the reception time ta (p + 1) of the target message Ma (p + 1) and the reference message Mb. An abnormality related to the target message Map is detected based on the time difference X (p + 1) from the time tb.
  • FIG. 15 is a diagram showing an example of the distribution of the reception time of the target message and the reference message in the in-vehicle communication system according to the embodiment of the present disclosure.
  • the horizontal axis represents the time.
  • FIG. 15 shows a case where the transmission cycle Ta of the target message Ma and the transmission cycle Tb of the reference message Mb are equal to each other when all the target message Ma are legitimate messages.
  • the calculation unit 53 calculates the time difference Xp between the reception time tap of the target message Map and the reception time tbq of the reference message Mbq.
  • the detection unit 54 calculates the Mahalanobis distance D ⁇ 2 based on the time difference Xp and the equation (13), compares the calculated Mahalanobis distance D ⁇ 2 with the threshold value Th, and based on the comparison result, the target message Map is Determine if it is an invalid message.
  • the calculation unit 53 calculates the time difference X (p + 1a) between the reception time ta (p + 1) of the target message Ma (p + 1) next to the target message Map and the reception time tbq of the reference message Mbq.
  • the detection unit 54 calculates the Mahalanobis distance D ⁇ 2 based on the time difference X (p + 1a) and the equation (13), compares the calculated Mahalanobis distance D ⁇ 2 with the threshold value Th, and based on the comparison result, the target. It is determined whether or not the message Ma (p + 1) is an invalid message.
  • the detection unit 54 determines that the target message Map is not an invalid message and then further determines that the target message Ma (p + 1) is not an invalid message, the target messages Map and Ma (p + 1) may be abnormal. Judge that there is, that is, judge gray.
  • the detection unit 54 calculates the Mahalanobis distance D ⁇ 2 based on the time difference Xp, and compares the calculated Mahalanobis distance D ⁇ 2 with the threshold value Th. Based on this, the configuration is such that it is determined whether or not the target message Map is an invalid message, but the present invention is not limited to this.
  • 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 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 calculates the classification score f (Xp) according to the following equation (16). The detection unit 54 determines that the target message Map is a legitimate message when the calculated classification score f (Xp) is zero or more, while the detection unit 54 determines that the target message Map is less than zero when the calculated classification score f (Xp) is less than zero. Map determines that the message is invalid.
  • 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 (17), or a sigmoid kernel.
  • X is a vector of the time difference Xp between the reception time tap of the target message Map and the reception time tbq of the plurality of reference messages Mbq.
  • 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 Xp between the reception time tap of the target message Map, which is a legitimate message, and the reception time tbq of the plurality of reference messages Mbq is calculated, and the calculated time difference Xp is used as the learning data set and the verification data set. Classify as.
  • f (Xp) of the data set for verification is calculated using the parameters obtained by machine learning and the above-mentioned equation (16), and the classification score is obtained.
  • f (Xp) 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 Xp between the reception time tap of the target message Map, which is a legitimate message, and the reception time tbq of the plurality of reference messages Mbq is calculated, and the calculated time difference Xp is used as the normal data group.
  • an invalid data group which is a data group of a plurality of time differences Xpr larger than the time difference Xp of the normal data group and a data group of a plurality of time differences Xps smaller than the time difference Xp 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 (Xp) of the verification data set is calculated using the parameters obtained by the machine learning and the above-mentioned equation (16), 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 (Xp). Then, the time difference Xps and Xpr values 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 Xp between the reception time tap of the target message Map, which is a legitimate message, and the reception time tbq of the plurality of reference messages Mbq is calculated, and the calculated time difference Xp is used as the normal data group.
  • an invalid data group which is a data group of a plurality of time differences Xpr larger than the time difference Xp of the normal data group and a data group of a plurality of time differences Xps smaller than the time difference Xp 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 Xps and Xpr values 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.
  • 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. 16 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 monitors the target message Ma and the reference message Mb in the vehicle-mounted network 12 and acquires the reception time tap of the target message Map and the reception time tbq of the reference message Mbq ( Step S102).
  • the gateway device 101 compares the reception time tbq of the reference message Mbq with the threshold values ThBq1 and ThBq2 (step S104).
  • the gateway device 101 When the reception time tbq is within the permissible range defined by the threshold values ThBq1 and ThBq2 (YES in step S106), the gateway device 101 performs a detection process for detecting an invalid message. Specifically, the gateway device 101 determines whether or not the target message Map is an invalid message (step S108).
  • the gateway device 101 continues to monitor the target message Ma and the reference message Mb, and the next target.
  • the reception time ta (p + 1) of the message Ma (p + 1) and the reception time tb (q + 1) of the next reference message Mb (q + 1) are acquired (step S102).
  • the gateway device 101 determines that the target message Map is a legitimate message as a result of the detection process (NO in step S110)
  • the gateway device 101 continues to monitor the target message Ma and the reference message Mb, and the next target message Ma (NO).
  • the reception time ta (p + 1) of p + 1) and the reception time tb (q + 1) of the next reference message Mb (q + 1) are acquired (step S102).
  • the gateway device 101 determines that the target message Map 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 transmitted in the vehicle 1 or in the vehicle 1. It is transmitted to a higher-level device outside (step S112).
  • the gateway device 101 continues to monitor the target message Ma and the reference message Mb, and receives the next target message Ma (p + 1) at the reception time ta (p + 1) and the next reference message Mb (q + 1) at the reception time tb ( q + 1) is acquired (step S102).
  • FIG. 17 is a flowchart defining another example of the operation procedure when the gateway device performs the detection process in the in-vehicle communication system according to the embodiment of the present disclosure.
  • the gateway device 101 monitors the target message Ma and the reference message Mb in the vehicle-mounted network 12, and sets a plurality of reception times of the target message Ma and a plurality of reception times tb of the reference message Mb. Acquire (step S202).
  • the gateway device 101 calculates a plurality of time difference Xp based on the acquired plurality of reception time ta and a plurality of reception time tb, and performs symbol synchronization processing using the calculated plurality of time difference Xp (step S204). ..
  • the gateway device 101 acquires the reception time tap of the target message Map and the reception time tbq of the reference message Mbq (step S206).
  • the gateway device 101 compares the reception time tbq of the reference message Mbq with the threshold values ThBq1 and ThBq2 (step S208).
  • the gateway device 101 When the reception time tbq is within the permissible range defined by the threshold values ThBq1 and ThBq2 (YES in step S210), the gateway device 101 performs a detection process for detecting an invalid message. Specifically, the gateway device 101 determines whether or not the target message Map is an invalid message (step S212).
  • the gateway device 101 performs the same processing as in steps S110 and S112 in FIG. 16 as the processing in steps S214 and S216.
  • FIG. 18 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. 18 shows the details of step S108 in FIG.
  • the gateway device 101 calculates the time difference Xp between the reception time tap of the target message Map and the reception time tbq of the reference message Mbq (step S302).
  • the gateway device 101 calculates the Mahalanobis distance D ⁇ 2 based on the time difference Xp (step S304).
  • the gateway device 101 compares the calculated Mahalanobis distance D ⁇ 2 with the threshold value Th (step S306).
  • the gateway device 101 determines that the target message Map is a valid message (step S310).
  • the gateway device 101 determines that the target message Map is an invalid message (step S312).
  • FIG. 19 is a flowchart defining another example of the detection process in the gateway device of the in-vehicle communication system according to the embodiment of the present disclosure.
  • FIG. 19 shows the details of step S212 in FIG.
  • the gateway device 101 generates a virtual reception time tvb based on the reception time tbq of the reference message Mbq (step S402).
  • the gateway device 101 calculates the time difference Xp between the reception time tap of the target message Map and the reception time tbq or the reception time tvb (step S404).
  • the gateway device 101 performs the same processing as in steps S304 to S312 in FIG. 18 as the processing from step S406 to 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. 20 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 the time corresponding to the transmission time of the reference message Mb transmitted by the control device 122 and the time corresponding to the transmission time of the target message Ma. Then, the calculation unit 53 of the detection device 151 calculates the time difference between the transmission time of the target message Ma and the transmission time of the reference message Mb based on the monitoring result by the monitoring unit 52.
  • the gateway device 101 monitors the periodic message M1 and the invalid message from the control device 122A as the target message Ma, and also monitors the periodic message M2 from the control device 122B.
  • the configuration is such that monitoring is performed as a reference message Mb, but the present invention is not limited to this.
  • the control device 122A transmits the periodic message M1 in the transmission cycle Ta and also transmits the periodic message M2 in the transmission cycle Tb. More specifically, the CPU 132A in the control device 122A broadcasts or unicasts the periodic messages M1 and M2 via the CAN transceiver 133A according to the timing of the clock generated based on the oscillation signal from the oscillator 131A.
  • the CAN transceiver 142 in the gateway device 101 monitors the periodic message M1 and the invalid message from the control device 122A as the target message Ma, and monitors the periodic message M2 from the control device 122A as the reference message Mb.
  • the detection unit 54 is configured to determine whether or not the target message Ma 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 Ma is an invalid message as the detection process.
  • the number of determination criteria used by the detection unit 54 in the detection process is the transmission cycle Ta of the target message Ma when all the target message Ma are legitimate messages.
  • the configuration is determined based on the least common multiple L of the reference message Mb with the transmission cycle Tb and the transmission cycle Ta of the target message Ma, but the present invention is not limited to this.
  • the number of determination criteria used by the detection unit 54 in the detection process may be a number that does not depend on the least common multiple L and the transmission cycle Ta, for example, a predetermined number. In this case, it is determined whether or not the message is an invalid message for some target message Ma.
  • the abnormality detection unit 56 is configured to detect an abnormality in the reference message Mb based on the monitoring result by the monitoring unit 52, but the present invention is limited to this. It's not a thing.
  • the gateway device 101 may be configured not to include the abnormality detection unit 56.
  • the detection unit 54 determines that the target message Map is not an invalid message and then further determines that the target message Ma (p + 1) is not an invalid message
  • the configuration is such that the target messages Map and Ma (p + 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 criteria for determining whether or not the target message Ma is an invalid message are the jitter caused by the oscillators 131A and 131B in the control devices 122A and 122B and the gateway device 101.
  • the configuration is set based on the jitter generated by the oscillator 143, but the configuration is not limited to this.
  • the determination standard may be configured to be set independently of the jitter generated by the oscillators 131A, 131B, and 143.
  • 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 illegal message is concerned.
  • the next periodic message is an invalid message.
  • the next malicious message may be erroneously determined to be a legitimate message, or the legitimate message transmitted according to a predetermined transmission cycle may be erroneously determined to be a legitimate message.
  • the monitoring unit 52 monitors the legitimate message and the malicious message periodically transmitted in the in-vehicle network 12 as the target message Ma, and also periodically.
  • the reference message Mb transmitted is monitored.
  • the calculation unit 53 calculates the time difference Xp between the time corresponding to the transmission time of the target message Ma and the time corresponding to the transmission time of the reference message Mb based on the monitoring result by the monitoring unit 52.
  • the detection unit 54 performs detection processing for detecting an unauthorized message based on the time difference Xp calculated by the calculation unit 53.
  • the time corresponding to the transmission time of the reference message Mb is configured to perform the detection process based on the time difference Xp between the time corresponding to the transmission time of the target message Ma and the time corresponding to the transmission time of the reference message Mb. Since the detection process can be performed based on the above, it is possible to avoid the occurrence of false detection due to the detection process based on the reception time of the malicious message included in the target message Ma.
  • the gateway device 101 can more accurately detect an unauthorized message in the in-vehicle network.
  • the transmission cycle of the legitimate message and the transmission cycle Tb of the reference message Mb are different from each other.
  • the detection unit 54 determines whether or not the target message Ma is an invalid message according to a determination criterion.
  • the detection unit 54 performs detection processing while switching a plurality of determination criteria.
  • the number of determination criteria used by the detection unit 54 in the detection process is the least common multiple L of the transmission cycle of the legitimate message and the transmission cycle Tb of the reference message Mb, and the legitimate one. Determined based on the message transmission cycle.
  • whether or not the target message Ma is an invalid message is determined according to a plurality of judgment criteria according to the magnitude of the time difference Xp based on the difference between the transmission cycle of the legitimate message and the transmission cycle Tb of the reference message Mb. Since it can be determined, for example, it is possible to determine whether or not all the target message Mas are invalid messages.
  • the abnormality detection unit 56 detects an abnormality in the reference message Mb based on the monitoring result by the monitoring unit 52, and when the abnormality is detected, performs a predetermined process. Do.
  • the detection unit 54 has a time difference Xp between the time corresponding to the transmission time of the target message Map and the time corresponding to the transmission time of the reference message Mbq, and the target message Map.
  • An abnormality related to the target message Map is detected based on the time difference X (p + 1a) between the time corresponding to the transmission time of the target message Ma (p + 1) transmitted after and the time corresponding to the transmission time of the reference message Mbq.
  • the monitoring unit 52 monitors the target message Ma received by the gateway device 101 and the reference message Mb received by the gateway device 101. As a detection process, the detection unit 54 determines whether or not the target message Ma is an invalid message according to a determination criterion. The determination criteria are set based on the jitter caused by the oscillator 131B in the control device 122B that transmits the reference message Mb and the jitter caused by the oscillator 143 in the gateway device 101.
  • a judgment criterion considering the error of the message transmission time based on the jitter caused by the oscillator 131A in the control device 122A and the error of the message reception time based on the jitter caused by the oscillator 143 in the gateway device 101 can be used. Based on this, more accurate detection processing can be performed.
  • 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 as the target message Ma in the vehicle-mounted network 12, and also monitors the reference message Mb transmitted periodically. To do.
  • the gateway device 101 calculates the time difference Xp between the time corresponding to the transmission time of the target message Ma and the time corresponding to the transmission time of the reference message Mb based on the monitoring result.
  • the gateway device 101 performs a detection process for detecting an unauthorized message based on the calculated time difference Xp.
  • the time corresponding to the transmission time of the reference message Mb is performed by the method of performing the detection process based on the time difference Xp between the time corresponding to the transmission time of the target message Ma and the time corresponding to the transmission time of the reference message Mb. Since the detection process can be performed based on the above, it is possible to avoid the occurrence of false detection due to the detection process based on the reception time of the malicious message included in the target message Ma.
  • 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 the periodically transmitted legitimate message and the malicious message as the target message in the in-vehicle network, and also monitors the reference message that is periodically transmitted.
  • a calculation unit that calculates the time difference between the time corresponding to the transmission time of the target message and the time corresponding to the transmission time of the reference message based on the monitoring result by the monitoring unit.
  • a detection unit that performs detection processing to detect the malicious message based on the time difference calculated by the calculation unit, and a detection unit.
  • An abnormality detection unit that detects an abnormality in the reference message based on the monitoring result by the monitoring unit and notifies the calculation unit of the abnormality when the abnormality is detected.
  • the target message and the reference message have different destinations or sources, and the destinations or sources are different from each other.
  • the calculation unit calculates the time difference based on the time corresponding to the transmission time of the target message and the time corresponding to the transmission time of the reference message in which the abnormality is not detected by the abnormality detection unit. Detection device.
  • a detection device that detects malicious messages in an in-vehicle network.
  • a monitoring unit that monitors the periodically transmitted legitimate message and the malicious message as the target message in the in-vehicle network, and also monitors the reference message that is periodically transmitted.
  • a calculation unit that calculates the time difference between the time corresponding to the transmission time of the target message and the time corresponding to the transmission time of the reference message based on the monitoring result by the monitoring unit.
  • a detection unit that performs detection processing for detecting the malicious message based on the time difference calculated by the calculation unit is provided.
  • the monitoring unit, the calculation unit, and the detection unit are detection devices realized by a processor.

Landscapes

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

Abstract

車載ネットワークにおける不正メッセージをより正しく検知する。検知装置は、前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視するとともに、周期的に送信される基準メッセージを監視する監視部と、前記監視部による監視結果に基づいて、前記対象メッセージの送信時刻に対応する時刻と前記基準メッセージの送信時刻に対応する時刻との時間差を算出する算出部と、前記算出部によって算出された前記時間差に基づいて、前記不正メッセージを検知する検知処理を行う検知部とを備える。

Description

検知装置、車両、検知方法および検知プログラム
 本開示は、検知装置、車両、検知方法および検知プログラムに関する。
 この出願は、2019年9月30日に出願された日本出願特願2019-178176号を基礎とする優先権を主張し、その開示のすべてをここに取り込む。
 特許文献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は、本開示の実施の形態に係る車載通信システムにおいてゲートウェイ装置が検知処理を行う際の動作手順の一例を定めたフローチャートである。 図17は、本開示の実施の形態に係る車載通信システムにおいてゲートウェイ装置が検知処理を行う際の動作手順の他の例を定めたフローチャートである。 図18は、本開示の実施の形態に係る車載通信システムのゲートウェイ装置における検知処理の一例を定めたフローチャートである。 図19は、本開示の実施の形態に係る車載通信システムのゲートウェイ装置における検知処理の他の例を定めたフローチャートである。 図20は、本開示の実施の形態に係る車載ネットワークの接続トポロジの一例を示す図である。
 従来、車載ネットワークにおけるセキュリティを向上させるための技術が開発されている。
 [本開示が解決しようとする課題]
 上述の特許文献1および2に記載の技術を超えて、車載ネットワークにおける不正メッセージをより正しく検知することを可能とする技術が望まれる。
 本開示は、上述の課題を解決するためになされたもので、その目的は、車載ネットワークにおける不正メッセージをより正しく検知することが可能な検知装置、車両、検知方法および検知プログラムを提供することである。
 [本開示の効果]
 本開示によれば、車載ネットワークにおける不正メッセージをより正しく検知することが可能である。
 [本開示の実施形態の説明]
 最初に、本開示の実施形態の内容を列記して説明する。
 (1)本開示の実施の形態に係る検知装置は、車載ネットワークにおける不正メッセージを検知する検知装置であって、前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視するとともに、周期的に送信される基準メッセージを監視する監視部と、前記監視部による監視結果に基づいて、前記対象メッセージの送信時刻に対応する時刻と前記基準メッセージの送信時刻に対応する時刻との時間差を算出する算出部と、前記算出部によって算出された前記時間差に基づいて、前記不正メッセージを検知する検知処理を行う検知部とを備える。
 このように、対象メッセージの送信時刻に対応する時刻と、基準メッセージの送信時刻に対応する時刻との時間差に基づいて検知処理を行う構成により、基準メッセージの送信時刻に対応する時刻を基準として検知処理を行うことができるため、対象メッセージに含まれる不正メッセージの受信時刻を基準として検知処理を行うことによる誤検知の発生を回避することができる。したがって、車載ネットワークにおける不正メッセージをより正しく検知することができる。
 (2)好ましくは、前記正当メッセージの送信周期および前記基準メッセージの送信周期が互いに異なり、前記検知部は、前記検知処理として、前記対象メッセージが前記不正メッセージであるか否かを判定基準に従って判定し、前記検知部は、複数の前記判定基準を切り替えながら前記検知処理を行う。
 このような構成により、正当メッセージの送信周期と基準メッセージの送信周期との差に基づく時間差の変化に対応して、複数の判定基準を切り替えながら検知処理を行うことができるため、様々な送信周期の周期メッセージを基準メッセージとして用いることができる柔軟な検知処理が可能となる。
 (3)より好ましくは、前記検知部が前記検知処理において用いる前記判定基準の数は、前記正当メッセージの送信周期と前記基準メッセージの送信周期との最小公倍数、および前記正当メッセージの送信周期に基づいて決定される。
 このような構成により、正当メッセージの送信周期と基準メッセージの送信周期との差に基づく時間差の大きさに応じて、複数の判定基準に従って対象メッセージが不正メッセージであるか否かを判定することができるため、たとえばすべての対象メッセージについて、不正メッセージであるか否かの判定を行うことができる。
 (4)好ましくは、前記検知装置は、さらに、前記監視部による監視結果に基づいて、前記基準メッセージの異常を検知し、前記異常を検知した場合に所定の処理を行う異常検知部を備える。
 このような構成により、基準メッセージの異常が検知された場合、たとえば、当該基準メッセージの送信時刻に対応する時刻を基準とした検知処理を行わないようにすることができるため、誤検知の発生を抑制することができる。
 (5)好ましくは、前記検知部は、前記対象メッセージである第1の対象メッセージの送信時刻に対応する時刻と前記基準メッセージの送信時刻に対応する時刻との前記時間差、および前記第1の対象メッセージの後に送信される前記対象メッセージである第2の対象メッセージの送信時刻に対応する時刻と前記基準メッセージの送信時刻に対応する時刻との前記時間差に基づいて、前記第1の対象メッセージに関する異常を検知する。
 このような構成により、たとえば、基準メッセージの送信時刻に対応する時刻を基準として正常であると判定される時間内に複数の対象メッセージが送信された場合、たとえば、実際には不正メッセージを含む当該複数の対象メッセージを正当メッセージであると誤判定した場合であっても、当該複数の対象メッセージは異常である可能性があると判断することができる。これにより、検知処理において検知することができなかった不正メッセージを、たとえばグレー判定することができる。
 (6)好ましくは、前記監視部は、前記検知装置が受信する前記対象メッセージおよび前記検知装置が受信する前記基準メッセージを監視し、前記検知部は、前記検知処理として、前記対象メッセージが前記不正メッセージであるか否かを判定基準に従って判定し、前記判定基準は、前記基準メッセージを送信する車載装置における発振器によって生じるジッタ、および前記検知装置における発振器によって生じるジッタに基づいて設定される。
 このような構成により、たとえば、車載装置における発振器によって生じるジッタに基づくメッセージの送信時刻の誤差、および検知装置における発振器によって生じるジッタに基づくメッセージの受信時刻の誤差を考慮した判断基準に基づいて、より正確な検知処理を行うことができる。
 (7)本開示の実施の形態に係る車両は、前記検知装置を備える。
 このような構成により、検知装置を備える車両において、車載ネットワークにおける不正メッセージをより正しく検知することができる。
 (8)本開示の実施の形態に係る検知方法は、車載ネットワークにおける不正メッセージを検知する検知装置における検知方法であって、前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視するとともに、周期的に送信される基準メッセージを監視するステップと、監視結果に基づいて、前記対象メッセージの送信時刻に対応する時刻と前記基準メッセージの送信時刻に対応する時刻との時間差を算出するステップと、算出した前記時間差に基づいて、前記不正メッセージを検知する検知処理を行うステップとを含む。
 このように、対象メッセージの送信時刻に対応する時刻と、基準メッセージの送信時刻に対応する時刻との時間差に基づいて検知処理を行う方法により、基準メッセージの送信時刻に対応する時刻を基準として検知処理を行うことができるため、対象メッセージに含まれる不正メッセージの受信時刻を基準として検知処理を行うことによる誤検知の発生を回避することができる。したがって、車載ネットワークにおける不正メッセージをより正しく検知することができる。
 (9)本開示の実施の形態に係る検知プログラムは、車載ネットワークにおける不正メッセージを検知する検知装置において用いられる検知プログラムであって、コンピュータを、前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視するとともに、周期的に送信される基準メッセージを監視する監視部と、前記監視部による監視結果に基づいて、前記対象メッセージの送信時刻に対応する時刻と前記基準メッセージの送信時刻に対応する時刻との時間差を算出する算出部と、前記算出部によって算出された前記時間差に基づいて、前記不正メッセージを検知する検知処理を行う検知部、して機能させるためのプログラムである。
 このように、対象メッセージの送信時刻に対応する時刻と、基準メッセージの送信時刻に対応する時刻との時間差に基づいて検知処理を行う構成により、基準メッセージの送信時刻に対応する時刻を基準として検知処理を行うことができるため、対象メッセージに含まれる不正メッセージの受信時刻を基準として検知処理を行うことによる誤検知の発生を回避することができる。したがって、車載ネットワークにおける不正メッセージをより正しく検知することができる。
 以下、本開示の実施の形態について図面を用いて説明する。なお、図中同一または相当部分には同一符号を付してその説明は繰り返さない。また、以下に記載する実施の形態の少なくとも一部を任意に組み合わせてもよい。
 [構成および基本動作]
 図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によって、当該メッセージが周期メッセージであるか否かを識別することが可能である。
 [ゲートウェイ装置の構成]
 図3は、本開示の実施の形態に係る車載通信システムにおけるゲートウェイ装置の構成を示す図である。
 図3を参照して、ゲートウェイ装置101は、通信処理部51と、監視部52と、算出部53と、検知部54と、記憶部55と、異常検知部56とを備える。記憶部55は、たとえば、たとえばフラッシュメモリである。通信処理部51、監視部52、算出部53、検知部54および異常検知部56は、たとえば、CPU(Central Processing Unit)およびDSP(Digital Signal Processor)等のプロセッサによって実現される。
 ゲートウェイ装置101は、検知装置として機能し、車載ネットワーク12における不正メッセージを検知する検知処理を行う。
 [通信処理部]
 通信処理部51は、制御装置122間で伝送されるメッセージを中継する中継処理を行う。
 たとえば、通信処理部51は、ある制御装置122から対応のバス13経由でメッセージを受信すると、受信したメッセージに、当該メッセージの受信時刻を示すタイムスタンプを付与する。そして、通信処理部51は、タイムスタンプが付与されたメッセージを他の制御装置122へ対応のバス13経由で送信する。
 [監視部]
 監視部52は、正当な周期メッセージおよび不正メッセージをゲートウェイ装置101における検知処理の対象となるメッセージすなわち対象メッセージMaとして監視するとともに、周期的に送信される基準メッセージMbを監視する。
 より詳細には、監視部52は、車載ネットワーク12における、2種類の周期メッセージM1,M2を監視する。
 たとえば、周期メッセージM1,M2は、IDが互いに異なるメッセージである。具体的には、周期メッセージM1,M2は、送信元アドレスおよび送信先アドレスの少なくとも一方が互いに異なる。あるいは、周期メッセージM1,M2は、IPヘッダのポート番号が互いに異なる。
 図4は、本開示の実施の形態に係る車載通信システムにおける制御装置およびゲートウェイ装置のハードウェア構成の一例を示す図である。
 図4を参照して、制御装置122の一例である制御装置122Aは、発振器131Aと、CPU(Central Processing Unit)132Aと、CANトランシーバ133Aとを備える。また、制御装置122の一例である制御装置122Bは、発振器131Bと、CPU132Bと、CANトランシーバ133Bとを備える。
 ゲートウェイ装置101は、CPU141と、CANトランシーバ142と、発振器143とを備える。CPU141は、監視部52、算出部53および検知部54の一部または全部を実現する。CANトランシーバ142は、通信処理部51の一部または全部を実現する。
 制御装置122Aは、送信周期Taで周期メッセージM1を送信する。より詳細には、制御装置122AにおけるCPU132Aは、発振器131Aからの発振信号に基づいて生成されるクロックのタイミングに従って、CANトランシーバ133A経由で周期メッセージM1をブロードキャストまたはユニキャストする。
 制御装置122Bは、送信周期Tbで周期メッセージM2を送信する。より詳細には、制御装置122BにおけるCPU132Bは、発振器131Bからの発振信号に基づいて生成されるクロックのタイミングに従って、CANトランシーバ133B経由で周期メッセージM2をブロードキャストまたはユニキャストする。
 ゲートウェイ装置101におけるCANトランシーバ142は、発振器143からの発振信号に基づいて生成されるクロックのタイミングに従って、制御装置122Aから受信した周期メッセージM1に受信時刻を示すタイムスタンプを付与する。また、CANトランシーバ142は、発振器143からの発振信号に基づいて生成されるクロックのタイミングに従って、制御装置122Bから受信した周期メッセージM2に受信時刻を示すタイムスタンプを付与する。
 制御装置122Aから受信したメッセージおよび制御装置122Bから受信したメッセージのいずれか一方は、対象メッセージMaであり、周期メッセージM1,M2のいずれか他方は、検知処理において不正メッセージであるか否かの判定に用いられるメッセージすなわち基準メッセージMbである。以下では、一例として、制御装置122Aから受信したメッセージを対象メッセージMaとし、制御装置122Bから受信したメッセージを基準メッセージMbとする。
 たとえば、ゲートウェイ装置101が制御装置122Aから受信するメッセージの一部は、不正メッセージである。監視部52は、制御装置122Aからの正当な周期メッセージM1および不正メッセージを対象メッセージMaとして監視するとともに、制御装置122Bからの周期メッセージM2を基準メッセージMbとして監視する。
 監視部52は、通信処理部51によって中継されるメッセージを監視することにより、対象メッセージMaの受信時刻taおよび基準メッセージMbの受信時刻tbを取得する。
 たとえば、記憶部55は、対象メッセージMaのIDおよび基準メッセージMbのIDを記憶している。以下、対象メッセージMaのIDを対象IDとも称し、基準メッセージMbのIDを基準IDとも称する。
 監視部52は、中継処理を行うべきメッセージを通信処理部51が受信すると、通信処理部51によって受信されたメッセージに含まれるID、ならびに記憶部55における対象IDおよび基準IDを確認する。
 そして、監視部52は、通信処理部51によって受信されたメッセージに含まれるIDが対象IDと一致する場合、通信処理部51によって受信されたメッセージが対象メッセージMaであると認識し、当該対象メッセージMaに付与されたタイムスタンプを参照することにより、対象メッセージMaの受信時刻taを取得する。
 監視部52は、受信時刻taを取得すると、取得した受信時刻taを示す受信情報を、通信処理部51によって何番目に受信された対象メッセージMaであるかを示す受信番号N1と対応付けて記憶部55に保存する。
 また、監視部52は、通信処理部51によって受信されたメッセージに含まれるIDが基準IDと一致する場合、通信処理部51によって受信されたメッセージが基準メッセージMbであると認識し、当該基準メッセージMbに付与されたタイムスタンプを参照することにより、基準メッセージMbの受信時刻tbを取得する。
 監視部52は、受信時刻tbを取得すると、取得した受信時刻tbを示す受信情報を、通信処理部51によって何番目に受信された基準メッセージMbであるかを示す受信番号N2と対応付けて記憶部55に保存する。
 [算出部]
 算出部53は、監視部52による監視結果に基づいて、対象メッセージMaの送信時刻に対応する時刻と基準メッセージMbの送信時刻に対応する時刻との時間差を算出する。
 より詳細には、算出部53は、記憶部55に保存された受信情報に基づいて、対象メッセージMaの受信時刻taと、基準メッセージMbの受信時刻tbとの時間差を算出する。
 (算出例1)
 図5は、本開示の実施の形態に係る車載通信システムにおける対象メッセージおよび基準メッセージの受信時刻の分布の一例を示す図である。図5において、横軸は時刻を示す。また、図5は、すべての対象メッセージMaが正当メッセージである場合において、対象メッセージMaの送信周期Taと基準メッセージMbの送信周期Tbとが等しい場合を示している。
 図5を参照して、たとえば、算出部53は、記憶部55に保存された受信情報に基づいて、受信番号N1がpであるp回目の対象メッセージMapの受信時刻tapと、受信番号N2がqであるq回目の基準メッセージMbqの受信時刻tbqとの時間差Xpを算出する。ここで、pは、1以上の整数である。qは、1以上の整数である。たとえば、qはpと等しい。
 p回目の対象メッセージMapの受信時刻tapは、以下の式(1)で表される。
Figure JPOXMLDOC01-appb-M000001
 また、q回目の基準メッセージMbqの受信時刻tbqは、以下の式(2)で表される。
Figure JPOXMLDOC01-appb-M000002
 ここで、E1は、制御装置122Aにおける発振器131Aによって生じるジッタに基づくメッセージの送信時刻の誤差である。E2は、制御装置122Bにおける発振器131Bによって生じるジッタに基づくメッセージの送信時刻の誤差である。E3は、ゲートウェイ装置101における発振器143によって生じるジッタに基づくメッセージの受信時刻の誤差である。なお、E1,E2,E3は、それぞれ、発振器131A,131B,143の、製造工程、使用環境および経年劣化等によって生じる誤差である。
 また、Aiは、制御装置122Aからのi番目のメッセージの、バス13における衝突および送信待機遅延によって生じる遅延時間である。Biは、制御装置122Aからのi番目のメッセージの、バス13における衝突および送信待機遅延によって生じる遅延時間である。S1は、対象メッセージMaの送信周期Taと基準メッセージMbの送信周期Tbとの位相差すなわちオフセットである。
 また、時間差Xpは、式(1)から式(2)を差し引くことにより、以下の式(3)で表される。なお、式(3)では、q=pとしている。
Figure JPOXMLDOC01-appb-M000003
 ここで、上述したように、送信周期Taと送信周期Tbとは互いに等しい。また、遅延時間Ai,Biは、それぞれ、通信状況に応じて各々が独立して増減を繰り返すことから、式(3)中のシグマ項は、単調に増加することのない、ある数値範囲内において増減を繰り返す誤差Error1に置き換えることができる。さらに、発振器131Aの発振信号の誤差に基づく誤差E1と、発振器131Bの発振信号の誤差に基づく誤差E2とが等しいと仮定すると、時間差Xpは、以下の式(4)で表すことができる。
Figure JPOXMLDOC01-appb-M000004
 したがって、時間差Xpは、受信番号N1,N2に依存しない値となり、時間差Xpの確率分布は、たとえば正規分布となる。
 算出部53は、監視部52によって記憶部55に受信情報が保存されると、記憶部55に保存された受信情報に基づいて、受信時刻tapと受信時刻tbpとの時間差Xpを算出し、算出した時間差Xpを示す時間差情報を記憶部55に保存する。
 (算出例2)
 図6は、本開示の実施の形態に係る車載通信システムにおける対象メッセージおよび基準メッセージの受信時刻の分布の他の例を示す図である。図6において、横軸は時刻を示す。また、図6は、すべての対象メッセージMaが正当メッセージである場合において、基準メッセージMbの送信周期Tbが対象メッセージMaの送信周期Taより短い場合を示している。具体的には、図6は、送信周期Tbが3秒であり、送信周期Taが7秒である場合を示している。
 図6を参照して、たとえば、算出部53は、記憶部55に保存された受信情報に基づいて、p回目の対象メッセージMapの受信時刻tapと、受信時刻tapの直前に受信されたq回目の基準メッセージMbqの受信時刻tbqとの時間差Xpを算出する。
 対象メッセージMapの送信時刻と、基準メッセージMbqの送信時刻との時間差は、理論上は、送信周期Taと送信周期Tbとの最小公倍数Lの周期で変化する。図6に示す例では、送信周期Tbが3秒であり、送信周期Taが7秒であるため、最小公倍数Lは21秒である。
 LをTaで除した値をL1とすると、(L1×k+1)回目の対象メッセージMa(L1×k+1)の受信時刻ta(L1×k+1)は、以下の式(5)で表される。
Figure JPOXMLDOC01-appb-M000005
 また、LをTbで除した値をL2とすると、(L2×k+1)回目の基準メッセージMb(L2×k+1)の受信時刻tb(L2×k+1)は、以下の式(6)で表される。
Figure JPOXMLDOC01-appb-M000006
 ここで、E4は、制御装置122Aにおける発振器131Aによって生じるジッタに基づくメッセージの送信時刻の誤差である。E5は、制御装置122Bにおける発振器131Bによって生じるジッタに基づくメッセージの送信時刻の誤差である。E6は、ゲートウェイ装置101における発振器143によって生じるジッタに基づくメッセージの受信時刻の誤差である。なお、E4,E5,E6は、それぞれ、発振器131A,131B,143の、製造工程、使用環境および経年劣化等によって生じる誤差である。
 また、Ciは、制御装置122Aからのi番目のメッセージの、バス13における衝突および送信待機遅延によって生じる遅延時間である。Diは、制御装置122Aからのi番目のメッセージの、バス13における衝突および送信待機遅延によって生じる遅延時間である。S2は、対象メッセージMaの送信周期Taと基準メッセージMbの送信周期Tbとの位相差すなわちオフセットである。
 また、時間差X(L1×k+1)は、式(5)から式(6)を差し引くことにより、以下の式(7)で表される。
Figure JPOXMLDOC01-appb-M000007
 ここで、遅延時間Ci,Diは、それぞれ、通信状況に応じて各々が独立して増減を繰り返すことから、式(7)中のシグマ項は、単調に増加することのない、ある数値範囲内において増減を繰り返す誤差Error2に置き換えることができる。また、発振器131Aの発振信号の誤差に基づく誤差E4と、発振器131Bの発振信号の誤差に基づく誤差E5とが等しいと仮定すると、時間差X(L1×k+1)は、以下の式(8)で表すことができる。
Figure JPOXMLDOC01-appb-M000008
 したがって、時間差X(L1×k+1)は、受信番号N1,N2に依存しない値となり、時間差X(L1×k+1)の確率分布は、たとえば正規分布となる。
 算出部53は、監視部52によって記憶部55に受信情報が保存されると、記憶部55に保存された受信情報に基づいて、受信時刻tapと受信時刻tbqとの時間差Xpを算出し、算出した時間差Xpを示す時間差情報を記憶部55に保存する。
 (算出例3)
 図7は、本開示の実施の形態に係る車載通信システムにおける対象メッセージおよび基準メッセージの受信時刻の分布の他の例を示す図である。図7において、横軸は時刻を示す。また、図7は、すべての対象メッセージMaが正当メッセージである場合において、対象メッセージMaの送信周期Taが基準メッセージMbの送信周期Tbより短い場合を示している。具体的には、図7は、送信周期Taが3秒であり、送信周期Tbが7秒である場合を示している。
 図7を参照して、たとえば、算出部53は、記憶部55に保存された受信情報に基づいて、p回目の対象メッセージMapの受信時刻tapと、受信時刻tapの直前に受信されたq回目の基準メッセージMbqの受信時刻tbqとの時間差Xpを算出する。ここで、pは、1以上の整数である。qは、1以上の整数である。
 対象メッセージMapの送信時刻と、基準メッセージMbqの送信時刻との時間差は、理論上は、送信周期Taと送信周期Tbとの最小公倍数L秒の周期で変化する。図7に示す例では、送信周期Tbが7秒であり、送信周期Taが3秒であるため、最小公倍数Lは21である。
 LをTaで除した値をL1とすると、(L1×k+1)回目の対象メッセージMa(L1×k+1)の受信時刻ta(L1×k+1)は、以下の式(9)で表される。
Figure JPOXMLDOC01-appb-M000009
 また、LをTbで除した値をL2とすると、(L2×k+1)回目の基準メッセージMb(L2×k+1)の受信時刻tb(L2×k+1)は、以下の式(10)で表される。
Figure JPOXMLDOC01-appb-M000010
 ここで、E7は、制御装置122Aにおける発振器131Aによって生じるジッタに基づくメッセージの送信時刻の誤差である。E8は、制御装置122Bにおける発振器131Bによって生じるジッタに基づくメッセージの送信時刻の誤差である。E9は、ゲートウェイ装置101における発振器143によって生じるジッタに基づくメッセージの受信時刻の誤差である。なお、E7,E8,E9は、それぞれ、発振器131A,131B,143の、製造工程、使用環境および経年劣化等によって生じる誤差である。
 また、Eiは、制御装置122Aからのi番目のメッセージの、バス13における衝突および送信待機遅延によって生じる遅延時間である。Fiは、制御装置122Aからのi番目のメッセージの、バス13における衝突および送信待機遅延によって生じる遅延時間である。S2は、対象メッセージMaの送信周期Taと基準メッセージMbの送信周期Tbとの位相差すなわちオフセットである。
 また、時間差X(L1×k+1)は、式(9)から式(10)を差し引くことにより、以下の式(11)で表される。
Figure JPOXMLDOC01-appb-M000011
 ここで、遅延時間Ei,Fiは、それぞれ、通信状況に応じて各々が独立して増減を繰り返すことから、式(11)中のシグマ項は、単調に増加することのない、ある数値範囲内において増減を繰り返す誤差Error3に置き換えることができる。また、発振器131Aの発振信号の誤差に基づく誤差E7と、発振器131Bの発振信号の誤差に基づく誤差E8とが等しいと仮定すると、時間差X(L1×k+1)は、以下の式(12)で表すことができる。
Figure JPOXMLDOC01-appb-M000012
 したがって、時間差X(L1×k+1)は、受信番号N1,N2に依存しない値となり、時間差X(L1×k+1)の確率分布は、たとえば正規分布となる。
 算出部53は、監視部52によって記憶部55に受信情報が保存されると、記憶部55に保存された受信情報に基づいて、受信時刻tapと受信時刻tbqとの時間差Xpを算出し、算出した時間差Xpを示す時間差情報を記憶部55に保存する。
 (算出例4)
 図8は、本開示の実施の形態に係る車載通信システムにおける対象メッセージおよび基準メッセージの受信時刻の分布の一例を示す図である。図8において、横軸は時刻を示す。また、図8は、すべての対象メッセージMaが正当メッセージである場合において、対象メッセージMaの送信周期Taと、基準メッセージMbxの送信周期Tbx、基準メッセージMbyの送信周期Tbyおよび基準メッセージMbzの送信周期Tbzとが等しい場合を示している。
 図8を参照して、たとえば、算出部53は、記憶部55に保存された受信情報に基づいて、p回目の対象メッセージMapの受信時刻tapと、q回目の基準メッセージMbxqの受信時刻tbxqとの時間差Xxqを算出する。また、算出部53は、記憶部55に保存された受信情報に基づいて、q回目の対象メッセージMaqの受信時刻taqと、q回目の基準メッセージMbyqの受信時刻tbyqとの時間差Xyqを算出する。さらに、算出部53は、記憶部55に保存された受信情報に基づいて、q回目の対象メッセージMaqの受信時刻taqと、q回目の基準メッセージMbzqの受信時刻tbzqとの時間差Xzqを算出する。
 算出部53は、監視部52によって記憶部55に受信情報が保存されると、記憶部55に保存された受信情報に基づいて、時間差Xpとして、時間差Xxp,Xyp,Xzpを算出し、算出した時間差Xxp,Xyp,Xzpを示す時間差情報を記憶部55に保存する。
 [検知部]
 検知部54は、算出部53によって算出された時間差Xpに基づいて、不正メッセージを検知する検知処理を行う。
 より詳細には、検知部54は、検知処理として、対象メッセージMaが不正メッセージであるか否かを判定基準に従って判定する。
 上記判定基準は、たとえば、基準メッセージMbを送信する制御装置122Bにおける発振器131Bによって生じるジッタ、およびゲートウェイ装置101における発振器143によって生じるジッタに基づいて設定される。具体的には、上記判定基準は、たとえば、発振器131Bによって生じるジッタに基づくメッセージの送信時刻の誤差、および発振器143によって生じるジッタに基づくメッセージの受信時刻の誤差に基づいて設定される。
 たとえば、検知部54は、算出部53によって記憶部55に時間差情報が保存されると、時間差情報が示す時間差Xpの統計距離を算出し、算出した統計距離としきい値Thとを比較する。そして、検知部54は、統計距離としきい値Thとの比較結果に基づいて、対象メッセージMaが不正メッセージであるか否かを判定する。
 たとえば、検知部54は、以下の式(13)に従って、統計距離の一例であるマハラノビス距離D^2を算出する。なお、「D^2」は、Dの2乗を意味する。
Figure JPOXMLDOC01-appb-M000013
 検知部54は、算出したマハラノビス距離D^2がしきい値Th以下である場合、対象メッセージMaは正当メッセージであると判断する。一方、検知部54は、算出したマハラノビス距離D^2がしきい値Thより大きい場合、対象メッセージMaは不正メッセージであると判断する。
 算出したマハラノビス距離D^2との比較に用いるしきい値Thは、対象メッセージMaの中に不正メッセージが存在するか否かを正確に判断することができるよう、適切な値であることが好ましい。
 たとえば、車両1の製造者は、予め、車両1と同じ種類のテスト車両のゲートウェイ装置101を用いて、すべての対象メッセージMaを正当メッセージとしたときに算出部53によって算出される時間差Xpを用いてマハラノビス距離D^2を算出する。
 図9は、本開示の実施の形態に係る車載通信システムにおけるすべての対象メッセージを正当メッセージとしたときに算出されるマハラノビス距離の度数分布の一例を示す図である。
 図9を参照して、すべての対象メッセージMaが正当メッセージであるときの時間差Xpを用いて算出されるマハラノビス距離D^2が大きくなるほど、度数が減少する。
 たとえば、検知部54は、起動時において、図9に示すマハラノビス距離D^2の度数分布を記憶部55から取得し、FPR(False Positive Rate)がゼロとなる範囲でしきい値Th1が最も小さくなるように、しきい値Th1を設定することが好ましい。ここで、FPRは偽陽性率であり、偽陽性/(偽陽性+真陰性)で表される。真陰性とは、正当メッセージを正当メッセージとして認識した度数であり、偽陽性とは、正当メッセージを不正メッセージとして検知した度数である。なお、記憶部55は、車両1の製造者によって予め決定されたしきい値Th1を記憶している構成であってもよい。この場合、検知部54は、起動時において、当該しきい値Th1を記憶部55から取得する。
 検知部54は、マハラノビス距離D^2およびしきい値Thに基づく判断結果を示す判断情報を通信処理部51へ出力する。
 通信処理部51は、検知部54から受けた判断情報が、対象メッセージMaが正当メッセージであることを示す場合、当該対象メッセージMaを送信先の制御装置122へ送信する。
 一方、通信処理部51は、検知部54から受けた判断情報が、対象メッセージMaが不正メッセージであることを示す場合、以下の処理を行う。
 すなわち、通信処理部51は、判断情報が示す対象メッセージMaを記録する。また、通信処理部51は、バス13において不正メッセージが伝送されていることを示す警報情報を車両1内または車両1外における上位装置へ送信する。
 [異常検知部]
 異常検知部56は、監視部52による監視結果に基づいて、基準メッセージMbの異常を検知し、異常を検知した場合に所定の処理を行う。
 より詳細には、異常検知部56は、記憶部55に保存された受信情報、および基準メッセージMbの送信周期Tbに基づいて、基準メッセージMbの異常を検知する。
 たとえば、記憶部55は、基準メッセージMbの異常を検知する際に用いる判断基準である所定のしきい値ThBを記憶している。
 図10は、本開示の実施の形態に係る車載通信システムにおける基準メッセージの受信時刻の分布の一例を示す図である。図10において、横軸は時刻を示す。
 図10を参照して、異常検知部56は、基準メッセージMb(q-1)の受信時刻tb(q-1)およびしきい値ThBに基づいて、次の基準メッセージMbqの異常を検知するための、基準メッセージMbqの受信時刻tbqの許容範囲を規定するしきい値ThBq1,ThBq2を設定する。
 そして、異常検知部56は、次の基準メッセージMbqの受信時刻tbqが記憶部55に保存されると、記憶部55における受信時刻tbqと設定したしきい値ThBq1,ThBq2とを比較する。
 異常検知部56は、受信時刻tbqが、しきい値ThBq1以上しきい値ThBq2以下である場合、すなわちしきい値ThBq1,ThBq2により規定された許容範囲内である場合、基準メッセージMbqは正常であると判断する。
 一方、異常検知部56は、受信時刻tbqが、しきい値ThBq1未満であるか、またはしきい値ThBq2より大きい場合、すなわちしきい値ThBq1,ThBq2により規定された許容範囲外である場合、基準メッセージMbqは異常であると判断する。異常検知部56は、基準メッセージMbqが異常であると判断すると、異常であると判断した基準メッセージMbqを示す異常判定情報を算出部53へ通知する。
 たとえば、算出部53は、異常検知部56から異常判定情報を受けると、受けた異常判定情報が示す基準メッセージMb以外の基準メッセージMbの受信時刻tbを用いて、時間差Xpを算出する。あるいは、算出部53は、異常検知部56から異常判定情報を受けると、時間差Xpの算出を停止する。
 再び図8を参照して、たとえば、記憶部55における受信情報として、複数種類の基準メッセージMbの受信時刻tbが保存されている場合、異常検知部56は、各種類の基準メッセージMbの異常を検知する。
 たとえば、異常検知部56は、基準メッセージMbqの受信時刻tbq、基準メッセージMbqの後に送信される次の基準メッセージMb(q+1)の受信時刻tb(q+1)に基づいて、基準メッセージMbqに関する異常を検知する。
 図11は、本開示の実施の形態に係る車載通信システムにおける基準メッセージの受信時刻の分布の他の例を示す図である。図11において、横軸は時刻を示す。
 図11を参照して、異常検知部56は、受信時刻tbqがしきい値ThBq1,ThBq2により規定された許容範囲内である基準メッセージMbqを正常であると判断した後、基準メッセージMbqの後に送信される次の基準メッセージMb(q+1)の受信時刻tb(q+1)が、しきい値ThBq1,ThBq2により規定された許容範囲内である場合、基準メッセージMbq,Mb(q+1)は異常である可能性があると判断する。
 異常検知部56は、基準メッセージMbq,Mb(q+1)が異常である可能性があると判断すると、異常である可能性がある基準メッセージMbq,Mb(q+1)を示す異常判定情報を算出部53へ通知する。
 算出部53は、異常検知部56から異常判定情報を受けると、受けた異常判定情報が示す、異常である可能性がある基準メッセージMb以外の基準メッセージMbの受信時刻tbを用いて、時間差Xpを算出する。
(しきい値の切り替え処理)
 上述したように、すべての対象メッセージMaが正当メッセージである場合において、対象メッセージMaの送信周期Taおよび基準メッセージMbの送信周期Tbが互いに異なる場合がある。検知部54は、複数の判定基準を切り替えながら、検知処理を行う。
 たとえば、再び図6を参照して、基準メッセージMbの送信周期Tbが対象メッセージMaの送信周期Taより短い場合、算出部53によって算出される時間差Xpは、周期的に変化する。
 検知部54は、時間差Xpの周期的な変化に応じて、複数の判定基準を切り替えながら、検知処理を行う。
 検知部54が検知処理において用いる判定基準の数は、すべての対象メッセージMaが正当メッセージである場合における、対象メッセージMaの送信周期Taと基準メッセージMbの送信周期Tbとの最小公倍数L、および対象メッセージMaの送信周期Taに基づいて決定される。より詳細には、記憶部55は、車両1の製造者によって予め決定された数の判定基準たとえばしきい値Thを記憶している。
 たとえば、記憶部55は、すべての対象メッセージMaが正当メッセージである場合における対象メッセージMaの送信周期Ta、および基準メッセージMbの送信周期Tb、ならびにオフセットS1,S2,S3を記憶している。また、記憶部55は、検知部54が検知処理において用いる判定基準として、最小公倍数Lを送信周期Taで除した値の数のしきい値Thを記憶している。
 (しきい値の切り替え処理の具体例1)
 図12は、本開示の実施の形態に係る車載通信システムにおける対象メッセージの受信時刻と基準メッセージの受信時刻との関係の一例を示す図である。図12は、図6に示す対象メッセージおよび基準メッセージの受信時刻の分布に対応している。
 図12を参照して、対象メッセージMapの受信時刻tapと、当該対象メッセージMapの比較対象とすべき基準メッセージMbqの受信時刻tbqとの時間差Xpは、理論上は2秒、0秒、1秒、2秒のように周期的に変化する。
 図6および図12に示す例のように、対象メッセージMaの送信周期Taが7秒であり、基準メッセージMbの送信周期Tbが3秒である場合、記憶部55は、最小公倍数Lである21を送信周期Taである7で除した値に応じて、3つのしきい値Th1,Th2,Th3を記憶している。
 検知部54は、はじめに、3つのしきい値Th1,Th2,Th3のうち、マハラノビス距離D^2との比較に用いるべきしきい値Thを決定するための処理であるシンボル同期処理を行う。
 より詳細には、検知部54は、記憶部55に保存されている送信周期Ta,TbおよびオフセットS1,S2,S3に基づいて、予め、理論値である時間差Xpsを算出する。たとえば、検知部54は、最小公倍数Lを送信周期Taで除した値の数の時間差Xpsすなわち3つの時間差Xpsを算出する。
 そして、検知部54は、時間差情報として、3つの時間差Xpが記憶部55に保存されると、記憶部55に保存された3つの時間差Xpと、算出した3つの時間差Xpsとをそれぞれ比較するパターンマッチング処理を行う。
 より詳細には、検知部54は、3つの時間差Xpと対応の3つの時間差Xpsとの差分がそれぞれ所定のしきい値以下である場合、シンボル同期処理を終了する。そして、検知部54は、算出した時間差Xpsの変化に応じて、3つの時間差Xpsに対応して予め決定されたしきい値Th1,Th2,Th3を切り替えながら検知処理を行う。
 一方、検知部54は、3つの時間差Xpと対応の3つの時間差Xpsとの差分がそれぞれ所定のしきい値より大きい場合、新たな時間差情報が記憶部55に保存されるまで待機する。検知部54は、新たな3つの時間差Xpが記憶部55に保存されると、再度、パターンマッチング処理を行う。検知部54は、3つの時間差Xpと対応の3つの時間差Xpsとの差分がそれぞれ所定のしきい値以下となるまで、パターンマッチング処理を繰り返す。
 たとえば、異常検知部56は、対象メッセージMapの受信情報が記憶部55に保存されると、対象メッセージMapの受信時刻tapと直前の対象メッセージMa(p-1)の受信時刻ta(p-1)との間において受信された基準メッセージMbの異常を検知する。
 具体的には、異常検知部56は、受信時刻tapが30秒である対象メッセージMaの受信情報が記憶部55に保存されると、直前の対象メッセージMaの受信時刻である23秒から30秒の間において受信された、3つの基準メッセージMbの受信時刻tbqに基づいて、受信時刻tbqの時間差Xqを算出し、算出した時間差Xqと記憶部55におけるしきい値ThBとの比較結果に基づいて、基準メッセージMbの異常を検知する。
 異常検知部56は、基準メッセージMbに異常が発生していると判断すると、異常を検知した旨を示す異常判定情報を検知部54へ通知する。
 検知部54は、異常判定情報を異常検知部56から受けると、再びシンボル同期処理を行う。
 (しきい値の切り替え処理の具体例2)
 図13は、本開示の実施の形態に係る車載通信システムにおける対象メッセージの受信時刻と基準メッセージの受信時刻との関係の他の例を示す図である。図13は、図7に示す対象メッセージおよび基準メッセージの受信時刻の分布に対応している。
 図13を参照して、対象メッセージMapの受信時刻tapと、当該対象メッセージMapの比較対象とすべき基準メッセージMbqの受信時刻tbqとの時間差Xpは、理論上は0秒、2秒、1秒、0秒のように周期的に変化する。
 図7および図13に示す例のように、対象メッセージMaの送信周期Taが3秒であり、基準メッセージMbの送信周期Tbが7秒である場合、記憶部55は、最小公倍数Lである21を送信周期Taである3で除した値に応じて、7つのしきい値Th1,Th2,Th3,Th4,Th5,Th6,Th7を記憶している。
 検知部54は、はじめに、7つのしきい値Th1,Th2,Th3,Th4,Th5,Th6,Th7のうち、マハラノビス距離D^2との比較に用いるべきしきい値Thを決定する処理であるシンボル同期処理を行う。
 より詳細には、検知部54は、記憶部55に保存されている送信周期Ta,TbおよびオフセットS1,S2,S3に基づいて、予め、理論値である時間差Xpsを算出する。たとえば、検知部54は、最小公倍数Lを送信周期Taで除した値の数の時間差Xpsすなわち7つの時間差Xpsを算出する。
 そして、検知部54は、時間差情報として、7つの時間差Xpが記憶部55に保存されると、記憶部55に保存された7つの時間差Xpと、算出した7つの時間差Xpsとをそれぞれ比較する。
 たとえば、検知部54は、7つの時間差Xpと対応の7つの時間差Xpsとの差分がそれぞれ所定のしきい値以下である場合、シンボル同期処理を終了する。そして、検知部54は、算出した時間差Xpsの変化に応じて、7つの時間差Xpsに対応して予め決定されたしきい値Th1,Th2,Th3,Th4,Th5,Th6,Th7を切り替えながら検知処理を行う。
 一方、検知部54は、7つの時間差Xpと対応の7つの時間差Xpsとの差分がそれぞれ所定のしきい値より大きい場合、新たな時間差情報が記憶部55に保存されるまで待機する。検知部54は、新たな7つの時間差Xpが記憶部55に保存されると、再度、パターンマッチング処理を行う。検知部54は、7つの時間差Xpと対応の7つの時間差Xpsとの差分がそれぞれ所定のしきい値以下となるまで、パターンマッチング処理を繰り返す。
 (しきい値の切り替え処理の具体例3)
 たとえば、検知部54は、基準メッセージMbの受信時刻tbに基づいて、仮想的な受信時刻tvbを生成することにより、基準メッセージMbを補完する。
 図14は、本開示の実施の形態に係る車載通信システムにおける対象メッセージの受信時刻と基準メッセージの受信時刻との関係の他の例を示す図である。図14は、図7に示す対象メッセージおよび基準メッセージの受信時刻の分布に対応している。
 図14を参照して、検知部54は、シンボル同期処理を実行した後、対象メッセージMapの受信時刻tbpを含む受信情報が監視部52によって記憶部55に保存されると、最新の基準メッセージMbの受信時刻tbを用いて、以下の式(14)および式(15)に従って、1つの基準メッセージMbの受信時刻tbに対してf個の受信時刻tvbを生成する。ここで、fは、1以上の整数である。
Figure JPOXMLDOC01-appb-M000014

Figure JPOXMLDOC01-appb-M000015
 ここで、Mgは、基準メッセージMbの遅延時間を考慮して設定される所定のマージンである。たとえば、マージンMgは、基準メッセージMbにおいて発生し得る最大の遅延時間にマイナス1を掛けた値である。また、eは、ある基準メッセージMbの受信時刻tbを用いて既に生成された受信時刻tvbの数である。
 検知部54は、生成した受信時刻tvbの後の時刻である、次の対象メッセージMa(p+1)の受信時刻ta(p+1)を含む受信情報が監視部52によって記憶部55に保存されると、最新の基準メッセージMbの受信時刻tbを用いて、式(15)におけるeに1を代入して再び受信時刻tvbを生成する。
 検知部54は、対象メッセージMaの受信時刻taと生成した受信時刻tvbとの時間差Xpにそれぞれ対応して予め設定されたしきい値Thを用いて検知処理を行う。
 [検知処理の他の例]
 (グレー判定)
 たとえば、検知部54は、対象メッセージMapの送信時刻に対応する時刻と基準メッセージMbの送信時刻に対応する時刻との時間差、および対象メッセージMapの後に送信される対象メッセージMa(p+1)の送信時刻に対応する時刻と基準メッセージMbの送信時刻に対応する時刻との時間差に基づいて、対象メッセージMapに関する異常を検知する。より詳細には、検知部54は、対象メッセージMapの受信時刻tapと基準メッセージMbの受信時刻tbとの時間差Xp、および対象メッセージMa(p+1)の受信時刻ta(p+1)と基準メッセージMbの受信時刻tbとの時間差X(p+1)に基づいて、対象メッセージMapに関する異常を検知する。
 図15は、本開示の実施の形態に係る車載通信システムにおける対象メッセージおよび基準メッセージの受信時刻の分布の一例を示す図である。図15において、横軸は時刻を示す。また、図15は、すべての対象メッセージMaが正当メッセージである場合において、対象メッセージMaの送信周期Taと基準メッセージMbの送信周期Tbとが等しい場合を示している。
 図15を参照して、上述したように、算出部53は、対象メッセージMapの受信時刻tapと、基準メッセージMbqの受信時刻tbqとの時間差Xpを算出する。
 検知部54は、時間差Xpおよび式(13)に基づいてマハラノビス距離D^2を算出し、算出したマハラノビス距離D^2としきい値Thとを比較し、比較結果に基づいて、対象メッセージMapが不正メッセージであるか否かを判定する。
 また、算出部53は、対象メッセージMapの次の対象メッセージMa(p+1)の受信時刻ta(p+1)と基準メッセージMbqの受信時刻tbqとの時間差X(p+1a)を算出する。
 検知部54は、時間差X(p+1a)および式(13)に基づいてマハラノビス距離D^2を算出し、算出したマハラノビス距離D^2としきい値Thとを比較し、比較結果に基づいて、対象メッセージMa(p+1)が不正メッセージであるか否かを判定する。
 検知部54は、対象メッセージMapが不正メッセージではないと判断した後、さらに対象メッセージMa(p+1)も不正メッセージではないと判断した場合、対象メッセージMap,Ma(p+1)は異常である可能性があると判断する、すなわちグレー判定する。
 (サポートベクターマシンを用いた検知処理)
 なお、本開示の実施の形態に係るゲートウェイ装置101では、検知部54は、時間差Xpに基づいてマハラノビス距離D^2を算出し、算出したマハラノビス距離D^2としきい値Thとの比較結果に基づいて、対象メッセージMapが不正メッセージであるか否かを判定する構成であるとしたが、これに限定するものではない。
 検知部54は、たとえばサポートベクターマシンを用いて、対象メッセージMaが不正メッセージであるか否かを判定する構成であってもよい。検知部54は、1クラスに分類するサポートベクターマシンを用いてもよいし、多クラスに分類するサポートベクターマシンを用いてもよい。
 より詳細には、検知部54は、以下の式(16)に従って、分類スコアf(Xp)を算出する。検知部54は、算出した分類スコアf(Xp)がゼロ以上である場合、対象メッセージMapは正当メッセージであると判断する一方、算出した分類スコアf(Xp)がゼロ未満である場合、対象メッセージMapは不正メッセージであると判断する。
Figure JPOXMLDOC01-appb-M000016
 ここで、K(x,xi)は、カーネル関数である。カーネル関数は、具体的には、線形カーネル、多項式カーネル、以下の式(17)に示すガウスカーネル、またはシグモイドカーネルである。
Figure JPOXMLDOC01-appb-M000017
 xは、対象メッセージMapの受信時刻tapと複数の基準メッセージMbqの受信時刻tbqとの時間差Xpのベクトルである。xiは、サポートベクトルである。yiは、分類すべき各クラスに対応する値である。たとえば1クラスに分類するサポートベクターマシンを用いる場合、yiは1である。Wiは、重みベクトルである。bは、バイアスである。xi,yi,Wiおよびbは、予め、車両1と同じ種類のテスト車両のゲートウェイ装置101を用いて、正当メッセージを用いて機械学習により求められるパラメータである。
 1クラスに分類するサポートベクターマシンを用いる場合、上記パラメータは、教師無し学習によって設定される。より詳細には、正当メッセージである対象メッセージMapの受信時刻tapと複数の基準メッセージMbqの受信時刻tbqとの時間差Xpを算出し、算出した時間差Xpを学習用のデータセットと検証用のデータセットとに分類する。
 そして、学習用のデータセットを用いて機械学習を行い、機械学習により得られたパラメータおよび上述した式(16)を用いて検証用のデータセットの分類スコアf(Xp)を算出し、分類スコアf(Xp)がゼロ以上となるか、またはゼロ未満となるかを確認する。すなわち、検証用のデータセットが正当メッセージであると判定されるか、または不正メッセージであると判定されるかを確認する。そして、検証用のデータセットの判定結果の偽陽性率が所望の値となるようパラメータを適切に調整し、再度、学習用のデータセットを用いた機械学習を行う。
 多クラスに分類するサポートベクターマシンを用いる場合、上記パラメータは、教師有り学習によって設定される。より詳細には、正当メッセージである対象メッセージMapの受信時刻tapと複数の基準メッセージMbqの受信時刻tbqとの時間差Xpを算出し、算出した時間差Xpを正常データ群とする。
 そして、正常データ群の時間差Xpより大きい複数の時間差Xprのデータ群である不正データ群、および正常データ群の時間差Xpより小さい複数の時間差Xpsのデータ群である不正データ群を生成する。正常データ群および不正データ群を、学習用のデータセットと検証用のデータセットとに分類する。
 次に、学習用のデータセットを用いて機械学習を行い、機械学習により得られたパラメータおよび上述した式(16)を用いて検証用のデータセットの分類スコアf(Xp)を算出し、分類スコアf(Xp)に基づいて検証用のデータセットが正当メッセージであると判定されるか、または不正メッセージであると判定されるかを確認する。そして、検証用のデータセットの判定結果の偽陽性率が所望の値となるように、不正データ群の時間差Xps,Xprの値すなわち不正データ群と正常データ群とのギャップ、およびパラメータを適切に調整し、再度、学習用のデータセットを用いた機械学習を行う。
 (決定木を用いた検知処理)
 検知部54は、たとえば決定木を用いて、対象メッセージMaが不正メッセージであるか否かを判定する構成であってもよい。決定木のアルゴリズムは、たとえば、CART(Classification And Regression Trees)およびC4.5等である。
 決定木のパラメータは、教師有り学習によって設定される。より詳細には、正当メッセージである対象メッセージMapの受信時刻tapと複数の基準メッセージMbqの受信時刻tbqとの時間差Xpを算出し、算出した時間差Xpを正常データ群とする。
 そして、正常データ群の時間差Xpより大きい複数の時間差Xprのデータ群である不正データ群、および正常データ群の時間差Xpより小さい複数の時間差Xpsのデータ群である不正データ群を生成する。正常データ群および不正データ群を、学習用のデータセットと検証用のデータセットとに分類する。
 次に、学習用のデータセットを用いて、CARTおよびC4.5等のアルゴリズムを用いる決定木の機械学習を行い、機械学習により得られた決定木を用いた場合において、検証用のデータセットが正当メッセージであると判定されるか、または不正メッセージであると判定されるかを確認する。そして、検証用のデータセットの判定結果の偽陽性率が所望の値となるように、不正データ群の時間差Xps,Xprの値すなわち不正データ群と正常データ群とのギャップ、および決定木の学習用パラメータを適切に調整し、再度、学習用のデータセットを用いた機械学習を行う。
 [動作の流れ]
 本開示の実施の形態に係る車載通信システムにおける各装置は、メモリを含むコンピュータを備え、当該コンピュータにおけるCPU等の演算処理部は、以下のフローチャートおよびシーケンスの各ステップの一部または全部を含むプログラムを当該メモリから読み出して実行する。これら複数の装置のプログラムは、それぞれ、外部からインストールすることができる。これら複数の装置のプログラムは、それぞれ、記録媒体に格納された状態で流通する。
 図16は、本開示の実施の形態に係る車載通信システムにおいてゲートウェイ装置が検知処理を行う際の動作手順の一例を定めたフローチャートである。
 図16を参照して、まず、ゲートウェイ装置101は、車載ネットワーク12における、対象メッセージMaと基準メッセージMbとを監視し、対象メッセージMapの受信時刻tapおよび基準メッセージMbqの受信時刻tbqを取得する(ステップS102)。
 次に、ゲートウェイ装置101は、基準メッセージMbqの受信時刻tbqとしきい値ThBq1,ThBq2とを比較する(ステップS104)。
 ゲートウェイ装置101は、受信時刻tbqがしきい値ThBq1,ThBq2により規定された許容範囲内である場合(ステップS106でYES)、不正メッセージを検知する検知処理を行う。具体的には、ゲートウェイ装置101は、対象メッセージMapが不正メッセージであるか否かを判断する(ステップS108)。
 一方、ゲートウェイ装置101は、受信時刻tbqがしきい値ThBq1,ThBq2により規定された許容範囲外である場合(ステップS106でNO)、対象メッセージMaおよび基準メッセージMbの監視を継続し、次の対象メッセージMa(p+1)の受信時刻ta(p+1)および次の基準メッセージMb(q+1)の受信時刻tb(q+1)を取得する(ステップS102)。
 また、ゲートウェイ装置101は、検知処理の結果、対象メッセージMapが正当メッセージであると判断した場合(ステップS110でNO)、対象メッセージMaおよび基準メッセージMbの監視を継続し、次の対象メッセージMa(p+1)の受信時刻ta(p+1)および次の基準メッセージMb(q+1)の受信時刻tb(q+1)を取得する(ステップS102)。
 一方、ゲートウェイ装置101は、検知処理の結果、対象メッセージMapが不正メッセージであると判断した場合(ステップS110でYES)、不正メッセージが伝送されていることを示す警報情報を車両1内または車両1外における上位装置へ送信する(ステップS112)。
 次に、ゲートウェイ装置101は、対象メッセージMaおよび基準メッセージMbの監視を継続し、次の対象メッセージMa(p+1)の受信時刻ta(p+1)および次の基準メッセージMb(q+1)の受信時刻tb(q+1)を取得する(ステップS102)。
 図17は、本開示の実施の形態に係る車載通信システムにおいてゲートウェイ装置が検知処理を行う際の動作手順の他の例を定めたフローチャートである。
 図17を参照して、まず、ゲートウェイ装置101は、車載ネットワーク12における、対象メッセージMaと基準メッセージMbとを監視し、対象メッセージMaの複数の受信時刻および基準メッセージMbの複数の受信時刻tbを取得する(ステップS202)。
 次に、ゲートウェイ装置101は、取得した複数の受信時刻taおよび複数の受信時刻tbに基づいて複数の時間差Xpを算出し、算出した複数の時間差Xpを用いてシンボル同期処理を行う(ステップS204)。
 次に、ゲートウェイ装置101は、対象メッセージMapの受信時刻tapおよび基準メッセージMbqの受信時刻tbqを取得する(ステップS206)。
 次に、ゲートウェイ装置101は、基準メッセージMbqの受信時刻tbqとしきい値ThBq1,ThBq2とを比較する(ステップS208)。
 ゲートウェイ装置101は、受信時刻tbqがしきい値ThBq1,ThBq2により規定された許容範囲内である場合(ステップS210でYES)、不正メッセージを検知する検知処理を行う。具体的には、ゲートウェイ装置101は、対象メッセージMapが不正メッセージであるか否かを判断する(ステップS212)。
 次に、ゲートウェイ装置101は、ステップS214,S216の処理として、図16におけるステップS110,S112と同様の処理を行う。
 図18は、本開示の実施の形態に係る車載通信システムのゲートウェイ装置における検知処理の一例を定めたフローチャートである。図18は、図16におけるステップS108の詳細を示している。
 図18を参照して、まず、ゲートウェイ装置101は、対象メッセージMapの受信時刻tapと基準メッセージMbqの受信時刻tbqとの時間差Xpを算出する(ステップS302)。
 次に、ゲートウェイ装置101は、時間差Xpに基づいて、マハラノビス距離D^2を算出する(ステップS304)。
 次に、ゲートウェイ装置101は、算出したマハラノビス距離D^2としきい値Thとを比較する(ステップS306)。
 次に、ゲートウェイ装置101は、マハラノビス距離D^2がしきい値Th以下である場合(ステップS308でYES)、対象メッセージMapは正当メッセージであると判断する(ステップS310)。
 一方、ゲートウェイ装置101は、マハラノビス距離D^2がしきい値Thより大きい場合(ステップS308でNO)、対象メッセージMapは不正メッセージであると判断する(ステップS312)。
 図19は、本開示の実施の形態に係る車載通信システムのゲートウェイ装置における検知処理の他の例を定めたフローチャートである。図19は、図17におけるステップS212の詳細を示している。
 図19を参照して、まず、ゲートウェイ装置101は、基準メッセージMbqの受信時刻tbqに基づいて、仮想的な受信時刻tvbを生成する(ステップS402)。
 次に、ゲートウェイ装置101は、対象メッセージMapの受信時刻tapと、受信時刻tbqまたは受信時刻tvbとの時間差Xpを算出する(ステップS404)。
 次に、ゲートウェイ装置101は、ステップS406からステップS414の処理として、図18におけるステップS304からステップS312と同様の処理を行う。
 なお、本開示の実施の形態に係る車載通信システム301では、ゲートウェイ装置101が、車載ネットワーク12における不正メッセージを検知する構成であるとしたが、これに限定するものではない。車載通信システム301では、ゲートウェイ装置101とは別の検知装置が、車載ネットワーク12における不正メッセージを検知する構成であってもよい。
 また、本開示の実施の形態に係る車載通信システム301では、検知装置として機能するゲートウェイ装置101がバス13に直接接続される構成であるとしたが、これに限定するものではない。
 図20は、本開示の実施の形態に係る車載ネットワークの接続トポロジの一例を示す図である。
 図20を参照して、検知装置151が、車載装置たとえば制御装置122を介してバス13に接続される構成であってもよい。この場合、検知装置151は、たとえば、当該車載装置が送受信するメッセージを監視することにより、バス13に伝送される不正メッセージを検知する。
 図20に示す例では、たとえば、検知装置151の監視部52は、制御装置122が送信する基準メッセージMbの送信時刻に対応する時刻および対象メッセージMaの送信時刻に対応する時刻を取得する。そして、検知装置151の算出部53は、監視部52による監視結果に基づいて、対象メッセージMaの送信時刻と、基準メッセージMbの送信時刻との時間差を算出する。
 また、本開示の実施の形態に係る車載通信システム301では、ゲートウェイ装置101は、制御装置122Aからの周期メッセージM1および不正メッセージを対象メッセージMaとして監視するとともに、制御装置122Bからの周期メッセージM2を基準メッセージMbとして監視する構成であるとしたが、これに限定するものではない。
 再び図4を参照して、たとえば、制御装置122Aは、送信周期Taで周期メッセージM1を送信するとともに、送信周期Tbで周期メッセージM2を送信する。より詳細には、制御装置122AにおけるCPU132Aは、発振器131Aからの発振信号に基づいて生成されるクロックのタイミングに従って、CANトランシーバ133A経由で周期メッセージM1,M2をブロードキャストまたはユニキャストする。
 ゲートウェイ装置101におけるCANトランシーバ142は、制御装置122Aからの周期メッセージM1および不正メッセージを対象メッセージMaとして監視するとともに、制御装置122Aからの周期メッセージM2を基準メッセージMbとして監視する。
 また、本開示の実施の形態に係るゲートウェイ装置101では、検知部54は、検知処理として、対象メッセージMaが不正メッセージであるか否かを判定する構成であるとしたが、これに限定するものではない。検知部54は、検知処理として、対象メッセージMaが不正メッセージである確率を算出する構成であってもよい。
 また、本開示の実施の形態に係るゲートウェイ装置101では、検知部54が検知処理において用いる判定基準の数は、すべての対象メッセージMaが正当メッセージである場合における、対象メッセージMaの送信周期Taと基準メッセージMbの送信周期Tbとの最小公倍数L、および対象メッセージMaの送信周期Taに基づいて決定される構成であるとしたが、これに限定するものではない。検知部54が検知処理において用いる判定基準の数は、最小公倍数Lおよび送信周期Taに依らない数、たとえば所定数であってもよい。この場合、不正メッセージであるか否かの判定が、一部の対象メッセージMaについて行われる。
 また、本開示の実施の形態に係るゲートウェイ装置101では、異常検知部56は、監視部52による監視結果に基づいて、基準メッセージMbの異常を検知する構成であるとしたが、これに限定するものではない。ゲートウェイ装置101は、異常検知部56を備えない構成であってもよい。
 また、本開示の実施の形態に係るゲートウェイ装置101では、検知部54は、対象メッセージMapが不正メッセージではないと判断した後、さらに対象メッセージMa(p+1)も不正メッセージではないと判断した場合、対象メッセージMap,Ma(p+1)をグレー判定する構成であるとしたが、これに限定するものではない。検知部54は、グレー判定を行わない構成であってもよい。
 また、本開示の実施の形態に係るゲートウェイ装置101では、対象メッセージMaが不正メッセージであるか否かの判定基準は、制御装置122A,122Bにおける発振器131A,131Bによって生じるジッタ、およびゲートウェイ装置101における発振器143によって生じるジッタに基づいて設定される構成であるとしたが、これに限定するものではない。判定基準は、発振器131A,131B,143によって生じるジッタに依らずに設定される構成であってもよい。
 ところで、車載ネットワークにおける不正メッセージをより正しく検知することを可能とする技術が望まれる。
 たとえば、周期メッセージを監視することにより、ある時刻に送信された周期メッセージを基準として、当該周期メッセージの送信時刻と、次に送信された周期メッセージの送信時刻との時間差に基づいて、正当な周期メッセージになりすました不正メッセージを検知する方法が考えられる。
 このような方法では、基準とした周期メッセージが不正メッセージである場合、次に送信された周期メッセージが不正メッセージであるか否かを正しく判定できない場合がある。
 具体的には、直前の周期メッセージの送信時刻に基づいて、次の周期メッセージが不正メッセージであるか否かを判定する上記方法では、不正メッセージを正当メッセージであると誤検知した場合、当該不正メッセージの送信時刻に基づいて、次の周期メッセージが不正メッセージであるか否かの判定を行うこととなる。その結果、次の不正メッセージを正当メッセージであると誤判定したり、所定の送信周期に従って送信された正当メッセージを不正メッセージであると誤判定したりする場合がある。
 これに対して、本開示の実施の形態に係るゲートウェイ装置101では、監視部52は、車載ネットワーク12における、周期的に送信される正当メッセージ、および不正メッセージを対象メッセージMaとして監視するとともに、周期的に送信される基準メッセージMbを監視する。算出部53は、監視部52による監視結果に基づいて、対象メッセージMaの送信時刻に対応する時刻と基準メッセージMbの送信時刻に対応する時刻との時間差Xpを算出する。検知部54は、算出部53によって算出された時間差Xpに基づいて、不正メッセージを検知する検知処理を行う。
 このように、対象メッセージMaの送信時刻に対応する時刻と、基準メッセージMbの送信時刻に対応する時刻との時間差Xpに基づいて検知処理を行う構成により、基準メッセージMbの送信時刻に対応する時刻を基準として検知処理を行うことができるため、対象メッセージMaに含まれる不正メッセージの受信時刻を基準として検知処理を行うことによる誤検知の発生を回避することができる。
 したがって、本開示の実施の形態に係るゲートウェイ装置101では、車載ネットワークにおける不正メッセージをより正しく検知することができる。
 また、本開示の実施の形態に係るゲートウェイ装置101では、正当メッセージの送信周期および基準メッセージMbの送信周期Tbが互いに異なる。検知部54は、検知処理として、対象メッセージMaが不正メッセージであるか否かを判定基準に従って判定する。検知部54は、複数の判定基準を切り替えながら検知処理を行う。
 このような構成により、正当メッセージの送信周期と基準メッセージMbの送信周期Tbとの差に基づく時間差Xpの変化に対応して、複数の判定基準を切り替えながら検知処理を行うことができるため、様々な送信周期の周期メッセージを基準メッセージMbとして用いることができる柔軟な検知処理が可能となる。
 また、本開示の実施の形態に係るゲートウェイ装置101では、検知部54が検知処理において用いる判定基準の数は、正当メッセージの送信周期と基準メッセージMbの送信周期Tbとの最小公倍数L、および正当メッセージの送信周期に基づいて決定される。
 このような構成により、正当メッセージの送信周期と基準メッセージMbの送信周期Tbとの差に基づく時間差Xpの大きさに応じて、複数の判定基準に従って対象メッセージMaが不正メッセージであるか否かを判定することができるため、たとえばすべての対象メッセージMaについて、不正メッセージであるか否かの判定を行うことができる。
 また、本開示の実施の形態に係るゲートウェイ装置101では、異常検知部56は、監視部52による監視結果に基づいて、基準メッセージMbの異常を検知し、異常を検知した場合に所定の処理を行う。
 このような構成により、基準メッセージMbの異常が検知された場合、たとえば、当該基準メッセージMbの送信時刻に対応する時刻を基準とした検知処理を行わないようにすることができるため、誤検知の発生を抑制することができる。
 また、本開示の実施の形態に係るゲートウェイ装置101では、検知部54は、対象メッセージMapの送信時刻に対応する時刻と基準メッセージMbqの送信時刻に対応する時刻との時間差Xp、および対象メッセージMapの後に送信される対象メッセージMa(p+1)の送信時刻に対応する時刻と基準メッセージMbqの送信時刻に対応する時刻との時間差X(p+1a)に基づいて、対象メッセージMapに関する異常を検知する。
 このような構成により、たとえば、基準メッセージMbqの送信時刻に対応する時刻を基準として正常であると判定される時間内に複数の対象メッセージMaが送信された場合、たとえば、実際には不正メッセージを含む当該複数の対象メッセージMaを正当メッセージであると誤判定した場合であっても、当該複数の対象メッセージMaは異常である可能性があると判断することができる。これにより、検知処理において検知することができなかった不正メッセージを、たとえばグレー判定することができる。
 また、本開示の実施の形態に係るゲートウェイ装置101では、監視部52は、ゲートウェイ装置101が受信する対象メッセージMaおよびゲートウェイ装置101が受信する基準メッセージMbを監視する。検知部54は、検知処理として、対象メッセージMaが不正メッセージであるか否かを判定基準に従って判定する。判定基準は、基準メッセージMbを送信する制御装置122Bにおける発振器131Bによって生じるジッタ、およびゲートウェイ装置101における発振器143によって生じるジッタに基づいて設定される。
 このような構成により、たとえば、制御装置122Aにおける発振器131Aによって生じるジッタに基づくメッセージの送信時刻の誤差、およびゲートウェイ装置101における発振器143によって生じるジッタに基づくメッセージの受信時刻の誤差を考慮した判断基準に基づいて、より正確な検知処理を行うことができる。
 また、本開示の実施の形態に係る車両1は、ゲートウェイ装置101を備える。
 このような構成により、ゲートウェイ装置101を備える車両1において、車載ネットワーク12における不正メッセージをより正しく検知することができる。
 また、本開示の実施の形態に係る検知方法は、車載ネットワーク12における不正メッセージを検知するゲートウェイ装置101における検知方法である。この検知方法では、まず、ゲートウェイ装置101が、車載ネットワーク12における、周期的に送信される正当メッセージ、および不正メッセージを対象メッセージMaとして監視するとともに、周期的に送信される基準メッセージMbとを監視する。次に、ゲートウェイ装置101が、監視結果に基づいて、対象メッセージMaの送信時刻に対応する時刻と基準メッセージMbの送信時刻に対応する時刻との時間差Xpを算出する。次に、ゲートウェイ装置101が、算出した時間差Xpに基づいて、不正メッセージを検知する検知処理を行う。
 このように、対象メッセージMaの送信時刻に対応する時刻と、基準メッセージMbの送信時刻に対応する時刻との時間差Xpに基づいて検知処理を行う方法により、基準メッセージMbの送信時刻に対応する時刻を基準として検知処理を行うことができるため、対象メッセージMaに含まれる不正メッセージの受信時刻を基準として検知処理を行うことによる誤検知の発生を回避することができる。
 したがって、本開示の実施の形態に係る検知方法では、車載ネットワークにおける不正メッセージをより正しく検知することができる。
 上記実施の形態は、すべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記説明ではなく請求の範囲によって示され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。
 以上の説明は、以下に付記する特徴を含む。
 [付記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 (9)

  1.  車載ネットワークにおける不正メッセージを検知する検知装置であって、
     前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視するとともに、周期的に送信される基準メッセージを監視する監視部と、
     前記監視部による監視結果に基づいて、前記対象メッセージの送信時刻に対応する時刻と前記基準メッセージの送信時刻に対応する時刻との時間差を算出する算出部と、
     前記算出部によって算出された前記時間差に基づいて、前記不正メッセージを検知する検知処理を行う検知部とを備える、検知装置。
  2.  前記正当メッセージの送信周期および前記基準メッセージの送信周期が互いに異なり、
     前記検知部は、前記検知処理として、前記対象メッセージが前記不正メッセージであるか否かを判定基準に従って判定し、
     前記検知部は、複数の前記判定基準を切り替えながら前記検知処理を行う、請求項1に記載の検知装置。
  3.  前記検知部が前記検知処理において用いる前記判定基準の数は、前記正当メッセージの送信周期と前記基準メッセージの送信周期との最小公倍数、および前記正当メッセージの送信周期に基づいて決定される、請求項2に記載の検知装置。
  4.  前記検知装置は、さらに、
     前記監視部による監視結果に基づいて、前記基準メッセージの異常を検知し、前記異常を検知した場合に所定の処理を行う異常検知部を備える、請求項1から請求項3のいずれか1項に記載の検知装置。
  5.  前記検知部は、前記対象メッセージである第1の対象メッセージの送信時刻に対応する時刻と前記基準メッセージの送信時刻に対応する時刻との前記時間差、および前記第1の対象メッセージの後に送信される前記対象メッセージである第2の対象メッセージの送信時刻に対応する時刻と前記基準メッセージの送信時刻に対応する時刻との前記時間差に基づいて、前記第1の対象メッセージに関する異常を検知する、請求項1から請求項4のいずれか1項に記載の検知装置。
  6.  前記監視部は、前記検知装置が受信する前記対象メッセージおよび前記検知装置が受信する前記基準メッセージを監視し、
     前記検知部は、前記検知処理として、前記対象メッセージが前記不正メッセージであるか否かを判定基準に従って判定し、
     前記判定基準は、前記基準メッセージを送信する車載装置における発振器によって生じるジッタ、および前記検知装置における発振器によって生じるジッタに基づいて設定される、請求項1から請求項5のいずれか1項に記載の検知装置。
  7.  請求項1から請求項6のいずれか1項に記載の検知装置を備える、車両。
  8.  車載ネットワークにおける不正メッセージを検知する検知装置における検知方法であって、
     前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視するとともに、周期的に送信される基準メッセージを監視するステップと、
     監視結果に基づいて、前記対象メッセージの送信時刻に対応する時刻と前記基準メッセージの送信時刻に対応する時刻との時間差を算出するステップと、
     算出した前記時間差に基づいて、前記不正メッセージを検知する検知処理を行うステップとを含む、検知方法。
  9.  車載ネットワークにおける不正メッセージを検知する検知装置において用いられる検知プログラムであって、
     コンピュータを、
     前記車載ネットワークにおける、周期的に送信される正当メッセージ、および前記不正メッセージを対象メッセージとして監視するとともに、周期的に送信される基準メッセージを監視する監視部と、
     前記監視部による監視結果に基づいて、前記対象メッセージの送信時刻に対応する時刻と前記基準メッセージの送信時刻に対応する時刻との時間差を算出する算出部と、
     前記算出部によって算出された前記時間差に基づいて、前記不正メッセージを検知する検知処理を行う検知部、
    として機能させるための、検知プログラム。
PCT/JP2020/019713 2019-09-30 2020-05-19 検知装置、車両、検知方法および検知プログラム WO2021065069A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2021551127A JP7396363B2 (ja) 2019-09-30 2020-05-19 検知装置、車両、検知方法および検知プログラム
CN202080042112.7A CN114245981A (zh) 2019-09-30 2020-05-19 检测装置、车辆、检测方法及检测程序
US17/622,086 US11870789B2 (en) 2019-09-30 2020-05-19 Detection device, vehicle, detection method, and detection program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019178176 2019-09-30
JP2019-178176 2019-09-30

Publications (1)

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

Family

ID=75338008

Family Applications (1)

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

Country Status (4)

Country Link
US (1) US11870789B2 (ja)
JP (1) JP7396363B2 (ja)
CN (1) CN114245981A (ja)
WO (1) WO2021065069A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016080422A1 (ja) * 2014-11-20 2016-05-26 国立大学法人名古屋大学 通信制御装置及び通信システム
WO2017038005A1 (ja) * 2015-08-31 2017-03-09 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 不正検知方法、不正検知電子制御ユニット及び不正検知システム
JP2018182725A (ja) * 2017-04-07 2018-11-15 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 不正通信検知基準決定方法、不正通信検知基準決定システム及びプログラム

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008129593A1 (ja) 2007-04-04 2008-10-30 Mitsubishi Electric Corporation 通信システム及び管理装置及び通信装置及びコンピュータプログラム
KR100897849B1 (ko) * 2007-09-07 2009-05-15 한국전자통신연구원 비정상 프로세스 탐지 방법 및 장치
JP5919205B2 (ja) 2013-01-28 2016-05-18 日立オートモティブシステムズ株式会社 ネットワーク装置およびデータ送受信システム
JP6585001B2 (ja) 2015-08-31 2019-10-02 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 不正検知方法、不正検知電子制御ユニット及び不正検知システム
JP6566400B2 (ja) * 2015-12-14 2019-08-28 パナソニックIpマネジメント株式会社 電子制御装置、ゲートウェイ装置、及び検知プログラム
JP6433951B2 (ja) * 2016-08-09 2018-12-05 東芝デジタルソリューションズ株式会社 ネットワーク監視装置およびプログラム
EP3609139B1 (en) 2017-04-07 2022-03-30 Panasonic Intellectual Property Corporation of America Method for determining reference for unauthorized communication detection, system for determining reference for unauthorized communication detection, and program
JP6539363B2 (ja) * 2017-04-07 2019-07-03 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 不正通信検知方法、不正通信検知システム及びプログラム
JP7005278B2 (ja) * 2017-10-27 2022-01-21 株式会社エヌ・ティ・ティ・データ 異常ログ検出装置、異常ログの検出方法およびプログラム
JP7282686B2 (ja) 2017-11-27 2023-05-29 日本電信電話株式会社 異常通信検知装置、異常通信検知方法、プログラム
WO2019225257A1 (ja) * 2018-05-23 2019-11-28 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 異常検知装置、異常検知方法およびプログラム
CN108848072B (zh) * 2018-05-25 2021-04-27 东南大学 一种基于相对熵的车载can总线异常检测方法
WO2021065068A1 (ja) * 2019-09-30 2021-04-08 株式会社オートネットワーク技術研究所 検知装置、車両、検知方法および検知プログラム

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016080422A1 (ja) * 2014-11-20 2016-05-26 国立大学法人名古屋大学 通信制御装置及び通信システム
WO2017038005A1 (ja) * 2015-08-31 2017-03-09 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 不正検知方法、不正検知電子制御ユニット及び不正検知システム
JP2018182725A (ja) * 2017-04-07 2018-11-15 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 不正通信検知基準決定方法、不正通信検知基準決定システム及びプログラム

Also Published As

Publication number Publication date
US11870789B2 (en) 2024-01-09
JPWO2021065069A1 (ja) 2021-04-08
JP7396363B2 (ja) 2023-12-12
US20220255954A1 (en) 2022-08-11
CN114245981A (zh) 2022-03-25

Similar Documents

Publication Publication Date Title
CN110494330B (zh) 车辆监视装置、不正当检测服务器、以及控制方法
JP6805667B2 (ja) 検知装置、ゲートウェイ装置、検知方法および検知プログラム
JP7007632B2 (ja) 検知装置、検知方法および検知プログラム
WO2021065068A1 (ja) 検知装置、車両、検知方法および検知プログラム
US11392683B2 (en) Detection device, detection method and recording medium
CN112823495B (zh) 检测装置、网关装置、检测方法和检测程序
WO2021111685A1 (ja) 検知装置、車両、検知方法および検知プログラム
WO2021065069A1 (ja) 検知装置、車両、検知方法および検知プログラム
US20230344847A1 (en) Detection device, vehicle, detection method, and detection program
US20210392109A1 (en) Detection device, gateway device, detection method, and detection program
JP7211224B2 (ja) 管理装置、通信システム、車両通信管理方法および車両通信管理プログラム
WO2022137661A1 (ja) 検知装置、検知方法および検知プログラム
US12003966B2 (en) Local misbehavior prevention system for cooperative intelligent transportation systems
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: 20872719

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021551127

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

Country of ref document: EP

Kind code of ref document: A1