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

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

Info

Publication number
WO2023002771A1
WO2023002771A1 PCT/JP2022/023421 JP2022023421W WO2023002771A1 WO 2023002771 A1 WO2023002771 A1 WO 2023002771A1 JP 2022023421 W JP2022023421 W JP 2022023421W WO 2023002771 A1 WO2023002771 A1 WO 2023002771A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
message
unit
received
unauthorized
Prior art date
Application number
PCT/JP2022/023421
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 住友電気工業株式会社
Publication of WO2023002771A1 publication Critical patent/WO2023002771A1/ja

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R16/00Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
    • B60R16/02Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
    • B60R16/023Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements for transmission of signals between vehicle parts or subsystems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks

Definitions

  • the present disclosure relates to a detection device, a detection method, and a detection program.
  • This application claims priority based on Japanese Patent Application No. 2021-120824 filed on July 21, 2021, and the entire disclosure thereof is incorporated herein.
  • Non-Patent Document 1 discloses a detection method for detecting packets that deviate from the communication sequence procedure defined by communication standards as cyberattacks. Specifically, in the detection method described in Non-Patent Document 1, according to the stateful rule, it is determined whether or not the received packet corresponds to the already received packet, and tagging is performed according to the determination result. , according to the stateless rule, determine whether the packet is a cyberattack based on the packet information and the tag.
  • a detection device of the present disclosure is a detection device that detects an unauthorized packet in an in-vehicle network, and includes a relay unit that relays packets between in-vehicle devices in the in-vehicle network, and a reception route for the packet received by the relay unit.
  • a route acquisition unit that acquires information, consistency between the first packet received by the relay unit and the second packet received by the relay unit, and acquired by the route acquisition unit, a processing unit that performs detection processing for detecting the unauthorized packet based on the reception path information about the first packet, wherein the reception path information is a source port that is a physical port through which the packet has passed; , a source address of the packet, and the second packet is the packet received by the relay unit before the first packet is received, and the packet corresponding to the first packet is.
  • One aspect of the present disclosure can be implemented not only as a detection device including such a characteristic processing unit, but also as a semiconductor integrated circuit that implements part or all of the detection device, or can be implemented as a semiconductor integrated circuit that includes the detection device. It can be implemented as a detection system.
  • FIG. 1 is a diagram showing the configuration of an in-vehicle network according to an embodiment of the present disclosure.
  • FIG. 2 is a diagram for explaining functions of SOME/IP used in an in-vehicle network according to an embodiment of the present disclosure.
  • FIG. 3 is a diagram for explaining functions of SOME/IP used in the in-vehicle network according to the embodiment of the present disclosure.
  • FIG. 4 is a diagram showing a configuration of a gateway device according to an embodiment of the present disclosure;
  • FIG. 5 is a diagram illustrating an example of an address table in the storage unit of the gateway device according to the embodiment of the present disclosure;
  • FIG. 6 is a diagram illustrating an example of a type table in the storage unit of the gateway device according to the embodiment of the present disclosure;
  • FIG. 1 is a diagram showing the configuration of an in-vehicle network according to an embodiment of the present disclosure.
  • FIG. 2 is a diagram for explaining functions of SOME/IP used in an in-vehicle network according
  • FIG. 7 is a diagram illustrating an example of a packet management table in the storage unit of the gateway device according to the embodiment of the present disclosure
  • FIG. 8 is a diagram for explaining states between a client and a server in an in-vehicle network according to the embodiment of the present disclosure.
  • FIG. 9 is a diagram illustrating an example of a state management table in the storage unit of the gateway device according to the embodiment of the present disclosure.
  • FIG. 10 is a diagram illustrating an example of a state transition table in the storage unit of the gateway device according to the embodiment of the present disclosure;
  • FIG. 11 is a flowchart defining an example of an operation procedure when the gateway device according to the embodiment of the present disclosure performs detection processing.
  • FIG. 12 is a flowchart that defines another example of the operation procedure when the gateway device according to the embodiment of the present disclosure performs detection processing.
  • FIG. 13 is a flowchart that defines another example of the operation procedure when the gateway device according to the embodiment of the present disclosure performs detection processing.
  • FIG. 14 is a diagram illustrating an example of a defense message table in the storage unit of the gateway device according to the modification of the embodiment of the present disclosure;
  • Non-Patent Document 1 when a packet transmitted by an attacker conforms to the communication sequence procedure defined by the communication standard, the packet may not be detected as an unauthorized packet.
  • the present disclosure has been made to solve the above-mentioned problems, and its purpose is to provide a detection device, a detection method, and a detection program capable of more correctly detecting unauthorized packets in an in-vehicle network.
  • a detection device is a detection device that detects unauthorized packets in an in-vehicle network, and includes a relay unit that relays packets between in-vehicle devices in the in-vehicle network, and packets received by the relay unit.
  • a route acquisition unit for acquiring reception route information about the packet received by the relay unit; consistency between the first packet received by the relay unit and the second packet received by the relay unit; a processing unit that performs detection processing for detecting the unauthorized packet based on the reception route information about the first packet acquired by the route acquisition unit, wherein the reception route information is the route through which the packet passed.
  • a source port that is a physical port; and a source address of the packet; the second packet is the packet received by the relay unit before the first packet is received; It is the said packet corresponding to 1 packet.
  • the reception path information In comparison with the configuration in which the detection process is performed based on the consistency between the first packet and the second packet without using Malformed packets sent in can also be correctly detected. Therefore, unauthorized packets in the in-vehicle network can be detected more correctly.
  • the detection device further stores a correspondence table showing a correspondence relationship between the physical port through which the packet is routed when received by the relay unit and the address of the vehicle-mounted device.
  • a storage unit may be provided, and the processing unit compares the pair of the source port and the source address indicated by the reception path information for the first packet in the correspondence table, Whether or not the first packet is the unauthorized packet may be determined based on consistency between the one packet and the second packet.
  • the route acquisition unit may further acquire transmission route information about the packet received by the relay unit, and the transmission route information may be A destination port, which is a physical port through which the packet should pass when being relayed to the in-vehicle device by the relay unit, and a destination address of the packet may be indicated.
  • Whether or not the first packet is the unauthorized packet may be determined based on consistency with a set of the source address indicated by the route information and the destination address indicated by the transmission route information.
  • the processing unit when the processing unit detects the unauthorized packet, the processing unit performs relay processing by the relay unit and performs the unauthorized packet received by the relay unit. A process of stopping the relay process via the physical port through which the packet has passed may be performed.
  • the detection device further includes a source address of the packet received by the relay unit, and a source address of the packet received by the relay unit Registering a set of a source address of the packet received by the relay unit and a physical port through which the packet was passed when the packet was received by the relay unit in a correspondence table indicating a correspondence relationship with the physical port through which the packet passes.
  • the updating unit may update the correspondence table by updating the correspondence table, and the updating unit updates the correspondence table when the set does not match the physical port of the set to which the same source address belongs in the correspondence table. No need to update.
  • the processing unit includes, in the first packet, a stateful rule conforming to the first packet and SOME/IP (Scalable service-oriented Middleware over IP):
  • SOME/IP Scalable service-oriented Middleware over IP
  • the detection process is performed based on the consistency between the first packet and the second packet storing the message corresponding to the message stored in the first packet with respect to the sequence according to SOME/IP. can be done.
  • the processing unit may perform processing to prevent the relay unit from relaying the unauthorized packet when detecting the unauthorized packet.
  • the processing unit when detecting the malicious packet, sends a defense message corresponding to the message stored in the malicious packet to the destination of the malicious packet. Processing may be performed for transmission to the in-vehicle device or to the in-vehicle device that is the transmission source of the unauthorized packet.
  • a configuration can be adopted in which a defense message is transmitted to the in-vehicle device when the packet is determined to be an unauthorized packet. As a result, it is possible to suppress the occurrence of communication delays compared to a configuration in which the packet is relayed after it is determined in the detection process that the packet is not an unauthorized packet.
  • a detection method is a detection method in a detection device that detects an unauthorized packet in an in-vehicle network, comprising a step of receiving a packet to be relayed between in-vehicle devices in the in-vehicle network; obtaining reception path information for the received packet; consistency between the first packet received and the second packet received; and the reception path information obtained for the first packet. and performing a detection process for detecting the unauthorized packet based on the above, wherein the reception path information indicates a source port that is a physical port through which the packet has passed and a source address of the packet, and The second packet is the packet received before the reception of the first packet and the packet corresponding to the first packet.
  • a method of performing detection processing based on the consistency between the first packet and the second packet corresponding to the first packet and the reception path information about the first packet enables the detection of the reception path information.
  • Malformed packets sent in can also be correctly detected. Therefore, unauthorized packets in the in-vehicle network can be detected more correctly.
  • a detection program is a detection program that is used in a detection device that detects unauthorized packets in an in-vehicle network, and that causes a computer to relay packets between in-vehicle devices in the in-vehicle network.
  • a route acquisition unit for acquiring reception route information about the packet received by the relay unit; the first packet received by the relay unit; and the second packet received by the relay unit.
  • the reception path information In comparison with the configuration in which the detection process is performed based on the consistency between the first packet and the second packet without using Malformed packets sent in can also be correctly detected. Therefore, unauthorized packets in the in-vehicle network can be detected more correctly.
  • FIG. 1 is a diagram showing the configuration of an in-vehicle network according to an embodiment of the present disclosure.
  • in-vehicle network 12 includes a gateway device 101 and a plurality of in-vehicle ECUs (Electronic Control Units) 111 .
  • the gateway device 101 and the in-vehicle ECU 111 are examples of in-vehicle devices.
  • the gateway device 101 and the plurality of in-vehicle ECUs 111 are mounted on the vehicle 1 .
  • Each in-vehicle ECU 111 is connected to the gateway device 101 via a cable 14 .
  • the cable 14 is, for example, a cable conforming to the Ethernet (registered trademark) standard.
  • the in-vehicle ECU 111 gives instructions to various devices in an electric power steering (EPS), a brake control device, an accelerator control device, a steering control device, and an advanced driver-assistance system (ADAS). It is a driving assistance device, a sensor, or the like.
  • EPS electric power steering
  • ADAS advanced driver-assistance system
  • the gateway device 101 is, for example, a central gateway (CGW), and is capable of communicating with other in-vehicle devices.
  • the gateway device 101 relays information exchanged between a plurality of in-vehicle ECUs 111 connected to different cables 14 in the vehicle 1 . More specifically, the gateway device 101 performs relay processing for relaying packets between the in-vehicle ECUs 111 in the in-vehicle network 12 .
  • the gateway device 101 functions, for example, as a detection device and performs detection processing for detecting unauthorized packets in the in-vehicle network 12 .
  • SOME/IP is an application layer protocol of the Ethernet protocol group. More specifically, in-vehicle ECU 111 stores a message conforming to SOME/IP in one or more packets and transmits the packet to other in-vehicle ECU 111 .
  • a sensor that is the in-vehicle ECU 111 transmits sensor information regarding the running state of the vehicle 1 or the surrounding state to another in-vehicle ECU 111 that is a driving support device.
  • the sensor transmits sensor information to the driving support device as a service provision.
  • the driving support device receives sensor information provided as a service from the sensor, uses the sensor information to generate various control information regarding driving of the vehicle 1, and transmits the generated various control information to the brake control device and the steering control device.
  • Applications such as safe driving support can be realized by transmitting the data to the like.
  • the in-vehicle ECU 111 that provides services is also referred to as a "server”. Further, the in-vehicle ECU 111 that receives the provision of services is also called a "client”.
  • the server stores in one or more packets a message containing sensor information, etc. provided as a service, and transmits the packet to the client according to SOME/IP.
  • Messages sent and received between a server and a client include, for example, a service ID (identifier) (hereinafter referred to as a "service ID”) and an ID of a function or the like associated with the service (hereinafter referred to as a "method ID"). ) is included.
  • a service ID identifier
  • method ID an ID of a function or the like associated with the service
  • (Function of SOME/IP) 2 and 3 are diagrams for explaining the functions of SOME/IP used in the in-vehicle network according to the embodiment of the present disclosure.
  • the Service Discovery feature allows a client to discover a server from which a service is provided and establish a communication connection between the client and the server.
  • an in-vehicle ECU 111 when it receives a service, it multicasts a FindService (hereinafter abbreviated as "Find") message including a service ID corresponding to the service as a client.
  • the Find message includes the client ID and the like.
  • the in-vehicle ECU 111 that can provide the service corresponding to the service ID included in the Find message sends an OfferService (hereinafter referred to as "Offer") as a server indicating to start providing the service. ) message is unicast to the in-vehicle ECU 111 that is the transmission source of the Find message.
  • the Offer message includes the ID of the server and the like. This allows a communication connection to be established between the client and the server.
  • the Service Discovery feature allows the server to offer a service and establish a communication connection between the client and the server.
  • an in-vehicle ECU 111 as a server, periodically or irregularly multicasts an Offer message containing service IDs corresponding to services that it can provide.
  • the in-vehicle ECU 111 that requires the service corresponding to the service ID included in the Offer message transmits a Find message indicating a request for the service to the sender of the Offer message. unicast to the in-vehicle ECU 111 of the vehicle. This allows a communication connection to be established between the client and the server.
  • the Find message and Offer message may be sent periodically or irregularly.
  • the transmission period is predetermined according to the SOME/IP specifications, for example.
  • the transmission period is predetermined according to the SOME/IP specifications, for example.
  • the client uses the service ID obtained by Service Discovery to send a SubscribeEventgroup (hereinafter abbreviated as "subscribe") message containing the service ID to the corresponding server.
  • SubscribeEventgroup hereinafter abbreviated as "subscribe”
  • the server When the server receives the Subscribe message, it confirms the service ID included in the Subscribe message. Then, when the service ID matches a service ID corresponding to a service that can be provided, the server sends a SubscribeEventgroupAck (hereinafter abbreviated as "SubscribeAck”) message to the client indicating that the provision of the service is approved. . Then, as a service provision, the server periodically transmits a Notification message conforming to SOME/IP to the client. On the other hand, if the server does not approve the provision of the service, it sends a SubscribeEventgroupNack (hereinafter abbreviated as "SubscribeNack”) message to the client.
  • SubscribeEventgroupAck SubscribeEventgroupAck
  • the transmission cycle of the Notification message is predetermined by the manufacturer of the vehicle 1, for example.
  • StopSubscribeEventgroup hereinafter abbreviated as "StopSubscribe”
  • the server receives the StopSubscribe message, it stops sending Notification messages.
  • StopOfferService hereinafter abbreviated as "StopOffer”
  • the Notification message can be divided into a plurality of packets and transmitted. For example, if a Notification message has a data length longer than the data length that can be transmitted in one packet, the Notification message is divided into multiple TP_Notification messages. A plurality of TP_Notification messages are respectively stored in a plurality of packets and transmitted.
  • RPCs RPC functionality allows a client to request a service from a particular server.
  • the client uses the service ID obtained by Service Discovery to send a Request message containing the service ID to the corresponding server.
  • the server When the server receives a Request message, it checks the service ID included in the Request message. If the service ID matches a service ID corresponding to a service that can be provided, the server approves the provision of the service. The server then sends a Response message to the client as a service offering.
  • the Request message and Response message may be sent periodically or irregularly.
  • the transmission cycle is predetermined by the manufacturer of vehicle 1, for example.
  • the transmission cycle is predetermined by the manufacturer of the vehicle 1, for example.
  • the Request message and the Response message can be divided into multiple packets and transmitted. For example, if a Request message has a data length longer than the data length that can be transmitted in one packet, the Request message is divided into multiple TP_Request messages. A plurality of TP_Request messages are respectively stored in a plurality of packets and transmitted. Also, for example, when a Response message has a data length longer than the data length that can be transmitted in one packet, the Response message is divided into a plurality of TP_Response messages. A plurality of TP_Response messages are respectively stored in a plurality of packets and transmitted.
  • FIG. 4 is a diagram showing a configuration of a gateway device according to an embodiment of the present disclosure.
  • gateway device 101 includes N communication ports 51 , relay section 52 , packet monitoring section 53 , processing section 55 , output section 56 and storage section 57 .
  • N is an integer of 2 or more.
  • the processing unit 55 is an example of an updating unit.
  • the packet monitoring unit 53 is an example of a route acquisition unit.
  • a part or all of the relay unit 52, the packet monitoring unit 53, the processing unit 55, and the output unit 56 are implemented by, for example, a processing circuit (circuitry) including one or more processors.
  • Storage unit 57 is, for example, a nonvolatile memory.
  • the communication port 51 is a terminal to which the cable 14 can be connected.
  • the communication port 51 is connected to the in-vehicle ECU 111 via the cable 14 .
  • the communication port 51 may be a terminal of an integrated circuit.
  • the relay unit 52 performs relay processing for relaying packets between the in-vehicle ECUs 111 in the in-vehicle network 12 . More specifically, the relay unit 52 relays packets containing messages transmitted between the plurality of in-vehicle ECUs 111 in the in-vehicle network 12 . Specifically, the relay unit 52 forwards a packet received from one in-vehicle ECU 111 via the corresponding communication port 51 to another in-vehicle ECU 111 according to the destination address such as the destination IP address and the destination MAC address of the packet. Send via 51. As will be described later, the relay unit 52 may discard the received packet without relaying it to the destination in-vehicle ECU 111 according to an instruction from the processing unit 55 .
  • FIG. 5 is a diagram showing an example of an address table in the storage unit of the gateway device according to the embodiment of the present disclosure.
  • storage unit 57 stores an address table Tb1 showing the correspondence relationship between the port number of communication port 51 and the MAC address of in-vehicle ECU 111 connected to communication port 51 . That is, the address table Tb1 shows the correspondence relationship between the port number of the communication port 51 through which the packet is received by the relay unit 52 and the MAC address of the in-vehicle ECU 111 .
  • Address table Tb1 is an example of a correspondence table.
  • the processing unit 55 updates the address table Tb1 by registering a set of the source MAC address of the packet received by the relay unit 52 and the communication port 51 through which the packet was received by the relay unit 52. It is possible to
  • the relay unit 52 upon receiving a packet from a vehicle-mounted ECU 111 via the corresponding communication port 51, acquires the destination MAC address from the received packet.
  • the relay unit 52 stores the address table Tb1 in the storage unit 57 as the port number of the communication port 51 through which the packet should pass when relaying the packet to the destination in-vehicle ECU 111 (hereinafter referred to as "destination port number"). acquires the port number corresponding to the destination MAC address from Then, the relay unit 52 transmits the packet to the destination in-vehicle ECU 111 via the communication port 51 of the acquired destination port number.
  • relay unit 52 stores, among packets received from in-vehicle ECU 111 , a packet in which a message according to SOME/IP is stored in storage unit 57 before transmission to destination in-vehicle ECU 111 . Then, according to an instruction from the processing unit 55, the relay unit 52 either transmits the packet to the destination in-vehicle ECU 111 or discards the packet.
  • the relay unit 52 upon receiving a packet from an in-vehicle ECU 111 via the corresponding communication port 51, the relay unit 52 checks the payload of the received packet to determine whether the packet contains a message conforming to SOME/IP. to judge whether When relay unit 52 detects a packet in which a message conforming to SOME/IP is stored, relay unit 52 stores the packet in storage unit 57 before transmitting the packet to destination vehicle-mounted ECU 111 .
  • the relay unit 52 determines that a message conforming to SOME/IP is stored in the received packet, the port number of the communication port 51 through which the packet was received (hereinafter referred to as “transmission source port number”) and the source MAC address of the packet.
  • the relay unit 52 also acquires the destination port number corresponding to the destination MAC address of the packet from the address table Tb1 in the storage unit 57, and generates transmission route information including the acquired destination port number and destination MAC address. Then, the relay unit 52 stores the generated reception route information and transmission route information in the storage unit 57 as attributes of the packet.
  • the relay unit 52 When the relay unit 52 saves the packet in which the message according to SOME/IP is stored, the reception route information, and the transmission route information in the storage unit 57, the relay unit 52 saves a message indicating that the packet to be detected is saved in the storage unit 57. A notification is output to the packet monitoring unit 53 .
  • the packet monitoring unit 53 acquires packets received by the relay unit 52 . More specifically, packet monitoring unit 53 receives a storage notification from relay unit 52 and accesses storage unit 57 to store the SOME/IP-compliant message stored in storage unit 57 by relay unit 52 . to get packets that are
  • the packet monitoring unit 53 acquires reception route information indicating the communication port 51 through which the acquired packet was received by the relay unit 52 and the source address of the packet.
  • the packet monitoring unit 53 receives the storage notification from the relay unit 52 and acquires the reception path information from the storage unit 57.
  • the packet monitoring unit 53 further acquires transmission route information indicating the communication port 51 through which the acquired packet is relayed to the in-vehicle ECU 111 by the relay unit 52 and the destination address of the packet.
  • the packet monitoring unit 53 receives the storage notification from the relay unit 52 and acquires the transmission route information from the storage unit 57 .
  • the packet monitoring unit 53 When the packet monitoring unit 53 receives the storage notification from the relay unit 52 and acquires the packet, the reception route information, and the transmission route information from the storage unit 57, it outputs an acquisition notification indicating that the packet has been acquired to the processing unit 55.
  • the processing unit 55 checks the consistency between the packet P1 acquired by the packet monitoring unit 53 and the packet P2 received by the relay unit 52 before the packet P1 and corresponding to the packet P1, and the packet monitoring unit Based on the reception path information acquired by 53, detection processing for detecting an unauthorized packet is performed.
  • Packet P1 is an example of a first packet.
  • Packet P2 is an example of a second packet. Note that the terms "first" and "second" do not mean priority.
  • the processing unit 55 performs detection processing based on the consistency between the packet P1 and the packet P2 corresponding to the packet P1 with respect to the stateful rule according to SOME/IP, and the reception path information.
  • the processing unit 55 when the processing unit 55 receives an acquisition notification of a certain packet P1 from the packet monitoring unit 53, it acquires the message M1 from the packet P1. Then, the processing unit 55 identifies the packet P2 storing the message M2 corresponding to the message M1 with respect to the sequence conforming to SOME/IP, among the packets acquired in the past by the packet monitoring unit 53, and identifies the packet P2 as the identified packet P2. Check consistency with packet P1.
  • FIG. 6 is a diagram showing an example of a type table in the storage unit of the gateway device according to the embodiment of the present disclosure.
  • storage unit 57 stores the type of message stored in the packet received by relay unit 52 in gateway device 101, the address type of the destination IP address of the packet, and the message corresponding to the message. It stores a type table Tb2 showing the correspondence with the type. “Address type of destination IP address” indicates whether the destination IP address is a multicast address or a unicast address. For example, type table Tb2 shows the correspondence between two messages based on the SOME/IP sequence.
  • FIG. 7 is a diagram showing an example of a packet management table in the storage unit of the gateway device according to the embodiment of the present disclosure.
  • storage unit 57 stores, for each service ID, the correspondence relationship between the message type stored in the packet acquired by packet monitoring unit 53 and the reception route information and transmission route information of the packet.
  • the processing unit 55 When the processing unit 55 receives the acquisition notification of the packet P1 from the packet monitoring unit 53, it acquires the message M1 and the destination IP address from the packet P1. The processing unit 55 acquires the type Ty1 of the message M1 from the "message type" field of the acquired message M1. Then, the processing unit 55 searches the type table Tb2 of the storage unit 57 for the type Ty2 corresponding to the acquired type Ty1 and the address type of the destination IP address.
  • type Ty1 is "Find message” and the address type of the destination IP address of packet P1 is "unicast address” or "multicast address", there is no corresponding type Ty2 in type table Tb2.
  • the processing unit 55 registers the service ID and type Ty1 of the message M1 and the reception route information and transmission route information of the packet P1 in the packet management table Tb3 in the storage unit 57.
  • the processing unit 55 also outputs a transmission instruction to the relay unit 52 to transmit the packet P1.
  • the processing unit 55 acquires the type Ty2. Specifically, when the type Ty1 is an "Offer message" and the address type of the destination IP address of the packet P1 is a "unicast address", the processing unit 55 acquires a "Find message” as the type Ty2. .
  • the processing unit 55 refers to the packet management table Tb3, and among the packets acquired in the past by the packet monitoring unit 53, the packet P2 in which the message M2 of type Ty2 including the same service ID as the message M1 is stored. , and compares the source MAC address of packet P1 and the destination MAC address of packet P2, for example, to determine consistency between packets P1 and P2.
  • the processing unit 55 determines whether or not the packet P1 is an unauthorized packet based at least on the result of determining the consistency between the packets P1 and P2 and the reception path information. Details of the process of determining whether the packet P1 is an unauthorized packet will be described below as a specific example 1-3 of the detection process.
  • the processing unit 55 sets the pair of the source port number indicated by the reception path information for the packet P1 and the destination port number indicated by the transmission path information, and the source port number and the transmission path information indicated by the reception path information for the packet P2. Consistency with a set of destination port numbers, a set of the source MAC address indicated by the reception path information for packet P1 and the destination MAC address indicated by the transmission path information, and the source MAC address indicated by the reception path information for packet P2 And based on the consistency with the set of destination MAC addresses indicated by the transmission route information, it is determined whether or not the packet P1 is an unauthorized packet.
  • the processing unit 55 acquires the reception route information and the transmission route information corresponding to the service ID and type Ty2 of the message M1 as the reception route information and the transmission route information of the packet P2 from the packet management table Tb3. Also, the processing unit 55 acquires the reception route information and the transmission route information of the packet P1 from the storage unit 57 .
  • the processing unit 55 compares the reception route information of the packet P1 and the transmission route information of the packet P2, and also compares the transmission route information of the packet P1 and the reception route information of the packet P2.
  • the processing unit 55 determines that the source port number of packet P1 and the destination port number of packet P2 match, the destination port number of packet P1 and the source port number of packet P2 match, and the source port number of packet P1 If the MAC address and the destination MAC address of packet P2 match, and if the destination MAC address of packet P1 and the source MAC address of packet P2 match, it is determined that packet P1 is not an unauthorized packet.
  • the processing unit 55 determines whether the source port number of the packet P1 and the destination port number of the packet P2 do not match, or the destination port number of the packet P1 and the source port number of the packet P2 do not match. If the source MAC address and the destination MAC address of the packet P2 do not match, or if the destination MAC address of the packet P1 and the source MAC address of the packet P2 do not match, the packet P1 is determined to be an illegal packet.
  • the processing unit 55 fails to obtain the reception route information and the transmission route information of the packet P2 from the packet management table Tb3, that is, the packet If the reception route information and transmission route information of P2 are not registered, it is determined that packet P1 is an unauthorized packet.
  • processing unit 55 determines that the packet P1 is not an unauthorized packet, the processing unit 55 outputs a transmission instruction to the relay unit 52 to transmit the packet P1.
  • the relay unit 52 Upon receiving a transmission instruction from the processing unit 55, the relay unit 52 acquires the packet P1 from the storage unit 57 and transmits the acquired packet P1 to the destination in-vehicle ECU 111 via the communication port 51 having the destination port number.
  • the processing unit 55 determines that the packet P1 is not an illegal packet and the type Ty1 of the message M1 is a "StopOffer message” or a "StopSubscribe message", the processing unit 55 determines that the message M1 Delete the information corresponding to the service ID.
  • the type Ty1 of the message M1 is a type other than "StopOffer message” and "StopSubscribe message”, and the information corresponding to the service ID of the message M1 is packet If not registered in the management table Tb3, information corresponding to the service ID of the message M1 is registered in the packet management table Tb3.
  • the processing unit 55 When detecting an unauthorized packet, the processing unit 55 performs processing to prevent the relay unit 52 from relaying the unauthorized packet. More specifically, when the processing unit 55 determines that the packet P1 is an unauthorized packet, the processing unit 55 outputs a discard instruction to the relay unit 52 to discard the packet P1.
  • the relay unit 52 Upon receiving a discard instruction from the processing unit 55, the relay unit 52 deletes the packet P1 from the storage unit 57.
  • the processing unit 55 determines that the packet P1 is an unauthorized packet, the pair of the source port number indicated by the reception path information about the packet P1 and the source MAC address of the packet P1 and the reception path information about the packet P2 are Log information is created that indicates the combination of the indicated source port number and the source MAC address of the packet P2.
  • the processing unit 55 stores the created log information in the storage unit 57 and outputs it to the output unit 56 .
  • the output unit 56 Upon receiving the log information from the processing unit 55, the output unit 56 transmits, for example, alarm information indicating that an unauthorized packet has been detected and log information to the user's terminal or the like. Specifically, output unit 56 transmits alarm information and log information to in-vehicle ECU 111 having a wireless communication function via relay unit 52 and corresponding communication port 51 . The in-vehicle ECU 111 transmits the alarm information and log information received from the gateway device 101 to the user's terminal or the like.
  • the processing unit 55 When the processing unit 55 detects an unauthorized packet, the processing unit 55 stops the relay processing by the relay unit 52, which is the relay processing via the communication port 51 through which the unauthorized packet was received by the relay unit 52. . More specifically, the processing unit 55 outputs to the relay unit 52 a blocking instruction indicating the source port number of the packet P1.
  • the relay unit 52 Upon receiving the blocking instruction from the processing unit 55, the relay unit 52 blocks the communication port 51 of the source port number indicated by the received blocking instruction. Specifically, the relay unit 52 stops receiving packets from the communication port 51 .
  • the processing unit 55 checks the combination of the source port number and the source MAC address indicated by the reception path information of the packet P1 in the address table Tb1 of the storage unit 57 . Then, the processing unit 55 determines whether or not the packet P1 is an unauthorized packet based on the collation result and the consistency between the packets P1 and P2.
  • the processing unit 55 acquires the reception route information of the packet P1 from the storage unit 57.
  • the processing unit 55 acquires the port number corresponding to the source MAC address indicated by the reception path information of the packet P1 from the address table Tb1 in the storage unit 57, and the acquired port number and the reception path information of the packet P1 are Check if the indicated source port number matches.
  • the processing unit 55 also acquires the type of message (hereinafter referred to as "type Ty3") corresponding to the service ID of the message M1 from the packet management table Tb3, and compares the acquired type Ty3 and type Ty2.
  • type Ty3 the type of message
  • the processing unit 55 determines that the packet P1 is invalid. Judge that it is not a packet.
  • the processing unit 55 determines that the packet P1 is not an unauthorized packet, the processing unit 55 performs processing such as "packet transmission" described above.
  • the processing unit 55 transfers the packet P1 to Judged as an illegal packet.
  • the processing unit 55 determines that the packet P1 is an unauthorized packet, the processing unit 55 performs processing such as "discarding the packet" described above.
  • the processing unit 55 determines that the pair of the transmission source MAC address of the packet received by the relay unit 52 and the communication port 51 through which the packet was received by the relay unit 52 is the same transmission address table Tb1. If it does not match the communication port 51 of the group to which the original MAC address belongs, the address table Tb1 is not updated.
  • the processing unit 55 determines that the correspondence between the source MAC address indicated by the reception path information of the packet P1 and the port number different from the source port number indicated by the reception path information of the packet P1 is already in the address table Tb1. If registered, the address table Tb1 is not updated by the source MAC address and the source port number indicated by the receiving route information.
  • the processing unit 55 obtains the message type Ty3 corresponding to the service ID of the message M1 from the packet management table Tb3, while obtaining the reception route information and the transmission route information. No information is acquired. Therefore, when the processing unit 55 executes the “specific example 2 of detection processing”, the storage unit 57 stores a table indicating the correspondence between service IDs and message types instead of storing the packet management table Tb3. You may remember. As a result, detection processing can be performed using a simpler table than the packet management table Tb3.
  • the destination MAC address and the destination port number of packet P1 are not required. A determination can be made as to whether or not the packet P1 is an unauthorized packet.
  • the processing unit 55 may determine whether or not the packet P1 is an unauthorized packet as follows. That is, the processing unit 55 acquires the source MAC address and destination MAC address corresponding to the service ID and type Ty2 of the message M1 as the source MAC address and destination MAC address of the packet P2 from the packet management table Tb3.
  • the processing unit 55 compares the source MAC address of the packet P1 and the destination MAC address of the packet P2, and also compares the destination MAC address of the packet P1 and the source MAC address of the packet P2.
  • the processing unit 55 determines that the port number acquired from the address table Tb1 matches the source port number indicated by the reception path information of the packet P1, and the source MAC address of the packet P1 and the destination MAC address of the packet P2 are identical. If they match and the destination MAC address of packet P1 and the source MAC address of packet P2 match, it is determined that packet P1 is not an unauthorized packet.
  • the processing unit 55 determines whether the port number acquired from the address table Tb1 and the source port number indicated by the reception route information of the packet P1 do not match, or the source MAC address of the packet P1 and the destination MAC address of the packet P2. do not match, or the destination MAC address of the packet P1 and the source MAC address of the packet P2 do not match, the packet P1 is determined to be an illegal packet.
  • the processing unit 55 performs detection processing based on the state between the server and the client for each service ID.
  • FIG. 8 is a diagram for explaining the state between the client and the server in the in-vehicle network according to the embodiment of the present disclosure.
  • the states between the server and the client are "state A” which is the initial state, "state B” which is the state in the process of establishing communication connection, and "state B” which is the state in which the communication connection is established.
  • C can take either state.
  • the client multicasts a Find message containing the service ID, so that the state between the server and the client for that service ID transitions to state B. .
  • the server unicasts an Offer message to the client, and the state between the server and the client transitions to state C. That is, a communication connection is established between the server and client for the service ID.
  • the server After that, for example, in a state where the server periodically sends a Notification message to the client, the server sends a StopOffer message to the client, so that the state between the server and the client for the service ID is the initial state. Transition to A.
  • FIG. 9 is a diagram showing an example of a state management table in the storage unit of the gateway device according to the embodiment of the present disclosure.
  • storage unit 57 stores a state management table Tb4 showing correspondence between service IDs and current states St1 between the server and the client.
  • the processing unit 55 acquires the service ID of the message M1 stored in the packet P1.
  • the processing unit 55 refers to the state management table Tb4 in the storage unit 57 and searches for the current state St1 between the server and the client corresponding to the acquired service ID.
  • the processing unit 55 determines that the current state St1 between the server and the client corresponding to the service ID is "state C”.
  • the processing unit 55 determines that the current state St1 between the server and the client corresponding to the service ID is the initial state. state A”.
  • FIG. 10 is a diagram showing an example of a state transition table in the storage unit of the gateway device according to the embodiment of the present disclosure.
  • storage unit 57 stores a state transition table Tb5 showing the correspondence relationship between the message type and the address type of the destination IP address of the packet, and the state transition between the server and the client due to transmission/reception of the message. are doing.
  • the processing unit 55 refers to the state transition table Tb5, and searches for the state St2 between the server and the client after the transmission/reception of the message, corresponding to the type Ty1 of the message M1, the address type of the destination IP address of the packet P1, and the state St1. .
  • the state transition table Tb5 State St2 does not exist. This indicates that when the state between the server and the client is state A, the unicast packet in which the Offer message is stored cannot normally be transmitted and received between the server and the client.
  • the processing unit 55 determines that the packet P1 is an unauthorized packet when the state St2 does not exist in the state transition table Tb5. When the processing unit 55 determines that the packet P1 is an unauthorized packet, the processing unit 55 performs processing such as “discarding the packet” described above.
  • the processing unit 55 determines that the packet P1 is not an unauthorized packet when the state St2 exists in the state transition table Tb5.
  • the processing unit 55 determines that the packet P1 is not an unauthorized packet, the processing unit 55 performs processing such as “packet transmission” described above.
  • the processing unit 55 updates the state St1 in the state management table Tb4 to the state St2, ie, "state C".
  • the processing unit 55 further performs at least one of the above-described "Specific example 1 of detection processing” and “Specific example 2 of detection processing” to It may be configured to determine whether or not P1 is an unauthorized packet.
  • FIG. 11 is a flowchart defining an example of an operation procedure when the gateway device according to the embodiment of the present disclosure performs detection processing.
  • FIG. 11 shows a flowchart of the "specific example 1 of detection processing" described above.
  • gateway device 101 waits for a packet in which a message according to SOME/IP is stored (NO in step S102), and relay unit 52 receives packet P1 (YES in step S102).
  • the packet P1 received by the unit 52 is obtained (step S104).
  • the gateway device 101 generates reception route information and transmission route information for the packet P1 (step S106).
  • the gateway device 101 searches the type table Tb2 of the storage unit 57 for the type Ty2 of the message M2 corresponding to the message M1 stored in the packet P1. More specifically, the gateway device 101 acquires the message M1 and the destination IP address from the packet P1, and acquires the type Ty1 of the message M1 from the "message type" field of the acquired message M1. The gateway device 101 then searches the type table Tb2 for the acquired type Ty1 and the type Ty2 corresponding to the address type of the destination IP address (step S108).
  • the gateway device 101 registers the information of the packet P1 in the packet management table Tb3 in the storage unit 57. More specifically, gateway device 101 registers the service ID and type Ty1 of message M1, and the reception route information and transmission route information of packet P1 in packet management table Tb3 (step S112).
  • the gateway device 101 transmits the packet P1 to the destination in-vehicle ECU 111 via the relay unit 52 (step S114).
  • gateway device 101 waits for a new packet containing a message according to SOME/IP (NO in step S102).
  • the gateway device 101 acquires the type Ty2, and extracts the message The reception route information and transmission route information corresponding to the service ID of M1 and type Ty2 are acquired (step S116).
  • the gateway device 101 compares the reception route information of the packet P1 and the transmission route information of the packet P2, and also compares the transmission route information of the packet P1 and the reception route information of the packet P2 (step S118).
  • the gateway device 101 determines whether the source port number of the packet P1 and the destination port number of the packet P2 do not match, or whether the destination port number of the packet P1 and the source port number of the packet P2 do not match. and the destination MAC address of packet P2 do not match, or the destination MAC address of packet P1 and the source MAC address of packet P2 do not match (NO in step S120), packet P1 is an illegal packet. (step S122).
  • gateway device 101 discards packet P1, creates log information, transmits alarm information and log information to the user terminal, and shuts off communication port 51 of the source port number of packet P1 (step S124). .
  • gateway device 101 waits for a new packet containing a message according to SOME/IP (NO in step S102).
  • the source port number of the packet P1 and the destination port number of the packet P2 match, the destination port number of the packet P1 and the source port number of the packet P2 match, and the source port number of the packet P1 matches. If the MAC address and the destination MAC address of packet P2 match, and if the destination MAC address of packet P1 and the source MAC address of packet P2 match (YES in step S120), it is determined that packet P1 is not an unauthorized packet. (step S126).
  • the gateway device 101 deletes the information corresponding to the service ID of the message M1 from the packet management table Tb3. (Step S130).
  • gateway device 101 transmits packet P1 to destination in-vehicle ECU 111 via relay unit 52 (step S132), and waits for a new packet containing a message according to SOME/IP (NO in step S102).
  • type Ty1 of message M1 is a type other than "StopOffer message” and "StopSubscribe message” (NO in step S128), and information corresponding to the service ID of message M1 is stored in packet management table Tb3. If registered (YES in step S134), packet P1 is transmitted to destination in-vehicle ECU 111 via relay unit 52 (step S132), and a new packet containing a message conforming to SOME/IP is awaited (step S102). NO).
  • type Ty1 of message M1 is a type other than "StopOffer message” and "StopSubscribe message” (NO in step S128), and information corresponding to the service ID of message M1 is stored in packet management table Tb3. If not registered (NO in step S134), information corresponding to the service ID of message M1 is registered in packet management table Tb3 (step S136).
  • gateway device 101 transmits packet P1 to destination in-vehicle ECU 111 via relay unit 52 (step S132), and waits for a new packet containing a message according to SOME/IP (NO in step S102).
  • FIG. 12 is a flow chart defining another example of the operation procedure when the gateway device according to the embodiment of the present disclosure performs detection processing.
  • FIG. 12 shows a flowchart of the above-described "specific example 2 of detection processing".
  • step S202 to step S214 is the same as the processing from step S102 to step S114 in FIG.
  • the gateway device 101 acquires the type Ty2, and extracts the message type Ty3 corresponding to the service ID of the message M1 from the packet management table Tb3. acquire (step S216).
  • gateway device 101 collates pairs of the source port number and source MAC address indicated by the reception path information of packet P1 in address table Tb1 in storage unit 57, and compares type Ty2 and type Ty3 (step S218).
  • the gateway device 101 determines whether the port number corresponding to the source MAC address of the packet P1 in the address table Tb1 does not match the source port number indicated by the reception route information of the packet P1, or the type Ty2 and type Ty3. does not match (NO in step S220), it is determined that packet P1 is an unauthorized packet (step S222).
  • gateway device 101 discards packet P1, creates log information, transmits alarm information and log information to the user terminal, and shuts off communication port 51 of the source port number of packet P1 (step S224). , and waits for a new packet containing a message according to SOME/IP (NO in step S202).
  • the port number corresponding to the source MAC address of the packet P1 in the address table Tb1 matches the source port number indicated by the reception path information of the packet P1, and the types Ty2 and Ty3 are identical. If they match (YES in step S220), it is determined that packet P1 is not an unauthorized packet (step S226).
  • step S228 to step S236 is the same as the processing from step S128 to step S136 in FIG.
  • FIG. 13 is a flow chart defining another example of the operation procedure when the gateway device according to the embodiment of the present disclosure performs detection processing.
  • FIG. 13 shows a flowchart of the above-described "specific example 3 of detection processing".
  • gateway device 101 waits for a packet in which a message according to SOME/IP is stored (NO in step S302), and relay unit 52 receives packet P1 (YES in step S302).
  • the packet P1 received by the unit 52 is obtained (step S304).
  • the gateway device 101 acquires the destination IP address and message M1 from the acquired packet P1, and acquires the service ID and type Ty1 from the acquired message M1 (step S306).
  • the gateway device 101 refers to the state management table Tb4 in the storage unit 57 and searches for the current state St1 between the server and the client corresponding to the acquired service ID (step S308).
  • the gateway device 101 determines the current state St1 between the server and the client corresponding to the service ID. is in "state A" (step S312), the state transition table Tb5 is referenced, and the state St2 corresponding to the type Ty1 of the message M1, the address type of the destination IP address of the packet P1, and the state St1 is searched (step S316).
  • the gateway device 101 acquires the state St1 from the state management table Tb4 (step S314),
  • the transition table Tb5 is referenced to search for the type Ty1 of the message M1, the address type of the destination IP address of the packet P1, and the state St2 corresponding to the state St1 (step S316).
  • the gateway device 101 determines that the packet P1 is an unauthorized packet (step S320).
  • gateway device 101 discards packet P1, creates log information, transmits alarm information and log information to the user terminal, and shuts off communication port 51 of the source port number of packet P1 (step S322). , and SOME/IP (NO in step S302).
  • gateway device 101 determines that packet P1 is not an unauthorized packet (step S324).
  • the gateway device 101 updates the state St1 in the state management table Tb4 to the state St2 (step S326).
  • the gateway device 101 transmits the packet P1 to the destination in-vehicle ECU 111 via the relay unit 52 (step S328), and waits for a new packet containing a message conforming to SOME/IP (NO in step S302).
  • the gateway device 101 is configured to perform detection processing, but the configuration is not limited to this.
  • a device other than the gateway device 101 may be configured to perform detection processing of unauthorized messages as a detection device.
  • the detection device may be connected to a predetermined port of the gateway device 101, such as a mirror port.
  • the processing unit 55 when detecting an unauthorized packet, performs relay processing via the communication port 51 through which the unauthorized packet was received by the relay unit 52.
  • the configuration is such that the process of stopping is performed, the present invention is not limited to this.
  • the processing unit 55 may have a configuration in which, when an unauthorized packet is detected, for example, the processing unit 55 discards the unauthorized packet but does not stop the relay processing via the communication port 51 through which the unauthorized packet passed.
  • the processing unit 55 is configured to create log information when an unauthorized packet is detected, but the configuration is not limited to this.
  • the processing unit 55 may have a configuration in which, when detecting an unauthorized packet, for example, the unauthorized packet is discarded, but the log information is not created.
  • the processing unit 55 stores the transmission source MAC address of the packet received by the relay unit 52 and the communication through which the packet was received by the relay unit 52.
  • the address table Tb1 can be updated by registering a pair with the port 51, it is not limited to this.
  • the processing unit 55 may be configured not to update the address table Tb1.
  • processing unit 55 determines consistency between packet P1 and packet P2 in which message M2 corresponding to message M1 is stored with respect to a sequence according to SOME/IP.
  • the processing unit 55 is configured to determine consistency between the packet P1 and the packet P2 in which the message M2 corresponding to the message M1 is stored with respect to a sequence conforming to a protocol other than SOME/IP such as ICMP (Internet Control Message Protocol).
  • ICMP Internet Control Message Protocol
  • the storage unit 57 stores the type of the message stored in the packet, the address type of the destination IP address of the packet, and the type of the message corresponding to the message.
  • the configuration stores the type table Tb2 indicating the correspondence relationship
  • the present invention is not limited to this.
  • the storage unit 57 stores a type table Tb2A showing the correspondence between the type of message stored in the packet, the address type of the destination MAC address of the packet, and the type of the message corresponding to the message. It may be a stored configuration. “Address type of destination MAC address” indicates whether the destination MAC address is a multicast address or a unicast address.
  • the processing unit 55 searches the type table Tb2A for the type Ty1 of the message M1 and the type Ty2 corresponding to the address type of the destination MAC address of the packet P1.
  • the storage unit 57 stores the correspondence relationship between the message type and the address type of the destination IP address of the packet, and the state transition between the server and the client due to transmission and reception of the message.
  • the configuration stores the state transition table Tb5 indicating the state transition table Tb5
  • the present invention is not limited to this.
  • the storage unit 57 stores a state transition table Tb5A that indicates the correspondence relationship between the message type and the address type of the destination MAC address of the packet, and the state transition between the server and the client due to transmission and reception of the message. It may be a stored configuration.
  • the processing unit 55 searches the state transition table Tb5A for the state St2 corresponding to the type Ty1 of the message M1, the address type of the destination MAC address of the packet P1, and the state St1.
  • the storage unit 57 stores a packet management table Tb3 that indicates the correspondence between the message type and the reception route information and the transmission route information for each service ID.
  • the storage unit 57 is configured to store a packet management table Tb3A showing the correspondence relationship between the message type and the reception route information and the transmission route information for each service ID and method ID.
  • the processing unit 55 refers to the packet management table Tb3 and, among the packets acquired in the past by the packet monitoring unit 53, determines that the message M2 of type Ty2 including the same service ID and the same method ID as the message M1 is Obtain the source MAC address and the like of the stored packet P2.
  • relay unit 52 is configured to store a packet in which a message according to SOME/IP is stored in storage unit 57 before transmitting the packet to destination in-vehicle ECU 111.
  • relay unit 52 is configured to store a packet in which a message according to SOME/IP is stored in storage unit 57 before transmitting the packet to destination in-vehicle ECU 111.
  • it is not limited to this.
  • the relay unit 52 may be configured to transmit a packet containing a message according to SOME/IP to the destination in-vehicle ECU 111 and store a copy of the packet in the storage unit 57 .
  • the relay unit 52 upon receiving a packet from an in-vehicle ECU 111 via the corresponding communication port 51, the relay unit 52 checks the payload of the received packet to determine whether the packet contains a message conforming to SOME/IP. to judge whether Upon detecting a packet in which a message conforming to SOME/IP is stored, relay unit 52 transmits the packet to in-vehicle ECU 111, which is the destination of the packet, via corresponding communication port 51, and duplicates the packet. Then, the relay unit 52 saves the packet obtained by duplication in the storage unit 57 . Further, the relay unit 52 generates reception route information and transmission route information, and stores the generated reception route information and transmission route information in the storage unit 57 as attributes of the packet.
  • the relay unit 52 When the relay unit 52 saves the packet, the reception route information, and the transmission route information obtained by duplication in the storage unit 57 , the relay unit 52 outputs a save notification to the packet monitoring unit 53 .
  • the packet monitoring unit 53 acquires the packet obtained by duplication as the packet received by the relay unit 52 . More specifically, packet monitoring unit 53 receives a storage notification from relay unit 52 . By accessing the storage unit 57 , the packet monitoring unit 53 acquires the packets, reception path information, and transmission path information stored in the storage unit 57 by the relay unit 52 . The packet monitoring unit 53 outputs an acquisition notification indicating that the packet has been acquired to the processing unit 55 .
  • the processing unit 55 performs detection processing as described above. For example, when processing unit 55 determines that packet P1 is not an unauthorized packet, processing unit 55 deletes packet P1 from storage unit 57 instead of outputting a transmission instruction to relay unit 52 to the effect that packet P1 should be transmitted.
  • the processing unit 55 when detecting an unauthorized packet, performs processing for transmitting a defense message corresponding to the message stored in the unauthorized packet to the in-vehicle ECU 111 that is the destination of the unauthorized packet or the in-vehicle ECU 111 that is the source of the unauthorized packet. I do. More specifically, when the processing unit 55 determines that the packet P1 is an unauthorized packet, it generates a defense message.
  • FIG. 14 is a diagram showing an example of a defense message table in the storage unit of the gateway device according to the modification of the embodiment of the present disclosure.
  • storage unit 57 stores a defense message table showing the correspondence between the type of message stored in an unauthorized packet, the address type of the destination IP address of the unauthorized packet, and the type of defense message to be generated. Tb6 is stored.
  • the defense message is a message for mitigating the effects of unauthorized packets transmitted and received between the in-vehicle ECUs 111. More specifically, for example, the defense message is a message for invalidating the processing in the in-vehicle ECU 111 that has received the unauthorized packet, which is performed based on the message stored in the unauthorized packet. Alternatively, the defense message is a message for suppressing further transmission of unauthorized packets by the in-vehicle ECU 111 that has transmitted the unauthorized packets.
  • the processing unit 55 determines that the packet P1 is an unauthorized packet, it acquires the message M1 and the destination IP address from the packet P1. The processing unit 55 acquires the service ID and type Ty1 from the acquired message M1. Then, the processing unit 55 searches the defense message table Tb6 of the storage unit 57 for the acquired type Ty1 and the type Ty3 corresponding to the address type of the destination IP address.
  • type Ty1 is "Find message” and the address type of the destination IP address of packet P1 is "unicast address” or "multicast address", there is no corresponding type Ty3 in defense message table Tb6.
  • the processing unit 55 does not generate a defense message if the type Ty3 does not exist in the defense message table Tb6.
  • the processing unit 55 generates a message of the type Ty3 that stores the same service ID as the message M1 as the defense message.
  • the processing unit 55 performs processing for transmitting the defense message to the in-vehicle ECU 111 that is the destination of the unauthorized packet.
  • the processing unit 55 determines that the type Ty1 is an "Offer message” to the client. StopOffer message” is generated as a defense message. Then, the processing unit 55 detects a packet in which the generated defense message is stored, in which the source address is set to the source address of the packet P1 and the destination address is set to the destination address of the packet P1. A protection packet is generated, and the generated protection packet is output to the relay unit 52 .
  • the processing unit 55 sends a "StopSubscribe message” to the server. as a defensive message. Then, the processing unit 55 detects a packet in which the generated defense message is stored, in which the source address is set to the source address of the packet P1 and the destination address is set to the destination address of the packet P1. A protection packet is generated, and the generated protection packet is output to the relay unit 52 .
  • the relay unit 52 When receiving a protection packet from the processing unit 55, the relay unit 52 transmits the received protection packet to the destination in-vehicle ECU 111 via the communication port 51 corresponding to the destination port number of the protection packet.
  • the processing unit 55 performs processing for transmitting the defense message to the in-vehicle ECU 111 that is the transmission source of the unauthorized packet.
  • the processing unit 55 sends a "SubscribeAck message” to the server. StopSubscribe message” is generated as a defense message. Then, the processing unit 55 detects a packet in which the generated defense message is stored, the source address of which is set to the destination address of the packet P1, and the destination address of which is set to the source address of the packet P1. A protection packet is generated, and the generated protection packet is output to the relay unit 52 .
  • the processing unit 55 sends a "StopOffer message" to the client. as a defensive message. Then, the processing unit 55 detects a packet in which the generated defense message is stored, the source address of which is set to the destination address of the packet P1, and the destination address of which is set to the source address of the packet P1. A protection packet is generated, and the generated protection packet is output to the relay unit 52 .
  • the relay unit 52 When receiving a protection packet from the processing unit 55, the relay unit 52 transmits the received protection packet to the destination in-vehicle ECU 111 via the communication port 51 corresponding to the destination port number of the protection packet.
  • the notification message is not transmitted by transmitting a defense message to the unauthorized vehicle-mounted ECU 111. This fact can be notified to the unauthorized in-vehicle ECU 111 .
  • the storage unit 57 stores the type of the message stored in the malicious packet, the address type of the destination IP address of the malicious packet, and the defense message to be generated.
  • the configuration stores the defense message table Tb6 indicating the correspondence relationship with the type of
  • the present invention is not limited to this.
  • the storage unit 57 stores a defense message indicating the correspondence between the type of message stored in the malicious packet, the address type of the destination MAC address of the malicious packet, and the type of the defense message to be generated. It may be configured to store the table Tb6A.
  • the processing unit 55 searches the defense message table Tb6 of the storage unit 57 for the type Ty3 corresponding to the type Ty1 of the message M1 and the type of the destination MAC address of the packet P1.
  • Each process (each function) of the above-described embodiment is realized by a processing circuit (circuitry) including one or more processors.
  • the processing circuit may be configured by an integrated circuit or the like in which one or more memories, various analog circuits, and various digital circuits are combined in addition to the one or more processors.
  • the one or more memories store programs (instructions) that cause the one or more processors to execute the processes.
  • the one or more processors may execute the above processes according to the program read from the one or more memories, or execute the above processes according to a logic circuit designed in advance to execute the above processes. may be executed.
  • the processor is a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a DSP (Digital Signal Processor), an FPGA (Field Programmable Gate Array), and an ASIC (Application Specific Control Integrated Computer) compatible with various computers.
  • processor Central Processing Unit
  • GPU Graphics Processing Unit
  • DSP Digital Signal Processor
  • FPGA Field Programmable Gate Array
  • ASIC Application Specific Control Integrated Computer
  • the plurality of physically separated processors may cooperate with each other to execute the above processes.
  • the processors installed in each of a plurality of physically separated computers cooperate with each other via networks such as LAN (Local Area Network), WAN (Wide Area Network), and the Internet to perform the above processes. may be executed.
  • the program may be installed in the memory from an external server device or the like via the network, and may be CD-ROM (Compact Disc Read Only Memory), DVD-ROM (Digital Versatile Disk Read Only Memory), and semiconductor It may be distributed in a state stored in a recording medium such as an essential memory, and installed in the memory from the recording medium.
  • CD-ROM Compact Disc Read Only Memory
  • DVD-ROM Digital Versatile Disk Read Only Memory
  • semiconductor It may be distributed in a state stored in a recording medium such as an essential memory, and installed in the memory from the recording medium.
  • a detection device for detecting unauthorized packets in an in-vehicle network a relay unit that relays packets between in-vehicle devices in the in-vehicle network; a route acquisition unit that acquires reception route information about the packet received by the relay unit; consistency between the first packet received by the relay unit and the second packet received by the relay unit, and the reception of the first packet obtained by the route obtaining unit; a processing unit that performs a detection process for detecting the unauthorized packet based on the route information; the receiving route information indicates a source port, which is a physical port through which the packet passed, and a source address of the packet; the second packet is the packet received by the relay unit before the reception of the first packet and the packet corresponding to the first packet; The relay unit receives the packet in which a message conforming to SOME/IP is stored; The detecting device, wherein the processing unit performs the detecting process further based on the state of the in-vehicle device
  • a detection device for detecting unauthorized packets in an in-vehicle network with a processing circuit, The processing circuit is relaying packets between in-vehicle devices in the in-vehicle network; obtaining reception path information for the received packet; performing detection processing for detecting the unauthorized packet based on the consistency between the received first packet and the received second packet, and the reception route information for the acquired first packet; the receiving route information indicates a source port, which is a physical port through which the packet passed, and a source address of the packet;
  • the detecting device wherein the second packet is the packet received by the relay unit before the first packet is received and is the packet corresponding to the first packet.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mechanical Engineering (AREA)
  • Small-Scale Networks (AREA)

Abstract

検知装置は、車載ネットワークにおける車載装置間のパケットを中継する中継部と、前記中継部により受信された前記パケットについての受信経路情報を取得する経路取得部と、第1の前記パケットと第2の前記パケットとの整合性、および前記経路取得部により取得された、前記第1のパケットについての前記受信経路情報に基づいて、前記不正パケットを検知する検知処理を行う処理部とを備え、前記受信経路情報は、前記パケットが経由した物理ポートである送信元ポートと、前記パケットの送信元アドレスとを示し、前記第2のパケットは、前記中継部により前記第1のパケットの受信前に受信された前記パケットであり、かつ前記第1のパケットに対応する前記パケットである。

Description

検知装置、検知方法および検知プログラム
 本開示は、検知装置、検知方法および検知プログラムに関する。
 この出願は、2021年7月21日に出願された日本出願特願2021-120824号を基礎とする優先権を主張し、その開示のすべてをここに取り込む。
 非特許文献1には、通信規格により定義される通信シーケンスの手順から逸脱したパケットをサイバ攻撃として検知する検知方法が開示されている。具体的には、非特許文献1に記載の検知方法では、ステートフルルールに従って、受信したパケットが既に受信したパケットに対応するパケットであるか否かを判断し、判断結果に応じてタグ付けを行い、ステートレスルールに従って、パケット情報とタグとに基づいてパケットがサイバ攻撃であるか否かを判断する。
Mohamed G. Gouda et al, Alex X. Liu、"A Model of Stateful Firewall and its Properties"、In Proseedings of the IEEE International Conference on Dependable Systems and Networks、2005
 本開示の検知装置は、車載ネットワークにおける不正パケットを検知する検知装置であって、前記車載ネットワークにおける車載装置間のパケットを中継する中継部と、前記中継部により受信された前記パケットについての受信経路情報を取得する経路取得部と、前記中継部により受信された第1の前記パケットと、前記中継部により受信された第2の前記パケットとの整合性、および前記経路取得部により取得された、前記第1のパケットについての前記受信経路情報に基づいて、前記不正パケットを検知する検知処理を行う処理部とを備え、前記受信経路情報は、前記パケットが経由した物理ポートである送信元ポートと、前記パケットの送信元アドレスとを示し、前記第2のパケットは、前記中継部により前記第1のパケットの受信前に受信された前記パケットであり、かつ前記第1のパケットに対応する前記パケットである。
 本開示の一態様は、このような特徴的な処理部を備える検知装置として実現され得るだけでなく、検知装置の一部または全部を実現する半導体集積回路として実現され得たり、検知装置を含む検知システムとして実現され得る。
図1は、本開示の実施の形態に係る車載ネットワークの構成を示す図である。 図2は、本開示の実施の形態に係る車載ネットワークにおいて用いられるSOME/IPの機能を説明するための図である。 図3は、本開示の実施の形態に係る車載ネットワークにおいて用いられるSOME/IPの機能を説明するための図である。 図4は、本開示の実施の形態に係るゲートウェイ装置の構成を示す図である。 図5は、本開示の実施の形態に係るゲートウェイ装置の記憶部におけるアドレステーブルの一例を示す図である。 図6は、本開示の実施の形態に係るゲートウェイ装置の記憶部におけるタイプテーブルの一例を示す図である。 図7は、本開示の実施の形態に係るゲートウェイ装置の記憶部におけるパケット管理テーブルの一例を示す図である。 図8は、本開示の実施の形態に係る車載ネットワークにおけるクライアントおよびサーバ間の状態を説明するための図である。 図9は、本開示の実施の形態に係るゲートウェイ装置の記憶部における状態管理テーブルの一例を示す図である。 図10は、本開示の実施の形態に係るゲートウェイ装置の記憶部における状態遷移テーブルの一例を示す図である。 図11は、本開示の実施の形態に係るゲートウェイ装置が検知処理を行う際の動作手順の一例を定めたフローチャートである。 図12は、本開示の実施の形態に係るゲートウェイ装置が検知処理を行う際の動作手順の他の例を定めたフローチャートである。 図13は、本開示の実施の形態に係るゲートウェイ装置が検知処理を行う際の動作手順の他の例を定めたフローチャートである。 図14は、本開示の実施の形態の変形例に係るゲートウェイ装置の記憶部における防御メッセージテーブルの一例を示す図である。
 従来、車載ネットワークにおけるセキュリティを向上させるための技術が開発されている。
 [本開示が解決しようとする課題]
 非特許文献1に記載の検知方法では、攻撃者が送信したパケットが、通信規格により定義される通信シーケンスの手順に適合する場合、当該パケットを不正パケットとして検知することができない場合がある。
 本開示は、上述の課題を解決するためになされたもので、その目的は、車載ネットワークにおける不正パケットをより正しく検知することが可能な検知装置、検知方法および検知プログラムを提供することである。
 [本開示の効果]
 本開示によれば、車載ネットワークにおける不正パケットをより正しく検知することができる。
 [本開示の実施形態の説明]
 最初に、本開示の実施形態の内容を列記して説明する。
 (1)本開示の実施の形態に係る検知装置は、車載ネットワークにおける不正パケットを検知する検知装置であって、前記車載ネットワークにおける車載装置間のパケットを中継する中継部と、前記中継部により受信された前記パケットについての受信経路情報を取得する経路取得部と、前記中継部により受信された第1の前記パケットと、前記中継部により受信された第2の前記パケットとの整合性、および前記経路取得部により取得された、前記第1のパケットについての前記受信経路情報に基づいて、前記不正パケットを検知する検知処理を行う処理部とを備え、前記受信経路情報は、前記パケットが経由した物理ポートである送信元ポートと、前記パケットの送信元アドレスとを示し、前記第2のパケットは、前記中継部により前記第1のパケットの受信前に受信された前記パケットであり、かつ前記第1のパケットに対応する前記パケットである。
 このように、第1のパケットと、当該第1のパケットに対応する第2のパケットとの整合性、および第1のパケットについての受信経路情報に基づいて検知処理を行う構成により、受信経路情報を用いることなく第1のパケットと第2のパケットとの整合性に基づいて検知処理を行う構成と比べて、通信シーケンスの手順に適合しない不正パケットだけでなく、通信シーケンスの手順に適合するタイミングにおいて送信された不正パケットも正しく検知することができる。したがって、車載ネットワークにおける不正パケットをより正しく検知することができる。
 (2)上記(1)において、前記検知装置は、さらに、前記中継部により受信される際に前記パケットが経由する物理ポートと、前記車載装置のアドレスとの対応関係を示す対応テーブルを記憶する記憶部を備えてもよく、前記処理部は、前記対応テーブルにおいて、前記第1のパケットについての前記受信経路情報が示す前記送信元ポートおよび送信元アドレスの組を照合し、照合結果および前記第1のパケットと前記第2のパケットとの整合性に基づいて、前記第1のパケットが前記不正パケットであるか否かを判断してもよい。
 このような構成により、送信元アドレスを偽装した不正パケットを、対応テーブルを用いた簡易な処理で検知することができる。
 (3)上記(1)または(2)において、前記経路取得部は、前記中継部により受信された前記パケットについての送信経路情報をさらに取得してもよく、前記送信経路情報は、前記パケットが前記中継部により前記車載装置へ中継される際に前記パケットが経由すべき物理ポートである宛先ポートと、前記パケットの宛先アドレスとを示してもよく、前記処理部は、前記第1のパケットについての前記受信経路情報が示す前記送信元ポートおよび前記送信経路情報が示す前記宛先ポートの組と、前記第2のパケットについての前記受信経路情報が示す前記送信元ポートおよび前記送信経路情報が示す前記宛先ポートの組との整合性、ならびに前記第1のパケットについての前記受信経路情報が示す前記送信元アドレスおよび前記送信経路情報が示す前記宛先アドレスの組と、前記第2のパケットについての前記受信経路情報が示す前記送信元アドレスおよび前記送信経路情報が示す前記宛先アドレスの組との整合性に基づいて、前記第1のパケットが前記不正パケットであるか否かを判断してもよい。
 このような構成により、あるパケットが経由した物理ポートと、当該パケットに対する応答を装った不正パケットとが経由した物理ポートの整合性に基づいて、不正パケットをより正しく検知することができる。
 (4)上記(1)から(3)のいずれかにおいて、前記処理部は、前記不正パケットを検知した場合、前記中継部による中継処理であって、前記中継部により受信される際に前記不正パケットが経由した物理ポートを介した前記中継処理を停止する処理を行ってもよい。
 このような構成により、不正パケットの送信元から送信される新たなパケットの中継、および不正パケットの送信元へのパケットの中継を停止することができる。
 (5)上記(3)において、前記処理部は、前記第1のパケットが前記不正パケットであると判断した場合、前記第1のパケットについての前記受信経路情報が示す前記送信元ポートおよび前記第1のパケットの送信元アドレスの組と、前記第2のパケットについての前記受信経路情報が示す前記送信元ポートおよび前記第2のパケットの送信元アドレスの組とを示すログ情報を作成してもよい。
 このような構成により、不正パケットに関する情報を収集し、たとえば不正パケットに対するセキュリティ性の向上に利用することができる。
 (6)上記(1)から(5)のいずれかにおいて、前記検知装置は、さらに、前記中継部により受信される前記パケットの送信元アドレスと、前記中継部により受信される際に前記パケットが経由する物理ポートとの対応関係を示す対応テーブルに、前記中継部により受信された前記パケットの送信元アドレスと、前記中継部により受信された際に前記パケットが経由した物理ポートとの組を登録することにより前記対応テーブルを更新する更新部を備えてもよく、前記更新部は、前記組が、前記対応テーブルにおける同じ送信元アドレスの属する前記組の物理ポートと一致しない場合、前記対応テーブルの更新を行わなくてもよい。
 このような構成により、車載ネットワークにおける新たな車載装置の追加に伴って対応テーブルを更新することができるとともに、たとえば、不正パケットの送信元が利用する物理ポートが対応テーブルへ誤って登録されないようにすることができる。
 (7)上記(1)から(6)のいずれかにおいて、前記処理部は、前記第1のパケットと、SOME/IP(Scalable service-Oriented MiddlewarE over IP)に従うステートフルルールについて前記第1のパケットに対応する前記第2のパケットとの整合性、および前記受信経路情報に基づいて前記検知処理を行ってもよい。
 このような構成により、第1のパケットと、SOME/IPに従うシーケンスに関して第1のパケットに格納されたメッセージに対応するメッセージが格納された第2のパケットとの整合性に基づく検知処理を行うことができる。
 (8)上記(1)から(7)のいずれかにおいて、前記処理部は、前記不正パケットを検知した場合、前記中継部による前記不正パケットの中継を行わせないための処理を行ってもよい。
 このような構成により、車載装置による不正パケットの受信を防止することができるので、セキュリティ性を向上させることができる。
 (9)上記(1)から(7)のいずれかにおいて、前記処理部は、前記不正パケットを検知した場合、前記不正パケットに格納されたメッセージに対応する防御メッセージを、前記不正パケットの宛先の前記車載装置または前記不正パケットの送信元の前記車載装置へ送信するための処理を行ってもよい。
 このような構成により、たとえば、車載装置間で送受信される不正パケットによる影響を緩和することができるので、車載装置へのパケットの中継を行うとともに当該パケットの複製を用いて検知処理を行い、当該パケットが不正パケットであると判断した場合において防御メッセージを車載装置へ送信する構成を採用することができる。これにより、検知処理において不正パケットではないと判断してから当該パケットの中継を行う構成と比べて、通信遅延の発生を抑制することができる。
 (10)本開示の実施の形態に係る検知方法は、車載ネットワークにおける不正パケットを検知する検知装置における検知方法であって、前記車載ネットワークにおける車載装置間において中継すべきパケットを受信するステップと、受信した前記パケットについての受信経路情報を取得するステップと、受信した第1の前記パケットと、受信した第2の前記パケットとの整合性、および取得した前記第1のパケットについての前記受信経路情報に基づいて、前記不正パケットを検知する検知処理を行うステップとを含み、前記受信経路情報は、前記パケットが経由した物理ポートである送信元ポートと、前記パケットの送信元アドレスとを示し、前記第2のパケットは、前記第1のパケットの受信前に受信した前記パケットであり、かつ前記第1のパケットに対応する前記パケットである。
 このように、第1のパケットと、当該第1のパケットに対応する第2のパケットとの整合性、および第1のパケットについての受信経路情報に基づいて検知処理を行う方法により、受信経路情報を用いることなく第1のパケットと第2のパケットとの整合性に基づいて検知処理を行う方法と比べて、通信シーケンスの手順に適合しない不正パケットだけでなく、通信シーケンスの手順に適合するタイミングにおいて送信された不正パケットも正しく検知することができる。したがって、車載ネットワークにおける不正パケットをより正しく検知することができる。
 (11)本開示の実施の形態に係る検知プログラムは、車載ネットワークにおける不正パケットを検知する検知装置において用いられる検知プログラムであって、コンピュータを、前記車載ネットワークにおける車載装置間のパケットを中継する中継部と、前記中継部により受信された前記パケットについての受信経路情報を取得する経路取得部と、前記中継部により受信された第1の前記パケットと、前記中継部により受信された第2の前記パケットとの整合性、および前記経路取得部により取得された、前記第1のパケットについての前記受信経路情報に基づいて、前記不正パケットを検知する検知処理を行う処理部、として機能させるためのプログラムであり、前記受信経路情報は、前記パケットが経由した物理ポートである送信元ポートと、前記パケットの送信元アドレスとを示し、前記第2のパケットは、前記中継部により前記第1のパケットの受信前に受信された前記パケットであり、かつ前記第1のパケットに対応する前記パケットである。
 このように、第1のパケットと、当該第1のパケットに対応する第2のパケットとの整合性、および第1のパケットについての受信経路情報に基づいて検知処理を行う構成により、受信経路情報を用いることなく第1のパケットと第2のパケットとの整合性に基づいて検知処理を行う構成と比べて、通信シーケンスの手順に適合しない不正パケットだけでなく、通信シーケンスの手順に適合するタイミングにおいて送信された不正パケットも正しく検知することができる。したがって、車載ネットワークにおける不正パケットをより正しく検知することができる。
 以下、本開示の実施の形態について図面を用いて説明する。なお、図中同一または相当部分には同一符号を付してその説明は繰り返さない。また、以下に記載する実施の形態の少なくとも一部を任意に組み合わせてもよい。
 [構成および基本動作]
 〔車載ネットワークの構成〕
 図1は、本開示の実施の形態に係る車載ネットワークの構成を示す図である。図1を参照して、車載ネットワーク12は、ゲートウェイ装置101と、複数の車載ECU(Electronic Control Unit)111とを備える。ゲートウェイ装置101および車載ECU111は、車載装置の一例である。ゲートウェイ装置101および複数の車載ECU111は、車両1に搭載されている。
 各車載ECU111は、ケーブル14を介してゲートウェイ装置101に接続されている。ケーブル14は、たとえば、イーサネット(登録商標)の規格に従うケーブルである。
 車載ECU111は、たとえば、電動パワーステアリング(Electric Power Steering:EPS)、ブレーキ制御装置、アクセル制御装置、ステアリング制御装置、運転支援システム(Advanced Driver-Assistance System:ADAS)における各種装置への指示等を行う運転支援装置、またはセンサ等である。
 ゲートウェイ装置101は、たとえば、セントラルゲートウェイ(Central Gateway:CGW)であり、他の車載装置と通信を行うことが可能である。ゲートウェイ装置101は、たとえば、車両1において異なるケーブル14に接続された複数の車載ECU111間でやり取りされる情報を中継する。より詳細には、ゲートウェイ装置101は、車載ネットワーク12における車載ECU111間のパケットを中継する中継処理を行う。
 ゲートウェイ装置101は、たとえば、検知装置として機能し、車載ネットワーク12における不正なパケットである不正パケットを検知する検知処理を行う。
 (SOME/IP)
 ここで、車載ネットワーク12においては、たとえば、イーサネットプロトコル群のアプリケーション層のプロトコルであるSOME/IPに従って、メッセージの送受信が行われる。より詳細には、車載ECU111は、SOME/IPに従うメッセージを1または複数のパケットに格納し、当該パケットを他の車載ECU111へ送信する。
 具体的には、たとえば、車載ECU111であるセンサが、車両1の走行状態または周囲の状態に関するセンサ情報を、他の車載ECU111である運転支援装置へ送信すると仮定する。この場合、センサは、サービスの提供として、センサ情報を運転支援装置へ送信する。運転支援装置は、センサからサービスとして提供されたセンサ情報を受信し、当該センサ情報を用いて、車両1の運転に関する各種制御情報を生成し、生成した各種制御情報をブレーキ制御装置およびステアリング制御装置等へ送信することにより、安全運転支援等のアプリケーションが実現される。
 以下、サービスの提供を行う側の車載ECU111を「サーバ」とも称する。また、サービスの提供の受ける側の車載ECU111を「クライアント」とも称する。
 より詳細には、サーバは、サービスとして提供するセンサ情報等が格納されたメッセージを1または複数のパケットに格納し、当該パケットを、SOME/IPに従ってクライアントへ送信する。サーバとクライアントとの間で送受信されるメッセージには、たとえば、サービスのID(Identifier)(以下、「サービスID」と称する。)と、サービスに付随する関数等のID(以下、「メソッドID」と称する。)とが含まれている。
 (SOME/IPの機能)
 図2および図3は、本開示の実施の形態に係る車載ネットワークにおいて用いられるSOME/IPの機能を説明するための図である。
 図2および図3を参照して、SOME/IPに従う通信では、車載ネットワーク12においてサービスの提供を行うための3つの機能、すなわち「Service Discovery」「Publish/Subscribe」および「RPC(Remote Procedure Call)」を実行することができる。
 (a)Service Discovery
 たとえば、Service Discoveryの機能により、クライアントがサービスの提供元であるサーバを探索して、クライアントとサーバとの間で通信接続を確立することができる。
 より詳細には、ある車載ECU111がサービスの提供を受ける場合、クライアントとして、当該サービスに対応するサービスIDを含むFindService(以下、「Find」と略す。)メッセージをマルチキャストする。Findメッセージには、クライアントのID等が含まれる。
 Findメッセージを受信した複数の車載ECU111のうち、Findメッセージに含まれるサービスIDに対応するサービスを提供可能な車載ECU111は、サーバとして、サービスの提供を開始することを示すOfferService(以下、「Offer」と略す。)メッセージを、Findメッセージの送信元の車載ECU111へユニキャストする。Offerメッセージには、サーバのID等が含まれる。これにより、クライアントとサーバとの間で通信接続を確立することができる。
 あるいは、Service Discoveryの機能により、サーバがサービスの提供を申し出て、クライアントとサーバとの間で通信接続を確立することができる。
 より詳細には、ある車載ECU111は、サーバとして、定期的または不定期に、自己が提供可能なサービスに対応するサービスIDを含むOfferメッセージをマルチキャストする。
 Offerメッセージを受信した複数の車載ECU111のうち、Offerメッセージに含まれるサービスIDに対応するサービスを必要とする車載ECU111は、クライアントとして、サービスを要求することを示すFindメッセージを、Offerメッセージの送信元の車載ECU111へユニキャストする。これにより、クライアントとサーバとの間で通信接続を確立することができる。
 FindメッセージおよびOfferメッセージは、周期的に送信されてもよいし、不定期に送信されてもよい。Findメッセージが周期的に送信される場合、送信周期は、たとえばSOME/IPの仕様等により予め定められている。また、Offerメッセージが周期的に送信される場合、送信周期は、たとえばSOME/IPの仕様等により予め定められている。
 (b)Publish/Subscribe
 Publish/Subscribeの機能により、クライアントが特定のサーバに対して周期的なサービスの提供を要求することができる。
 たとえば、クライアントは、Service Discoveryにより取得したサービスIDを用いて、サービスIDが含まれるSubscribeEventgroup(以下、「Subscribe」と略す。)メッセージを対応するサーバへ送信する。
 サーバは、Subscribeメッセージを受信すると、当該Subscribeメッセージに含まれるサービスIDを確認する。そして、サーバは、当該サービスIDが、提供可能なサービスに対応するサービスIDと一致する場合、サービスの提供を承認することを示すSubscribeEventgroupAck(以下、「SubscribeAck」と略す。)メッセージをクライアントへ送信する。そして、サーバは、サービスの提供として、SOME/IPに従うNotificationメッセージを周期的にクライアントへ送信する。一方、サーバは、サービスの提供を承認しない場合、SubscribeEventgroupNack(以下、「SubscribeNack」と略す。)メッセージをクライアントへ送信する。
 Notificationメッセージの送信周期は、たとえば、車両1の製造元において予め定められている。
 クライアントは、サービスの提供を受けることを停止する場合、StopSubscribeEventgroup(以下、「StopSubscribe」と略す。)メッセージをサーバへ送信する。サーバは、StopSubscribeメッセージを受信すると、Notificationメッセージの送信を停止する。
 また、サーバ側においてサービスの提供を停止する場合、サーバは、StopOfferService(以下、「StopOffer」と略す。)メッセージをクライアントへ送信する。
 ここで、車載ネットワーク12において、Notificationメッセージは複数のパケットに分割して送信され得る。たとえば、Notificationメッセージが、1パケットで送信可能なデータ長よりも長いデータ長を有する場合、当該Notificationメッセージは複数のTP_Notificationメッセージに分割される。複数のTP_Notificationメッセージは、複数のパケットにそれぞれ格納されて送信される。
 (c)RPC
 RPCの機能により、クライアントが特定のサーバに対してサービスの提供を要求することができる。
 たとえば、クライアントは、Service Discoveryにより取得したサービスIDを用いて、サービスIDが含まれるRequestメッセージを対応するサーバへ送信する。
 サーバは、Requestメッセージを受信すると、当該Requestメッセージに含まれるサービスIDを確認する。そして、サーバは、当該サービスIDが、提供可能なサービスに対応するサービスIDと一致する場合、サービスの提供を承認する。そして、サーバは、サービスの提供として、Responseメッセージをクライアントへ送信する。
 RequestメッセージおよびResponseメッセージは、周期的に送信されてもよいし、不定期に送信されてもよい。Requestメッセージが周期的に送信される場合、送信周期は、たとえば、車両1の製造元において予め定められている。また、Responseメッセージが周期的に送信される場合、送信周期は、たとえば、車両1の製造元において予め定められている。
 ここで、車載ネットワーク12において、RequestメッセージおよびResponseメッセージは複数のパケットに分割して送信され得る。たとえば、Requestメッセージが、1パケットで送信可能なデータ長よりも長いデータ長を有する場合、当該Requestメッセージは複数のTP_Requestメッセージに分割される。複数のTP_Requestメッセージは、複数のパケットにそれぞれ格納されて送信される。また、たとえば、Responseメッセージが、1パケットで送信可能なデータ長よりも長いデータ長を有する場合、当該Responseメッセージは複数のTP_Responseメッセージに分割される。複数のTP_Responseメッセージは、複数のパケットにそれぞれ格納されて送信される。
 〔ゲートウェイ装置の構成〕
 図4は、本開示の実施の形態に係るゲートウェイ装置の構成を示す図である。図4を参照して、ゲートウェイ装置101は、N個の通信ポート51と、中継部52と、パケット監視部53と、処理部55と、出力部56と、記憶部57とを備える。Nは、2以上の整数である。処理部55は、更新部の一例である。パケット監視部53は、経路取得部の一例である。中継部52、パケット監視部53、処理部55および出力部56の一部または全部は、たとえば、1または複数のプロセッサを含む処理回路(Circuitry)により実現される。記憶部57は、たとえば不揮発性メモリである。
 通信ポート51は、ケーブル14を接続可能な端子である。通信ポート51は、ケーブル14を介して車載ECU111に接続されている。なお、通信ポート51は、集積回路の端子であってもよい。
 <中継部>
 中継部52は、車載ネットワーク12における車載ECU111間のパケットを中継する中継処理を行う。より詳細には、中継部52は、車載ネットワーク12における複数の車載ECU111間で伝送されるメッセージが格納されたパケットを中継する。具体的には、中継部52は、ある車載ECU111から対応の通信ポート51経由で受信したパケットを、当該パケットの宛先IPアドレスおよび宛先MACアドレス等の宛先アドレスに従って他の車載ECU111へ対応の通信ポート51経由で送信する。後述するように、中継部52は、処理部55からの指示により、受信したパケットを宛先の車載ECU111へ中継することなく破棄する場合がある。
 図5は、本開示の実施の形態に係るゲートウェイ装置の記憶部におけるアドレステーブルの一例を示す図である。図5を参照して、記憶部57は、通信ポート51のポート番号と、通信ポート51に接続された車載ECU111のMACアドレスとの対応関係を示すアドレステーブルTb1を記憶している。すなわち、アドレステーブルTb1は、中継部52により受信される際にパケットが経由する通信ポート51のポート番号と、車載ECU111のMACアドレスとの対応関係を示す。アドレステーブルTb1は、対応テーブルの一例である。処理部55は、中継部52により受信されたパケットの送信元MACアドレスと、中継部52により受信された際に当該パケットが経由した通信ポート51との組を登録することによりアドレステーブルTb1を更新することが可能である。
 再び図4を参照して、中継部52は、ある車載ECU111から対応の通信ポート51経由でパケットを受信すると、受信したパケットから宛先MACアドレスを取得する。中継部52は、当該パケットを宛先の車載ECU111へ中継する際に当該パケットが経由すべき通信ポート51のポート番号(以下、「宛先ポート番号」と称する。)として、記憶部57におけるアドレステーブルTb1から当該宛先MACアドレスに対応するポート番号を取得する。そして、中継部52は、当該パケットを、取得した宛先ポート番号の通信ポート51経由で宛先の車載ECU111へ送信する。
 (SOME/IPメッセージが格納されたパケットを受信した場合の処理)
 たとえば、中継部52は、車載ECU111から受信したパケットのうちの、SOME/IPに従うメッセージが格納されたパケットを、宛先の車載ECU111へ送信する前に記憶部57に保存する。そして、中継部52は、処理部55からの指示により、当該パケットを宛先の車載ECU111へ送信するか、または当該パケットを破棄する。
 より詳細には、中継部52は、ある車載ECU111から対応の通信ポート51経由でパケットを受信すると、受信したパケットのペイロードを確認することにより当該パケットにSOME/IPに従うメッセージが格納されているか否かを判断する。中継部52は、SOME/IPに従うメッセージが格納されているパケットを検知すると、当該パケットを宛先の車載ECU111へ送信する前に記憶部57に保存する。
 一例として、中継部52は、受信したパケットにSOME/IPに従うメッセージが格納されていると判断した場合、当該パケットを受信した際に当該パケットが経由した通信ポート51のポート番号(以下、「送信元ポート番号」と称する。)および当該パケットの送信元MACアドレスを含む受信経路情報を生成する。また、中継部52は、当該パケットの宛先MACアドレスに対応する宛先ポート番号を記憶部57におけるアドレステーブルTb1から取得し、取得した宛先ポート番号および宛先MACアドレスを含む送信経路情報を生成する。そして、中継部52は、生成した受信経路情報および送信経路情報を当該パケットの属性として記憶部57に保存する。
 中継部52は、SOME/IPに従うメッセージが格納されているパケット、受信経路情報および送信経路情報を記憶部57に保存すると、検知処理の対象となるパケットを記憶部57に保存した旨を示す保存通知をパケット監視部53へ出力する。
 <パケット監視部>
 パケット監視部53は、中継部52により受信されたパケットを取得する。より詳細には、パケット監視部53は、中継部52から保存通知を受けて、記憶部57にアクセスすることにより、中継部52により記憶部57に保存された、SOME/IPに従うメッセージが格納されているパケットを取得する。
 (受信経路情報の取得)
 パケット監視部53は、取得したパケットが中継部52により受信された際に経由した通信ポート51と、当該パケットの送信元アドレスとを示す受信経路情報を取得する。
 より詳細には、パケット監視部53は、中継部52から保存通知を受けて、記憶部57から受信経路情報を取得する。
 (送信経路情報の取得)
 パケット監視部53は、取得したパケットが中継部52により車載ECU111へ中継される際に経由すべき通信ポート51と、当該パケットの宛先アドレスとを示す送信経路情報をさらに取得する。
 より詳細には、パケット監視部53は、中継部52から保存通知を受けて、記憶部57から送信経路情報を取得する。
 パケット監視部53は、中継部52から保存通知を受けて、記憶部57からパケット、受信経路情報および送信経路情報を取得すると、パケットを取得した旨を示す取得通知を処理部55へ出力する。
 <処理部>
 処理部55は、パケット監視部53により取得されたパケットP1と、中継部52によりパケットP1の受信前に受信されたパケットであってパケットP1に対応するパケットP2との整合性、およびパケット監視部53により取得された受信経路情報に基づいて、不正パケットを検知する検知処理を行う。パケットP1は、第1のパケットの一例である。パケットP2は、第2のパケットの一例である。なお、「第1の」「第2の」の記載は、優先順位を意味するものではない。
 たとえば、処理部55は、パケットP1と、SOME/IPに従うステートフルルールについてパケットP1に対応するパケットP2との整合性、および受信経路情報に基づいて検知処理を行う。
 より詳細には、処理部55は、あるパケットP1の取得通知をパケット監視部53から受けると、パケットP1からメッセージM1を取得する。そして、処理部55は、パケット監視部53により過去に取得されたパケットのうちの、SOME/IPに従うシーケンスに関してメッセージM1に対応するメッセージM2が格納されたパケットP2を特定し、特定したパケットP2とパケットP1との整合性を判断する。
 図6は、本開示の実施の形態に係るゲートウェイ装置の記憶部におけるタイプテーブルの一例を示す図である。図6を参照して、記憶部57は、ゲートウェイ装置101における中継部52により受信されたパケットに格納されたメッセージのタイプおよび当該パケットの宛先IPアドレスのアドレス種類と、当該メッセージに対応するメッセージのタイプとの対応関係を示すタイプテーブルTb2を記憶している。「宛先IPアドレスのアドレス種類」とは、宛先IPアドレスが、マルチキャストアドレスおよびユニキャストアドレスのいずれであるかを示す。たとえば、タイプテーブルTb2は、2つのメッセージの、SOME/IPに従うシーケンスに基づく対応関係を示している。
 図7は、本開示の実施の形態に係るゲートウェイ装置の記憶部におけるパケット管理テーブルの一例を示す図である。図7を参照して、記憶部57は、サービスIDごとに、パケット監視部53により取得されたパケットに格納されたメッセージのタイプと、当該パケットの受信経路情報および送信経路情報との対応関係を示すパケット管理テーブルTb3を記憶している。
 処理部55は、パケットP1の取得通知をパケット監視部53から受けると、パケットP1からメッセージM1および宛先IPアドレスを取得する。処理部55は、取得したメッセージM1の「メッセージタイプ」のフィールドからメッセージM1のタイプTy1を取得する。そして、処理部55は、記憶部57のタイプテーブルTb2において、取得したタイプTy1および宛先IPアドレスのアドレス種類に対応する、タイプTy2を検索する。
 たとえば、タイプTy1が「Findメッセージ」であり、かつパケットP1の宛先IPアドレスのアドレス種類が「ユニキャストアドレス」または「マルチキャストアドレス」である場合、タイプテーブルTb2において対応するタイプTy2は存在しない。
 処理部55は、タイプテーブルTb2においてタイプTy2が存在しない場合、メッセージM1のサービスIDおよびタイプTy1、ならびにパケットP1の受信経路情報および送信経路情報を記憶部57におけるパケット管理テーブルTb3に登録する。また、処理部55は、パケットP1を送信すべき旨の送信指示を中継部52へ出力する。
 一方、処理部55は、タイプテーブルTb2にタイプTy2が存在する場合、当該タイプTy2を取得する。具体的には、処理部55は、タイプTy1が「Offerメッセージ」であり、かつパケットP1の宛先IPアドレスのアドレス種類が「ユニキャストアドレス」である場合、タイプTy2として「Findメッセージ」を取得する。
 そして、処理部55は、パケット管理テーブルTb3を参照して、パケット監視部53により過去に取得されたパケットのうちの、メッセージM1と同じサービスIDを含むタイプTy2のメッセージM2が格納されたパケットP2の送信元MACアドレス等を取得し、たとえばパケットP1の送信元MACアドレスとパケットP2の宛先MACアドレスとを比較することにより、パケットP1とパケットP2との整合性を判断する。
 処理部55は、パケットP1とパケットP2との整合性の判断結果および受信経路情報に少なくとも基づいて、パケットP1が不正パケットであるか否かを判断する。以下、パケットP1が不正パケットであるか否かを判断する処理の詳細を、検知処理の具体例1-3として説明する。
 (検知処理の具体例1)
 処理部55は、パケットP1についての受信経路情報が示す送信元ポート番号および送信経路情報が示す宛先ポート番号の組と、パケットP2についての受信経路情報が示す送信元ポート番号および送信経路情報が示す宛先ポート番号の組との整合性、ならびにパケットP1についての受信経路情報が示す送信元MACアドレスおよび送信経路情報が示す宛先MACアドレスの組と、パケットP2についての受信経路情報が示す送信元MACアドレスおよび送信経路情報が示す宛先MACアドレスの組との整合性に基づいて、パケットP1が不正パケットであるか否かを判断する。
 より詳細には、処理部55は、パケット管理テーブルTb3から、パケットP2の受信経路情報および送信経路情報として、メッセージM1のサービスIDおよびタイプTy2に対応する受信経路情報および送信経路情報を取得する。また、処理部55は、記憶部57からパケットP1の受信経路情報および送信経路情報を取得する。
 そして、処理部55は、パケットP1の受信経路情報とパケットP2の送信経路情報とを比較するとともに、パケットP1の送信経路情報とパケットP2の受信経路情報とを比較する。
 たとえば、処理部55は、パケットP1の送信元ポート番号とパケットP2の宛先ポート番号とが一致し、パケットP1の宛先ポート番号とパケットP2の送信元ポート番号とが一致し、パケットP1の送信元MACアドレスとパケットP2の宛先MACアドレスとが一致し、かつパケットP1の宛先MACアドレスとパケットP2の送信元MACアドレスとが一致する場合、パケットP1は不正パケットではないと判断する。
 一方、処理部55は、パケットP1の送信元ポート番号とパケットP2の宛先ポート番号とが一致しないか、パケットP1の宛先ポート番号とパケットP2の送信元ポート番号とが一致しないか、パケットP1の送信元MACアドレスとパケットP2の宛先MACアドレスとが一致しないか、またはパケットP1の宛先MACアドレスとパケットP2の送信元MACアドレスとが一致しない場合、パケットP1は不正パケットであると判断する。
 たとえば、処理部55は、タイプテーブルTb2にタイプTy2が存在する場合であって、パケット管理テーブルTb3からパケットP2の受信経路情報および送信経路情報を取得できなかった場合、すなわちパケット管理テーブルTb3にパケットP2の受信経路情報および送信経路情報が登録されていない場合、パケットP1は不正パケットであると判断する。
 (パケットの送信)
 処理部55は、パケットP1は不正パケットではないと判断した場合、パケットP1を送信すべき旨の送信指示を中継部52へ出力する。
 中継部52は、処理部55から送信指示を受けた場合、記憶部57からパケットP1を取得し、取得したパケットP1を宛先ポート番号の通信ポート51経由で宛先の車載ECU111へ送信する。
 また、処理部55は、パケットP1が不正パケットではないと判断した場合であって、かつメッセージM1のタイプTy1が「StopOfferメッセージ」または「StopSubscribeメッセージ」である場合、パケット管理テーブルTb3からメッセージM1のサービスIDに対応する情報を削除する。
 一方、パケットP1が不正パケットではないと判断した場合であって、メッセージM1のタイプTy1が「StopOfferメッセージ」および「StopSubscribeメッセージ」以外のタイプであり、かつメッセージM1のサービスIDに対応する情報がパケット管理テーブルTb3に未登録である場合、メッセージM1のサービスIDに対応する情報をパケット管理テーブルTb3に登録する。
 (パケットの破棄)
 処理部55は、不正パケットを検知した場合、中継部52による不正パケットの中継を行わせないための処理を行う。より詳細には、処理部55は、パケットP1は不正パケットであると判断した場合、パケットP1を破棄すべき旨の破棄指示を中継部52へ出力する。
 中継部52は、処理部55から破棄指示を受けた場合、記憶部57からパケットP1を消去する。
 (不正ログの作成および通知)
 処理部55は、パケットP1が不正パケットであると判断した場合、パケットP1についての受信経路情報が示す送信元ポート番号およびパケットP1の送信元MACアドレスの組と、パケットP2についての受信経路情報が示す送信元ポート番号およびパケットP2の送信元MACアドレスの組とを示すログ情報を作成する。処理部55は、作成したログ情報を記憶部57に保存するとともに、出力部56へ出力する。
 出力部56は、ログ情報を処理部55から受けると、たとえば、不正パケットが検知された旨の警報情報およびログ情報をユーザの端末等へ送信する。具体的には、出力部56は、警報情報およびログ情報を、無線通信機能を有する車載ECU111へ中継部52および対応の通信ポート51経由で送信する。当該車載ECU111は、ゲートウェイ装置101から受信した警報情報およびログ情報をユーザの端末等へ送信する。
 (中継処理の停止)
 処理部55は、不正パケットを検知した場合、中継部52による中継処理であって、中継部52により受信される際に不正パケットが経由した通信ポート51を介した中継処理を停止する処理を行う。より詳細には、処理部55は、パケットP1の送信元ポート番号を示す遮断指示を中継部52へ出力する。
 中継部52は、処理部55から遮断指示を受けて、受けた遮断指示が示す送信元ポート番号の通信ポート51を遮断する。具体的には、中継部52は、当該通信ポート51からのパケットの受信を停止する。
 (検知処理の具体例2)
 処理部55は、記憶部57のアドレステーブルTb1において、パケットP1の受信経路情報が示す送信元ポート番号および送信元MACアドレスの組を照合する。そして、処理部55は、照合結果およびパケットP1とパケットP2との整合性に基づいて、パケットP1が不正パケットであるか否かを判断する。
 より詳細には、処理部55は、記憶部57から、パケットP1の受信経路情報を取得する。
 そして、処理部55は、記憶部57におけるアドレステーブルTb1から、パケットP1の受信経路情報が示す送信元MACアドレスに対応するポート番号を取得し、取得したポート番号と、パケットP1の受信経路情報が示す送信元ポート番号とが一致するか否かを確認する。
 また、処理部55は、パケット管理テーブルTb3から、メッセージM1のサービスIDに対応するメッセージのタイプ(以下、「タイプTy3」と称する)を取得し、取得したタイプTy3とタイプTy2とを比較する。
 たとえば、処理部55は、アドレステーブルTb1から取得したポート番号と、パケットP1の受信経路情報が示す送信元ポート番号とが一致し、かつタイプTy3とタイプTy2とが一致する場合、パケットP1は不正パケットではないと判断する。
 処理部55は、パケットP1は不正パケットではないと判断した場合、上述した「パケットの送信」等の処理を行う。
 一方、処理部55は、アドレステーブルTb1から取得したポート番号と、パケットP1の受信経路情報が示す送信元ポート番号とが一致しないか、またはタイプTy3とタイプTy2とが一致しない場合、パケットP1は不正パケットであると判断する。
 処理部55は、パケットP1は不正パケットであると判断した場合、上述した「パケットの破棄」等の処理を行う。
 また、処理部55は、中継部52により受信されたパケットの送信元MACアドレスと、中継部52により受信された際に当該パケットが経由した通信ポート51との組が、アドレステーブルTb1における同じ送信元MACアドレスの属する組の通信ポート51と一致しない場合、アドレステーブルTb1の更新を行わない。
 より詳細には、処理部55は、パケットP1の受信経路情報が示す送信元MACアドレスと、パケットP1の受信経路情報が示す送信元ポート番号とは異なるポート番号の対応関係がアドレステーブルTb1に既に登録されている場合、当該受信経路情報が示す送信元MACアドレスおよび送信元ポート番号によるアドレステーブルTb1の更新を行わない。
 上述したように、「検知処理の具体例2」では、処理部55は、パケット管理テーブルTb3から、メッセージM1のサービスIDに対応するメッセージのタイプTy3を取得する一方で、受信経路情報および送信経路情報の取得は行わない。したがって、処理部55により「検知処理の具体例2」が実行される場合、記憶部57は、パケット管理テーブルTb3を記憶する代わりに、サービスIDと、メッセージのタイプとの対応関係を示すテーブルを記憶していてもよい。これにより、パケット管理テーブルTb3と比べて簡易なテーブルを用いて検知処理を行うことができる。
 また、「検知処理の具体例2」では、「検知処理の具体例1」と比べて、パケットP1の宛先MACアドレスおよび宛先ポート番号を必要としないので、パケットP1に関するより少ない情報を用いて、パケットP1が不正パケットであるか否かの判断を行うことができる。
 (検知処理の具体例2の変形例)
 処理部55は、以下のようにして、パケットP1が不正パケットであるか否かの判断を行ってもよい。すなわち、処理部55は、パケット管理テーブルTb3から、パケットP2の送信元MACアドレスおよび宛先MACアドレスとして、メッセージM1のサービスIDおよびタイプTy2に対応する送信元MACアドレスおよび宛先MACアドレスを取得する。
 そして、処理部55は、パケットP1の送信元MACアドレスとパケットP2の宛先MACアドレスを比較するとともに、パケットP1の宛先MACアドレスとパケットP2の送信元MACアドレスを比較する。
 たとえば、処理部55は、アドレステーブルTb1から取得したポート番号と、パケットP1の受信経路情報が示す送信元ポート番号とが一致し、パケットP1の送信元MACアドレスとパケットP2の宛先MACアドレスとが一致し、かつパケットP1の宛先MACアドレスとパケットP2の送信元MACアドレスとが一致する場合、パケットP1は不正パケットではないと判断する。
 一方、処理部55は、アドレステーブルTb1から取得したポート番号と、パケットP1の受信経路情報が示す送信元ポート番号とが一致しないか、パケットP1の送信元MACアドレスとパケットP2の宛先MACアドレスとが一致しないか、またはパケットP1の宛先MACアドレスとパケットP2の送信元MACアドレスとが一致しない場合、パケットP1は不正パケットであると判断する。
 (検知処理の具体例3)
 たとえば、処理部55は、サービスIDごとのサーバおよびクライアント間の状態に基づいて、検知処理を行う。
 図8は、本開示の実施の形態に係る車載ネットワークにおけるクライアントおよびサーバ間の状態を説明するための図である。
 図8を参照して、サーバおよびクライアント間の状態は、初期状態である「状態A」、通信接続の確立途中の状態である「状態B」、および通信接続が確立された状態である「状態C」のいずれかの状態を取り得る。
 より詳細には、サーバおよびクライアント間の状態が状態Aである場合、クライアントが、サービスIDを含むFindメッセージをマルチキャストすることにより、当該サービスIDについてのサーバおよびクライアント間の状態は状態Bに遷移する。
 そして、当該サーバがOfferメッセージを当該クライアントへユニキャストすることにより、サーバおよびクライアント間の状態は状態Cに遷移する。すなわち、当該サービスIDについてのサーバとクライアントとの間で通信接続が確立される。
 その後、たとえば、サーバが定期的にクライアントへNotificationメッセージを送信している状態において、サーバがStopOfferメッセージをクライアントへ送信することにより、当該サービスIDについてのサーバおよびクライアント間の状態は初期状態である状態Aに遷移する。
 図9は、本開示の実施の形態に係るゲートウェイ装置の記憶部における状態管理テーブルの一例を示す図である。図9を参照して、記憶部57は、サービスIDと、サーバおよびクライアント間の現在の状態St1との対応関係を示す状態管理テーブルTb4を記憶している。
 処理部55は、あるパケットP1がパケット監視部53により記憶部57に保存されると、当該パケットP1に格納されたメッセージM1のサービスIDを取得する。処理部55は、記憶部57における状態管理テーブルTb4を参照し、取得したサービスIDに対応するサーバおよびクライアント間の現在の状態St1を検索する。
 たとえば、処理部55は、取得したサービスIDが「0x1234」である場合、当該サービスIDに対応するサーバおよびクライアント間の現在の状態St1は「状態C」であると判断する。
 一方、たとえば、処理部55は、取得したサービスIDに対応する状態St1が状態管理テーブルTb4に存在しない場合、当該サービスIDに対応するサーバおよびクライアント間の現在の状態St1は、初期状態である「状態A」であると判断する。
 図10は、本開示の実施の形態に係るゲートウェイ装置の記憶部における状態遷移テーブルの一例を示す図である。図10を参照して、記憶部57は、メッセージのタイプおよびパケットの宛先IPアドレスのアドレス種類と、当該メッセージの送受信によるサーバおよびクライアント間の状態遷移との対応関係を示す状態遷移テーブルTb5を記憶している。
 処理部55は、状態遷移テーブルTb5を参照し、メッセージM1のタイプTy1、パケットP1の宛先IPアドレスのアドレス種類および状態St1に対応する、メッセージの送受信後のサーバおよびクライアント間の状態St2を検索する。
 たとえば、メッセージM1のタイプTy1が「Offerメッセージ」であり、パケットP1の宛先IPアドレスのアドレス種類が「ユニキャストアドレス」であり、かつ状態St1が「状態A」である場合、状態遷移テーブルTb5に状態St2は存在しない。これは、サーバおよびクライアント間の状態が状態Aであるとき、当該サーバおよび当該クライアント間においてOfferメッセージが格納されたユニキャストパケットが送受信されることは通常起こり得ないことを示している。
 処理部55は、状態遷移テーブルTb5に状態St2が存在しない場合、パケットP1は不正パケットであると判断する。処理部55は、パケットP1は不正パケットであると判断した場合、上述した「パケットの破棄」等の処理を行う。
 一方、たとえば、処理部55は、メッセージM1のタイプが「Offerメッセージ」であり、パケットP1の宛先IPアドレスのアドレス種類が「ユニキャストアドレス」であり、かつ状態St1が「状態B」である場合、メッセージの送受信後のサーバおよびクライアント間の状態St2は「状態C」であると判断する。
 処理部55は、状態遷移テーブルTb5に状態St2が存在する場合、パケットP1は不正パケットではないと判断する。処理部55は、パケットP1は不正パケットではないと判断した場合、上述した「パケットの送信」等の処理を行う。たとえば、処理部55は、パケットP1は不正パケットではないと判断した場合、状態管理テーブルTb4における状態St1を、状態St2すなわち「状態C」に更新する。
 なお、処理部55は、状態遷移テーブルTb5に状態St2が存在する場合、上述した「検知処理の具体例1」および「検知処理の具体例2」の少なくともいずれか一方をさらに行うことにより、パケットP1が不正パケットであるか否かを判断する構成であってもよい。
 [動作の流れ]
 図11は、本開示の実施の形態に係るゲートウェイ装置が検知処理を行う際の動作手順の一例を定めたフローチャートである。図11は、上述の「検知処理の具体例1」のフローチャートを示している。
 図11を参照して、まず、ゲートウェイ装置101は、SOME/IPに従うメッセージが格納されたパケットを待ち受け(ステップS102でNO)、中継部52がパケットP1を受信すると(ステップS102でYES)、中継部52により受信されたパケットP1を取得する(ステップS104)。
 次に、ゲートウェイ装置101は、パケットP1の受信経路情報および送信経路情報を生成する(ステップS106)。
 次に、ゲートウェイ装置101は、記憶部57のタイプテーブルTb2において、パケットP1に格納されたメッセージM1に対応するメッセージM2のタイプTy2を検索する。より詳細には、ゲートウェイ装置101は、パケットP1からメッセージM1および宛先IPアドレスを取得し、取得したメッセージM1の「メッセージタイプ」のフィールドからメッセージM1のタイプTy1を取得する。そして、ゲートウェイ装置101は、タイプテーブルTb2において、取得したタイプTy1および宛先IPアドレスのアドレス種類に対応するタイプTy2を検索する(ステップS108)。
 次に、ゲートウェイ装置101は、タイプテーブルTb2にタイプTy2が存在しない場合(ステップS110でNO)、パケットP1の情報を記憶部57におけるパケット管理テーブルTb3に登録する。より詳細には、ゲートウェイ装置101は、メッセージM1のサービスIDおよびタイプTy1、ならびにパケットP1の受信経路情報および送信経路情報をパケット管理テーブルTb3に登録する(ステップS112)。
 次に、ゲートウェイ装置101は、パケットP1を中継部52経由で宛先の車載ECU111へ送信する(ステップS114)。
 次に、ゲートウェイ装置101は、SOME/IPに従うメッセージが格納された新たなパケットを待ち受ける(ステップS102でNO)。
 一方、ゲートウェイ装置101は、タイプテーブルTb2にタイプTy2が存在する場合(ステップS110でYES)、当該タイプTy2を取得し、パケット管理テーブルTb3から、パケットP2の受信経路情報および送信経路情報として、メッセージM1のサービスIDおよびタイプTy2に対応する受信経路情報および送信経路情報を取得する(ステップS116)。
 次に、ゲートウェイ装置101は、パケットP1の受信経路情報とパケットP2の送信経路情報とを比較するとともに、パケットP1の送信経路情報とパケットP2の受信経路情報とを比較する(ステップS118)。
 次に、ゲートウェイ装置101は、パケットP1の送信元ポート番号とパケットP2の宛先ポート番号とが一致しないか、パケットP1の宛先ポート番号とパケットP2の送信元ポート番号とが一致しないか、パケットP1の送信元MACアドレスとパケットP2の宛先MACアドレスとが一致しないか、またはパケットP1の宛先MACアドレスとパケットP2の送信元MACアドレスとが一致しない場合(ステップS120でNO)、パケットP1は不正パケットであると判断する(ステップS122)。
 次に、ゲートウェイ装置101は、パケットP1の破棄、ログ情報の作成、ユーザ端末への警報情報およびログ情報の送信、ならびにパケットP1の送信元ポート番号の通信ポート51の遮断を行う(ステップS124)。
 次に、ゲートウェイ装置101は、SOME/IPに従うメッセージが格納された新たなパケットを待ち受ける(ステップS102でNO)。
 一方、ゲートウェイ装置101は、パケットP1の送信元ポート番号とパケットP2の宛先ポート番号とが一致し、パケットP1の宛先ポート番号とパケットP2の送信元ポート番号とが一致し、パケットP1の送信元MACアドレスとパケットP2の宛先MACアドレスとが一致し、かつパケットP1の宛先MACアドレスとパケットP2の送信元MACアドレスとが一致する場合(ステップS120でYES)、パケットP1は不正パケットではないと判断する(ステップS126)。
 次に、ゲートウェイ装置101は、メッセージM1のタイプTy1が「StopOfferメッセージ」または「StopSubscribeメッセージ」である場合(ステップS128でYES)、パケット管理テーブルTb3からメッセージM1のサービスIDに対応する情報を削除する(ステップS130)。
 次に、ゲートウェイ装置101は、パケットP1を中継部52経由で宛先の車載ECU111へ送信し(ステップS132)、SOME/IPに従うメッセージが格納された新たなパケットを待ち受ける(ステップS102でNO)。
 一方、ゲートウェイ装置101は、メッセージM1のタイプTy1が「StopOfferメッセージ」および「StopSubscribeメッセージ」以外のタイプであり(ステップS128でNO)、かつメッセージM1のサービスIDに対応する情報がパケット管理テーブルTb3に登録されている場合(ステップS134でYES)、パケットP1を中継部52経由で宛先の車載ECU111へ送信し(ステップS132)、SOME/IPに従うメッセージが格納された新たなパケットを待ち受ける(ステップS102でNO)。
 一方、ゲートウェイ装置101は、メッセージM1のタイプTy1が「StopOfferメッセージ」および「StopSubscribeメッセージ」以外のタイプであり(ステップS128でNO)、かつメッセージM1のサービスIDに対応する情報がパケット管理テーブルTb3に未登録である場合(ステップS134でNO)、メッセージM1のサービスIDに対応する情報をパケット管理テーブルTb3に登録する(ステップS136)。
 次に、ゲートウェイ装置101は、パケットP1を中継部52経由で宛先の車載ECU111へ送信し(ステップS132)、SOME/IPに従うメッセージが格納された新たなパケットを待ち受ける(ステップS102でNO)。
 図12は、本開示の実施の形態に係るゲートウェイ装置が検知処理を行う際の動作手順の他の例を定めたフローチャートである。図12は、上述の「検知処理の具体例2」のフローチャートを示している。
 図12を参照して、ステップS202からステップS214の処理は、図11におけるステップS102からステップS114の処理と同様である。
 そして、ゲートウェイ装置101は、タイプテーブルTb2にタイプTy2が存在する場合(ステップS210でYES)、当該タイプTy2を取得し、パケット管理テーブルTb3から、メッセージM1のサービスIDに対応するメッセージのタイプTy3を取得する(ステップS216)。
 次に、ゲートウェイ装置101は、記憶部57におけるアドレステーブルTb1において、パケットP1の受信経路情報が示す送信元ポート番号および送信元MACアドレスの組を照合し、タイプTy2とタイプTy3とを比較する(ステップS218)。
 次に、ゲートウェイ装置101は、アドレステーブルTb1におけるパケットP1の送信元MACアドレスに対応するポート番号と、パケットP1の受信経路情報が示す送信元ポート番号とが一致しないか、またはタイプTy2とタイプTy3とが一致しない場合(ステップS220でNO)、パケットP1は不正パケットであると判断する(ステップS222)。
 次に、ゲートウェイ装置101は、パケットP1の破棄、ログ情報の作成、ユーザ端末への警報情報およびログ情報の送信、ならびにパケットP1の送信元ポート番号の通信ポート51の遮断を行い(ステップS224)、SOME/IPに従うメッセージが格納された新たなパケットを待ち受ける(ステップS202でNO)。
 一方、ゲートウェイ装置101は、アドレステーブルTb1におけるパケットP1の送信元MACアドレスに対応するポート番号と、パケットP1の受信経路情報が示す送信元ポート番号とが一致し、かつタイプTy2とタイプTy3とが一致する場合(ステップS220でYES)、パケットP1は不正パケットではないと判断する(ステップS226)。
 ステップS228からステップS236の処理は、図11におけるステップS128からステップS136の処理と同様である。
 図13は、本開示の実施の形態に係るゲートウェイ装置が検知処理を行う際の動作手順の他の例を定めたフローチャートである。図13は、上述の「検知処理の具体例3」のフローチャートを示している。
 図13を参照して、まず、ゲートウェイ装置101は、SOME/IPに従うメッセージが格納されたパケットを待ち受け(ステップS302でNO)、中継部52がパケットP1を受信すると(ステップS302でYES)、中継部52により受信されたパケットP1を取得する(ステップS304)。
 次に、ゲートウェイ装置101は、取得したパケットP1から宛先IPアドレスおよびメッセージM1を取得し、取得したメッセージM1からサービスIDおよびタイプTy1を取得する(ステップS306)。
 次に、ゲートウェイ装置101は、記憶部57における状態管理テーブルTb4を参照し、取得したサービスIDに対応するサーバおよびクライアント間の現在の状態St1を検索する(ステップS308)。
 次に、ゲートウェイ装置101は、取得したサービスIDに対応する状態St1が状態管理テーブルTb4に登録されていない場合(ステップS310でNO)、当該サービスIDに対応するサーバおよびクライアント間の現在の状態St1は「状態A」であると判断し(ステップS312)、状態遷移テーブルTb5を参照し、メッセージM1のタイプTy1、パケットP1の宛先IPアドレスのアドレス種類および状態St1に対応する状態St2を検索する(ステップS316)。
 一方、ゲートウェイ装置101は、取得したサービスIDに対応する状態St1が状態管理テーブルTb4に登録されている場合(ステップS310でYES)、状態管理テーブルTb4から状態St1を取得し(ステップS314)、状態遷移テーブルTb5を参照し、メッセージM1のタイプTy1、パケットP1の宛先IPアドレスのアドレス種類および状態St1に対応する状態St2を検索する(ステップS316)。
 次に、ゲートウェイ装置101は、状態遷移テーブルTb5に状態St2が存在しない場合(ステップS318でNO)、パケットP1は不正パケットであると判断する(ステップS320)。
 次に、ゲートウェイ装置101は、パケットP1の破棄、ログ情報の作成、ユーザ端末への警報情報およびログ情報の送信、ならびにパケットP1の送信元ポート番号の通信ポート51の遮断を行い(ステップS322)、SOME/IPに従うメッセージが格納された新たなパケットを待ち受ける(ステップS302でNO)。
 一方、ゲートウェイ装置101は、状態遷移テーブルTb5に状態St2が存在する場合(ステップS318でYES)、パケットP1は不正パケットではないと判断する(ステップS324)。
 次に、ゲートウェイ装置101は、状態管理テーブルTb4における状態St1を状態St2に更新する(ステップS326)。
 次に、ゲートウェイ装置101は、パケットP1を中継部52経由で宛先の車載ECU111へ送信し(ステップS328)、SOME/IPに従うメッセージが格納された新たなパケットを待ち受ける(ステップS302でNO)。
 なお、本開示の実施の形態では、ゲートウェイ装置101が検知処理を行う構成であるとしたが、これに限定するものではない。車載ネットワーク12において、ゲートウェイ装置101とは別の装置が、検知装置として不正メッセージの検知処理を行う構成であってもよい。この場合、当該検知装置は、ゲートウェイ装置101の所定のポート、たとえばミラーポートに接続されてもよい。
 また、本開示の実施の形態に係るゲートウェイ装置101では、処理部55は、不正パケットを検知した場合、中継部52により受信される際に不正パケットが経由した通信ポート51を介した中継処理を停止する処理を行う構成であるとしたが、これに限定するものではない。処理部55は、不正パケットを検知した場合、たとえば不正パケットの破棄を行う一方で、不正パケットが経由した通信ポート51を介した中継処理を停止する処理を行わない構成であってもよい。
 また、本開示の実施の形態に係るゲートウェイ装置101では、処理部55は、不正パケットを検知した場合、ログ情報を作成する構成であるとしたが、これに限定するものではない。処理部55は、不正パケットを検知した場合、たとえば不正パケットの破棄を行う一方で、ログ情報の作成を行わない構成であってもよい。
 また、本開示の実施の形態に係るゲートウェイ装置101では、処理部55は、中継部52により受信されたパケットの送信元MACアドレスと、中継部52により受信された際に当該パケットが経由した通信ポート51との組を登録することによりアドレステーブルTb1を更新することが可能な構成であるとしたが、これに限定するものではない。処理部55は、アドレステーブルTb1を更新しない構成であってもよい。
 また、本開示の実施の形態に係るゲートウェイ装置101では、処理部55は、パケットP1と、SOME/IPに従うシーケンスに関してメッセージM1に対応するメッセージM2が格納されたパケットP2との整合性を判断する構成であるとしたが、これに限定するものではない。処理部55は、パケットP1と、ICMP(Internet Control Message Protocol)等のSOME/IP以外のプロトコルに従うシーケンスに関してメッセージM1に対応するメッセージM2が格納されたパケットP2との整合性を判断する構成であってもよい。
 また、本開示の実施の形態に係るゲートウェイ装置101では、記憶部57は、パケットに格納されたメッセージのタイプおよび当該パケットの宛先IPアドレスのアドレス種類と、当該メッセージに対応するメッセージのタイプとの対応関係を示すタイプテーブルTb2を記憶している構成であるとしたが、これに限定するものではない。記憶部57は、タイプテーブルTb2の代わりに、パケットに格納されたメッセージのタイプおよび当該パケットの宛先MACアドレスのアドレス種類と、当該メッセージに対応するメッセージのタイプとの対応関係を示すタイプテーブルTb2Aを記憶している構成であってもよい。「宛先MACアドレスのアドレス種類」とは、宛先MACアドレスが、マルチキャストアドレスおよびユニキャストアドレスのいずれであるかを示す。この場合、処理部55は、タイプテーブルTb2Aにおいて、メッセージM1のタイプTy1およびパケットP1の宛先MACアドレスのアドレス種類に対応する、タイプTy2を検索する。
 また、本開示の実施の形態に係るゲートウェイ装置101では、記憶部57は、メッセージのタイプおよびパケットの宛先IPアドレスのアドレス種類と、当該メッセージの送受信によるサーバおよびクライアント間の状態遷移との対応関係を示す状態遷移テーブルTb5を記憶している構成であるとしたが、これに限定するものではない。記憶部57は、状態遷移テーブルTb5の代わりに、メッセージのタイプおよびパケットの宛先MACアドレスのアドレス種類と、当該メッセージの送受信によるサーバおよびクライアント間の状態遷移との対応関係を示す状態遷移テーブルTb5Aを記憶している構成であってもよい。この場合、処理部55は、状態遷移テーブルTb5Aにおいて、メッセージM1のタイプTy1、パケットP1の宛先MACアドレスのアドレス種類および状態St1に対応する、状態St2を検索する。
 また、本開示の実施の形態に係るゲートウェイ装置101では、記憶部57は、サービスIDごとに、メッセージのタイプと受信経路情報および送信経路情報との対応関係を示すパケット管理テーブルTb3を記憶している構成であるとしたが、これに限定するものではない。記憶部57は、パケット管理テーブルTb3の代わりに、サービスIDおよびメソッドIDごとに、メッセージのタイプと受信経路情報および送信経路情報との対応関係を示すパケット管理テーブルTb3Aを記憶している構成であってもよい。この場合、処理部55は、パケット管理テーブルTb3を参照して、パケット監視部53により過去に取得されたパケットのうちの、メッセージM1と同じサービスIDおよび同じメソッドIDを含むタイプTy2のメッセージM2が格納されたパケットP2の送信元MACアドレス等を取得する。
 <変形例>
 本開示の実施の形態に係るゲートウェイ装置101では、中継部52は、SOME/IPに従うメッセージが格納されたパケットを、宛先の車載ECU111へ送信する前に記憶部57に保存する構成であるとしたが、これに限定するものではない。
 中継部52は、SOME/IPに従うメッセージが格納されたパケットを、宛先の車載ECU111へ送信するとともに、当該パケットの複製を記憶部57に保存する構成であってもよい。
 より詳細には、中継部52は、ある車載ECU111から対応の通信ポート51経由でパケットを受信すると、受信したパケットのペイロードを確認することにより当該パケットにSOME/IPに従うメッセージが格納されているか否かを判断する。中継部52は、SOME/IPに従うメッセージが格納されているパケットを検知すると、当該パケットの宛先の車載ECU111へ対応の通信ポート51経由で送信するとともに、当該パケットを複製する。そして、中継部52は、複製により得られたパケットを記憶部57に保存する。また、中継部52は、受信経路情報および送信経路情報を生成し、生成した受信経路情報および送信経路情報を当該パケットの属性として記憶部57に保存する。
 中継部52は、複製により得られたパケット、受信経路情報および送信経路情報を記憶部57に保存すると、保存通知をパケット監視部53へ出力する。
 パケット監視部53は、中継部52により受信されたパケットとして、複製により得られたパケットを取得する。より詳細には、パケット監視部53は、中継部52から保存通知を受ける。パケット監視部53は、記憶部57にアクセスすることにより、中継部52により記憶部57に保存されたパケット、受信経路情報および送信経路情報を取得する。パケット監視部53は、パケットを取得した旨を示す取得通知を処理部55へ出力する。
 処理部55は、上述したように検知処理を行う。たとえば、処理部55は、パケットP1は不正パケットではないと判断した場合、パケットP1を送信すべき旨の送信指示を中継部52へ出力する代わりに、記憶部57からパケットP1を消去する。
 一方、処理部55は、不正パケットを検知した場合、不正パケットに格納されたメッセージに対応する防御メッセージを、不正パケットの宛先の車載ECU111または不正パケットの送信元の車載ECU111へ送信するための処理を行う。より詳細には、処理部55は、パケットP1は不正パケットであると判断した場合、防御メッセージを生成する。
 図14は、本開示の実施の形態の変形例に係るゲートウェイ装置の記憶部における防御メッセージテーブルの一例を示す図である。図14を参照して、記憶部57は、不正パケットに格納されたメッセージのタイプおよび当該不正パケットの宛先IPアドレスのアドレス種類と、生成すべき防御メッセージのタイプとの対応関係を示す防御メッセージテーブルTb6を記憶している。
 防御メッセージは、車載ECU111間で送受信される不正パケットによる影響を緩和するためのメッセージである。より詳細には、たとえば、防御メッセージは、不正パケットを受信した車載ECU111における処理であって、当該不正パケットに格納されたメッセージに基づいて行われた処理を無効化するためのメッセージである。あるいは、防御メッセージは、不正パケットを送信した車載ECU111によるさらなる不正パケットの送信を抑制するためのメッセージである。
 処理部55は、パケットP1は不正パケットであると判断すると、パケットP1からメッセージM1および宛先IPアドレスを取得する。処理部55は、取得したメッセージM1からサービスIDおよびタイプTy1を取得する。そして、処理部55は、記憶部57の防御メッセージテーブルTb6において、取得したタイプTy1および宛先IPアドレスのアドレス種類に対応するタイプTy3を検索する。
 たとえば、タイプTy1が「Findメッセージ」であり、かつパケットP1の宛先IPアドレスのアドレス種類が「ユニキャストアドレス」または「マルチキャストアドレス」である場合、防御メッセージテーブルTb6において対応するタイプTy3は存在しない。
 処理部55は、防御メッセージテーブルTb6においてタイプTy3が存在しない場合、防御メッセージの生成を行わない。
 一方、処理部55は、防御メッセージテーブルTb6にタイプTy3が存在する場合、当該タイプTy3のメッセージであって、メッセージM1と同じサービスIDが格納されたメッセージを防御メッセージとして生成する。
 (防御メッセージの送信例1)
 処理部55は、防御メッセージを、不正パケットの宛先の車載ECU111へ送信するための処理を行う。
 具体的には、たとえば、処理部55は、タイプTy1がサーバからクライアント宛の「Offerメッセージ」であり、かつパケットP1の宛先IPアドレスのアドレス種類が「マルチキャストアドレス」である場合、クライアント宛の「StopOfferメッセージ」を防御メッセージとして生成する。そして、処理部55は、生成した防御メッセージが格納されたパケットであって、送信元アドレスがパケットP1の送信元アドレスに設定され、かつ宛先アドレスがパケットP1の宛先アドレスに設定されたパケットである防御パケットを生成し、生成した防御パケットを中継部52へ出力する。
 また、たとえば、処理部55は、タイプTy1がクライアントからサーバ宛の「Subscribeメッセージ」であり、かつパケットP1の宛先IPアドレスのアドレス種類が「マルチキャストアドレス」である場合、サーバ宛の「StopSubscribeメッセージ」を防御メッセージとして生成する。そして、処理部55は、生成した防御メッセージが格納されたパケットであって、送信元アドレスがパケットP1の送信元アドレスに設定され、かつ宛先アドレスがパケットP1の宛先アドレスに設定されたパケットである防御パケットを生成し、生成した防御パケットを中継部52へ出力する。
 中継部52は、処理部55から防御パケットを受けた場合、受けた防御パケットを、防御パケットの宛先ポート番号の通信ポート51経由で宛先の車載ECU111へ送信する。
 このように、防御メッセージを生成して車載ECU111へ送信する構成により、車載ECU111により受信された不正パケットを無効化することができる。具体的には、不正な車載ECU111から送信された不正なパケットP1が、クライアントとして機能する車載ECU111により受信された場合において、当該クライアントへ防御メッセージを送信することにより、当該クライアントに、パケットP1の送信元との間で確立した通信接続の解除を行わせることができる。また、不正な車載ECU111から送信された不正なパケットP1が、サーバとして機能する車載ECU111により受信された場合において、当該サーバへ防御メッセージを送信することにより、当該サーバに、パケットP1の送信元へのNotificationメッセージの送信停止を行わせることができる。
 (防御メッセージの送信例2)
 処理部55は、防御メッセージを、不正パケットの送信元の車載ECU111へ送信するための処理を行う。
 具体的には、たとえば、処理部55は、タイプTy1がサーバからクライアント宛の「SubscribeAckメッセージ」であり、かつパケットP1の宛先IPアドレスのアドレス種類が「マルチキャストアドレス」である場合、サーバ宛の「StopSubscribeメッセージ」を防御メッセージとして生成する。そして、処理部55は、生成した防御メッセージが格納されたパケットであって、送信元アドレスがパケットP1の宛先アドレスに設定され、かつ宛先アドレスがパケットP1の送信元アドレスに設定されたパケットである防御パケットを生成し、生成した防御パケットを中継部52へ出力する。
 また、たとえば、処理部55は、タイプTy1がクライアントからサーバ宛の「Requestメッセージ」であり、かつパケットP1の宛先IPアドレスのアドレス種類が「マルチキャストアドレス」である場合、クライアント宛の「StopOfferメッセージ」を防御メッセージとして生成する。そして、処理部55は、生成した防御メッセージが格納されたパケットであって、送信元アドレスがパケットP1の宛先アドレスに設定され、かつ宛先アドレスがパケットP1の送信元アドレスに設定されたパケットである防御パケットを生成し、生成した防御パケットを中継部52へ出力する。
 中継部52は、処理部55から防御パケットを受けた場合、受けた防御パケットを、防御パケットの宛先ポート番号の通信ポート51経由で宛先の車載ECU111へ送信する。
 このように、防御メッセージを生成して車載ECU111へ送信する構成により、不正パケットを送信した車載ECU111によるさらなる不正パケットの送信を抑制することができる。具体的には、不正な車載ECU111から送信された不正なパケットP1が、クライアントとして機能する車載ECU111により受信された場合において、当該不正な車載ECU111へ防御メッセージを送信することにより、当該不正な車載ECU111に、不正なNotificationメッセージの送信を停止させることができる。また、不正な車載ECU111から送信された不正なパケットP1が、サーバとして機能する車載ECU111により受信された場合において、当該不正な車載ECU111へ防御メッセージを送信することにより、Notificationメッセージの送信を行わない旨を当該不正な車載ECU111へ通知することができる。
 (防御メッセージの送信による効果)
 SOME/IPに従うメッセージが格納されたパケットを、他の車載ECU111へ送信するとともに、当該パケットの複製を用いて検知処理を行う構成では、当該パケットを用いて検知処理を行ってから他の車載ECU111へ送信する構成と比べて、通信遅延の発生を抑制することができる。
 一方、SOME/IPに従うメッセージが格納されたパケットを用いて検知処理を行ってから他の車載ECU111へ送信する構成では、不正パケットを検知した場合において、当該不正パケットを他の車載ECU111へ送信する前に破棄することができるので、セキュリティ性を向上させることができる。
 なお、本開示の実施の形態の変形例に係るゲートウェイ装置101では、記憶部57は、不正パケットに格納されたメッセージのタイプおよび当該不正パケットの宛先IPアドレスのアドレス種類と、生成すべき防御メッセージのタイプとの対応関係を示す防御メッセージテーブルTb6を記憶している構成であるとしたが、これに限定するものではない。記憶部57は、防御メッセージテーブルTb6の代わりに、不正パケットに格納されたメッセージのタイプおよび当該不正パケットの宛先MACアドレスのアドレス種類と、生成すべき防御メッセージのタイプとの対応関係を示す防御メッセージテーブルTb6Aを記憶している構成であってもよい。この場合、処理部55は、記憶部57の防御メッセージテーブルTb6において、メッセージM1のタイプTy1およびパケットP1の宛先MACアドレスのアドレス種類に対応する、タイプTy3を検索する。
 変形例に係るゲートウェイ装置101のその他の構成および動作は、実施の形態に係るゲートウェイ装置101と同様であるため、ここでは詳細な説明を繰り返さない。
 上記実施の形態は、すべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記説明ではなく請求の範囲によって示され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。
 上述の実施形態の各処理(各機能)は、1または複数のプロセッサを含む処理回路(Circuitry)により実現される。上記処理回路は、上記1または複数のプロセッサに加え、1または複数のメモリ、各種アナログ回路、各種デジタル回路が組み合わされた集積回路等で構成されてもよい。上記1または複数のメモリは、上記各処理を上記1または複数のプロセッサに実行させるプログラム(命令)を格納する。上記1または複数のプロセッサは、上記1または複数のメモリから読み出した上記プログラムに従い上記各処理を実行してもよいし、予め上記各処理を実行するように設計された論理回路に従って上記各処理を実行してもよい。上記プロセッサは、CPU(Central Processing Unit)、GPU(Graphics Processing Unit)、DSP(Digital Signal Processor)、FPGA(Field Programmable Gate Array)、およびASIC(Application Specific Integrated Circuit)等、コンピュータの制御に適合する種々のプロセッサであってよい。なお、物理的に分離した上記複数のプロセッサが互いに協働して上記各処理を実行してもよい。たとえば、物理的に分離した複数のコンピュータのそれぞれに搭載された上記プロセッサがLAN(Local Area Network)、WAN (Wide Area Network)、およびインターネット等のネットワークを介して互いに協働して上記各処理を実行してもよい。上記プログラムは、外部のサーバ装置等から上記ネットワークを介して上記メモリにインストールされても構わないし、CD-ROM(Compact Disc Read Only Memory)、DVD-ROM(Digital Versatile Disk Read Only Memory)、および半導体必須メモリ等の記録媒体に格納された状態で流通し、上記記録媒体から上記メモリにインストールされても構わない。
 以上の説明は、以下に付記する特徴を含む。
 [付記1]
 車載ネットワークにおける不正パケットを検知する検知装置であって、
 前記車載ネットワークにおける車載装置間のパケットを中継する中継部と、
 前記中継部により受信された前記パケットについての受信経路情報を取得する経路取得部と、
 前記中継部により受信された第1の前記パケットと、前記中継部により受信された第2の前記パケットとの整合性、および前記経路取得部により取得された、前記第1のパケットについての前記受信経路情報に基づいて、前記不正パケットを検知する検知処理を行う処理部とを備え、
 前記受信経路情報は、前記パケットが経由した物理ポートである送信元ポートと、前記パケットの送信元アドレスとを示し、
 前記第2のパケットは、前記中継部により前記第1のパケットの受信前に受信された前記パケットであり、かつ前記第1のパケットに対応する前記パケットであり、
 前記中継部は、SOME/IPに従うメッセージが格納された前記パケットを受信し、
 前記処理部は、前記第1のパケットに格納された前記メッセージのサービスIDについての前記車載装置の状態にさらに基づいて前記検知処理を行う、検知装置。
 [付記2]
 車載ネットワークにおける不正パケットを検知する検知装置であって、
 処理回路を備え、
 前記処理回路は、
 前記車載ネットワークにおける車載装置間のパケットを中継し、
 受信した前記パケットについての受信経路情報を取得し、
 受信した第1の前記パケットと、受信した第2の前記パケットとの整合性、および取得した前記第1のパケットについての前記受信経路情報に基づいて、前記不正パケットを検知する検知処理を行い、
 前記受信経路情報は、前記パケットが経由した物理ポートである送信元ポートと、前記パケットの送信元アドレスとを示し、
 前記第2のパケットは、前記中継部により前記第1のパケットの受信前に受信された前記パケットであり、かつ前記第1のパケットに対応する前記パケットである、検知装置。
 1   車両
 12  車載ネットワーク
 14  ケーブル
 51  通信ポート
 52  中継部
 53  パケット監視部(経路取得部)
 55  処理部(更新部)
 56  出力部
 57  記憶部
 101 ゲートウェイ装置
 111 車載ECU
 Tb1 アドレステーブル
 Tb2 タイプテーブル
 Tb3 パケット管理テーブル
 Tb4 状態管理テーブル
 Tb5 状態遷移テーブル
 Tb6 防御メッセージテーブル

Claims (11)

  1.  車載ネットワークにおける不正パケットを検知する検知装置であって、
     前記車載ネットワークにおける車載装置間のパケットを中継する中継部と、
     前記中継部により受信された前記パケットについての受信経路情報を取得する経路取得部と、
     前記中継部により受信された第1の前記パケットと、前記中継部により受信された第2の前記パケットとの整合性、および前記経路取得部により取得された、前記第1のパケットについての前記受信経路情報に基づいて、前記不正パケットを検知する検知処理を行う処理部とを備え、
     前記受信経路情報は、前記パケットが経由した物理ポートである送信元ポートと、前記パケットの送信元アドレスとを示し、
     前記第2のパケットは、前記中継部により前記第1のパケットの受信前に受信された前記パケットであり、かつ前記第1のパケットに対応する前記パケットである、検知装置。
  2.  前記検知装置は、さらに、
     前記中継部により受信される際に前記パケットが経由する物理ポートと、前記車載装置のアドレスとの対応関係を示す対応テーブルを記憶する記憶部を備え、
     前記処理部は、前記対応テーブルにおいて、前記第1のパケットについての前記受信経路情報が示す前記送信元ポートおよび送信元アドレスの組を照合し、照合結果および前記第1のパケットと前記第2のパケットとの整合性に基づいて、前記第1のパケットが前記不正パケットであるか否かを判断する、請求項1に記載の検知装置。
  3.  前記経路取得部は、前記中継部により受信された前記パケットについての送信経路情報をさらに取得し、
     前記送信経路情報は、前記パケットが前記中継部により前記車載装置へ中継される際に前記パケットが経由すべき物理ポートである宛先ポートと、前記パケットの宛先アドレスとを示し、
     前記処理部は、前記第1のパケットについての前記受信経路情報が示す前記送信元ポートおよび前記送信経路情報が示す前記宛先ポートの組と、前記第2のパケットについての前記受信経路情報が示す前記送信元ポートおよび前記送信経路情報が示す前記宛先ポートの組との整合性、ならびに前記第1のパケットについての前記受信経路情報が示す前記送信元アドレスおよび前記送信経路情報が示す前記宛先アドレスの組と、前記第2のパケットについての前記受信経路情報が示す前記送信元アドレスおよび前記送信経路情報が示す前記宛先アドレスの組との整合性に基づいて、前記第1のパケットが前記不正パケットであるか否かを判断する、請求項1または請求項2に記載の検知装置。
  4.  前記処理部は、前記不正パケットを検知した場合、前記中継部による中継処理であって、前記中継部により受信される際に前記不正パケットが経由した物理ポートを介した前記中継処理を停止する処理を行う、請求項1から請求項3のいずれか1項に記載の検知装置。
  5.  前記処理部は、前記第1のパケットが前記不正パケットであると判断した場合、前記第1のパケットについての前記受信経路情報が示す前記送信元ポートおよび前記第1のパケットの送信元アドレスの組と、前記第2のパケットについての前記受信経路情報が示す前記送信元ポートおよび前記第2のパケットの送信元アドレスの組とを示すログ情報を作成する、請求項3に記載の検知装置。
  6.  前記検知装置は、さらに、
     前記中継部により受信される前記パケットの送信元アドレスと、前記中継部により受信される際に前記パケットが経由する物理ポートとの対応関係を示す対応テーブルに、前記中継部により受信された前記パケットの送信元アドレスと、前記中継部により受信された際に前記パケットが経由した物理ポートとの組を登録することにより前記対応テーブルを更新する更新部を備え、
     前記更新部は、前記組が、前記対応テーブルにおける同じ送信元アドレスの属する前記組の物理ポートと一致しない場合、前記対応テーブルの更新を行わない、請求項1から請求項5のいずれか1項に記載の検知装置。
  7.  前記処理部は、前記第1のパケットと、SOME/IP(Scalable service-Oriented MiddlewarE over IP)に従うステートフルルールについて前記第1のパケットに対応する前記第2のパケットとの整合性、および前記受信経路情報に基づいて前記検知処理を行う、請求項1から請求項6のいずれか1項に記載の検知装置。
  8.  前記処理部は、前記不正パケットを検知した場合、前記中継部による前記不正パケットの中継を行わせないための処理を行う、請求項1から請求項7のいずれか1項に記載の検知装置。
  9.  前記処理部は、前記不正パケットを検知した場合、前記不正パケットに格納されたメッセージに対応する防御メッセージを、前記不正パケットの宛先の前記車載装置または前記不正パケットの送信元の前記車載装置へ送信するための処理を行う、請求項1から請求項7のいずれか1項に記載の検知装置。
  10.  車載ネットワークにおける不正パケットを検知する検知装置における検知方法であって、
     前記車載ネットワークにおける車載装置間において中継すべきパケットを受信するステップと、
     受信した前記パケットについての受信経路情報を取得するステップと、
     受信した第1の前記パケットと、受信した第2の前記パケットとの整合性、および取得した前記第1のパケットについての前記受信経路情報に基づいて、前記不正パケットを検知する検知処理を行うステップとを含み、
     前記受信経路情報は、前記パケットが経由した物理ポートである送信元ポートと、前記パケットの送信元アドレスとを示し、
     前記第2のパケットは、前記第1のパケットの受信前に受信した前記パケットであり、かつ前記第1のパケットに対応する前記パケットである、検知方法。
  11.  車載ネットワークにおける不正パケットを検知する検知装置において用いられる検知プログラムであって、
     コンピュータを、
     前記車載ネットワークにおける車載装置間のパケットを中継する中継部と、
     前記中継部により受信された前記パケットについての受信経路情報を取得する経路取得部と、
     前記中継部により受信された第1の前記パケットと、前記中継部により受信された第2の前記パケットとの整合性、および前記経路取得部により取得された、前記第1のパケットについての前記受信経路情報に基づいて、前記不正パケットを検知する検知処理を行う処理部、
    として機能させるためのプログラムであり、
     前記受信経路情報は、前記パケットが経由した物理ポートである送信元ポートと、前記パケットの送信元アドレスとを示し、
     前記第2のパケットは、前記中継部により前記第1のパケットの受信前に受信された前記パケットであり、かつ前記第1のパケットに対応する前記パケットである、検知プログラム。
PCT/JP2022/023421 2021-07-21 2022-06-10 検知装置、検知方法および検知プログラム WO2023002771A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021120824 2021-07-21
JP2021-120824 2021-07-21

Publications (1)

Publication Number Publication Date
WO2023002771A1 true WO2023002771A1 (ja) 2023-01-26

Family

ID=84979923

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/023421 WO2023002771A1 (ja) 2021-07-21 2022-06-10 検知装置、検知方法および検知プログラム

Country Status (1)

Country Link
WO (1) WO2023002771A1 (ja)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7031297B1 (en) * 2000-06-15 2006-04-18 Avaya Communication Israel Ltd. Policy enforcement switching
JP2015165614A (ja) * 2014-03-03 2015-09-17 アラクサラネットワークス株式会社 通信装置および通信装置における通信制御方法
JP2018170754A (ja) * 2016-07-05 2018-11-01 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 異常検知電子制御ユニット、車載ネットワークシステム及び異常検知方法
JP2018174480A (ja) * 2017-03-31 2018-11-08 住友電気工業株式会社 中継装置、検知方法および検知プログラム
JP2019022210A (ja) * 2017-07-19 2019-02-07 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 車載中継装置、中継方法及びプログラム
US20200389469A1 (en) * 2017-12-24 2020-12-10 Arilou Information Security Technologies Ltd. System and method for tunnel-based malware detection

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7031297B1 (en) * 2000-06-15 2006-04-18 Avaya Communication Israel Ltd. Policy enforcement switching
JP2015165614A (ja) * 2014-03-03 2015-09-17 アラクサラネットワークス株式会社 通信装置および通信装置における通信制御方法
JP2018170754A (ja) * 2016-07-05 2018-11-01 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 異常検知電子制御ユニット、車載ネットワークシステム及び異常検知方法
JP2018174480A (ja) * 2017-03-31 2018-11-08 住友電気工業株式会社 中継装置、検知方法および検知プログラム
JP2019022210A (ja) * 2017-07-19 2019-02-07 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 車載中継装置、中継方法及びプログラム
US20200389469A1 (en) * 2017-12-24 2020-12-10 Arilou Information Security Technologies Ltd. System and method for tunnel-based malware detection

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
GOUDA M.G., LIU A.X.: "A Model of Stateful Firewalls and Its Properties", DEPENDABLE SYSTEMS AND NETWORKS, 2005. DSN 2005. PROCEEDINGS. INTERNAT IONAL CONFERENCE ON YOKOHAMA, JAPAN 28-01 JUNE 2005, PISCATAWAY, NJ, USA,IEEE, 28 June 2005 (2005-06-28) - 1 June 2005 (2005-06-01), pages 128 - 137, XP010817789, ISBN: 978-0-7695-2282-1, DOI: 10.1109/DSN.2005.9 *

Similar Documents

Publication Publication Date Title
WO2021002261A1 (ja) 異常検知装置および異常検知方法
Rahman et al. Group communication for the constrained application protocol (CoAP)
Bormann et al. CoAP (constrained application protocol) over TCP, TLS, and WebSockets
US7685288B2 (en) Ad-hoc service discovery protocol
US10454710B2 (en) Virtual local area network mismatch detection in networks
JP2005287045A (ja) Ipネットワークに接続された装置の発見の方法、及び、この方法を実行する装置
US20070288613A1 (en) Providing support for responding to location protocol queries within a network node
CN107547510B (zh) 一种邻居发现协议安全表项处理方法和装置
US11196702B2 (en) In-vehicle communication device, and communication control method
JP2008177714A (ja) ネットワークシステム、サーバ、ddnsサーバおよびパケット中継装置
US11533388B2 (en) Method and device for analyzing service-oriented communication
JP5360233B2 (ja) 負荷分散システム及びその方法
Lu et al. An SDN‐based authentication mechanism for securing neighbor discovery protocol in IPv6
JP2014534760A (ja) 複数の受信機にメッセージを伝送する装置および方法
US20030236860A1 (en) Link-layer triggers protocol
CN112383559B (zh) 地址解析协议攻击的防护方法及装置
US20210014253A1 (en) Device and method for intrusion detection in a communications network
WO2023002771A1 (ja) 検知装置、検知方法および検知プログラム
JP5551061B2 (ja) 情報処理装置、アドレス重複対処方法およびアドレス重複対処用プログラム
JP7045247B2 (ja) 通信保護装置、制御方法、および、プログラム
US20160006692A1 (en) Monitoring device and monitoring method
WO2022153839A1 (ja) 検知装置、検知方法および検知プログラム
US9912557B2 (en) Node information detection apparatus, node information detection method, and program
JP4677501B2 (ja) 中継装置および中継方法
WO2021106446A1 (ja) 検知装置、車両、検知方法および検知プログラム

Legal Events

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

Ref document number: 22844423

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE