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

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

Info

Publication number
WO2022137661A1
WO2022137661A1 PCT/JP2021/032961 JP2021032961W WO2022137661A1 WO 2022137661 A1 WO2022137661 A1 WO 2022137661A1 JP 2021032961 W JP2021032961 W JP 2021032961W WO 2022137661 A1 WO2022137661 A1 WO 2022137661A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
sequence number
detection
periodic
messages
Prior art date
Application number
PCT/JP2021/032961
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 US18/265,441 priority Critical patent/US20240114028A1/en
Priority to CN202180080871.7A priority patent/CN116530060A/zh
Priority to JP2022571050A priority patent/JPWO2022137661A1/ja
Publication of WO2022137661A1 publication Critical patent/WO2022137661A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C5/00Registering or indicating the working of vehicles
    • G07C5/008Registering or indicating the working of vehicles communicating information to a remotely located station
    • 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/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1425Traffic logging, e.g. anomaly detection

Definitions

  • the present disclosure relates to detection devices, detection methods and detection programs. This application claims priority on the basis of Japanese Application Japanese Patent Application No. 2020-216834 filed on December 25, 2020 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 detection processing is performed, and the predetermined processing is performed on the first data.
  • the detection device of the present disclosure is a detection device that detects an unauthorized message in an in-vehicle network, and as a message in the in-vehicle network, a periodic message to be periodically transmitted and having a source identification information and a sequence number.
  • a monitoring unit that monitors event messages transmitted irregularly, a counter unit that changes the counter value corresponding to the identification information when the detection device receives the event message from the in-vehicle network, and monitoring by the monitoring unit.
  • the sequence number is compared with the counter value, and the detection unit is provided with a detection unit that makes a provisional determination of detection of an unauthorized message based on the comparison result, and the detection unit is provided with the same identification information.
  • the main determination of the detection of the invalid message is performed based on the interval of the message satisfying the predetermined condition regarding the sequence number and the predetermined transmission cycle of the periodic message.
  • the detection device of the present disclosure is a detection device that detects an unauthorized message in an in-vehicle network, and is an in-vehicle network that includes periodic messages that are periodically transmitted with identification information of a source and that are irregularly and said. The same identification information is attached and continuously based on the monitoring result of the monitoring unit that monitors two or more event messages that are continuously transmitted at intervals shorter than the transmission cycle of the periodic message. It is provided with a detection unit that counts the number of the event messages transmitted and makes a provisional determination of detection of an unauthorized message based on the count result.
  • 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 is periodically transmitted as a message in the in-vehicle network with source identification information and a sequence number. Based on the monitoring result, a step of monitoring a periodic message and an event message transmitted irregularly, a step of changing a counter value corresponding to the identification information when the detection device receives the event message from the in-vehicle network, and a step of changing the counter value corresponding to the identification information.
  • the said The present invention includes the step of performing the main determination of the detection of the invalid message based on the interval of the message satisfying the predetermined condition regarding the sequence number and the predetermined transmission cycle of the periodic message.
  • 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 a cycle in which a computer is attached with source identification information and a sequence number as a message in the in-vehicle network.
  • a monitoring unit that monitors periodic messages and event messages that are transmitted irregularly, and a counter that changes the counter value corresponding to the identification information when the detection device receives the event message from the in-vehicle network.
  • It is a program for functioning as a detection unit that compares the sequence number and the counter value based on the monitoring result of the unit and the monitoring unit, and makes a provisional determination of detection of an unauthorized message based on the comparison result.
  • the detection unit of the rogue message is based on the interval of the message satisfying the predetermined condition regarding the sequence number and the predetermined transmission cycle of the periodic message. This judgment of detection is performed.
  • One aspect of the present disclosure can be realized as a semiconductor integrated circuit that realizes a part or all of the detection device, or can be realized as a system including the detection device. Further, one aspect of the present disclosure can be realized as a semiconductor integrated circuit that realizes a part or all of a system including a detection device.
  • FIG. 1 is a diagram showing a configuration of an in-vehicle communication system according to the first embodiment of the present disclosure.
  • FIG. 2 is a diagram showing a configuration of a bus connection device group according to the first embodiment of the present disclosure.
  • FIG. 3 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 first embodiment of the present disclosure.
  • FIG. 4 is a diagram showing a configuration of a gateway device in an in-vehicle communication system according to the first embodiment of the present disclosure.
  • FIG. 5 is a diagram showing an example of a case where the received message is determined to be a legitimate message in the gateway device according to the first embodiment of the present disclosure.
  • FIG. 1 is a diagram showing a configuration of an in-vehicle communication system according to the first embodiment of the present disclosure.
  • FIG. 2 is a diagram showing a configuration of a bus connection device group according to the first embodiment of the present disclosure.
  • FIG. 3 is
  • FIG. 6 is a diagram showing an example of a case where the received message is determined to be an invalid message in the gateway device according to the first embodiment of the present disclosure.
  • FIG. 7 is a diagram showing an example of a case where the gateway device according to the first embodiment of the present disclosure modifies the detection result.
  • FIG. 8 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 first embodiment of the present disclosure.
  • FIG. 9 is a diagram showing an example of a case where a part of a periodic message is missing in the in-vehicle communication system according to the first embodiment of the present disclosure.
  • FIG. 10 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 first embodiment of the present disclosure.
  • FIG. 11 is a diagram showing an example of a case where the received message is determined to be an invalid message in the gateway device according to the second embodiment of the present disclosure.
  • FIG. 12 is a diagram showing an example of a case where the received message is determined to be an invalid message in the gateway device according to the second embodiment of the present disclosure.
  • FIG. 13 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 second embodiment of the present disclosure.
  • FIG. 11 is a diagram showing an example of a case where the received message is determined to be an invalid message in the gateway device according to the second embodiment of the present disclosure.
  • FIG. 12 is a diagram showing an example of a case where the received message is determined to be an invalid message in the gateway device according to the second embodiment of the present
  • FIG. 14 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 second embodiment of the present disclosure.
  • FIG. 15 is a diagram showing an example of a case where the received message is determined to be an invalid message in the gateway device according to the third 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 third embodiment of the present disclosure.
  • FIG. 17 is a diagram showing an example of a case where it is determined that the received message is an invalid message in the in-vehicle communication system according to the modified example of the third embodiment of the present disclosure.
  • FIG. 18 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 detection method, and a detection program capable of more accurately detecting an unauthorized message in an in-vehicle network.
  • the detection device is a detection device that detects an unauthorized message in the vehicle-mounted network, and is a cycle in which the source identification information and the sequence number are attached as the message in the vehicle-mounted network.
  • a monitoring unit that monitors periodic messages and event messages that are transmitted irregularly, and a counter that changes the counter value corresponding to the identification information when the detection device receives the event message from the in-vehicle network.
  • the detection unit includes a unit and a detection unit that compares the sequence number with the counter value based on the monitoring result by the monitoring unit and makes a tentative determination of detection of an unauthorized message based on the comparison result.
  • the determination of detection of the malicious message is performed based on the interval between the messages satisfying the predetermined conditions for the sequence number and the predetermined transmission cycle of the periodic message. ..
  • the detection unit makes the present determination that can correct the detection result of the invalid message in the provisional determination based on the interval of the messages satisfying the predetermined condition regarding the sequence number and the predetermined transmission cycle of the periodic message. Even if an invalid message whose sequence number matches the counter value is sent, the invalid message is determined to be a valid message, and the valid message is falsely detected as an invalid message, the validity of the detection result is verified and if necessary. The detection result can be modified. Therefore, it is possible to detect an unauthorized message in the in-vehicle network more accurately.
  • the message is assigned a first sequence number that is changed each time the periodic message and the event message are transmitted as the sequence number attached to the message, and the counter unit detects the detection.
  • the counter value may be changed when the device receives the periodic message and the event message, respectively.
  • the timing at which an invalid message is sent can be specified to some extent by simple processing.
  • the message is assigned a first sequence number that is changed each time the periodic message and the event message are transmitted as the sequence number attached to the message, and the detection unit monitors the message. Based on the result, the loss of the periodic message is detected, the counter value is corrected based on the number of the missing periodic messages, and the first sequence number and the corrected counter value are compared and compared. The malicious message may be detected based on the result.
  • the message includes, as the sequence number attached to the message, a second sequence number that is not changed when the periodic message is transmitted but is changed each time the event message is transmitted. Attached, the counter unit may change the counter value among the periodic message and the event message when the detection device receives the event message.
  • the interval may be the reception interval between the third message and the fourth message having the same second sequence number as the second sequence number of the third message.
  • the timing at which an invalid message is sent can be specified to some extent by simple processing.
  • the detection unit corrects the detection result of the fraudulent message in the provisional determination in the final determination, then transitions to the transient state, and in the transient state, in the message to which the same identification information is attached.
  • the rogue message may be detected based on the reception interval of the messages received continuously in time, and the sequence number.
  • the detection device is a detection device that detects an unauthorized message in an in-vehicle network, and is periodically transmitted in the in-vehicle network with identification information of a sender.
  • the same identification information is based on a monitoring unit that monitors a periodic message and two or more consecutive event messages that are irregularly and at intervals shorter than the transmission cycle of the periodic message, and a monitoring result by the monitoring unit. It is provided with a detection unit which counts the number of the event messages transmitted continuously and detects an unauthorized message based on the count result.
  • the detection unit counts the number of continuously transmitted event messages and detects the malicious message based on the count result, so that the malicious message impersonating the event message can be easily detected. .. Therefore, it is possible to detect an unauthorized message in the in-vehicle network more accurately.
  • the detection method is a detection method in a detection device that detects an unauthorized message in an in-vehicle network, and a sender identification information and a sequence number are attached as the message in the in-vehicle network.
  • the step of monitoring the periodic message transmitted periodically and the event message transmitted irregularly, and when the detection device receives the event message from the in-vehicle network, the counter value corresponding to the identification information is changed.
  • the step of comparing the sequence number and the counter value based on the monitoring result, and the step of making a tentative determination of detection of an unauthorized message based on the comparison result, and the monitored and same identification information are attached.
  • the step of performing the main determination of the detection of the malicious message is included based on the interval of the message satisfying the predetermined condition regarding the sequence number and the predetermined transmission cycle of the periodic message.
  • the sequence number is countered by the configuration in which the present determination that can correct the detection result of the invalid message in the provisional determination is performed based on the interval of the messages satisfying the predetermined condition regarding the sequence number and the predetermined transmission cycle of the periodic message. Even if an invalid message is sent according to the value, the invalid message is judged as a legitimate message, and the legitimate message is falsely detected as an invalid message, the validity of the detection result is verified and the detection result is corrected if necessary. can do. Therefore, it is possible to detect an unauthorized message in the in-vehicle network more accurately.
  • 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 uses a computer as a message in the in-vehicle network to provide identification information of a sender and information.
  • the detection device receives the event message from the in-vehicle network and the monitoring unit that monitors the periodic message and the event message transmitted irregularly with the sequence number, the identification information is used.
  • a detection unit that compares the sequence number with the counter value based on the monitoring result of the monitoring unit and the counter unit that changes the corresponding counter value, and makes a tentative determination of detection of an invalid message based on the comparison result.
  • the detection unit has a message interval that satisfies a predetermined condition regarding the sequence number, and a predetermined transmission cycle of the periodic message. Based on the above, the final determination of the detection of the malicious message is performed.
  • the detection unit makes the present determination that can correct the detection result of the invalid message in the provisional determination based on the interval of the messages satisfying the predetermined condition regarding the sequence number and the predetermined transmission cycle of the periodic message. Even if an invalid message whose sequence number matches the counter value is sent, the invalid message is determined to be a valid message, and the valid message is falsely detected as an invalid message, the validity of the detection result is verified and if necessary. The detection result can be modified. Therefore, it is possible to detect an unauthorized message in the in-vehicle network more accurately.
  • FIG. 1 is a diagram showing a configuration of an in-vehicle communication system according to the first embodiment of the present disclosure.
  • the vehicle-mounted communication system 301 mounted on the vehicle 1 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 gateway device 101 is connected to each bus connection device group 121 via the bus 13, and is connected to each in-vehicle communication device 111 via the bus 14.
  • the gateway device 101 connected by the buses 13 and 14, the plurality of vehicle-mounted communication devices 111, and the plurality of vehicle-mounted communication device groups 121 constitute the vehicle-mounted network 12.
  • FIG. 2 is a diagram showing a configuration of a bus connection device group according to the first 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 in-vehicle communication system 301 includes a plurality of in-vehicle devices that are devices inside the vehicle 1.
  • the vehicle-mounted communication system 301 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 communication system 301 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. It may be configured to include a plurality of control devices 122, or may be configured to include one in-vehicle communication device 111 and one control device 122.
  • the in-vehicle 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 5G.
  • 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 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, a wireless terminal device provided on a tire, and an LF (Low Frequency) band or UHF (Ultra) according to a predetermined communication standard. It is possible to perform wireless communication using radio waves in the High Frequency) band, and it is possible to perform communication 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 devices such as optical beacons, radio wave beacons, and ITS spots provided near the road, and can be used for road-to-vehicle communication with in-vehicle terminals mounted on other vehicles. 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 vehicle-mounted 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, air conditioner control device, anti-theft control device, airbag control device and smart entry control device control the instrument, air conditioner, anti-theft mechanism, airbag mechanism and 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 each in-vehicle communication device 111, and exchanged between the control device 122 and the in-vehicle communication device 111. Performs relay processing to relay the information to be relayed.
  • a periodic message and an event message are transmitted from one in-vehicle device to another in-vehicle device according to a predetermined agreement.
  • Periodic messages are periodically transmitted from one vehicle-mounted device to another vehicle-mounted device.
  • Event messages are transmitted irregularly from one vehicle-mounted device to another vehicle-mounted device.
  • a message transmitted between two in-vehicle devices that is, a message transmitted from one control device 122 to another control device 122 will be described, but a message between the control device 122 and the in-vehicle communication device 111, and each in-vehicle communication device 111 will be described. The same applies to the message between them.
  • FIG. 3 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 first embodiment of the present disclosure.
  • control devices 122A and 122B which are examples of the control device 122, are connected to the gateway device 101 via the bus 13.
  • the control device 122A includes an oscillator 131A, a processor 132A such as a CPU (Central Processing Unit) and a DSP (Digital Signal Processor), and a CAN transceiver 133A.
  • the control device 122B has the same configuration as the control device 122A, and includes a transmitter 131B, a processor 132B, and a CAN transceiver 133B.
  • the gateway device 101 includes a processor 141 such as a CPU and a DSP, a CAN transceiver 142, and an oscillator 143.
  • the control device 122A transmits a periodic message at a predetermined transmission cycle. More specifically, the processor 132A in the control device 122A transmits a periodic message via the CAN transceiver 133A according to the timing of the clock generated based on the oscillation signal from the oscillator 131A. Further, the control device 122A transmits an event message irregularly. More specifically, the processor 132A in the control device 122A transmits an event message irregularly via the CAN transceiver 133A.
  • the control device 122A transmits the periodic message and the event message with a message ID (Identifier) which is an example of the identification information.
  • the message ID indicates the source of the periodic message and the event message.
  • the message ID may further indicate a transmission priority, a message transmission type indicating whether the message is a periodic message or an event message, a message content, and the like.
  • the message is attached with a sequence number (first sequence number) that is changed each time a periodic message and an event message are transmitted. More specifically, the control device 122A includes a sequence number in the periodic message and the event message, which is incremented by 1 for each transmission of the periodic message and the event message. In short, the control device 122A assigns consecutive numbers to the messages to be transmitted regardless of the types of the periodic message and the event message.
  • control device 122 When a certain control device 122 communicates a periodic message and an event message with a plurality of control devices 122, the control device 122 sets a sequence number for each message ID. Further, when a certain control device 122 uses a plurality of message IDs properly according to the content of the message, the control device 122 sets a sequence number for each message ID.
  • FIG. 4 is a diagram showing a configuration of a gateway device in an in-vehicle communication system according to the first embodiment of the present disclosure.
  • the gateway device 101 includes a communication processing unit 51, a monitoring unit 52, a counter unit 53, a detection unit 54, and a storage unit 55.
  • the processor 141 shown in FIG. 3 realizes a part or all of the monitoring unit 52, the counter unit 53, and the detection unit 54, and the CAN transceiver 142 realizes a part or all of the communication processing unit 51.
  • the storage unit 55 is, for example, a flash memory.
  • the gateway device 101 functions as a detection device and performs detection processing for detecting an unauthorized message in the in-vehicle network 12.
  • the communication processing unit 51 receives the messages on the buses 13 and 14 in the vehicle-mounted network 12. When the communication processing unit 51 receives a message, it adds a time stamp indicating the reception time of the message and outputs a message reception notification to the monitoring unit 52 and the detection unit 54.
  • the monitoring unit 52 monitors periodically transmitted periodic messages and irregularly transmitted event messages with message IDs and sequence numbers, which are source identification information, as messages in the vehicle-mounted network 12.
  • the monitoring unit 52 acquires the reception time of the periodic message and the reception time of the event message by monitoring the message in the vehicle-mounted network 12.
  • the monitoring unit 52 When the monitoring unit 52 receives a reception notification from the communication processing unit 51, for example, the monitoring unit 52 receives a message ID included in the message received by the communication processing unit 51, and a message ID and an event of a periodic message stored in the storage unit 55 in advance. Check the message ID of the message.
  • the monitoring unit 52 refers to the time stamp given to the message. , Get the message reception time.
  • the monitoring unit 52 When the monitoring unit 52 acquires the reception time, the monitoring unit 52 outputs the reception information indicating the acquired reception time to the detection unit 54 in association with the sequence number.
  • the counter unit 53 changes the counter value corresponding to the identification information.
  • the counter value is set for each message ID.
  • the counter unit 53 changes the counter value when the gateway device 101 receives the periodic message and the event message, respectively.
  • the counter unit 53 increments the counter value by one when the received message is determined to be a legitimate message by the detection unit 54, as will be described later.
  • the counter unit 53 stores the increased counter value in the storage unit 55.
  • the counter unit 53 sets a separate counter value for each message ID.
  • the counter unit 53 sets a counter value for each message ID.
  • the detection unit 54 compares the sequence number with the counter value based on the monitoring result by the monitoring unit 52, and makes a tentative determination of detection of an invalid message based on the comparison result.
  • the detection unit 54 acquires the sequence number and the counter value of the message from the storage unit 55.
  • the detection unit 54 compares the acquired sequence number with the counter value, and if the sequence number and the counter value are the same, determines that the received message is a legitimate message, and the sequence number and the counter value are different values. In the case of, it is determined that the received message is an invalid message.
  • FIG. 5 is a diagram showing an example of a case where the received message is determined to be a legitimate message in the gateway device according to the first embodiment of the present disclosure.
  • the sequence number "01" is attached to the message A first transmitted by the control device 122A. Further, the initial value of the counter value of the counter unit 53 in the gateway device 101 is set to "01".
  • the counter unit 53 in the gateway device 101 increments the counter value by one and sets it to “02”. do.
  • the detection unit 54 sets the periodic message B as a legitimate message because the sequence number and the counter value match with “02”. judge. After that, the counter unit 53 increases the counter value by one and sets it to "03".
  • the detection unit 54 sets the event message C as a legitimate message because the sequence number and the counter value match with “03”. judge. After that, the counter unit 53 sets the counter value to "04".
  • the detection unit 54 determines whether or not the messages D to G received thereafter are also legitimate messages. Then, in the example shown in FIG. 5, the detection unit 54 determines that the messages D to G are legitimate messages.
  • FIG. 6 is a diagram showing an example of a case where the received message is determined to be an invalid message in the gateway device according to the first embodiment of the present disclosure.
  • FIG. 6 is different from FIG. 5 in that the gateway device 101 receives the invalid message H after receiving the event message C.
  • the counter unit 53 sets the counter value to “04”. After that, when the gateway device 101 receives the message H with the sequence number “05”, the detection unit 54 determines that the message H is an invalid message because the sequence number and the counter value do not match.
  • the detection unit 54 determines whether or not the detection result is valid. More specifically, when the detection unit 54 detects an invalid message in the provisional determination, the detection unit 54 sets a predetermined condition regarding the sequence number in the message monitored by the monitoring unit 52 and to which the same identification information is attached. Based on the interval of the messages to be satisfied and the predetermined transmission cycle of the periodic message, the main determination of the detection of the invalid message is performed, and the correction process for correcting the detection result of the invalid message in the provisional determination is performed.
  • the message interval is the reception interval between the first message and the second message having the sequence number immediately before the first message.
  • the detection unit 54 does not correct the detection result.
  • the first message is a message H once determined to be an invalid message, and its counter value is “05”.
  • the second message is a message with the sequence number "04" one count before the message H, but the gateway device 101 has a counter value "04" before receiving the message H. You have not received the attached message. Therefore, in the example shown in FIG. 6, the detection unit 54 does not correct the detection result because the message corresponding to the second message does not exist, and determines the message H as an invalid message.
  • the counter unit 53 maintains "04" without changing the counter value. Then, the detection unit 54 determines that the messages D to G received thereafter are legitimate messages.
  • the detection unit 54 determines that the message H is an invalid message because the sequence number of the message H is different from the counter value of the counter unit 53.
  • the sequence number of the message H is the same as the counter value of the counter unit 53
  • the message H, which is an invalid message is determined to be a legitimate message
  • the message D which is a legitimate message
  • the gateway device 101 can reduce erroneous detection by correcting the detection result even when the message that should be originally a legitimate message is determined to be an invalid message. can.
  • FIG. 7 is a diagram showing an example of a case where the gateway device according to the first embodiment of the present disclosure corrects the detection result.
  • the gateway device 101 receives messages A to C in order.
  • the detection unit 54 determines that each of the messages A to C is a valid message because the sequence number and the counter value match. In this state, the counter value of the counter unit 53 is set to "04".
  • the gateway device 101 receives the invalid message H. Since the sequence number "04" is attached to the invalid message H, the detection unit 54 determines that the invalid message H is a legitimate message. The counter unit 53 increases the counter value to "05".
  • the gateway device 101 receives the message D. Since this message D is a message transmitted from the control device 122A next to the message C, it has the sequence number “04”. However, the detection unit 54 tentatively determines that the message D, which is originally a legitimate message, is an invalid message because the counter value of the counter unit 53 is "05" and the sequence number and the counter value do not match.
  • the detection unit 54 determines the validity of the detection result in which the message D is an invalid message. As described above, among the messages to which the same identification information is attached, whether the detection unit 54 corrects the detection result based on the interval of the message satisfying the predetermined condition regarding the sequence number and the predetermined transmission cycle of the periodic message. Judge whether or not.
  • the interval between messages satisfying a predetermined condition is not the interval between messages actually continuously received by the gateway device 101 in time, but a sequence assigned as a number immediately before a certain message and the sequence number of the message. It means the interval between the messages having a number, that is, the interval between a certain message and the message that should have been originally received immediately before the message.
  • the message actually continuously received in time with respect to the message D determined to be an invalid message is the message H.
  • the control device 122A assigns sequence numbers to the messages to be transmitted in order regardless of the types of the periodic message and the event message. Therefore, the message that should be originally received before the message D is not the message H having the same sequence number "04" as the message D, but the message C having the sequence number "03" immediately before the message D. be. Therefore, in the example shown in FIG. 7, the detection unit 54 corrects the detection result based on the reception interval between the first message, the message D, and the second message, the message C, and the transmission cycle of the periodic message. Decide whether or not.
  • the detection unit 54 acquires the reception time of the message D and the message C, and a predetermined transmission cycle of the periodic message from the storage unit 55.
  • the detection unit 54 calculates the reception interval from the difference between the reception times of the acquired message D and the message C.
  • the detection unit 54 compares the calculated reception interval with the predetermined transmission cycle of the periodic message, and determines whether the reception interval is less than the transmission cycle or less than the value obtained by adding the predetermined margin to the transmission cycle.
  • this determination criterion that is, a transmission cycle or a value obtained by adding a predetermined margin to the transmission cycle is referred to as an allowable value.
  • the predetermined transmission cycle of the periodic message is 20 ms
  • the margin is +6 ms.
  • the reception interval between the message D and the message C is 20 ms, which is less than the allowable value.
  • the message D is likely to be a legitimate periodic message transmitted from the legitimate message C after a predetermined transmission cycle of 20 ms. Therefore, when the reception interval is less than the permissible value, the detection unit 54 corrects the detection result that the message D is an invalid message, and determines that the message D is a legitimate message.
  • the transmission cycle and the margin are not limited to the above, and can be set as appropriate, and the margin may not be provided.
  • the detection unit 54 determines that the invalid message has been received before the message D, and outputs the detection result indicating that the invalid message has been detected to the communication processing unit 51.
  • the detection unit 54 maintains the detection result, determines the message D as an invalid message, and outputs the detection result indicating that the invalid message has been detected to the communication processing unit 51.
  • the communication processing unit 51 receives the detection result from the detection unit 54 and transmits alarm information indicating that an unauthorized message is transmitted on the bus 13 to a higher-level device inside or outside the vehicle 1.
  • 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. 8 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 first embodiment of the present disclosure.
  • FIG. 8 shows the detection process for a message having a certain message ID, and the same detection process is performed for a message having another message ID.
  • the gateway device 101 monitors the periodic message and the event message in the in-vehicle communication system 301, and acquires the reception time of the periodic message and the event message (step S101).
  • the gateway device 101 acquires the sequence number of the received periodic message or event message and the counter value in the counter unit 53.
  • the gateway device 101 compares the acquired sequence number with the counter value, and if the sequence number and the counter value match (YES in step S102), determines the received message as a valid message (step S103).
  • the gateway device 101 determines that the received message is a legitimate message, the gateway device 101 increments the counter value of the counter unit 53 by one (step S104).
  • the gateway device 101 stores the reception time of the received message in the storage unit 55 (step S105), and continues monitoring the periodic message and the event message in the in-vehicle communication system 301 (step S101).
  • the gateway device 101 provisionally determines the received message as an invalid message (step S106).
  • the gateway device 101 has a reception interval between the first message tentatively determined to be an invalid message and the second message having a sequence number one count before the first message, which is less than the allowable value of the periodic message. Determine if it exists.
  • the gateway device 101 detects the first message as an invalid message in the provisional determination. Is corrected, and the first message is determined to be a legitimate message (step S108).
  • the gateway device 101 determines that the illegal message has been received before the first message, and provides warning information indicating that the illegal message is transmitted on the bus 13. Transmission to a higher-level device inside 1 or outside vehicle 1 (step S109).
  • the gateway device 101 stores the reception time of the received message in the storage unit 55 (step S105), and continues monitoring the periodic message and the event message in the in-vehicle communication system 301 (step S101).
  • the gateway device 101 determines the detection result of the first message as an invalid message in the provisional determination. It is maintained and the first message is officially determined to be an invalid message (step S110).
  • the gateway device 101 transmits alarm information indicating that an unauthorized message is being transmitted on the bus 13 to a higher-level device inside or outside the vehicle 1 (step S111), and the periodic message in the in-vehicle communication system 301 and the periodic message.
  • the monitoring of the event message is continued (step S101).
  • FIG. 9 is a diagram showing an example of a case where a part of a periodic message is missing in the in-vehicle communication system according to the first embodiment of the present disclosure.
  • the detection unit 54 determines that the messages A to C are valid messages because the sequence number and the counter value match.
  • the gateway device 101 is scheduled to receive the periodic message D after receiving the message C.
  • the gateway device 101 receives the periodic message E with the sequence number “05” because the periodic message D is missing for some reason.
  • the detection unit 54 tentatively determines the periodic message E, which is a legitimate message, as an invalid message because the counter value is "04" and does not match the sequence number "05" of the periodic message E.
  • the detection unit 54 detects the loss of the periodic message based on the monitoring result by the monitoring unit 52, and is based on the number of the missing periodic messages. Then, the counter value is corrected, the sequence number is compared with the corrected counter value, and a tentative determination of detection of an invalid message is made based on the comparison result.
  • the detection unit 54 performs a process of detecting the presence or absence of a missing periodic message after tentatively determining that the periodic message E is an invalid message and before performing a correction process of the detection result.
  • the detection unit 54 acquires the reception time of the message E, the reception time of the message C which is the previously received message, and the predetermined transmission cycle of the periodic message from the storage unit 55.
  • the detection unit 54 calculates the reception interval from the difference between the reception times of the acquired message E and the message C.
  • the detection unit 54 compares the calculated reception interval with a predetermined transmission cycle of the periodic message. In the example shown in FIG. 9, it is assumed that the reception interval of the message E and the message C is twice the allowable value, that is, the gateway device 101 receives the message E approximately one cycle later than the message C.
  • the detection unit 54 determines that one periodic message is missing, adds the number of missing periodic messages to the counter value "04" acquired from the storage unit 55, and corrects it to "05".
  • the detection unit 54 compares the corrected counter value with the sequence number of the cycle message E, and since the counter value “05” and the sequence number “05” of the cycle message E match, the tentative determination result is corrected and the cycle is repeated.
  • the message E is tentatively determined as a legitimate message.
  • the detection unit 54 outputs the missing information indicating the number of missing periodic messages to the counter unit 53.
  • the counter unit 53 receives the missing information from the detection unit 54, changes the current counter value to "05", and stores it in the storage unit 55.
  • FIG. 10 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 first embodiment of the present disclosure.
  • FIG. 10 shows a detection process for a message having a certain message ID, and the same detection process is performed for a message having another message ID.
  • the gateway device 101 monitors the periodic message and the event message in the in-vehicle communication system 301, and acquires the reception time of the periodic message and the event message (step S201).
  • the gateway device 101 acquires the sequence number of the received periodic message or event message and the counter value in the counter unit 53.
  • the gateway device 101 compares the acquired sequence number with the counter value, and if the sequence number and the counter value match (YES in step S202), determines the received message as a valid message (step S203).
  • the gateway device 101 determines that the received message is a legitimate message, the gateway device 101 increments the counter value of the counter unit 53 by one (step S204).
  • the gateway device 101 stores the reception time of the received message in the storage unit 55 (step S205), and continues monitoring the periodic message and the event message in the in-vehicle communication system 301 (step S201).
  • the gateway device 101 provisionally determines the received message as an invalid message (step S206).
  • the gateway device 101 determines whether or not there is a missing periodic message before the received message, and if the missing is detected (YES in step S207), the number of missing counter values in the counter unit 53. Only increase (step S208).
  • the gateway device 101 corrects the counter value acquired from the storage unit 55 based on the detected number of defects, compares the acquired sequence number with the corrected counter value, and sets the sequence number and the corrected counter value. If they match (YES in step S209), the received message is determined to be a valid message (step S203).
  • the gateway device 101 tentatively determines the received message as an invalid message.
  • steps S210 to S214 Since the processing of steps S210 to S214 is the same as that of steps S107 to S111 shown in FIG. 8, detailed description will not be given.
  • a method of detecting an invalid message based on a sequence number assigned in order to messages sent periodically and irregularly can be considered.
  • the detection unit 54 has an interval and a cycle of messages to which the same identification information is attached, which satisfy a predetermined condition regarding the sequence number. Based on the predetermined transmission cycle of the message, the main determination of the detection of the invalid message is performed, and the correction process for correcting the detection result of the invalid message in the provisional determination is performed. As a result, the gateway device 101 erroneously determines the invalid message as a legitimate message, and even if the later legitimate message is erroneously detected as an invalid message, the gateway device 101 verifies the validity of the detection result and detects the result as necessary. Can be modified.
  • the gateway device 101 can more accurately detect an unauthorized message in the in-vehicle communication system 301.
  • the detection unit 54 has described a case where the message is determined to be a legitimate message when the sequence number of the message and the counter value match. However, the detection unit 54 may determine the message as a legitimate message when, for example, the difference between the sequence number of the message and the counter value is a predetermined value.
  • sequence number and the counter value of the message increase by 1 has been described.
  • sequence number and counter value of the message may be increased or decreased in units of other values, or may be changed with regularity.
  • the present embodiment relates to an in-vehicle communication system in which the method of transmitting a message and the method of detecting an unauthorized message are changed as compared with the in-vehicle communication system 301 according to the first embodiment. Except for the contents described below, it is the same as the in-vehicle communication system according to the first embodiment.
  • FIG. 11 is a diagram showing an example of a case where the received message is determined to be an invalid message in the gateway device according to the second embodiment of the present disclosure.
  • a sequence number “01” is attached to the periodic message A first transmitted by the control device 122A. Further, the initial value of the counter value of the counter unit 53 in the gateway device 101 is set to "02".
  • the message is assigned a sequence number (second sequence number) that is not changed when the periodic message is transmitted and is changed each time the event message is transmitted.
  • control device 122A includes the same sequence number "01" in the periodic message A and the periodic message B transmitted after the periodic message A.
  • the control device 122A increments the sequence number by one and includes "02” in the event message C transmitted after the periodic message B.
  • the control device 122A includes the same sequence number “02” as the event message C in the periodic message D transmitted after the event message C.
  • the detection unit 54 determines whether the received message is a periodic message or an event message. More specifically, when the detection unit 54 receives the message reception notification from the communication processing unit 51, the detection unit 54 determines a message that is temporally continuous with respect to the message received this time, that is, a reception time of the previously received message, and a periodic message. The transmission cycle of is acquired from the storage unit 55. The detection unit 54 calculates the reception interval between the message received this time and the message received last time. The detection unit 54 compares the calculated reception interval with the predetermined transmission cycle, and determines whether or not the reception interval coincides with the predetermined transmission cycle. For example, when the absolute value of the difference between the reception interval and the transmission cycle is less than a predetermined value, the detection unit 54 determines that the reception interval and the transmission cycle match.
  • the detection unit 54 calculates the reception interval between the message B and the previously received message A.
  • the reception interval between the message B and the message A coincides with a predetermined transmission cycle. Therefore, the detection unit 54 determines that the message B is a periodic message.
  • the detection unit 54 calculates the reception interval between the message C and the previously received message B.
  • the reception interval between the message C and the message B is less than a predetermined transmission cycle. Therefore, the detection unit 54 determines that the message C is an event message.
  • the detection unit 54 acquires the sequence number and the counter value of the event message from the storage unit 55.
  • the detection unit 54 compares the acquired sequence number with the counter value, and if the sequence number and the counter value are the same, determines that the received event message is a legitimate message.
  • the detection unit 54 determines that the event message C is a legitimate message.
  • the detection unit 54 outputs a counter value change notification to the counter unit 53.
  • the counter unit 53 changes the counter value among the periodic message and the event message when the gateway device 101 receives the event message. More specifically, the counter unit 53 receives a counter value change notification from the detection unit 54 and increases the counter value by one. The counter unit 53 stores the increased counter value in the storage unit 55.
  • the detection unit 54 determines that the received event message is an invalid message.
  • the gateway device 101 receives the invalid message H after receiving the messages A to C.
  • the counter unit 53 sets the counter value to "03".
  • the detection unit 54 determines that the message H is an invalid message because the sequence number and the counter value do not match.
  • the detection unit 54 detects an invalid message in the provisional determination
  • the message is monitored by the monitoring unit 52, and the same identification information is used.
  • the interval of messages that satisfy the predetermined conditions for the sequence number and the predetermined transmission cycle of the periodic message are used to make the final determination of unauthorized message detection, and the detection result of the invalid message in the provisional determination is corrected. Perform the correction process.
  • the message interval is the reception interval between the message D, which is the third message, and the message C, which is the fourth message having the same sequence number as the third message.
  • the gateway device 101 receives messages A to C in order.
  • the detection unit 54 determines that the periodic messages A and B are legitimate messages because the reception interval coincides with the predetermined transmission cycle.
  • the detection unit 54 determines that the event message C is a valid message because the sequence number and the counter value match. In this state, the counter value of the counter unit 53 is incremented by one from the initial value and set to "03".
  • the gateway device 101 receives the invalid message H. Since the reception interval between the invalid message H and the previously received event message C is less than the predetermined transmission cycle, the detection unit 54 determines that the invalid message H is an event message. Then, the detection unit 54 determines that the invalid message H is a legitimate message because the invalid message H has a sequence number “03” which is the same value as the counter value. The counter unit 53 increases the counter value to "04".
  • the gateway device 101 receives the message D. Since this message D is a periodic message transmitted from the control device 122A next to the event message C, it has the same sequence number “02” as the event message C. However, since the reception interval between the periodic message D and the previously received invalid message H is less than the predetermined transmission cycle, the detection unit 54 determines that the periodic message D is an event message. Then, the detection unit 54 tentatively assumes that the periodic message D, which is originally a legitimate message, is an invalid message because the counter value of the counter unit 53 is "04" and the sequence number of the periodic message D and the counter value do not match. judge.
  • the detection unit 54 determines the validity of the detection result in which the periodic message D is an invalid message. As described above, among the messages to which the same identification information is attached, whether the detection unit 54 corrects the detection result based on the interval of the message satisfying the predetermined condition regarding the sequence number and the predetermined transmission cycle of the periodic message. Judge whether or not.
  • the interval between messages satisfying a predetermined condition is not the interval between messages actually continuously received by the gateway device 101 in time, but a certain message and the same sequence number as the message. It means the interval between the latest message and the message, that is, the interval between a certain message and the message that should have been originally received immediately before the message.
  • the detection unit 54 determines whether or not to correct the detection result based on the reception interval between the periodic message D which is the third message and the message C which is the fourth message and the transmission cycle of the periodic message. ..
  • the detection unit 54 acquires the reception time of the message D and the message C, and a predetermined transmission cycle of the periodic message from the storage unit 55.
  • the detection unit 54 calculates the reception interval from the difference between the reception times of the acquired message D and the message C.
  • the detection unit 54 compares the calculated reception interval with a predetermined transmission cycle of the periodic message, and determines whether or not the reception interval matches the predetermined transmission cycle.
  • the reception interval between the message D and the message C is 20 ms, which is the length of the predetermined transmission cycle.
  • the message D is likely to be a legitimate periodic message transmitted from the legitimate message C after a predetermined transmission cycle of 20 ms. Therefore, when the reception interval coincides with the predetermined transmission cycle, the detection unit 54 corrects the detection result that the message D is an invalid message, and determines that the message D is a legitimate message.
  • the detection unit 54 determines that the invalid message has been received before the message D, and outputs the detection result indicating that the invalid message has been detected to the communication processing unit 51.
  • the detection unit 54 maintains the detection result, determines the message D as an invalid message, and outputs the detection result indicating that the invalid message has been detected to the communication processing unit 51.
  • the communication processing unit 51 receives the detection result from the detection unit 54 and transmits alarm information indicating that an unauthorized message is transmitted on the bus 13 to a higher-level device inside or outside the vehicle 1.
  • the detection unit 54 transitions to the transient state, and in the transient state, the message monitored by the monitoring unit 52 and to which the same identification information is attached is the time. It may be configured to detect an invalid message based on the reception interval of continuously received messages and the sequence number. More specifically, the detection unit 54 redetermines the periodic message D as a legitimate message, and then outputs a transition notification to the counter unit 53.
  • the counter unit 53 receives a transition notification from the detection unit 54 and sets the counter value to "none". That is, the detection unit 54 does not use the counter value for determining an invalid message in the transient state.
  • the gateway device 101 receives the message E one cycle after the cycle message D.
  • the detection unit 54 determines the message E as a periodic message and determines that it is a legitimate message from the reception interval between the received message E and the periodic message D.
  • the detection unit 54 acquires the sequence number of the periodic message E determined to be a valid message in the transition state from the storage unit 55, and outputs the sequence number information indicating the sequence number of the periodic message E to the counter unit 53.
  • the counter unit 53 receives the sequence number information from the detection unit 54, sets "03", which is the sequence number value indicated by the sequence number information by one, as a new counter value, and cancels the transition state.
  • the gateway device 101 receives an invalid message while the detection unit 54 is in the transition state, the following processing is performed.
  • FIG. 12 is a diagram showing an example of a case where the received message is determined to be an invalid message in the gateway device according to the second embodiment of the present disclosure.
  • FIG. 12 shows a case where the invalid message I of the sequence number “03” is received when the detection unit is in the transition state in the case shown in FIG.
  • the gateway device 101 receives the message I before one cycle elapses from the periodic message D.
  • the detection unit 54 determines that the message I is an event message from the reception interval between the received message I and the periodic message D.
  • the detection unit 54 acquires the sequence number of the message I determined to be an event message and the previously received periodic message D from the storage unit 55.
  • the detection unit 54 compares the sequence numbers of the acquired message I and the periodic message D, and if the sequence number and the counter value are different, determines that the received message I is a valid message, and the sequence number and the counter value are different. If the values are the same, the received message I is determined to be an invalid message. In this example, the sequence numbers of message I and message D are different values. Therefore, the detection unit 54 determines that the message I, which is an invalid message, is a legitimate message.
  • the detection unit 54 outputs the sequence number information indicating the sequence number of the message I determined to be a valid message in the transient state to the counter unit 53.
  • the counter unit 53 receives the sequence number information from the detection unit 54, sets "04", which is the sequence number value indicated by the sequence number information by one, as a new counter value, and cancels the transition state.
  • the gateway device 101 receives the periodic message E. Since this periodic message E is a periodic message transmitted from the control device 122A next to the periodic message D, it has the same sequence number “02” as the event message D. However, since the reception interval between the periodic message E and the previously received invalid message I is less than the predetermined transmission cycle, the detection unit 54 determines that the periodic message E is an event message. Then, the detection unit 54 tentatively assumes that the periodic message E, which is originally a legitimate message, is an invalid message because the counter value of the counter unit 53 is "04" and the sequence number of the periodic message E and the counter value do not match. judge.
  • the detection unit 54 determines the validity of the detection result in which the periodic message E is an invalid message, as described above. That is, the detection unit 54 has a reception interval between the message having the same sequence number "02" as the periodic message E determined to be an invalid message and the newest message, the periodic message D, which is less than the above-mentioned allowable value. Judge whether or not.
  • the detection unit 54 corrects the detection result that the message E is an invalid message, and determines the message E as a legitimate message.
  • the detection unit 54 corrects the detection result, it determines that the invalid message has been received before the message E, outputs the detection result indicating that the invalid message has been detected to the communication processing unit 51, and again in the transition state. Transition to.
  • FIGS. 13 and 14 are flowcharts defining an example of an operation procedure when the gateway device performs detection processing in the in-vehicle communication system according to the second embodiment of the present disclosure. 13 and 14 show detection processing for a message having the same message ID, and the same detection processing is performed for a message having another message ID.
  • the gateway device 101 monitors the periodic message and the event message in the in-vehicle communication system 301, and acquires the reception time of the periodic message and the event message (step S301).
  • the gateway device 101 confirms whether or not the detection unit 54 is in the transition state, and if it is not in the transition state (NO in step S302), the reception interval of the message received this time and the message received last time is a predetermined transmission. Determine if it matches the cycle. When the reception interval of the message matches the predetermined transmission cycle (YES in step S303), the gateway device 101 determines that the received message is a periodic message and is a legitimate message (step S304).
  • the gateway device 101 stores the reception time of the received message in the storage unit 55 (step S305), and continues monitoring the periodic message and the event message in the in-vehicle communication system 301 (step S301).
  • the gateway device 101 determines that the received message is an event message, and determines the sequence number of the message and the counter in the counter unit 53. Get the value.
  • the gateway device 101 compares the acquired sequence number with the counter value, and if the sequence number and the counter value match (YES in step S306), the counter value of the counter unit 53 is incremented by one (step S307).
  • the received message is determined to be a legitimate message (step S304).
  • the gateway device 101 provisionally determines the received message as an invalid message (step S308).
  • the gateway device 101 has a reception interval between the third message tentatively determined to be an invalid message and the fourth message, which is the latest message having the same sequence number as the message, less than the allowable value of the periodic message. Judge whether or not.
  • the gateway device 101 detects the third message as an invalid message in the provisional determination. Is corrected, and the third message is determined to be a legitimate message (step S310).
  • the gateway device 101 determines that the illegal message has been received before the third message, and provides warning information indicating that the illegal message is transmitted on the bus 13. Transmission to a higher-level device inside 1 or outside vehicle 1 (step S311).
  • the detection unit 54 in the gateway device 101 transitions to the transient state (step S312), stores the reception time of the received message in the storage unit 55 (step S305), and periodically and event messages in the in-vehicle communication system 301. Continues to monitor (step S301).
  • the gateway device 101 regarding the third message which is regarded as an invalid message by the provisional determination.
  • the detection result is maintained, and the third message is officially determined to be an invalid message (step S313).
  • the gateway device 101 transmits alarm information indicating that an unauthorized message is being transmitted on the bus 13 to a higher-level device inside or outside the vehicle 1 (step S314), and the periodic message in the in-vehicle communication system 301 and the periodic message. Continue monitoring of event messages (step S301).
  • the gateway device 101 determines whether or not the reception interval of the message received this time and the message received last time matches the predetermined transmission cycle.
  • the gateway device 101 determines that the received message is a periodic message and is a legitimate message. (Step S316).
  • the gateway device 101 acquires the sequence number of the received message from the storage unit 55, sets the value obtained by increasing the sequence number by one as the counter value in the counter unit 53, and releases the transition state (step S317). ).
  • the gateway device 101 stores the reception time of the received message in the storage unit 55 (step S318), and continues monitoring the periodic message and the event message in the in-vehicle communication system 301 (step S301).
  • the gateway device 101 determines that the received message is an event message, and determines the sequence number of the message and the previously received message.
  • the sequence number is acquired from the storage unit 55.
  • the gateway device 101 compares the acquired sequence numbers, and if both sequence numbers do not match (NO in step S319), determines the received message as a valid message (step S316).
  • step S319 the gateway device 101 determines that the received message is an invalid message (step S320), and transients the periodic message and the event message in the in-vehicle communication system 301.
  • the monitoring in the state is continued (step S301).
  • the detection unit 54 of the gateway device 101 may be configured so as not to transition to the transient state. Specifically, the detection unit 54 may be configured not to perform the processes of steps S302, S312, and S315 to S320 in the examples shown in FIGS. 13 and 14.
  • the detection unit 54 has described the case of transitioning to the transient state after performing the correction processing of the detection result. However, the detection unit 54 may be configured so as not to transition to the transient state.
  • the detection unit 54 outputs a correction completion notification to the counter unit 53 after performing correction processing of the detection result.
  • the counter unit 53 receives the correction completion notification from the detection unit 54 and returns the counter value to the previous value. For example, in the example shown in FIG. 11, after correcting the detection result of the message D tentatively determined to be an invalid message, the counter unit 53 sets the counter value to the value immediately before the current value “04”. Set to "03".
  • the detection unit 54 has described a case where the message is determined to be a legitimate message when the sequence number of the message and the counter value match. However, the detection unit 54 may determine the message as a legitimate message when, for example, the difference between the sequence number of the message and the counter value is a predetermined value.
  • sequence number and the counter value of the message increase by 1 has been described.
  • sequence number and counter value of the message may be increased or decreased in units of other values, or may be changed with regularity.
  • the present embodiment relates to an in-vehicle communication system in which a method for detecting an unauthorized message is changed as compared with the in-vehicle communication system 301 according to the first embodiment. Except for the contents described below, it is the same as the in-vehicle communication system according to the first embodiment.
  • FIG. 15 is a diagram showing an example of a case where the received message is determined to be an invalid message in the gateway device according to the third embodiment of the present disclosure.
  • FIG. 15 shows a case where the gateway device receives the invalid messages F, G, and H.
  • a sequence number “01” is attached to the periodic message A first transmitted by the control device 122A.
  • the message has a sequence number that changes each time a periodic or event message is sent.
  • the initial value of the counter value of the counter unit 53 in the gateway device 101 is set to "02".
  • the counter unit 53 changes the counter value when the gateway device 101 receives the periodic message and the event message, respectively, and stores the counter value in the storage unit 55.
  • the counter unit 53 has a continuous event counter value in addition to the counter value.
  • the initial value of the continuous event counter value is set to "0".
  • the counter unit 53 changes the continuous event counter value when the gateway device 101 receives the event message, and stores it in the storage unit 55.
  • the monitoring unit 52 monitors the periodic message transmitted periodically and the event message transmitted irregularly and at intervals shorter than the transmission cycle of the periodic message in the in-vehicle communication system 301.
  • the monitoring unit 52 acquires the reception time of the periodic message and the reception time of the event message by monitoring the message relayed by the communication processing unit 51.
  • the monitoring unit 52 stores the message ID included in the message received by the communication processing unit 51 and the storage unit 55 in advance. Check the message ID of the periodic message and the message ID of the event message.
  • the monitoring unit 52 relays the message received by the communication processing unit 51.
  • the reception time of the message is acquired.
  • the monitoring unit 52 When the monitoring unit 52 acquires the reception time, the monitoring unit 52 outputs the reception information indicating the acquired reception time to the detection unit 54 in association with the sequence number.
  • the detection unit 54 counts the number of continuously transmitted event messages based on the monitoring result by the monitoring unit 52, and detects an invalid message based on the count result.
  • the detection unit 54 receives the received information from the monitoring unit 52, and acquires the reception time of the previously received message and the predetermined transmission cycle of the periodic message from the storage unit 55.
  • the detection unit 54 calculates the reception interval between the message received this time and the message received last time based on the reception time indicated by the reception information and the acquired reception time.
  • the detection unit 54 determines whether or not the calculated reception interval coincides with a predetermined transmission cycle. If the reception interval does not match the predetermined transmission cycle, the detection unit 54 determines that the received message is an event message, and if the reception interval matches the predetermined transmission cycle, the detection unit 54 determines that the received message is a periodic message.
  • the detection unit 54 determines that the messages A and B whose reception interval coincides with the predetermined transmission cycle are periodic messages. The detection unit 54 determines that the message C transmitted from the message B at an interval less than a predetermined transmission cycle is an event message. When the detection unit 54 receives the periodic message or the event message, the detection unit 54 outputs the type information indicating the type of the message to the counter unit 53.
  • the counter unit 53 When the counter unit 53 receives the type information from the detection unit 54, the counter value is incremented by one regardless of the type of the message shown in the type information. When the type of the message shown in the type information is an event message, the counter unit 53 increments the continuous event counter value by one. The counter unit 53 sets the continuous event counter value to "0" when the type of the message shown in the type information is a periodic message.
  • the gateway device 101 receives the invalid message F impersonating the event message after receiving the periodic messages A and B and the event message C which are legitimate messages will be described.
  • the counter value in the counter unit 53 is "04" and the continuous event counter value is "1".
  • the detection unit 54 validates the invalid message F because the sequence number and the counter value match. Judge as a message. Then, the counter value in the counter unit 53 is set to "05", and the continuous event counter value is set to "2".
  • the gateway device 101 receives an invalid message G impersonating a periodic message delayed by one cycle from the event message C. Since the sequence number of the invalid message G is "05", the detection unit 54 determines that the invalid message G is a legitimate message. Further, the detection unit 54 determines that the invalid message G is an event message because the reception interval between the invalid message G and the previously received invalid message F is less than the predetermined transmission cycle. In this case, the counter value in the counter unit 53 is set to "06", and the continuous event counter value is set to "3".
  • the upper limit of the continuous event counter value is registered in advance in the storage unit 55 of the gateway device 101.
  • the upper limit of the continuous event counter value is assumed to be "2".
  • the upper limit of the continuous event counter value is not limited to this, and is set as appropriate.
  • the detection unit 54 acquires limit information indicating the upper limit of the continuous event counter value from the storage unit 55.
  • the detection unit 54 determines the invalid message G as an event message, and acquires the restriction information and the continuous event counter value from the storage unit 55 and compares them.
  • the detection unit 54 determines that the invalid message has been received before the invalid message G.
  • the detection result indicating that an invalid message has been detected is output to the communication processing unit 51.
  • the communication processing unit 51 receives the detection result from the detection unit 54 and transmits alarm information indicating that an unauthorized message is transmitted on the bus 13 to a higher-level device inside or outside the vehicle 1.
  • 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 third embodiment of the present disclosure.
  • FIG. 16 shows a detection process for a message having the same message ID, and the same detection process is performed for a message having another message ID.
  • the gateway device 101 monitors the periodic message and the event message in the in-vehicle communication system 301, and acquires the reception time of the periodic message and the event message (step S401).
  • the gateway device 101 acquires the sequence number of the received periodic message or event message and the counter value in the counter unit 53.
  • the gateway device 101 compares the acquired sequence number with the counter value, and if the sequence number and the counter value do not match (NO in step S402), determines the received message as an invalid message (step S403).
  • the gateway device 101 transmits alarm information indicating that an unauthorized message is being transmitted on the bus 13 to a higher-level device inside or outside the vehicle 1 (step S404), and the periodic message in the in-vehicle communication system 301 and the periodic message.
  • the monitoring of the event message is continued (step S401).
  • the gateway device 101 determines whether or not the reception interval with the message matches the predetermined transmission cycle.
  • the gateway device 101 determines that the received message is a valid message (step S406).
  • the gateway device 101 sets the continuous event counter value of the counter unit 53 to "0" (step S407), and continues monitoring of periodic messages and event messages in the in-vehicle communication system 301 (step S401).
  • the gateway device 101 acquires the continuous event counter value and the upper limit value of the continuous event counter value from the storage unit 55 and compares them. When the acquired continuous event counter value is larger than the upper limit value (YES in step S408), the gateway device 101 determines the received message as an invalid message (step S409).
  • the gateway device 101 transmits alarm information indicating that an unauthorized message is being transmitted on the bus 13 to a higher-level device inside or outside the vehicle 1 (step S410), and the periodic message in the in-vehicle communication system 301 and the periodic message.
  • the monitoring of the event message is continued (step S401).
  • the gateway device 101 determines that the received message is a valid message (step S411), and determines the periodic message and the event message in the in-vehicle communication system 301. Continues to monitor (step S401).
  • FIG. 17 is a diagram showing an example of a case where it is determined that the received message is an invalid message in the in-vehicle communication system according to the modified example of the third embodiment of the present disclosure.
  • FIG. 17 shows a case where the gateway device receives the invalid messages F, G, and H.
  • the message is not changed when a periodic message is sent, but is assigned a sequence number which is changed each time an event message is sent. There may be.
  • the detection unit 54 can detect an unauthorized message even with such a configuration.
  • the detection unit 54 counts the number of event messages transmitted continuously, and detects an unauthorized message based on the count result. As a result, for example, even if an invalid event message in which the sequence number is matched with the counter value of the gateway device 101 is transmitted, the invalid message can be easily detected. Therefore, the fraudulent message in the in-vehicle communication system 301 can be detected more accurately.
  • the gateway device 101 has described a configuration in which the control device 122A in the vehicle-mounted network 12 directly transmits a message to another control device.
  • the gateway device 101 may relay the message transmitted by the control device 122A.
  • the gateway device 101 receives a message from the bus connection device group 121 (control device 122A) via the bus 13 and transmits the message to the vehicle-mounted communication device 111 via the bus 14. It may be a configuration.
  • the communication processing unit 51 in the gateway device 101 receives a message from the control device 122A via the corresponding bus 13, the communication processing unit 51 outputs a message reception notification to the monitoring unit 52 and the detection unit 54. Then, when the message ID included in the message received by the communication processing unit 51 matches the message ID stored in the storage unit 55, the monitoring unit 52 relays the message received by the communication processing unit 51. By recognizing that it is a message to be performed and referring to the time stamp given to the message, the reception time of the message is acquired.
  • the configuration in which the gateway device 101 detects an unauthorized message in the vehicle-mounted communication system 301 has been described.
  • a detection device different from the gateway device 101 may be configured to detect an unauthorized message in the vehicle-mounted communication system 301.
  • the gateway device 101 which is a detection device, is provided separately from the control device 122A for transmitting the message and the control device 122B for receiving the message.
  • the detection device may be configured to be included in the vehicle-mounted device that transmits the message or the vehicle-mounted device that receives the message.
  • the in-vehicle communication system 301 according to the first to third embodiments described above, the configuration in which the gateway device 101 functioning as a detection device is directly connected to the bus 13 has been described.
  • the in-vehicle communication system 301 is not limited to this.
  • FIG. 18 is a diagram showing an example of the connection topology of the in-vehicle communication system 301 according to the embodiment of the present disclosure.
  • the detection device 151 may be connected to the bus 13 via an in-vehicle device, for example, a control device 122.
  • the detection device 151 detects an unauthorized message transmitted to the bus 13, for example, by monitoring the messages transmitted and received by the vehicle-mounted device.
  • the detection device 151 is connected to the in-vehicle device via, for example, a bus according to the Ethernet or CAN standard.
  • the operation of the detection device 151 is the same as that of the gateway device 101 in the in-vehicle communication system 301 according to the first and second embodiments.
  • the detection unit 54 of the detection device 151 compares the sequence number of the periodic message and the event message transmitted by the control device 122 with the counter value, and makes a tentative determination of detection of an invalid message based on the comparison result.
  • the detection unit 54 makes a final determination of detection of an unauthorized message based on the interval between messages satisfying a predetermined condition regarding the sequence number and a predetermined transmission cycle of the periodic message.
  • the operation of the detection device 151 is the same as that of the gateway device 101 in the in-vehicle communication system 301 according to the third embodiment.
  • the detection unit 54 of the detection device 151 counts the number of event messages continuously transmitted from the control device 122, and detects an invalid message based on the count result.
  • Appendix 1 It is a detection device that detects malicious messages in the in-vehicle network.
  • a monitoring unit that monitors periodically transmitted periodic messages and irregularly transmitted event messages with source identification information and a sequence number.
  • the detection device receives the event message from the vehicle-mounted network, the counter unit that changes the counter value corresponding to the identification information, and the counter unit. It is provided with a detection unit that compares the sequence number with the counter value based on the monitoring result by the monitoring unit and makes a tentative determination of detection of an unauthorized message based on the comparison result.
  • the detection unit detects the malicious message based on the interval between the messages satisfying the predetermined conditions for the sequence number and the predetermined transmission cycle of the periodic message in the message to which the same identification information is attached. Make this judgment,
  • the predetermined transmission cycle is a detection device including a predetermined margin in the transmission cycle of the cycle message.

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)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Small-Scale Networks (AREA)

Abstract

検知装置は、車載ネットワークにおけるメッセージとして、送信元の識別情報およびシーケンス番号が付された、周期的に送信される周期メッセージおよび不定期に送信されるイベントメッセージを監視する監視部と、車載ネットワークからイベントメッセージを検知装置が受信すると、識別情報に対応するカウンタ値を変更するカウンタ部と、監視部による監視結果に基づいて、シーケンス番号とカウンタ値とを比較し、比較結果に基づいて不正メッセージの検知の仮判定を行う検知部とを備え、検知部は、同じ前記識別情報が付された前記メッセージの中で、前記シーケンス番号に関する所定条件を満たすメッセージの間隔、および周期メッセージの所定の送信周期に基づいて、不正メッセージの検知の本判定を行う。

Description

検知装置、検知方法および検知プログラム
 本開示は、検知装置、検知方法および検知プログラムに関する。
 この出願は、2020年12月25日に出願された日本出願特願2020-216834号を基礎とする優先権を主張し、その開示のすべてをここに取り込む。
 特許文献1(特開2014-146868号公報)には、以下のようなネットワーク装置が開示されている。すなわち、ネットワーク装置は、データを受信する通信部と、データを受信した受信時間を管理する時間管理部と、受信したデータを処理する制御部とを有し、周期的にデータを受信して処理するネットワーク装置において、前記制御部は、前記通信部で受信したデータが有する識別子毎に前記時間管理部における受信時刻を記録し、基準とするデータと同じ識別子を持つデータを受信した間隔が所定周期より短い第1のデータを受信した場合に、前記基準とするデータを受信した時刻から前記所定周期経過するまでに前記第1のデータと同じ識別子を持つ第2のデータを受信した時には、周期異常検出時処理を行い、前記所定周期経過するまでに前記第1のデータと同じ識別子を持つデータを受信しなかった時には、前記第1のデータについて所定の処理を行う。
特開2014-146868号公報
 本開示の検知装置は、車載ネットワークにおける不正メッセージを検知する検知装置であって、前記車載ネットワークにおけるメッセージとして、送信元の識別情報およびシーケンス番号が付された、周期的に送信される周期メッセージおよび不定期に送信されるイベントメッセージを監視する監視部と、前記車載ネットワークから前記イベントメッセージを前記検知装置が受信すると、前記識別情報に対応するカウンタ値を変更するカウンタ部と、前記監視部による監視結果に基づいて、前記シーケンス番号と前記カウンタ値とを比較し、比較結果に基づいて不正メッセージの検知の仮判定を行う検知部とを備え、前記検知部は、同じ前記識別情報が付された前記メッセージの中で、前記シーケンス番号に関する所定条件を満たす前記メッセージの間隔、および前記周期メッセージの所定の送信周期に基づいて、前記不正メッセージの検知の本判定を行う。
 本開示の検知装置は、車載ネットワークにおける不正メッセージを検知する検知装置であって、前記車載ネットワークにおいて、送信元の識別情報が付された、周期的に送信される周期メッセージおよび不定期にかつ前記周期メッセージの送信周期よりも短い間隔で2つ以上連続して送信されるイベントメッセージを監視する監視部と、前記監視部による監視結果に基づいて、同じ前記識別情報が付され、かつ、連続して送信された前記イベントメッセージの数をカウントし、カウント結果に基づいて不正メッセージの検知の仮判定を行う検知部とを備える。
 本開示の検知方法は、車載ネットワークにおける不正メッセージを検知する検知装置における検知方法であって、前記車載ネットワークにおけるメッセージとして、送信元の識別情報およびシーケンス番号が付された、周期的に送信される周期メッセージおよび不定期に送信されるイベントメッセージを監視するステップと、前記車載ネットワークから前記イベントメッセージを前記検知装置が受信すると、前記識別情報に対応するカウンタ値を変更するステップと、監視結果に基づいて、前記シーケンス番号と前記カウンタ値とを比較し、比較結果に基づいて不正メッセージの検知の仮判定を行うステップと、監視された、同じ前記識別情報が付された前記メッセージの中で、前記シーケンス番号に関する所定条件を満たす前記メッセージの間隔、および前記周期メッセージの所定の送信周期に基づいて、前記不正メッセージの検知の本判定を行うステップとを含む。
 本開示の検知プログラムは、車載ネットワークにおける不正メッセージを検知する検知装置において用いられる検知プログラムであって、コンピュータを、前記車載ネットワークにおけるメッセージとして、送信元の識別情報およびシーケンス番号が付された、周期的に送信される周期メッセージおよび不定期に送信されるイベントメッセージを監視する監視部と、前記車載ネットワークから前記イベントメッセージを前記検知装置が受信すると、前記識別情報に対応するカウンタ値を変更するカウンタ部と、前記監視部による監視結果に基づいて、前記シーケンス番号と前記カウンタ値とを比較し、比較結果に基づいて不正メッセージの検知の仮判定を行う検知部、として機能させるためのプログラムであり、前記検知部は、同じ前記識別情報が付された前記メッセージの中で、前記シーケンス番号に関する所定条件を満たす前記メッセージの間隔、および前記周期メッセージの所定の送信周期に基づいて、前記不正メッセージの検知の本判定を行う。
 本開示の一態様は、検知装置の一部または全部を実現する半導体集積回路として実現され得たり、検知装置を備えるシステムとして実現され得る。また、本開示の一態様は、検知装置を備えるシステムの一部または全部を実現する半導体集積回路として実現され得る。
図1は、本開示の第1の実施の形態に係る車載通信システムの構成を示す図である。 図2は、本開示の第1の実施の形態に係るバス接続装置群の構成を示す図である。 図3は、本開示の第1の実施の形態に係る車載通信システムにおける制御装置およびゲートウェイ装置のハードウェア構成の一例を示す図である。 図4は、本開示の第1の実施の形態に係る車載通信システムにおけるゲートウェイ装置の構成を示す図である。 図5は、本開示の第1の実施の形態に係るゲートウェイ装置において、受信したメッセージが正当メッセージであると判定する場合の一例を示す図である。 図6は、本開示の第1の実施の形態に係るゲートウェイ装置において、受信したメッセージが不正メッセージであると判定する場合の一例を示す図である。 図7は、本開示の第1の実施の形態に係るゲートウェイ装置が検知結果を修正する場合の一例を示す図である。 図8は、本開示の第1の実施の形態に係る車載通信システムにおいてゲートウェイ装置が検知処理を行う際の動作手順の一例を定めたフローチャートである。 図9は、本開示の第1の実施の形態の変形例1に係る車載通信システムにおいて、周期メッセージの一部が欠損した場合の一例を示す図である。 図10は、本開示の第1の実施の形態の変形例1に係る車載通信システムにおいてゲートウェイ装置が検知処理を行う際の動作手順の一例を定めたフローチャートである。 図11は、本開示の第2の実施の形態に係るゲートウェイ装置において、受信したメッセージが不正メッセージであると判定する場合の一例を示す図である。 図12は、本開示の第2の実施の形態に係るゲートウェイ装置において、受信したメッセージが不正メッセージであると判定する場合の一例を示す図である。 図13は、本開示の第2の実施の形態に係る車載通信システムにおいてゲートウェイ装置が検知処理を行う際の動作手順の一例を定めたフローチャートである。 図14は、本開示の第2の実施の形態に係る車載通信システムにおいてゲートウェイ装置が検知処理を行う際の動作手順の一例を定めたフローチャートである。 図15は、本開示の第3の実施の形態に係るゲートウェイ装置において、受信したメッセージが不正メッセージであると判定する場合の一例を示す図である。 図16は、本開示の第3の実施の形態に係る車載通信システムにおいてゲートウェイ装置が検知処理を行う際の動作手順の一例を定めたフローチャートである。 図17は、本開示の第3の実施の形態の変形例に係る車載通信システムにおいて、受信したメッセージが不正メッセージであると判定する場合の一例を示す図である。 図18は、本開示の実施の形態に係る車載ネットワークの接続トポロジの一例を示す図である。
 従来、車載ネットワークにおけるセキュリティを向上させるための技術が開発されている。
 [本開示が解決しようとする課題]
 特許文献1に記載の技術を超えて、車載ネットワークにおける不正メッセージをより正しく検知することを可能とする技術が望まれる。
 本開示は、上述の課題を解決するためになされたもので、その目的は、車載ネットワークにおける不正メッセージをより正しく検知することが可能な検知装置、検知方法および検知プログラムを提供することである。
 [本開示の効果]
 本開示によれば、車載ネットワークにおける不正メッセージをより正しく検知することが可能である。
 [本開示の実施形態の説明]
 最初に、本開示の実施形態の内容を列記して説明する。
 (1)本開示の実施の形態に係る検知装置は、車載ネットワークにおける不正メッセージを検知する検知装置であって、前記車載ネットワークにおけるメッセージとして、送信元の識別情報およびシーケンス番号が付された、周期的に送信される周期メッセージおよび不定期に送信されるイベントメッセージを監視する監視部と、前記車載ネットワークから前記イベントメッセージを前記検知装置が受信すると、前記識別情報に対応するカウンタ値を変更するカウンタ部と、前記監視部による監視結果に基づいて、前記シーケンス番号と前記カウンタ値とを比較し、比較結果に基づいて不正メッセージの検知の仮判定を行う検知部とを備え、前記検知部は、同じ前記識別情報が付された前記メッセージの中で、前記シーケンス番号に関する所定条件を満たす前記メッセージの間隔、および前記周期メッセージの所定の送信周期に基づいて、前記不正メッセージの検知の本判定を行う。
 このように、検知部が、シーケンス番号に関する所定条件を満たすメッセージの間隔、および周期メッセージの所定の送信周期に基づいて、仮判定における不正メッセージの検知結果を修正し得る本判定を行う構成により、シーケンス番号をカウンタ値に合わせた不正メッセージが送信され、当該不正メッセージを正当メッセージと判定し、正当メッセージを不正メッセージと誤検知したとしても、その検知結果の妥当性を検証し、必要に応じて検知結果を修正することができる。したがって、車載ネットワークにおける不正メッセージをより正しく検知することができる。
 (2)前記メッセージには、前記メッセージに付されるシーケンス番号として、前記周期メッセージおよび前記イベントメッセージが送信される毎に変更される第1のシーケンス番号が付され、前記カウンタ部は、前記検知装置が前記周期メッセージおよび前記イベントメッセージをそれぞれ受信したときに前記カウンタ値を変更してもよい。
 このような構成により、周期メッセージおよびイベントメッセージを判別する必要がなく、全てのメッセージをシーケンス番号で管理することができ、検知装置の構成を簡素にすることができる。
 (3)前記間隔は、第1のメッセージと前記第1のメッセージの前記第1のシーケンス番号よりも1つ前の前記第1のシーケンス番号を有する第2のメッセージとの受信間隔であってもよい。
 このような構成により、不正メッセージが送信されたタイミングを簡易な処理である程度特定することができる。
 (4)前記メッセージには、前記メッセージに付されるシーケンス番号として、前記周期メッセージおよび前記イベントメッセージが送信される毎に変更される第1のシーケンス番号が付され、前記検知部は、前記監視結果に基づいて、前記周期メッセージの欠損を検知し、欠損した前記周期メッセージの数に基づいて、前記カウンタ値を補正し、前記第1のシーケンス番号と補正した前記カウンタ値とを比較し、比較結果に基づいて前記不正メッセージを検知してもよい。
 このような構成により、正当メッセージである周期メッセージが何らかの要因で欠損したとしても、欠損を考慮して不正メッセージの検知を行うことができ、誤検知の発生を抑制することができる。
 (5)前記メッセージには、前記メッセージに付されるシーケンス番号として、前記周期メッセージが送信される場合には変更されず、前記イベントメッセージが送信される毎に変更される第2のシーケンス番号が付され、前記カウンタ部は、前記周期メッセージおよび前記イベントメッセージのうち、前記検知装置が前記イベントメッセージを受信したときに前記カウンタ値を変更してもよい。
 このような構成により、周期メッセージおよびイベントメッセージを判別し、イベントメッセージについての異常から不正メッセージを検知することができる。
 (6)前記間隔は、第3のメッセージと前記第3のメッセージの前記第2のシーケンス番号と同じ前記第2のシーケンス番号を有する第4のメッセージとの受信間隔であってもよい。
 このような構成により、不正メッセージが送信されたタイミングを簡易な処理である程度特定することができる。
 (7)前記検知部は、前記仮判定における不正メッセージの検知結果を前記本判定において修正した後、過渡状態に遷移し、前記過渡状態において、同じ前記識別情報が付された前記メッセージの中で、時間的に連続して受信された前記メッセージの受信間隔、および前記シーケンス番号に基づいて前記不正メッセージを検知してもよい。
 このような構成により、カウンタ値を用いて不正メッセージと判定した結果の修正処理を行った後も不正メッセージの検知を継続することができる。
 (8)本開示の実施の形態に係る検知装置は、車載ネットワークにおける不正メッセージを検知する検知装置であって、前記車載ネットワークにおいて、送信元の識別情報が付された、周期的に送信される周期メッセージおよび不定期にかつ前記周期メッセージの送信周期よりも短い間隔で2つ以上連続して送信されるイベントメッセージを監視する監視部と、前記監視部による監視結果に基づいて、同じ前記識別情報が付され、かつ、連続して送信された前記イベントメッセージの数をカウントし、カウント結果に基づいて不正メッセージを検知する検知部とを備える。
 このように、検知部が、連続して送信されたイベントメッセージの数をカウントし、カウント結果に基づいて不正メッセージを検知する構成により、イベントメッセージになりすました不正メッセージを容易に検知することができる。したがって、車載ネットワークにおける不正メッセージをより正しく検知することができる。
 (9)本開示の実施の形態に係る検知方法は、車載ネットワークにおける不正メッセージを検知する検知装置における検知方法であって、前記車載ネットワークにおけるメッセージとして、送信元の識別情報およびシーケンス番号が付された、周期的に送信される周期メッセージおよび不定期に送信されるイベントメッセージを監視するステップと、前記車載ネットワークから前記イベントメッセージを前記検知装置が受信すると、前記識別情報に対応するカウンタ値を変更するステップと、監視結果に基づいて、前記シーケンス番号と前記カウンタ値とを比較し、比較結果に基づいて不正メッセージの検知の仮判定を行うステップと、監視された、同じ前記識別情報が付された前記メッセージの中で、前記シーケンス番号に関する所定条件を満たす前記メッセージの間隔、および前記周期メッセージの所定の送信周期に基づいて、前記不正メッセージの検知の本判定を行うステップとを含む。
 このように、シーケンス番号に関する所定条件を満たすメッセージの間隔、および周期メッセージの所定の送信周期に基づいて、仮判定における不正メッセージの検知結果を修正し得る本判定を行う構成により、シーケンス番号をカウンタ値に合わせた不正メッセージが送信され、当該不正メッセージを正当メッセージと判定し、正当メッセージを不正メッセージと誤検知したとしても、その検知結果の妥当性を検証し、必要に応じて検知結果を修正することができる。したがって、車載ネットワークにおける不正メッセージをより正しく検知することができる。
 (10)本開示の実施の形態に係る検知プログラムは、車載ネットワークにおける不正メッセージを検知する検知装置において用いられる検知プログラムであって、コンピュータを、前記車載ネットワークにおけるメッセージとして、送信元の識別情報およびシーケンス番号が付された、周期的に送信される周期メッセージおよび不定期に送信されるイベントメッセージを監視する監視部と、前記車載ネットワークから前記イベントメッセージを前記検知装置が受信すると、前記識別情報に対応するカウンタ値を変更するカウンタ部と、前記監視部による監視結果に基づいて、前記シーケンス番号と前記カウンタ値とを比較し、比較結果に基づいて不正メッセージの検知の仮判定を行う検知部、として機能させるためのプログラムであり、前記検知部は、同じ前記識別情報が付された前記メッセージの中で、前記シーケンス番号に関する所定条件を満たす前記メッセージの間隔、および前記周期メッセージの所定の送信周期に基づいて、前記不正メッセージの検知の本判定を行う。
 このように、検知部が、シーケンス番号に関する所定条件を満たすメッセージの間隔、および周期メッセージの所定の送信周期に基づいて、仮判定における不正メッセージの検知結果を修正し得る本判定を行う構成により、シーケンス番号をカウンタ値に合わせた不正メッセージが送信され、当該不正メッセージを正当メッセージと判定し、正当メッセージを不正メッセージと誤検知したとしても、その検知結果の妥当性を検証し、必要に応じて検知結果を修正することができる。したがって、車載ネットワークにおける不正メッセージをより正しく検知することができる。
 以下、本開示の実施の形態について図面を用いて説明する。なお、図中同一または相当部分には同一符号を付してその説明は繰り返さない。また、以下に記載する実施の形態の少なくとも一部を任意に組み合わせてもよい。
 <第1の実施の形態>
 [構成および基本動作]
 図1は、本開示の第1の実施の形態に係る車載通信システムの構成を示す図である。
 図1を参照して、車両1に搭載される車載通信システム301は、ゲートウェイ装置101と、複数の車載通信機111と、複数のバス接続装置群121とを備える。ゲートウェイ装置101は、検知装置の一例である。ゲートウェイ装置101は、バス13を介して各バス接続装置群121と接続され、バス14を介して各車載通信機111と接続される。バス13,14で接続されたゲートウェイ装置101、複数の車載通信機111および複数のバス接続装置群121は、車載ネットワーク12を構成する。
 図2は、本開示の第1の実施の形態に係るバス接続装置群の構成を示す図である。
 図2を参照して、バス接続装置群121は、複数の制御装置122を含む。なお、バス接続装置群121は、複数の制御装置122を備える構成に限らず、1つの制御装置122を含む構成であってもよい。
 車載通信システム301は、車両1の内部における装置である車載装置を複数含む。具体的には、車載通信システム301は、車載装置の一例である、複数の車載通信機111および複数の制御装置122を含む。なお、車載通信システム301は、複数の車載装置を含む構成であれば、複数の車載通信機111を含みかつ制御装置122を含まない構成であってもよいし、車載通信機111を含まずかつ複数の制御装置122を含む構成であってもよいし、1つの車載通信機111および1つの制御装置122を含む構成であってもよい。
 車載通信システム301において、車載通信機111は、たとえば、車両1の外部における装置と通信する。具体的には、車載通信機111は、たとえば、TCU(Telematics Communication Unit)、近距離無線端末装置、およびITS(Intelligent Transport Systems)無線機である。
 TCUは、たとえば、LTE(Long Term Evolution)または5G等の通信規格に従って、無線基地局装置と無線通信を行うことが可能であり、かつゲートウェイ装置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では、車載通信システム301におけるメッセージとして、たとえば、所定の取り決めに従って、ある車載装置から他の車載装置へ周期メッセージおよびイベントメッセージが送信される。周期メッセージは、ある車載装置から他の車載装置へ周期的に送信される。イベントメッセージは、ある車載装置から他の車載装置へ不定期に送信される。
 この例では、2つの車載装置間、すなわち、ある制御装置122から他の制御装置122へ送信されるメッセージについて説明するが、制御装置122および車載通信機111間におけるメッセージ、ならびに各車載通信機111間におけるメッセージについても同様である。
 図3は、本開示の第1の実施の形態に係る車載通信システムにおける制御装置およびゲートウェイ装置のハードウェア構成の一例を示す図である。
 図3を参照して、制御装置122の一例である制御装置122A,122Bは、バス13を介してゲートウェイ装置101と接続される。制御装置122Aは、発振器131Aと、CPU(Central Processing Unit)およびDSP(Digital Signal Processor)等のプロセッサ132Aと、CANトランシーバ133Aとを備える。また、制御装置122Bは、制御装置122Aと同様の構成であり、発信機131Bと、プロセッサ132Bと、CANトランシーバ133Bとを備える。
 ゲートウェイ装置101は、CPUおよびDSP等のプロセッサ141と、CANトランシーバ142と、発振器143とを備える。
 制御装置122Aは、所定の送信周期で周期メッセージを送信する。より詳細には、制御装置122Aにおけるプロセッサ132Aは、発振器131Aからの発振信号に基づいて生成されるクロックのタイミングに従って、CANトランシーバ133A経由で周期メッセージを送信する。また、制御装置122Aは、不定期にイベントメッセージを送信する。より詳細には、制御装置122Aにおけるプロセッサ132Aは、CANトランシーバ133A経由でイベントメッセージを不定期に送信する。
 制御装置122Aは、周期メッセージおよびイベントメッセージに識別情報の一例であるメッセージID(Identifier)を付して送信する。メッセージIDは、周期メッセージおよびイベントメッセージの送信元を示している。なお、メッセージIDは、送信優先順位、周期メッセージであるかまたはイベントメッセージであるかを示すメッセージ送信タイプおよびメッセージ内容等をさらに示してもよい。
 また、メッセージには、周期メッセージおよびイベントメッセージが送信される毎に変更されるシーケンス番号(第1のシーケンス番号)が付されている。より詳細には、制御装置122Aは、周期メッセージおよびイベントメッセージに、周期メッセージおよびイベントメッセージが送信される毎に1ずつ増加するシーケンス番号を含める。要するに、制御装置122Aは、周期メッセージおよびイベントメッセージの種別を問わず、送信するメッセージに連続する番号を付す。
 なお、ある制御装置122が、周期メッセージおよびイベントメッセージを複数の制御装置122と通信する場合、制御装置122は、メッセージID毎に、シーケンス番号を設定する。また、ある制御装置122がメッセージの内容に応じて複数のメッセージIDを使い分ける場合、制御装置122はメッセージID毎にシーケンス番号を設定する。
 [ゲートウェイ装置の構成]
 図4は、本開示の第1の実施の形態に係る車載通信システムにおけるゲートウェイ装置の構成を示す図である。
 図4を参照して、ゲートウェイ装置101は、通信処理部51と、監視部52と、カウンタ部53と、検知部54と、記憶部55とを備える。図3に示すプロセッサ141は、監視部52、カウンタ部53および検知部54の一部または全部を実現し、CANトランシーバ142は、通信処理部51の一部または全部を実現する。記憶部55は、たとえばフラッシュメモリである。
 ゲートウェイ装置101は、検知装置として機能し、車載ネットワーク12における不正メッセージを検知する検知処理を行う。
 [通信処理部]
 通信処理部51は、車載ネットワーク12におけるバス13,14上のメッセージを受信する。通信処理部51は、メッセージを受信すると、当該メッセージの受信時刻を示すタイムスタンプを付与し、監視部52および検知部54へメッセージ受信通知を出力する。
 [監視部]
 監視部52は、車載ネットワーク12におけるメッセージとして、送信元の識別情報であるメッセージIDおよびシーケンス番号が付された、周期的に送信される周期メッセージおよび不定期に送信されるイベントメッセージを監視する。
 再び図3を参照して、監視部52は、車載ネットワーク12におけるメッセージを監視することにより、周期メッセージの受信時刻およびイベントメッセージの受信時刻を取得する。
 監視部52は、たとえば、通信処理部51から受信通知を受けると、通信処理部51によって受信されたメッセージに含まれるメッセージID、ならびに予め記憶部55に保存されている周期メッセージのメッセージIDおよびイベントメッセージのメッセージIDを確認する。
 そして、監視部52は、通信処理部51によって受信されたメッセージに含まれるメッセージIDが記憶部55に保存されているメッセージIDと一致する場合、当該メッセージに付与されたタイムスタンプを参照することにより、メッセージの受信時刻を取得する。
 監視部52は、受信時刻を取得すると、取得した受信時刻を示す受信情報を、シーケンス番号と対応付けて検知部54へ出力する。
 [カウンタ部]
 カウンタ部53は、車載ネットワーク12から少なくともイベントメッセージをゲートウェイ装置101が受信すると、識別情報に対応するカウンタ値を変更する。カウンタ値は、メッセージID毎に設定される。本実施の形態では、カウンタ部53は、ゲートウェイ装置101が周期メッセージおよびイベントメッセージをそれぞれ受信したときにカウンタ値を変更する。
 より詳細には、カウンタ部53は、後述するように受信したメッセージが検知部54によって正当メッセージと判定された場合、カウンタ値を1つ増加させる。カウンタ部53は、増加させたカウンタ値を記憶部55に保存する。
 カウンタ部53は、複数の制御装置122がそれぞれメッセージを送信する場合、メッセージID毎に別個のカウンタ値を設定する。なお、カウンタ部53は、ある1つの制御装置122がメッセージの内容に応じて複数のメッセージIDを使い分ける場合、メッセージID毎にカウンタ値を設定する。
 [検知部]
 検知部54は、監視部52による監視結果に基づいて、シーケンス番号とカウンタ値とを比較し、比較結果に基づいて不正メッセージの検知の仮判定を行う。
 より詳細には、検知部54は、通信処理部51からメッセージ受信通知を受けると、メッセージのシーケンス番号およびカウンタ値を記憶部55から取得する。検知部54は、取得したシーケンス番号とカウンタ値とを比較し、シーケンス番号とカウンタ値とが同じ値の場合、受信したメッセージは正当メッセージであると判定し、シーケンス番号とカウンタ値とが異なる値の場合、受信したメッセージは不正メッセージであると判定する。
 図5は、本開示の第1の実施の形態に係るゲートウェイ装置において、受信したメッセージが正当メッセージであると判定する場合の一例を示す図である。
 図5を参照して、制御装置122Aが最初に送信するメッセージAにはシーケンス番号「01」が付されている。また、ゲートウェイ装置101におけるカウンタ部53のカウンタ値の初期値は、「01」に設定されている。
 ゲートウェイ装置101におけるカウンタ部53は、制御装置122Aからバス13経由でシーケンス番号「01」が付された周期メッセージAをゲートウェイ装置101において受信すると、カウンタ値を1つ増加させて「02」に設定する。
 次に、検知部54は、ゲートウェイ装置101がシーケンス番号「02」が付された周期メッセージBを受信すると、シーケンス番号とカウンタ値とは「02」で一致するため、周期メッセージBを正当メッセージと判定する。その後、カウンタ部53は、カウンタ値を1つ増加させて「03」に設定する。
 次に、検知部54は、ゲートウェイ装置101がシーケンス番号「03」が付されたイベントメッセージCを受信すると、シーケンス番号とカウンタ値とは「03」で一致するため、イベントメッセージCを正当メッセージと判定する。その後、カウンタ部53は、カウンタ値を「04」に設定する。
 このようにして、検知部54は、その後に受信するメッセージD~Gについても正当メッセージであるか否かを判定する。そして、図5に示す例では、検知部54は、メッセージD~Gを正当メッセージであると判定する。
 図6は、本開示の第1の実施の形態に係るゲートウェイ装置において、受信したメッセージが不正メッセージであると判定する場合の一例を示す図である。図6は、ゲートウェイ装置101が、イベントメッセージCを受信した後に不正メッセージHを受信する点で図5と異なる。
 図6を参照して、ゲートウェイ装置101がメッセージA~Cを受信した後、カウンタ部53はカウンタ値を「04」に設定する。その後、検知部54は、ゲートウェイ装置101がシーケンス番号「05」が付されたメッセージHを受信すると、シーケンス番号とカウンタ値とが一致しないため、メッセージHを不正メッセージと判定する。
 (検知結果の修正)
 検知部54は、不正メッセージを検知した場合、検知結果が妥当であるか否かを判定する。より詳細には、検知部54は、仮判定において不正メッセージを検知した場合、監視部52によって監視されたメッセージであって、同じ識別情報が付されたメッセージの中で、シーケンス番号に関する所定条件を満たすメッセージの間隔、および周期メッセージの所定の送信周期に基づいて、不正メッセージの検知の本判定を行い、仮判定における不正メッセージの検知結果を修正する修正処理を行う。本実施の形態において、上記メッセージの間隔は、第1のメッセージと第1のメッセージよりも1つ前のシーケンス番号を有する第2のメッセージとの受信間隔である。
 (修正しない例1)
 まず、図6に示す例において、検知部54が検知結果を修正しない場合について説明する。図6に示す例において、上記第1のメッセージは、一旦不正メッセージと判定されたメッセージHであり、そのカウンタ値は「05」である。そして、上記第2のメッセージはメッセージHよりも1カウント前のシーケンス番号「04」が付されたメッセージであるところ、ゲートウェイ装置101は、メッセージHを受信するよりも前にカウンタ値「04」が付されたメッセージを受信していない。したがって、検知部54は、図6に示す例では、第2のメッセージに相当するメッセージが存在しないため、検知結果を修正せず、メッセージHを不正メッセージと判定する。
 なお、カウンタ部53は、ゲートウェイ装置101が不正メッセージHを受信した場合、カウンタ値を変更せずに「04」を維持する。そして、検知部54は、その後に受信するメッセージD~Gを正当メッセージと判定する。
 (修正しない例2)
 また、図6に示す例において、メッセージHのシーケンス番号が「02」であったとする。この場合、メッセージHのシーケンス番号とカウンタ部53のカウンタ値とが一致しないため、メッセージHは、一旦、不正メッセージと判定される。検知部54は、不正メッセージを検知したため、上述と同様に、検知結果の妥当性を判定する。この場合、第1のメッセージであるメッセージHよりも1カウント前のシーケンス番号「01」を有するメッセージは、メッセージAである。しかしながら、ゲートウェイ装置101は、メッセージAとメッセージHとの間にメッセージBおよびCを受信しているため、メッセージAは、メッセージHに対して時間的に連続して送信されたメッセージではなく、上記第2のメッセージに相当しない。したがって、この場合であっても、検知部54は、検知結果を修正せず、メッセージHを不正メッセージと判定する。
 (修正する例)
 次に、検知部54が検知結果を修正する場合について説明する。図6に示す例では、検知部54は、メッセージHのシーケンス番号が、カウンタ部53のカウンタ値と異なる値であるため、メッセージHが不正メッセージであると判定している。しかしながら、メッセージHのシーケンス番号が、カウンタ部53のカウンタ値と同じである場合、不正メッセージであるメッセージHが正当メッセージと判定され、正当メッセージであるメッセージDが不正メッセージと判定されることになる。本実施の形態に係るゲートウェイ装置101は、このように、本来正当メッセージであるはずのメッセージが不正メッセージと判定された場合であっても、検知結果を修正することで誤検知を低減することができる。
 図7は、本開示の第1の実施の形態に係るゲートウェイ装置が検知結果を修正する場合の一例を示す図である。
 図7を参照して、まず、ゲートウェイ装置101は、メッセージA~Cを順に受信する。検知部54は、メッセージA~Cの各々については、シーケンス番号とカウンタ値とが一致するため、正当メッセージと判定する。この状態で、カウンタ部53のカウンタ値は「04」に設定されている。
 次に、ゲートウェイ装置101は、不正メッセージHを受信する。検知部54は、この不正メッセージHにはシーケンス番号「04」が付されているため、不正メッセージHを正当メッセージと判定する。カウンタ部53は、カウンタ値を「05」に増加させる。
 次に、ゲートウェイ装置101は、メッセージDを受信する。このメッセージDは、制御装置122AからメッセージCの次に送信されたメッセージであるため、シーケンス番号「04」を有している。しかしながら、検知部54は、カウンタ部53のカウンタ値は「05」であり、シーケンス番号とカウンタ値とが一致しないため、本来正当メッセージであるメッセージDを不正メッセージであると仮判定する。
 次に、検知部54は、メッセージDを不正メッセージとした検知結果の妥当性を判定する。上述したように、検知部54は、同じ識別情報が付されたメッセージの中で、シーケンス番号に関する所定条件を満たすメッセージの間隔および周期メッセージの所定の送信周期に基づいて、検知結果を修正するか否かを判定する。
 ここで、所定条件を満たすメッセージの間隔とは、ゲートウェイ装置101が実際に時間的に連続して受信したメッセージの間隔ではなく、あるメッセージと当該メッセージのシーケンス番号の直前の番号として付与されたシーケンス番号を有するメッセージとの間隔、すなわち、あるメッセージと当該メッセージの1つ前に本来受信しているべきメッセージとの間隔を意味する。
 具体的には、不正メッセージと判定されたメッセージDに対して、実際に時間的に連続して受信されたメッセージは、メッセージHである。しかしながら、本実施の形態において制御装置122Aは、周期メッセージおよびイベントメッセージの種別を問わず、送信するメッセージに順にシーケンス番号を付している。そのため、メッセージDの前に本来受信しているべきメッセージは、メッセージDと同じシーケンス番号「04」を有するメッセージHではなく、メッセージDよりも1つ前のシーケンス番号「03」を有するメッセージCである。したがって、図7に示す例では、検知部54は、第1のメッセージであるメッセージDと第2のメッセージであるメッセージCとの受信間隔および周期メッセージの送信周期に基づいて、検知結果を修正するか否かを決定する。
 より詳細には、検知部54は、メッセージDおよびメッセージCの受信時刻、ならびに周期メッセージの所定の送信周期を記憶部55から取得する。検知部54は、取得したメッセージDおよびメッセージCの受信時刻の差分から受信間隔を算出する。検知部54は、算出した受信間隔と周期メッセージの所定の送信周期とを比較し、受信間隔が送信周期未満または送信周期に所定のマージンを加えた値未満であるか否かを判定する。以下、この判定基準、すなわち送信周期または送信周期に所定のマージンを加えた値を許容値と称する。本実施の形態では、一例として、周期メッセージの所定の送信周期は20msであり、マージンは+6msである。
 より詳細には、本実施の形態において、メッセージDとメッセージCとの受信間隔は、20msであり、許容値未満である。この場合、メッセージDは、正当メッセージであるメッセージCから所定の送信周期20ms後に送信された正当な周期メッセージである可能性が高い。したがって、検知部54は、受信間隔が許容値未満である場合、メッセージDを不正メッセージとする検知結果を修正し、メッセージDを正当メッセージと判定する。なお、送信周期およびマージンは上記に限定されず、適宜設定可能であり、また、マージンは設けなくてもよい。
 検知部54は、検知結果を修正すると、メッセージDよりも前に不正メッセージを受信していると判定し、不正メッセージを検知した旨を示す検知結果を通信処理部51へ出力する。
 一方、メッセージDとメッセージCとの受信間隔が、許容値以上の場合、メッセージDは不正メッセージである可能性が高い。したがって、検知部54は、検知結果を維持し、メッセージDを不正メッセージと判定し、不正メッセージを検知した旨を示す検知結果を通信処理部51へ出力する。
 通信処理部51は、検知部54から検知結果を受けて、バス13において不正メッセージが伝送されていることを示す警報情報を車両1内または車両1外における上位装置へ送信する。
 [動作の流れ]
 本開示の実施の形態に係る車載通信システムにおける各装置は、メモリを含むコンピュータを備え、当該コンピュータにおけるCPU等の演算処理部は、以下のフローチャートおよびシーケンスの各ステップの一部または全部を含むプログラムを当該メモリから読み出して実行する。これら複数の装置のプログラムは、それぞれ、外部からインストールすることができる。これら複数の装置のプログラムは、それぞれ、記録媒体に格納された状態で流通する。
 図8は、本開示の第1の実施の形態に係る車載通信システムにおいてゲートウェイ装置が検知処理を行う際の動作手順の一例を定めたフローチャートである。図8は、ある同一のメッセージIDを有するメッセージに対する検知処理を示しており、他のメッセージIDを有するメッセージについても同様の検知処理が行われる。
 図8を参照して、まず、ゲートウェイ装置101は、車載通信システム301における周期メッセージおよびイベントメッセージを監視し、周期メッセージおよびイベントメッセージの受信時刻を取得する(ステップS101)。
 次に、ゲートウェイ装置101は、受信した周期メッセージまたはイベントメッセージのシーケンス番号およびカウンタ部53におけるカウンタ値を取得する。ゲートウェイ装置101は、取得したシーケンス番号とカウンタ値とを比較し、シーケンス番号とカウンタ値とが一致する場合(ステップS102でYES)、受信したメッセージを正当メッセージと判定する(ステップS103)。
 次に、ゲートウェイ装置101は、受信したメッセージを正当メッセージと判定すると、カウンタ部53のカウンタ値を1つ増加させる(ステップS104)。
 次に、ゲートウェイ装置101は、受信したメッセージの受信時刻を記憶部55に保存し(ステップS105)、車載通信システム301における周期メッセージおよびイベントメッセージの監視を継続する(ステップS101)。
 一方、ゲートウェイ装置101は、取得したシーケンス番号とカウンタ値とが一致しない場合(ステップS102でNO)、受信したメッセージを不正メッセージと仮判定する(ステップS106)。
 次に、ゲートウェイ装置101は、不正メッセージと仮判定した第1のメッセージと第1のメッセージよりも1カウント前のシーケンス番号を有する第2のメッセージとの受信間隔が、周期メッセージの許容値未満であるか否かを判定する。ゲートウェイ装置101は、第1のメッセージと第2のメッセージとの受信間隔が周期メッセージの許容値未満である場合(ステップS107でYES)、仮判定で不正メッセージとした第1のメッセージについての検知結果を修正し、第1のメッセージを正当メッセージと判定する(ステップS108)。
 次に、ゲートウェイ装置101は、検知結果を修正すると、第1のメッセージよりも前に不正メッセージを受信していると判定し、バス13において不正メッセージが伝送されている旨を示す警報情報を車両1内または車両1外における上位装置へ送信する(ステップS109)。
 次に、ゲートウェイ装置101は、受信したメッセージの受信時刻を記憶部55に保存し(ステップS105)、車載通信システム301における周期メッセージおよびイベントメッセージの監視を継続する(ステップS101)。
 ゲートウェイ装置101は、第1のメッセージと第2のメッセージとの受信間隔が周期メッセージの許容値以上の場合(ステップS107でNO)、仮判定で不正メッセージとした第1のメッセージについての検知結果を維持し、第1のメッセージを正式に不正メッセージと判定する(ステップS110)。
 次に、ゲートウェイ装置101は、バス13において不正メッセージが伝送されている旨を示す警報情報を車両1内または車両1外における上位装置へ送信し(ステップS111)、車載通信システム301における周期メッセージおよびイベントメッセージの監視を継続する(ステップS101)。
 [変形例1]
 図9は、本開示の第1の実施の形態の変形例1に係る車載通信システムにおいて、周期メッセージの一部が欠損した場合の一例を示す図である。
 図9を参照して、検知部54は、メッセージA~Cについて、シーケンス番号とカウンタ値とが一致するため、正当メッセージと判定する。ゲートウェイ装置101は、メッセージCの受信後、周期メッセージDを受信する予定である。しかしながら、ゲートウェイ装置101は、周期メッセージDが何らかの要因により欠損したため、シーケンス番号「05」が付された周期メッセージEを受信する。
 この場合、検知部54は、カウンタ値が「04」であり周期メッセージEのシーケンス番号「05」と一致しないため、正当メッセージである周期メッセージEを不正メッセージと仮判定してしまう。
 そこで、第1の実施の形態における変形例1に係るゲートウェイ装置101において、検知部54は、監視部52による監視結果に基づいて、周期メッセージの欠損を検知し、欠損した周期メッセージの数に基づいて、カウンタ値を補正し、シーケンス番号と補正したカウンタ値とを比較し、比較結果に基づいて不正メッセージの検知の仮判定を行う。
 より詳細には、検知部54は、周期メッセージEを不正メッセージであると仮判定した後、検知結果の修正処理を行う前に、周期メッセージの欠損の有無を検知する処理を行う。
 具体的には、検知部54は、メッセージEの受信時刻および前回受信したメッセージであるメッセージCの受信時刻、ならびに周期メッセージの所定の送信周期を記憶部55から取得する。検知部54は、取得したメッセージEおよびメッセージCの受信時刻の差分から受信間隔を算出する。検知部54は、算出した受信間隔と周期メッセージの所定の送信周期とを比較する。図9に示す例では、メッセージEおよびメッセージCの受信間隔は許容値の2倍、すなわち、メッセージCから概ね1周期遅れてゲートウェイ装置101がメッセージEを受信したとする。
 この場合、検知部54は、周期メッセージが1つ欠損していると判断し、記憶部55から取得したカウンタ値「04」に欠損した周期メッセージの数を加算し、「05」に補正する。検知部54は、補正したカウンタ値と周期メッセージEのシーケンス番号とを比較し、カウンタ値「05」と周期メッセージEのシーケンス番号「05」とが一致するため、仮判定結果を修正し、周期メッセージEを正当メッセージと仮判定する。
 また、検知部54は、周期メッセージの欠損数を示す欠損情報をカウンタ部53へ出力する。カウンタ部53は、検知部54から欠損情報を受けて、現在のカウンタ値を「05」に変更し、記憶部55に保存する。
 図10は、本開示の第1の実施の形態の変形例1に係る車載通信システムにおいてゲートウェイ装置が検知処理を行う際の動作手順の一例を定めたフローチャートである。図10は、ある同一のメッセージIDを有するメッセージに対する検知処理を示しており、他のメッセージIDを有するメッセージについても同様の検知処理が行われる。
 図10を参照して、まず、ゲートウェイ装置101は、車載通信システム301における、周期メッセージおよびイベントメッセージを監視し、周期メッセージおよびイベントメッセージの受信時刻を取得する(ステップS201)。
 次に、ゲートウェイ装置101は、受信した周期メッセージまたはイベントメッセージのシーケンス番号およびカウンタ部53におけるカウンタ値を取得する。ゲートウェイ装置101は、取得したシーケンス番号とカウンタ値とを比較し、シーケンス番号とカウンタ値とが一致する場合(ステップS202でYES)、受信したメッセージを正当メッセージと判定する(ステップS203)。
 次に、ゲートウェイ装置101は、受信したメッセージを正当メッセージと判定すると、カウンタ部53のカウンタ値を1つ増加させる(ステップS204)。
 次に、ゲートウェイ装置101は、受信したメッセージの受信時刻を記憶部55に保存し(ステップS205)、車載通信システム301における周期メッセージおよびイベントメッセージの監視を継続する(ステップS201)。
 一方、ゲートウェイ装置101は、取得したシーケンス番号とカウンタ値とが一致しない場合(ステップS202でNO)、受信したメッセージを不正メッセージと仮判定する(ステップS206)。
 次に、ゲートウェイ装置101は、受信したメッセージよりも前に、周期メッセージの欠損があったか否かを判定し、欠損を検知した場合(ステップS207でYES)、カウンタ部53におけるカウンタ値を欠損した数だけ増加させる(ステップS208)。
 次に、ゲートウェイ装置101は、記憶部55から取得したカウンタ値を検知した欠損数に基づいて補正し、取得したシーケンス番号と補正したカウンタ値とを比較し、シーケンス番号と補正したカウンタ値とが一致する場合(ステップS209でYES)、受信したメッセージを正当メッセージと判定する(ステップS203)。
 一方、ゲートウェイ装置101は、取得したシーケンス番号と補正したカウンタ値とが一致しない場合(ステップS209でNO)、受信したメッセージを不正メッセージと再度仮判定する。
 ステップS210~S214の処理は、図8に示すステップS107~S111と同様であるため詳細な説明は行わない。
 ところで、車載通信システムにおける不正メッセージをより正しく検知することを可能とする技術が望まれる。
 たとえば、周期的および不定期に送信されるメッセージに順番に付されたシーケンス番号に基づいて、不正メッセージを検知する方法が考えられる。
 しかしながら、このような方法では、本来次に送信される予定の正当メッセージのシーケンス番号になりすましたシーケンス番号を有する不正メッセージを検知することは難しく、不正メッセージの次に送信された正当メッセージを不正メッセージと誤検知する可能性がある。
 これに対して、本開示の第1の実施の形態に係るゲートウェイ装置101では、検知部54が、同じ識別情報が付されたメッセージの中で、シーケンス番号に関する所定条件を満たすメッセージの間隔および周期メッセージの所定の送信周期に基づいて、不正メッセージの検知の本判定を行い、仮判定における不正メッセージの検知結果を修正する修正処理を行う。これにより、ゲートウェイ装置101は、不正メッセージを正当メッセージと誤判定したことで、後の正当メッセージを不正メッセージと誤検知したとしても、その検知結果の妥当性を検証し、必要に応じて検知結果を修正することができる。
 したがって、本開示の第1の実施の形態に係るゲートウェイ装置101では、車載通信システム301における不正メッセージをより正しく検知することができる。
 [変形例2]
 上述の説明では、制御装置122Aが最初に送信するメッセージのシーケンス番号およびカウンタ部53のカウンタ値の初期値は「01」である場合について説明した。しかしながら、制御装置122Aが最初に送信するメッセージのシーケンス番号およびカウンタ部53のカウンタ値の初期値はこれに限定されず、他の値であってもよい。
 また、上述の説明では、検知部54は、メッセージのシーケンス番号とカウンタ値とが一致する場合に当該メッセージを正当メッセージと判定する場合について説明した。しかしながら、検知部54は、たとえば、メッセージのシーケンス番号とカウンタ値との差分が所定の値である場合に当該メッセージを正当メッセージと判定してもよい。
 また、上述の説明では、メッセージのシーケンス番号およびカウンタ値は、1ずつ値が増加する場合について説明した。しかしながら、メッセージのシーケンス番号およびカウンタ値は、他の値の単位で増加または減少してもよいし、規則性を持って変更されてもよい。
 次に、本開示の他の実施の形態について図面を用いて説明する。なお、図中同一または相当部分には同一符号を付してその説明は繰り返さない。
 <第2の実施の形態>
 本実施の形態は、第1の実施の形態に係る車載通信システム301と比べてメッセージの送信方法および不正メッセージの検知方法を変更した車載通信システムに関する。以下で説明する内容以外は第1の実施の形態に係る車載通信システムと同様である。
 図11は、本開示の第2の実施の形態に係るゲートウェイ装置において、受信したメッセージが不正メッセージであると判定する場合の一例を示す図である。
 図11を参照して、制御装置122Aが最初に送信する周期メッセージAにはシーケンス番号「01」が付されている。また、ゲートウェイ装置101におけるカウンタ部53のカウンタ値の初期値は、「02」に設定されている。
 本実施の形態において、メッセージには、周期メッセージが送信される場合には変更されず、イベントメッセージが送信される毎に変更されるシーケンス番号(第2のシーケンス番号)が付される。
 より詳細には、制御装置122Aは、周期メッセージAおよび周期メッセージAの次に送信する周期メッセージBには、同じシーケンス番号「01」を含める。制御装置122Aは、周期メッセージBの次に送信するイベントメッセージCには、シーケンス番号を1つ増加させて「02」を含める。制御装置122Aは、イベントメッセージCの次に送信する周期メッセージDには、イベントメッセージCと同じシーケンス番号「02」を含める。
 検知部54は、受信したメッセージが、周期メッセージおよびイベントメッセージのいずれであるかを判定する。より詳細には、検知部54は、通信処理部51からメッセージ受信通知を受けると、今回受信したメッセージに対して時間的に連続するメッセージ、すなわち前回受信したメッセージの受信時刻、および周期メッセージの所定の送信周期を記憶部55から取得する。検知部54は、今回受信したメッセージと前回受信したメッセージとの受信間隔を算出する。検知部54は、算出した受信間隔と当該所定の送信周期とを比較し、受信間隔が所定の送信周期と一致するか否かを判定する。たとえば、検知部54は、受信間隔と送信周期との差の絶対値が所定値未満である場合、受信間隔と送信周期とが一致すると判断する。
 たとえば、検知部54は、ゲートウェイ装置101がメッセージBを受信すると、メッセージBと前回受信したメッセージAとの受信間隔を算出する。本例では、メッセージBとメッセージAとの受信間隔は、所定の送信周期と一致する。したがって、検知部54は、メッセージBを周期メッセージと判定する。
 次に、検知部54は、ゲートウェイ装置101がメッセージCを受信すると、メッセージCと前回受信したメッセージBとの受信間隔を算出する。本例では、メッセージCとメッセージBとの受信間隔は、所定の送信周期未満である。したがって、検知部54は、メッセージCをイベントメッセージと判定する。
 次に、検知部54は、受信したメッセージをイベントメッセージと判定すると、当該イベントメッセージのシーケンス番号、およびカウンタ値を記憶部55から取得する。検知部54は、取得したシーケンス番号とカウンタ値とを比較し、シーケンス番号とカウンタ値とが同じ値の場合、受信したイベントメッセージは正当メッセージであると判定する。
 具体的には、ゲートウェイ装置101が受信したイベントメッセージCのシーケンス番号は「02」であり、カウンタ値「02」と一致する。したがって、検知部54は、イベントメッセージCを正当メッセージであると判定する。検知部54は、イベントメッセージCを正当メッセージと判定すると、カウンタ値変更通知をカウンタ部53へ出力する。
 カウンタ部53は、周期メッセージおよびイベントメッセージのうち、ゲートウェイ装置101がイベントメッセージを受信したときにカウンタ値を変更する。より詳細には、カウンタ部53は、検知部54からカウンタ値変更通知を受けて、カウンタ値を1つ増加させる。カウンタ部53は、増加させたカウンタ値を記憶部55に保存する。
 一方、検知部54は、シーケンス番号とカウンタ値とが異なる値の場合、受信したイベントメッセージは不正メッセージであると判定する。
 たとえば、ゲートウェイ装置101がメッセージA~Cを受信した後、不正メッセージHを受信する場合を想定する。ゲートウェイ装置101がメッセージA~Cを受信した後、カウンタ部53はカウンタ値を「03」に設定する。その後、検知部54は、ゲートウェイ装置101が仮に、シーケンス番号「05」が付されたメッセージHを受信すると、シーケンス番号とカウンタ値とが一致しないため、メッセージHを不正メッセージと判定する。
 しかしながら、不正メッセージHのシーケンス番号が、カウンタ部53のカウンタ値と同じ「03」である場合、不正メッセージHが正当メッセージと判定され、正当メッセージであるメッセージDが不正メッセージと判定されることになる。
 そこで、第1の実施の形態と同様に、本実施の形態においても、検知部54は、仮判定において不正メッセージを検知した場合、監視部52によって監視されたメッセージであって、同じ識別情報が付されたメッセージの中で、シーケンス番号に関する所定条件を満たすメッセージの間隔および周期メッセージの所定の送信周期に基づいて、不正メッセージの検知の本判定を行い、仮判定における不正メッセージの検知結果を修正する修正処理を行う。本実施の形態において、上記メッセージの間隔は、第3のメッセージであるメッセージDと、第3のメッセージと同じシーケンス番号を有する第4のメッセージであるメッセージCとの受信間隔である。
 より詳細には、まず、ゲートウェイ装置101は、メッセージA~Cを順に受信する。検知部54は、周期メッセージAおよびBについては、受信間隔が所定の送信周期と一致するため、正当メッセージと判定する。検知部54は、イベントメッセージCについては、シーケンス番号とカウンタ値とが一致するため、正当メッセージと判定する。この状態で、カウンタ部53のカウンタ値は初期値から1つ増加され「03」に設定される。
 次に、ゲートウェイ装置101は、不正メッセージHを受信する。検知部54は、不正メッセージHと前回受信したイベントメッセージCとの受信間隔が所定の送信周期未満であるため、不正メッセージHをイベントメッセージと判定する。そして、検知部54は、この不正メッセージHにはカウンタ値と同じ値であるシーケンス番号「03」が付されているため、不正メッセージHを正当メッセージと判定する。カウンタ部53は、カウンタ値を「04」に増加させる。
 次に、ゲートウェイ装置101は、メッセージDを受信する。このメッセージDは、制御装置122AからイベントメッセージCの次に送信された周期メッセージであるため、イベントメッセージCと同じシーケンス番号「02」を有している。しかしながら、検知部54は、周期メッセージDと前回受信した不正メッセージHとの受信間隔が所定の送信周期未満であるため、周期メッセージDをイベントメッセージと判定する。そして、検知部54は、カウンタ部53のカウンタ値は「04」であり、周期メッセージDのシーケンス番号とカウンタ値とが一致しないため、本来正当メッセージである周期メッセージDを不正メッセージであると仮判定する。
 次に、検知部54は、周期メッセージDを不正メッセージとした検知結果の妥当性を判定する。上述したように、検知部54は、同じ識別情報が付されたメッセージの中で、シーケンス番号に関する所定条件を満たすメッセージの間隔および周期メッセージの所定の送信周期に基づいて、検知結果を修正するか否かを判定する。
 ここで、本実施の形態では、所定条件を満たすメッセージの間隔とは、ゲートウェイ装置101が実際に時間的に連続して受信したメッセージの間隔ではなく、あるメッセージと、当該メッセージと同じシーケンス番号を有するメッセージであって最も新しいメッセージとの間隔、すなわち、あるメッセージと当該メッセージの1つ前に本来受信しているべきメッセージとの間隔を意味する。
 具体的には、不正メッセージと判定された周期メッセージDと同じシーケンス番号「02」を有するメッセージであって最も新しいメッセージは、イベントメッセージCである。したがって、検知部54は、第3のメッセージである周期メッセージDと第4のメッセージであるメッセージCとの受信間隔および周期メッセージの送信周期に基づいて、検知結果を修正するか否かを決定する。
 より詳細には、検知部54は、メッセージDおよびメッセージCの受信時刻、ならびに周期メッセージの所定の送信周期を記憶部55から取得する。検知部54は、取得したメッセージDおよびメッセージCの受信時刻の差分から受信間隔を算出する。検知部54は、算出した受信間隔と周期メッセージの所定の送信周期とを比較し、受信間隔が所定の送信周期と一致するか否かを判定する。
 本実施の形態において、メッセージDとメッセージCとの受信間隔は、20msであり、所定の送信周期の長さである。この場合、メッセージDは、正当メッセージであるメッセージCから所定の送信周期20ms後に送信された正当な周期メッセージである可能性が高い。したがって、検知部54は、受信間隔が所定の送信周期と一致する場合、メッセージDを不正メッセージとする検知結果を修正し、メッセージDを正当メッセージと判定する。
 検知部54は、検知結果を修正すると、メッセージDよりも前に不正メッセージを受信していると判定し、不正メッセージを検知した旨を示す検知結果を通信処理部51へ出力する。
 一方、メッセージDとメッセージCとの受信間隔が、所定の送信周期と一致しない場合、メッセージDは不正メッセージである可能性が高い。したがって、検知部54は、検知結果を維持し、メッセージDを不正メッセージと判定し、不正メッセージを検知した旨を示す検知結果を通信処理部51へ出力する。
 通信処理部51は、検知部54から検知結果を受けて、バス13において不正メッセージが伝送されていることを示す警報情報を車両1内または車両1外における上位装置へ送信する。
 [変形例1]
 検知部54は、検知結果の修正処理を行った後、過渡状態に遷移し、過渡状態において、監視部52によって監視されたメッセージであって、同じ識別情報が付されたメッセージの中で、時間的に連続して受信されたメッセージの受信間隔、およびシーケンス番号に基づいて不正メッセージを検知する構成であってもよい。より詳細には、検知部54は、周期メッセージDを正当メッセージと判定し直した後、遷移通知をカウンタ部53へ出力する。
 カウンタ部53は、検知部54から遷移通知を受けて、カウンタ値を「無し」に設定する。すなわち、検知部54は、過渡状態において、不正メッセージの判定にカウンタ値を用いない。
 その後、ゲートウェイ装置101は、周期メッセージDから1周期後にメッセージEを受信する。検知部54は、受信したメッセージEと周期メッセージDとの受信間隔から、メッセージEを周期メッセージと判定し、かつ正当メッセージと判定する。
 検知部54は、過渡状態において正当メッセージと判定した周期メッセージEのシーケンス番号を記憶部55から取得し、周期メッセージEのシーケンス番号を示すシーケンス番号情報をカウンタ部53へ出力する。
 カウンタ部53は、検知部54からシーケンス番号情報を受けて、シーケンス番号情報が示すシーケンス番号の値を1つ増加させた「03」を新たにカウンタ値として設定し、過渡状態を解除する。
 一方、ゲートウェイ装置101が、検知部54が過渡状態であるときに、不正メッセージを受信した場合は、次のような処理を行う。
 図12は、本開示の第2の実施の形態に係るゲートウェイ装置において、受信したメッセージが不正メッセージであると判定する場合の一例を示す図である。図12では、図11に示す場合において検知部が過渡状態であるときにシーケンス番号「03」の不正メッセージIを受信する場合を示している。
 図12を参照して、ゲートウェイ装置101は、周期メッセージDから1周期経過する前にメッセージIを受信する。検知部54は、受信したメッセージIと周期メッセージDとの受信間隔から、メッセージIをイベントメッセージと判定する。
 検知部54は、イベントメッセージと判定したメッセージIおよび前回受信した周期メッセージDのシーケンス番号を記憶部55から取得する。検知部54は、取得したメッセージIおよび周期メッセージDのシーケンス番号を比較し、シーケンス番号とカウンタ値とが異なる値の場合、受信したメッセージIを正当メッセージと判定し、シーケンス番号とカウンタ値とが同じ値の場合、受信したメッセージIを不正メッセージと判定する。本例では、メッセージIおよびメッセージDのシーケンス番号は異なる値である。したがって、検知部54は、不正メッセージであるメッセージIを正当メッセージと判定する。
 検知部54は、過渡状態において正当メッセージと判定したメッセージIのシーケンス番号を示すシーケンス番号情報をカウンタ部53へ出力する。
 カウンタ部53は、検知部54からシーケンス番号情報を受けて、シーケンス番号情報が示すシーケンス番号の値を1つ増加させた「04」を新たにカウンタ値として設定し、過渡状態を解除する。
 その後、ゲートウェイ装置101は、周期メッセージEを受信する。この周期メッセージEは、制御装置122Aから周期メッセージDの次に送信された周期メッセージであるため、イベントメッセージDと同じシーケンス番号「02」を有している。しかしながら、検知部54は、周期メッセージEと前回受信した不正メッセージIとの受信間隔が所定の送信周期未満であるため、周期メッセージEをイベントメッセージと判定する。そして、検知部54は、カウンタ部53のカウンタ値が「04」であり、周期メッセージEのシーケンス番号とカウンタ値とが一致しないため、本来正当メッセージである周期メッセージEを不正メッセージであると仮判定する。
 次に、検知部54は、上述と同様に、周期メッセージEを不正メッセージとした検知結果の妥当性を判定する。すなわち、検知部54は、不正メッセージと判定された周期メッセージEと同じシーケンス番号「02」を有するメッセージであって最も新しいメッセージである周期メッセージDとの受信間隔が、上述した許容値未満であるか否かを判定する。
 本例では、周期メッセージEと周期メッセージDとの受信間隔は、所定の送信周期と一致する。そのため、検知部54は、メッセージEを不正メッセージとする検知結果を修正し、メッセージEを正当メッセージと判定する。
 検知部54は、検知結果を修正すると、メッセージEよりも前に不正メッセージを受信していると判定し、不正メッセージを検知した旨を示す検知結果を通信処理部51へ出力し、再び過渡状態へ遷移する。
 [動作の流れ]
 図13および図14は、本開示の第2の実施の形態に係る車載通信システムにおいてゲートウェイ装置が検知処理を行う際の動作手順の一例を定めたフローチャートである。図13および図14は、ある同一のメッセージIDを有するメッセージに対する検知処理を示しており、他のメッセージIDを有するメッセージについても同様の検知処理が行われる。
 図13を参照して、まず、ゲートウェイ装置101は、車載通信システム301における周期メッセージおよびイベントメッセージを監視し、周期メッセージおよびイベントメッセージの受信時刻を取得する(ステップS301)。
 次に、ゲートウェイ装置101は、検知部54が過渡状態であるか否かを確認し、過渡状態でない場合(ステップS302でNO)、今回受信したメッセージおよび前回受信したメッセージの受信間隔が所定の送信周期と一致するか否かを判定する。ゲートウェイ装置101は、メッセージの受信間隔が所定の送信周期と一致する場合(ステップS303でYES)、受信したメッセージが周期メッセージであり、かつ、正当メッセージであると判定する(ステップS304)。
 次に、ゲートウェイ装置101は、受信したメッセージの受信時刻を記憶部55に保存し(ステップS305)、車載通信システム301における周期メッセージおよびイベントメッセージの監視を継続する(ステップS301)。
 一方、ゲートウェイ装置101は、メッセージの受信間隔が所定の送信周期と一致しない場合(ステップS303でNO)、受信したメッセージがイベントメッセージであると判定し、当該メッセージのシーケンス番号およびカウンタ部53におけるカウンタ値を取得する。ゲートウェイ装置101は、取得したシーケンス番号とカウンタ値とを比較し、シーケンス番号とカウンタ値とが一致する場合(ステップS306でYES)、カウンタ部53のカウンタ値を1つ増加させ(ステップS307)、受信したメッセージを正当メッセージと判定する(ステップS304)。
 一方、ゲートウェイ装置101は、取得したシーケンス番号とカウンタ値とが一致しない場合(ステップS306でNO)、受信したメッセージを不正メッセージと仮判定する(ステップS308)。
 次に、ゲートウェイ装置101は、不正メッセージと仮判定した第3のメッセージと当該メッセージと同じシーケンス番号を有する最新のメッセージである第4のメッセージとの受信間隔が、周期メッセージの許容値未満であるか否かを判定する。ゲートウェイ装置101は、第3のメッセージと第4のメッセージとの受信間隔が周期メッセージの許容値未満である場合(ステップS309でYES)、仮判定で不正メッセージとした第3のメッセージについての検知結果を修正し、第3のメッセージを正当メッセージと判定する(ステップS310)。
 次に、ゲートウェイ装置101は、検知結果を修正すると、第3のメッセージよりも前に不正メッセージを受信していると判定し、バス13において不正メッセージが伝送されている旨を示す警報情報を車両1内または車両1外における上位装置へ送信する(ステップS311)。
 次に、ゲートウェイ装置101における検知部54は、過渡状態へ遷移し(ステップS312)、受信したメッセージの受信時刻を記憶部55に保存し(ステップS305)、車載通信システム301における周期メッセージおよびイベントメッセージの監視を継続する(ステップS301)。
 一方、ゲートウェイ装置101は、第3のメッセージと第4のメッセージとの受信間隔が周期メッセージの許容値以上である場合(ステップS309でNO)、仮判定で不正メッセージとした第3のメッセージについての検知結果を維持し、第3のメッセージを正式に不正メッセージと判定する(ステップS313)。
 次に、ゲートウェイ装置101は、バス13において不正メッセージが伝送されている旨を示す警報情報を車両1内または車両1外における上位装置へ送信し(ステップS314)、車載通信システム301における周期メッセージおよびイベントメッセージの監視を継続する(ステップS301)。
 一方、ゲートウェイ装置101は、検知部54が過渡状態である場合(ステップS302でYES)、今回受信したメッセージおよび前回受信したメッセージの受信間隔が所定の送信周期と一致するか否かを判定する。
 図14を参照して、ゲートウェイ装置101は、メッセージの受信間隔が所定の送信周期と一致する場合(ステップS315でYES)、受信したメッセージが周期メッセージであり、かつ、正当メッセージであると判定する(ステップS316)。
 次に、ゲートウェイ装置101は、受信したメッセージのシーケンス番号を記憶部55から取得し、シーケンス番号を1つ増加させた値をカウンタ部53におけるカウンタ値として設定し、過渡状態を解除する(ステップS317)。
 次に、ゲートウェイ装置101は、受信したメッセージの受信時刻を記憶部55に保存し(ステップS318)、車載通信システム301における周期メッセージおよびイベントメッセージの監視を継続する(ステップS301)。
 一方、ゲートウェイ装置101は、メッセージの受信間隔が所定の送信周期と一致しない場合(ステップS315でNO)、受信したメッセージがイベントメッセージであると判定し、当該メッセージのシーケンス番号および前回受信したメッセージのシーケンス番号を記憶部55から取得する。ゲートウェイ装置101は、取得したシーケンス番号同士を比較し、両シーケンス番号が一致しない場合(ステップS319でNO)、受信したメッセージを正当メッセージと判定する(ステップS316)。
 一方、ゲートウェイ装置101は、取得した両シーケンス番号が一致する場合(ステップS319でYES)、受信したメッセージを不正メッセージと判定し(ステップS320)、車載通信システム301における周期メッセージおよびイベントメッセージの、過渡状態での監視を継続する(ステップS301)。
 なお、ゲートウェイ装置101の検知部54は、過渡状態へ遷移しない構成であってもよい。具体的には、検知部54は、図13および図14に示す例において、ステップS302、S312、およびS315~S320の処理を行わない構成であってもよい。
 [変形例2]
 上述の説明では、検知部54は、検知結果の修正処理を行った後、過渡状態に遷移する場合について説明した。しかしながら、検知部54は、過渡状態に遷移しない構成であってもよい。
 より詳細には、検知部54は、検知結果の修正処理を行った後、修正完了通知をカウンタ部53へ出力する。カウンタ部53は、検知部54から修正完了通知を受けて、カウンタ値を1つ前の値に戻す。たとえば、図11に示す例において、不正メッセージと仮判定したメッセージDの検知結果を修正した後、カウンタ部53は、カウンタ値を現在の値である「04」から1つ前の値である「03」に設定する。
 カウンタ値をこのように設定し直すことで、検知部54が過渡状態に遷移しない場合であっても、後に受信する周期メッセージD,EおよびイベントメッセージFを正当メッセージとして受信することができる。
 [変形例3]
 上述の説明では、制御装置122Aが最初に送信するメッセージのシーケンス番号は「01」、カウンタ部53のカウンタ値の初期値は「02」である場合について説明した。しかしながら、制御装置122Aが最初に送信するメッセージのシーケンス番号およびカウンタ部53のカウンタ値の初期値はこれに限定されず、他の値であってよい。
 また、上述の説明では、検知部54は、メッセージのシーケンス番号とカウンタ値とが一致する場合に当該メッセージを正当メッセージと判定する場合について説明した。しかしながら、検知部54は、たとえば、メッセージのシーケンス番号とカウンタ値との差分が所定の値である場合に当該メッセージを正当メッセージと判定してもよい。
 また、上述の説明では、メッセージのシーケンス番号およびカウンタ値は、1ずつ値が増加する場合について説明した。しかしながら、メッセージのシーケンス番号およびカウンタ値は、他の値の単位で増加または減少してもよいし、規則性を持って変更されてもよい。
 <第3の実施の形態>
 本実施の形態は、第1の実施の形態に係る車載通信システム301と比べて不正メッセージの検知方法を変更した車載通信システムに関する。以下で説明する内容以外は第1の実施の形態に係る車載通信システムと同様である。
 図15は、本開示の第3の実施の形態に係るゲートウェイ装置において、受信したメッセージが不正メッセージであると判定する場合の一例を示す図である。図15では、ゲートウェイ装置が不正メッセージF,G,Hを受信する場合を示している。
 図15を参照して、制御装置122Aが最初に送信する周期メッセージAにはシーケンス番号「01」が付されている。メッセージには、周期メッセージおよびイベントメッセージが送信される毎に変更されるシーケンス番号が付されている。
 ゲートウェイ装置101におけるカウンタ部53のカウンタ値の初期値は、「02」に設定されている。カウンタ部53は、ゲートウェイ装置101が周期メッセージおよびイベントメッセージをそれぞれ受信したときにカウンタ値を変更し、記憶部55に保存する。
 また、カウンタ部53は、カウンタ値に加えて連続イベントカウンタ値を有している。連続イベントカウンタ値の初期値は、「0」に設定されている。カウンタ部53は、ゲートウェイ装置101がイベントメッセージを受信したときに連続イベントカウンタ値を変更し、記憶部55に保存する。
 監視部52は、車載通信システム301において、周期的に送信される周期メッセージ、および不定期にかつ周期メッセージの送信周期よりも短い間隔で2つ以上連続して送信されるイベントメッセージを監視する。
 より詳細には、監視部52は、通信処理部51によって中継されるメッセージを監視することにより、周期メッセージの受信時刻およびイベントメッセージの受信時刻を取得する。
 監視部52は、たとえば、中継処理を行うべき周期メッセージまたはイベントメッセージを通信処理部51が受信すると、通信処理部51によって受信されたメッセージに含まれるメッセージID、ならびに予め記憶部55に保存されている周期メッセージのメッセージIDおよびイベントメッセージのメッセージIDを確認する。
 そして、監視部52は、通信処理部51によって受信されたメッセージに含まれるメッセージIDが記憶部55に保存されているメッセージIDと一致する場合、通信処理部51によって受信されたメッセージが中継処理を行うべきメッセージであると認識し、当該メッセージに付与されたタイムスタンプを参照することにより、メッセージの受信時刻を取得する。
 監視部52は、受信時刻を取得すると、取得した受信時刻を示す受信情報を、シーケンス番号と対応付けて検知部54へ出力する。
 検知部54は、監視部52による監視結果に基づいて、連続して送信されたイベントメッセージの数をカウントし、カウント結果に基づいて不正メッセージを検知する。
 より詳細には、検知部54は、監視部52から受信情報を受けて、前回受信したメッセージの受信時刻および周期メッセージの所定の送信周期を記憶部55から取得する。検知部54は、受信情報が示す受信時刻および取得した受信時刻に基づき、今回受信したメッセージと前回受信したメッセージとの受信間隔を算出する。
 検知部54は、算出した受信間隔が所定の送信周期と一致するか否かを判定する。検知部54は、受信間隔が所定の送信周期と一致しない場合、受信したメッセージをイベントメッセージと判定し、受信間隔が所定の送信周期と一致する場合、受信したメッセージを周期メッセージと判定する。
 具体的には、検知部54は、受信間隔が所定の送信周期と一致するメッセージAおよびBについては、周期メッセージと判定する。検知部54は、メッセージBから所定の送信周期未満の間隔で送信されたメッセージCについては、イベントメッセージと判定する。検知部54は、周期メッセージまたはイベントメッセージを受信すると、メッセージの種別を示す種別情報をカウンタ部53へ出力する。
 カウンタ部53は、検知部54から種別情報を受けると、種別情報に示されるメッセージの種別に関わらず、カウンタ値を1つ増加させる。カウンタ部53は、種別情報に示されるメッセージの種別がイベントメッセージである場合、連続イベントカウンタ値を1つ増加させる。カウンタ部53は、種別情報に示されるメッセージの種別が周期メッセージである場合、連続イベントカウンタ値を「0」に設定する。
 ここで、図15に示す例において、ゲートウェイ装置101が、正当メッセージである周期メッセージA,BおよびイベントメッセージCを受信した後、イベントメッセージになりすました不正メッセージFを受信する場合について説明する。
 ゲートウェイ装置101がイベントメッセージCを受信した後、カウンタ部53におけるカウンタ値は「04」、連続イベントカウンタ値は「1」となっている。
 検知部54は、不正メッセージFのシーケンス番号が前回受信したイベントメッセージCのシーケンス番号よりも1つ増えた「04」である場合、シーケンス番号とカウンタ値とが一致するため、不正メッセージFを正当メッセージと判定する。そして、カウンタ部53におけるカウンタ値は「05」、連続イベントカウンタ値は「2」に設定される。
 次に、ゲートウェイ装置101は、イベントメッセージCから1周期遅れた周期メッセージになりすました不正メッセージGを受信する。検知部54は、不正メッセージGのシーケンス番号は「05」であるため、不正メッセージGを正当メッセージと判定する。また、検知部54は、不正メッセージGと前回受信した不正メッセージFとの受信間隔が所定の送信周期未満であるため、不正メッセージGをイベントメッセージと判定する。この場合、カウンタ部53におけるカウンタ値は「06」、連続イベントカウンタ値は「3」に設定される。
 ここで、ゲートウェイ装置101の記憶部55には、予め連続イベントカウンタ値の上限値が登録されている。本例では、たとえば、連続イベントカウンタ値の上限値は「2」であるとする。ただし、連続イベントカウンタ値の上限値は、これに限定されず、適宜設定される。
 検知部54は、イベントメッセージを受信する毎に、連続イベントカウンタ値の上限値を示す制限情報を記憶部55から取得する。検知部54は、不正メッセージGをイベントメッセージと判定するとともに、制限情報および連続イベントカウンタ値を記憶部55から取得し、比較する。
 検知部54は、記憶部55から取得した連続イベントカウンタ値「3」が連続イベントカウンタ値の上限値「2」を超えているため、不正メッセージGの前に不正メッセージを受信したと判定し、不正メッセージを検知した旨を示す検知結果を通信処理部51へ出力する。
 通信処理部51は、検知部54から検知結果を受けて、バス13において不正メッセージが伝送されていることを示す警報情報を車両1内または車両1外における上位装置へ送信する。
 [動作の流れ]
 図16は、本開示の第3の実施の形態に係る車載通信システムにおいてゲートウェイ装置が検知処理を行う際の動作手順の一例を定めたフローチャートである。図16は、ある同一のメッセージIDを有するメッセージに対する検知処理を示しており、他のメッセージIDを有するメッセージについても同様の検知処理が行われる。
 図16を参照して、まず、ゲートウェイ装置101は、車載通信システム301における周期メッセージおよびイベントメッセージを監視し、周期メッセージおよびイベントメッセージの受信時刻を取得する(ステップS401)。
 次に、ゲートウェイ装置101は、受信した周期メッセージまたはイベントメッセージのシーケンス番号およびカウンタ部53におけるカウンタ値を取得する。ゲートウェイ装置101は、取得したシーケンス番号とカウンタ値とを比較し、シーケンス番号とカウンタ値とが一致しない場合(ステップS402でNO)、受信したメッセージを不正メッセージと判定する(ステップS403)。
 次に、ゲートウェイ装置101は、バス13において不正メッセージが伝送されている旨を示す警報情報を車両1内または車両1外における上位装置へ送信し(ステップS404)、車載通信システム301における周期メッセージおよびイベントメッセージの監視を継続する(ステップS401)。
 一方、ゲートウェイ装置101は、取得したシーケンス番号とカウンタ値とが一致する場合(ステップS402でYES)、今回受信したメッセージと前回受信したメッセージ、すなわち受信したメッセージよりも1カウント前のシーケンス番号を有するメッセージとの受信間隔が、所定の送信周期と一致するか否かを判定する。ゲートウェイ装置101は、受信間隔が所定の送信周期と一致する場合(ステップS405でYES)、受信したメッセージを正当メッセージと判定する(ステップS406)。
 次に、ゲートウェイ装置101は、カウンタ部53の連続イベントカウンタ値を「0」に設定し(ステップS407)、車載通信システム301における周期メッセージおよびイベントメッセージの監視を継続する(ステップS401)。
 一方、ゲートウェイ装置101は、受信間隔が所定の送信周期と一致しない場合(ステップS405でNO)、連続イベントカウンタ値および連続イベントカウンタ値の上限値を記憶部55から取得し、比較する。ゲートウェイ装置101は、取得した連続イベントカウンタ値が上限値よりも大きい場合(ステップS408でYES)、受信したメッセージを不正メッセージと判定する(ステップS409)。
 次に、ゲートウェイ装置101は、バス13において不正メッセージが伝送されている旨を示す警報情報を車両1内または車両1外における上位装置へ送信し(ステップS410)、車載通信システム301における周期メッセージおよびイベントメッセージの監視を継続する(ステップS401)。
 一方、ゲートウェイ装置101は、取得した連続イベントカウンタ値が上限値以下の場合(ステップS408でNO)、受信したメッセージを正当メッセージと判定し(ステップS411)、車載通信システム301における周期メッセージおよびイベントメッセージの監視を継続する(ステップS401)。
 [変形例]
 図17は、本開示の第3の実施の形態の変形例に係る車載通信システムにおいて、受信したメッセージが不正メッセージであると判定する場合の一例を示す図である。図17では、ゲートウェイ装置が不正メッセージF,G,Hを受信する場合を示している。
 図17を参照して、図15に示す例において、メッセージには、周期メッセージが送信される場合には変更されず、イベントメッセージが送信される毎に変更されるシーケンス番号が付される構成であってもよい。
 この場合、ゲートウェイ装置101が不正メッセージGを受信した後、カウンタ部53における連続イベントカウンタ値は「3」となり、上限値を超える。したがって、検知部54は、このような構成であっても不正メッセージを検知することができる。
 本開示の第3の実施の形態に係るゲートウェイ装置101では、検知部54が、連続して送信されたイベントメッセージの数をカウントし、カウント結果に基づいて不正メッセージを検知する。これにより、たとえば、ゲートウェイ装置101のカウンタ値にシーケンス番号を合わせた不正なイベントメッセージが送信されたとしても、不正メッセージを容易に検知することができる。したがって、車載通信システム301における不正メッセージをより正しく検知することができる。
 上記実施の形態は、すべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記説明ではなく請求の範囲によって示され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。
 たとえば、上述の第1~第3の実施の形態に係る車載通信システム301では、ゲートウェイ装置101が、車載ネットワーク12においてある制御装置122Aが他の制御装置へメッセージを直接送信する構成について説明した。しかしながら、車載通信システム301では、制御装置122Aが送信したメッセージをゲートウェイ装置101が中継する構成であってもよい。具体的には、図1を参照して、ゲートウェイ装置101は、バス13を介してバス接続装置群121(制御装置122A)からメッセージを受信し、車載通信機111へバス14を介して送信する構成であってもよい。この場合、ゲートウェイ装置101における通信処理部51は、制御装置122Aから対応のバス13経由でメッセージを受信すると、監視部52および検知部54へメッセージ受信通知を出力する。そして、監視部52は、通信処理部51によって受信されたメッセージに含まれるメッセージIDが記憶部55に保存されているメッセージIDと一致する場合、通信処理部51によって受信されたメッセージが中継処理を行うべきメッセージであると認識し、当該メッセージに付与されたタイムスタンプを参照することにより、メッセージの受信時刻を取得する。
 たとえば、上述の第1~第3の実施の形態に係る車載通信システム301では、ゲートウェイ装置101が車載通信システム301における不正メッセージを検知する構成について説明した。しかしながら、車載通信システム301では、ゲートウェイ装置101とは別の検知装置が、車載通信システム301における不正メッセージを検知する構成であってもよい。
 また、上述の第1~第3の実施の形態に係る車載通信システム301では、検知装置であるゲートウェイ装置101が、メッセージを送信する制御装置122Aおよびメッセージを受信する制御装置122Bとは別に設けられる構成について説明した。しかしながら、検知装置は、メッセージを送信する車載装置またはメッセージを受信する車載装置に含まれる構成であってもよい。
 また、上述の第1~第3の実施の形態に係る車載通信システム301では、検知装置として機能するゲートウェイ装置101がバス13に直接接続される構成について説明した。しかしながら、車載通信システム301は、これに限定されるものではない。
 図18は、本開示の実施の形態に係る車載通信システム301の接続トポロジの一例を示す図である。
 図18を参照して、検知装置151が、車載装置たとえば制御装置122を介してバス13に接続される構成であってもよい。この場合、検知装置151は、たとえば、当該車載装置が送受信するメッセージを監視することにより、バス13に伝送される不正メッセージを検知する。なお、検知装置151は、たとえばイーサネットまたはCANの規格に従うバスを介して車載装置と接続される。
 検知装置151の動作は、第1および第2の実施の形態に係る車載通信システム301におけるゲートウェイ装置101と同様である。たとえば、検知装置151の検知部54は、制御装置122が送信する周期メッセージおよびイベントメッセージのシーケンス番号とカウンタ値とを比較し、比較結果に基づいて不正メッセージの検知の仮判定を行う。検知部54は、同じ識別情報が付されたメッセージの中で、シーケンス番号に関する所定条件を満たすメッセージの間隔、および周期メッセージの所定の送信周期に基づいて、不正メッセージの検知の本判定を行う。
 あるいは、検知装置151の動作は、第3の実施の形態に係る車載通信システム301におけるゲートウェイ装置101と同様である。たとえば、検知装置151の検知部54は、制御装置122から連続して送信されたイベントメッセージの数をカウントし、カウント結果に基づいて不正メッセージを検知する。
 以上の説明は、以下に付記する特徴を含む。
 [付記1]
 車載ネットワークにおける不正メッセージを検知する検知装置であって、
 前記車載ネットワークにおけるメッセージとして、送信元の識別情報およびシーケンス番号が付された、周期的に送信される周期メッセージおよび不定期に送信されるイベントメッセージを監視する監視部と、
 前記車載ネットワークから前記イベントメッセージを前記検知装置が受信すると、前記識別情報に対応するカウンタ値を変更するカウンタ部と、
 前記監視部による監視結果に基づいて、前記シーケンス番号と前記カウンタ値とを比較し、比較結果に基づいて不正メッセージの検知の仮判定を行う検知部とを備え、
 前記検知部は、同じ前記識別情報が付された前記メッセージの中で、前記シーケンス番号に関する所定条件を満たす前記メッセージの間隔、および前記周期メッセージの所定の送信周期に基づいて、前記不正メッセージの検知の本判定を行い、
 前記所定の送信周期は、前記周期メッセージの送信周期に所定のマージンを含む、検知装置。
 1     車両
 12    車載ネットワーク
 13,14 バス
 51    通信処理部
 52    監視部
 53    カウンタ部
 54    検知部
 55    記憶部
 101   ゲートウェイ装置
 111   車載通信機
 112   ポート
 121   バス接続装置群
 122,122A,122B   制御装置
 131,131A,131B,143   発振器
 132,132A,132B,141   プロセッサ
 133,133A,133B,142   CANトランシーバ
 151   検知装置
 301   車載通信システム

Claims (10)

  1.  車載ネットワークにおける不正メッセージを検知する検知装置であって、
     前記車載ネットワークにおけるメッセージとして、送信元の識別情報およびシーケンス番号が付された、周期的に送信される周期メッセージおよび不定期に送信されるイベントメッセージを監視する監視部と、
     前記車載ネットワークから前記イベントメッセージを前記検知装置が受信すると、前記識別情報に対応するカウンタ値を変更するカウンタ部と、
     前記監視部による監視結果に基づいて、前記シーケンス番号と前記カウンタ値とを比較し、比較結果に基づいて不正メッセージの検知の仮判定を行う検知部とを備え、
     前記検知部は、同じ前記識別情報が付された前記メッセージの中で、前記シーケンス番号に関する所定条件を満たす前記メッセージの間隔、および前記周期メッセージの所定の送信周期に基づいて、前記不正メッセージの検知の本判定を行う、検知装置。
  2.  前記メッセージには、前記メッセージに付されるシーケンス番号として、前記周期メッセージおよび前記イベントメッセージが送信される毎に変更される第1のシーケンス番号が付され、
     前記カウンタ部は、前記検知装置が前記周期メッセージおよび前記イベントメッセージをそれぞれ受信したときに前記カウンタ値を変更する、請求項1に記載の検知装置。
  3.  前記間隔は、第1のメッセージと前記第1のメッセージの前記第1のシーケンス番号よりも1つ前の前記第1のシーケンス番号を有する第2のメッセージとの受信間隔である、請求項2に記載の検知装置。
  4.  前記メッセージには、前記メッセージに付されるシーケンス番号として、前記周期メッセージおよび前記イベントメッセージが送信される毎に変更される第1のシーケンス番号が付され、
     前記検知部は、前記監視結果に基づいて、前記周期メッセージの欠損を検知し、欠損した前記周期メッセージの数に基づいて、前記カウンタ値を補正し、前記第1のシーケンス番号と補正した前記カウンタ値とを比較し、比較結果に基づいて前記不正メッセージの検知の仮判定を行う、請求項1から請求項3のいずれか1項に記載の検知装置。
  5.  前記メッセージには、前記メッセージに付されるシーケンス番号として、前記周期メッセージが送信される場合には変更されず、前記イベントメッセージが送信される毎に変更される第2のシーケンス番号が付され、
     前記カウンタ部は、前記周期メッセージおよび前記イベントメッセージのうち、前記検知装置が前記イベントメッセージを受信したときに前記カウンタ値を変更する、請求項1に記載の検知装置。
  6.  前記間隔は、第3のメッセージと前記第3のメッセージの前記第2のシーケンス番号と同じ前記第2のシーケンス番号を有する第4のメッセージとの受信間隔である、請求項5に記載の検知装置。
  7.  前記検知部は、前記仮判定における不正メッセージの検知結果を前記本判定において修正した後、過渡状態に遷移し、前記過渡状態において、同じ前記識別情報が付された前記メッセージの中で、時間的に連続して受信された前記メッセージの受信間隔、および前記シーケンス番号に基づいて前記不正メッセージを検知する、請求項6に記載の検知装置。
  8.  車載ネットワークにおける不正メッセージを検知する検知装置であって、
     前記車載ネットワークにおいて、送信元の識別情報が付された、周期的に送信される周期メッセージおよび不定期にかつ前記周期メッセージの送信周期よりも短い間隔で2つ以上連続して送信されるイベントメッセージを監視する監視部と、
     前記監視部による監視結果に基づいて、同じ前記識別情報が付され、かつ、連続して送信された前記イベントメッセージの数をカウントし、カウント結果に基づいて不正メッセージを検知する検知部とを備える、検知装置。
  9.  車載ネットワークにおける不正メッセージを検知する検知装置における検知方法であって、
     前記車載ネットワークにおけるメッセージとして、送信元の識別情報およびシーケンス番号が付された、周期的に送信される周期メッセージおよび不定期に送信されるイベントメッセージを監視するステップと、
     前記車載ネットワークから前記イベントメッセージを前記検知装置が受信すると、前記識別情報に対応するカウンタ値を変更するステップと、
     監視結果に基づいて、前記シーケンス番号と前記カウンタ値とを比較し、比較結果に基づいて不正メッセージの検知の仮判定を行うステップと、
     同じ前記識別情報が付された前記メッセージの中で、前記シーケンス番号に関する所定条件を満たす前記メッセージの間隔、および前記周期メッセージの所定の送信周期に基づいて、前記不正メッセージの検知の本判定を行うステップとを含む、検知方法。
  10.  車載ネットワークにおける不正メッセージを検知する検知装置において用いられる検知プログラムであって、
     コンピュータを、
     前記車載ネットワークにおけるメッセージとして、送信元の識別情報およびシーケンス番号が付された、周期的に送信される周期メッセージおよび不定期に送信されるイベントメッセージを監視する監視部と、
     前記車載ネットワークから前記イベントメッセージを前記検知装置が受信すると、前記識別情報に対応するカウンタ値を変更するカウンタ部と、
     前記監視部による監視結果に基づいて、前記シーケンス番号と前記カウンタ値とを比較し、比較結果に基づいて不正メッセージの検知の仮判定を行う検知部、として機能させるためのプログラムであり、
     前記検知部は、同じ前記識別情報が付された前記メッセージの中で、前記シーケンス番号に関する所定条件を満たす前記メッセージの間隔、および前記周期メッセージの所定の送信周期に基づいて、前記不正メッセージの検知の本判定を行う、検知プログラム。
PCT/JP2021/032961 2020-12-25 2021-09-08 検知装置、検知方法および検知プログラム WO2022137661A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US18/265,441 US20240114028A1 (en) 2020-12-25 2021-09-08 Detection device, detection method, and detection program
CN202180080871.7A CN116530060A (zh) 2020-12-25 2021-09-08 检测装置、检测方法及检测程序
JP2022571050A JPWO2022137661A1 (ja) 2020-12-25 2021-09-08

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020216834 2020-12-25
JP2020-216834 2020-12-25

Publications (1)

Publication Number Publication Date
WO2022137661A1 true WO2022137661A1 (ja) 2022-06-30

Family

ID=82157472

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/032961 WO2022137661A1 (ja) 2020-12-25 2021-09-08 検知装置、検知方法および検知プログラム

Country Status (4)

Country Link
US (1) US20240114028A1 (ja)
JP (1) JPWO2022137661A1 (ja)
CN (1) CN116530060A (ja)
WO (1) WO2022137661A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014146868A (ja) * 2013-01-28 2014-08-14 Hitachi Automotive Systems Ltd ネットワーク装置およびデータ送受信システム
WO2015170451A1 (ja) * 2014-05-08 2015-11-12 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 車載ネットワークシステム、電子制御ユニット及び不正検知方法
US20200382528A1 (en) * 2019-05-27 2020-12-03 Industry-Academic Cooperation Foundation, Chosun University Apparatus for detecting in-vehicle external data intrusion by comparing multiple information entropy and operating method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014146868A (ja) * 2013-01-28 2014-08-14 Hitachi Automotive Systems Ltd ネットワーク装置およびデータ送受信システム
WO2015170451A1 (ja) * 2014-05-08 2015-11-12 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 車載ネットワークシステム、電子制御ユニット及び不正検知方法
US20200382528A1 (en) * 2019-05-27 2020-12-03 Industry-Academic Cooperation Foundation, Chosun University Apparatus for detecting in-vehicle external data intrusion by comparing multiple information entropy and operating method thereof

Also Published As

Publication number Publication date
JPWO2022137661A1 (ja) 2022-06-30
CN116530060A (zh) 2023-08-01
US20240114028A1 (en) 2024-04-04

Similar Documents

Publication Publication Date Title
US11538344B2 (en) Method for handling case of detecting unauthorized frame transmitted over onboard network
CN109691029B (zh) 检测装置、网关装置和检测方法
US11392683B2 (en) Detection device, detection method and recording medium
CN112823495B (zh) 检测装置、网关装置、检测方法和检测程序
JP7435616B2 (ja) 検知装置、車両、検知方法および検知プログラム
WO2021111685A1 (ja) 検知装置、車両、検知方法および検知プログラム
JP2012230516A (ja) 路側通信機、及びこれを用いた無線通信システム、異常検知方法
WO2022137661A1 (ja) 検知装置、検知方法および検知プログラム
JP2010154183A (ja) 車載無線通信装置およびキャリアセンス方法
JP7211224B2 (ja) 管理装置、通信システム、車両通信管理方法および車両通信管理プログラム
US20210392109A1 (en) Detection device, gateway device, detection method, and detection program
US20130145157A1 (en) System and method for adjusting the frequency of updating certificate revocation list
WO2021065069A1 (ja) 検知装置、車両、検知方法および検知プログラム
US11830367B2 (en) Method for handling case of detecting unauthorized frame transmitted over onboard network
CN111030908A (zh) 一种车辆内部网络系统的信息安全监控系统及方法

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022571050

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 202180080871.7

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21909819

Country of ref document: EP

Kind code of ref document: A1