Fraud detection method, fraud detection device, and program
The fraud detection method in in-vehicle networks accurately identifies abnormal messages by analyzing reception times and arbitration status, improving the precision of message legitimacy determination.
Patent Information
- Application Number
- JP2024102810
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2018-03-29
- Filing Date
- 2024-06-26
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2038-12-04
AI Technical Summary
Existing fraud detection methods in in-vehicle networks fail to accurately determine abnormal messages when transmission cycles are disrupted due to disturbances on the CAN network bus, leading to incorrect judgments.
A fraud detection method that analyzes message reception times and arbitration status to determine if a message is abnormal, by checking if the reception time is within a predetermined range and if arbitration has occurred, using a fraud detection device with processors and a storage unit to perform cycle abnormality and arbitration detection.
Enhances the accuracy of identifying abnormal messages in in-vehicle networks by accounting for transmission delays caused by arbitration, ensuring higher precision in determining message legitimacy.
Smart Images

Figure 2024114822000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a fraud detection method for detecting abnormal messages in an in-vehicle network. [Background technology]
[0002] In recent years, systems inside automobiles are equipped with many devices called electronic control units (ECUs). The communication network that connects these ECUs is called an in-vehicle network. There are many communication standards for in-vehicle networks. One of the most mainstream standards for in-vehicle networks is the Controller Area Network (CAN).
[0003] In a network based on the CAN standard (CAN network), the communication path (bus) consists of two cables, and the ECUs connected to the bus are also called nodes. Each node connected to the bus sends and receives data in units called frames or messages. CAN does not use identifiers to indicate the destination or source of data.
[0004] The node that transmits a frame (transmitting node) assigns an ID called a message ID, which indicates the type of message, to each message, and transmits the message; in other words, it sends a signal onto the bus. The node that receives the message (receiving node) only receives messages that contain a predetermined message ID; in other words, it reads signals from the bus. Messages with the same ID are transmitted at regular intervals.
[0005] As mentioned above, the numerous ECUs installed in systems inside automobiles are each connected to a CAN network and operate by exchanging various messages with each other.
[0006] Here, an ECU having a communication function with the outside of the CAN network may be illegally accessed from the outside and may be illegally controlled by someone, causing the ECU to transmit an abnormal message (attack message) to the CAN network. Such an ECU illegally controlled by someone (illegal ECU) may, for example, masquerade as another ECU and transmit an abnormal message, thereby illegally controlling the vehicle. A method for detecting such so-called spoofing attacks is disclosed in, for example, Patent Document 1. [Prior art documents] [Patent documents]
[0007] [Patent Document 1] International Publication No. 2014 / 115455 Summary of the Invention [Problem to be solved by the invention]
[0008] However, the method disclosed in Patent Document 1 has a problem in that it is not possible to make a correct determination when the transmission period of a normal message becomes longer due to a disturbance in the transmission period on the CAN network bus.
[0009] The present disclosure is devised to solve the above-mentioned problems, and aims to provide a fraud detection method, a fraud detection device, etc., that determine whether or not each message sent to a bus is an abnormal message. [Means for solving the problem]
[0010] In order to solve the above problem, a fraud detection method according to one embodiment of the present disclosure is a fraud detection method for detecting an abnormal message in an in-vehicle network, the fraud detection method including the steps of: receiving a first message sent to the in-vehicle network; determining whether a reception time of the first message is within a predetermined range of times including a scheduled time which is an elapsed time from a reception time of a second message received immediately before the first message and having the same data type as the first message; if the reception time of the first message is within the predetermined range of times in the determination, determining the first message to be a normal message; if the reception time of the first message is not within the predetermined range of times in the determination, detecting whether arbitration occurred when the first message was received; if arbitration did not occur when the first message was received, determining the first message to be an abnormal message; and if arbitration occurred when the first message was received, detecting one or a plurality of consecutive messages. and when the first message is received consecutively following the one or a plurality of consecutive third messages, the reception time of the message having the earliest reception time among the one or a plurality of consecutive third messages is set as the start time of arbitration, and when the start time of arbitration is earlier than the upper limit of the specified range of times, the first message is determined to be a normal message, and when the start time of arbitration is after the upper limit of the specified range of times, the first message is determined to be an abnormal message, and a start time that is a starting time for calculating a scheduled time of a fourth message that is received immediately after the first message and has the same data type as the first message is determined to be the reception time of the first message or the scheduled time of the first message, which is the elapsed time from the reception time of the second message, depending on the type of the first message, and it is determined whether the reception time of the fourth message is within a specified range of times that includes the scheduled time, which is the elapsed time from the start time.
[0011] In addition, these comprehensive or specific aspects may be realized in a system, an apparatus, a method, an integrated circuit, a computer program, or a non-transitory recording medium such as a computer-readable CD-ROM, or may be realized in any combination of a system, an apparatus, a method, an integrated circuit, a computer program, and a recording medium. Effect of the Invention
[0012] According to the fraud detection method and the like according to one aspect of the present disclosure, it is possible to determine whether an individual message sent to a bus is an abnormal message. [Brief description of the drawings]
[0013] [Figure 1] FIG. 1 is a block diagram showing an overall configuration of an in-vehicle network system according to the first embodiment. [Diagram 2] FIG. 2 is a diagram showing a format of a message (data frame) of the CAN protocol in the first embodiment. [Diagram 3] FIG. 3 is a block diagram showing a configuration of a gateway included in the in-vehicle network system according to the first embodiment. [Figure 4] FIG. 4 is a diagram showing an example of a reception ID list according to the first embodiment. [Diagram 5] FIG. 5 is a diagram illustrating an example of a transfer rule according to the first embodiment. [Figure 6] FIG. 6 is a block diagram showing an example of a fraud detection processing function group according to the first embodiment. [Figure 7A] FIG. 7A is a diagram showing a message reception pattern when arbitration occurs in the first embodiment. [Figure 7B] FIG. 7B is another diagram showing a message reception pattern when arbitration occurs in the first embodiment. [Figure 8] FIG. 8 is a block diagram showing another example of the fraud detection processing function group according to the first embodiment. In FIG. [Figure 9]FIG. 9 is a block diagram showing an example of an ECU included in the in-vehicle network system according to the first embodiment. [Figure 10] FIG. 10 is a flowchart showing an example of the fraud detection process according to the first embodiment. [Figure 11] FIG. 11 is a flowchart showing an example of the transfer process according to the first embodiment. [Figure 12] FIG. 12 is a block diagram showing an example of a fraud detection processing function group according to the second embodiment. [Figure 13] FIG. 13 is a flowchart showing an example of the fraud detection process according to the second embodiment. [Figure 14] FIG. 14 is a diagram showing an example of a fraud detection processing function group in the modified example. [Figure 15] FIG. 15 is a diagram showing an example of a fraud detection processing function group in the modified example. [Figure 16] FIG. 16 is a block diagram showing an example of an ECU in the modified example. [Figure 17] FIG. 17 is a block diagram showing an example of an ECU in the modified example. [Figure 18] FIG. 18 is a block diagram showing an example of an ECU in the modified example. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] (Knowledge that forms the basis of this disclosure) When many ECUs are connected to a CAN network, if each ECU tries to send a message independently, there is a high possibility that the messages will be sent at the same time.
[0015] In this case, the CAN network has a function called "arbitration" that prioritizes sending messages with a lower ID, and has messages with a higher ID wait to be sent. This causes a discrepancy in the timing of message transmission, which can cause the function that determines whether a message is normal or abnormal based on the message transmission interval to malfunction, resulting in the normal message being determined to be an abnormal message.
[0016] Therefore, a fraud detection method according to one aspect of the present disclosure is a fraud detection method for detecting an abnormal message in an in-vehicle network system, executed in an information processing system including a memory unit, and includes a periodic abnormality determination step for determining whether a period of a message repeatedly sent to the in-vehicle network system is abnormal, a mediation detection step for detecting whether mediation occurred when the message was sent to the in-vehicle network system, and a message determination step for determining that the message is an abnormal message if the period of the message is abnormal and mediation did not occur when the message was sent to the in-vehicle network system.
[0017] This allows the system to properly determine whether a received message is normal or not when a delay occurs in a message sent to the in-vehicle network system due to arbitration, etc. As a result, the system can determine with higher accuracy whether each message is abnormal or not.
[0018] Further, for example, the method may include a period start determination step of determining the time that is the starting point of the period when determining the period in the period abnormality determination step to be the time when the message is received or the scheduled time of receipt, and the period may be determined in the period abnormality detection step using the starting point determined in the period start determination step.
[0019] As a result, even if there are multiple methods for sending a message when arbitration occurs, it is possible to determine whether a message is normal or not based on characteristics that appear at the time the message is received, making it possible to determine whether a message is abnormal with greater accuracy.
[0020] Also, for example, the method may include a transmission type determination step of determining a transmission type of the message, and in the cycle start determination step, the reception time or scheduled reception time of the message may be determined according to the transmission type.
[0021] This allows for coordinated detection according to the transmission type of the message sent to the in-vehicle network.
[0022] Also, for example, in the arbitration detection step, it may be determined that arbitration has occurred if the message is included in one or more messages received consecutively from other messages received at times within a normal range of periods for receiving the messages.
[0023] This makes it possible to appropriately determine whether a received message is a normal message or not, even if a delay in message transmission occurs due to arbitration or the like.
[0024] In addition, a fraud detection device according to one embodiment of the present disclosure is a fraud detection device that detects abnormal messages in an in-vehicle network system, and includes one or more processors and a memory unit, and using the memory unit, the one or more processors perform a periodic abnormality determination step of determining whether a period of a message sent to the in-vehicle network system is abnormal, an arbitration detection step of detecting whether arbitration occurred when the message was sent to the in-vehicle network system, and a periodic determination step of determining that the message is a normal message if the period of the message is abnormal and arbitration occurred when the message was sent to the in-vehicle network system.
[0025] This makes it possible to appropriately determine whether a message is normal or not even if a transmission delay occurs due to arbitration, etc. As a result, it is possible to more accurately determine whether each message is abnormal or not.
[0026] Furthermore, a program according to one aspect of the present disclosure is a program for causing the one or more processors in the fraud detection device to execute any one of the fraud detection methods described above.
[0027] This makes it possible to appropriately determine whether a message is normal or not even if a transmission delay occurs in a message sent to the in-vehicle network system due to arbitration, etc. As a result, it is possible to more accurately determine whether each message is abnormal or not.
[0028] Hereinafter, the embodiment will be described in detail with reference to the drawings.
[0029] The embodiments described below are all comprehensive or specific examples. The numerical values, shapes, materials, components, arrangement and connection of components, steps, and order of steps shown in the following embodiments are merely examples and are not intended to limit the present disclosure. Among the components in the following embodiments, components that are not described in an independent claim showing a top concept are described as components that are optionally included.
[0030] (Embodiment 1) [1. Overview] In this embodiment, a case where a determination is made as to whether a message being transmitted is an abnormal message in an in-vehicle network system will be described with reference to the drawings. Note that an abnormal message is basically an unauthorized message.
[0031] [1.1 Overall configuration of in-vehicle network system] FIG. 1 is a block diagram showing the overall configuration of an in-vehicle network system 10 according to the present embodiment.
[0032] 1, the in-vehicle network system 10 is configured with a CAN network, and includes an ECU 100a, an ECU 100b, an ECU 100c, and an ECU 100d, a bus 200a, a bus 200b, and a gateway 300.
[0033] In the following description, ECU 100a, ECU 100b, ECU 100c, and ECU 100d may be collectively referred to as ECU 100. Furthermore, any one of ECU 100a, ECU 100b, ECU 100c, and ECU 100d may be described as ECU 100.
[0034] In the following description, the buses 200a and 200b may be collectively referred to as the bus 200. In addition, the bus 200 may refer to either the bus 200a or the bus 200b.
[0035] The ECU 100a is connected to an engine 101, the ECU 100b is connected to a brake 102, the ECU 100c is connected to a door opening / closing sensor 103, and the ECU 100d is connected to a window opening / closing sensor 104.
[0036] ECU 100 acquires the status of connected devices and periodically transmits a message indicating the acquired status to bus 200. For example, ECU 100a acquires the RPM of engine 101, and transmits a message including a data value indicating the RPM to bus 200 with a predetermined ID.
[0037] Furthermore, each ECU 100 reads messages transmitted by other ECUs 100 from the bus 200 and selectively receives the messages according to the IDs attached to the messages. This selective reception will be described later.
[0038] The gateway 300 connects the bus 200a to which the ECUs 100a and 100b are connected, and the bus 200b to which the ECUs 100c and 100d are connected. The gateway 300 has a function of transferring a message received from one bus to the other bus. The gateway 300 is also a node on the CAN network.
[0039] The in-vehicle network system 10 is an example for explaining an object to which the unauthorized communication detection system that determines whether a message is abnormal or not can be applied, and the object to which the unauthorized communication detection system can be applied is not limited to the in-vehicle network system 10. The in-vehicle network system 10 may be applied to various network systems using a LAN (Local Area Network) or a distributed database.
[0040] [1.2 Message data format] 2 is a diagram showing the format of a message (data frame) of the CAN protocol, in which a message is shown in the standard ID format of the CAN protocol.
[0041] The message consists of the Start Of Frame (SOF), an ID field, a Remote Transmission Request (RTR), an IDentifier Extension (IDE), a reserved bit (r), a Data Length Code (DLC), a data field, a Cyclic Redundancy Check (CRC) sequence, a CRC delimiter (DEL on the left in the figure), an Acknowledgement (ACK) slot, an ACK delimiter (DEL on the right in the figure), and an End Of Frame (EOF).
[0042] SOF is a 1-bit dominant. Dominant means superior. In a CAN network where a digital method is used to transmit data, dominant means a state in which voltage is applied to two cables constituting a bus to transmit a value of "0", or the value of this "0" transmitted. In contrast, a state in which voltage is applied to two cables constituting a bus to transmit a value of "1", or the value of this "1" transmitted, is called recessive. Recessive means inferior. If a value of "0" and a value of "1" are transmitted from two nodes to the bus at the same time, the value of "0" takes precedence. The bus is in a recessive state when idle. Each ECU 100 starts transmitting a message by changing the state of the bus 200 from recessive to dominant, and the other ECUs 100 read this change and synchronize. In FIG. 2, the parts in which the lines indicating the dominant or recessive constituting the message are solid lines indicate that they can take the respective values of dominant or recessive. Since SOF is fixed in the dominant state, the dominant line is solid and the recessive line is dashed.
[0043] The ID is an 11-bit value that indicates the type of data that the message contains. CAN is designed so that when multiple nodes start sending messages at the same time, messages with smaller ID values have higher priority.
[0044] RTR is a 1-bit dominant that indicates that the frame is a message (data frame).
[0045] IDE is 1 bit dominant each.
[0046] DLC is a 4-bit value that indicates the length of the following data field.
[0047] The data field is a value that indicates the content of the data to be transmitted, and is a maximum of 64 bits long, and the length can be adjusted in 8-bit units. The specifications regarding the allocation of data to this part depend on the vehicle model or manufacturer.
[0048] The CRC sequence is a 15-bit value calculated from the transmitted values of the SOF, ID field, control field, and data field.
[0049] The CRC delimiter is a fixed 1-bit recessive delimiter that indicates the end of the CRC sequence. The receiving node determines whether there are any errors by comparing the result calculated from the SOF, ID field, control field, and data field of the received message with the CRC sequence value.
[0050] The ACK slot is 1 bit long, and the transmitting node transmits a recessive bit in this portion. If the receiving node has received the CRC sequence normally, it transmits a dominant bit as an acknowledgment. Since dominant bits have priority, if the communication of one message has been normal up to the CRC sequence, the bus 200 is dominant during the transmission of the ACK slot.
[0051] The ACK delimiter is fixed to 1 recessive bit and is the delimiter that indicates the end of the ACK slot.
[0052] EOF is fixed to a 7-bit recessive signal, indicating the end of a message.
[0053] [1.3 Gateway configuration] Fig. 3 is a block diagram showing the configuration of a gateway 300 included in the in-vehicle network system 10 according to the present embodiment. In Fig. 3, the gateway 300 includes a frame transmitting / receiving unit 310, a frame interpreting unit 320, a received ID determining unit 330, a received ID list holding unit 340, a frame processing unit 350, a transfer rule holding unit 360, a fraud detection processing function group 370, and a frame generating unit 380.
[0054] Note that these configurations indicate functions, and the gateway 300 is provided as an information processing device having, for example, a processing unit realized by a processor, a storage unit realized by a semiconductor memory or the like, and an input / output unit realized by an input / output port.
[0055] The configuration exhibiting the above-mentioned functions is realized by reading and executing a program stored in the storage unit by the processing unit, and recording predetermined data in the storage unit. Alternatively, instead of recording predetermined data in the storage unit, these configurations may be realized by transmitting and receiving data via the input / output unit. Alternatively, the configuration exhibiting the above-mentioned functions may be realized by a combination of these.
[0056] The frame transmitting / receiving unit 310 transmits and receives messages conforming to the CAN protocol to and from each of the buses 200a and 200b.
[0057] More specifically, the frame transmitting / receiving unit 310 reads the message sent to the bus 200 one bit at a time, and transfers the read message to the frame interpreting unit 320 .
[0058] Furthermore, in response to the bus information transmitted from the frame generating unit 380, the frame transmitting / receiving unit 310 transmits a message to the buses 200a and 200b, one bit at a time.
[0059] Frame transmitting / receiving unit 310 transfers messages between buses 200 by transmitting messages received from bus 200a to bus 200b and transmitting messages received from bus 200b to bus 200a.
[0060] The frame interpretation unit 320 receives message values from the frame transmission / reception unit 310, maps them to each field in the CAN protocol, and interprets the received message. The frame interpretation unit 320 transfers the series of values that it has interpreted as the ID field value to the received ID determination unit 330.
[0061] Frame interpretation unit 320 further determines, depending on the judgment result notified by received ID judgment unit 330, whether to transfer the value of the ID field of the message and the data fields appearing after the ID field to frame processing unit 350, or to cancel reception of the message.
[0062] Furthermore, if the frame interpretation unit 320 determines that the received message does not conform to the CAN protocol, it requests the frame generation unit 380 to transmit an error frame.
[0063] An error frame is a frame with a specific format defined by the CAN protocol that is sent from a node when an error occurs on the CAN network. When an error frame is sent to the bus, the transmission of messages on that network is interrupted.
[0064] Furthermore, if the frame interpretation unit 320 interprets the received frame as an error frame transmitted by another node, it discards the message being read.
[0065] The received ID determination unit 330 receives the value of the ID field from the frame interpretation unit 320, and determines whether or not to receive the read message according to the list of message IDs held by the received ID list holding unit 340. The received ID determination unit 330 notifies the frame interpretation unit 320 of the result of this determination.
[0066] The receiving ID list holding unit 340 holds a list of message IDs (receiving ID list) received by the gateway 300. Fig. 4 is a diagram showing an example of the receiving ID list in this embodiment. The receiving ID list in Fig. 4 will be described later in detail.
[0067] The frame processing unit 350 determines the destination bus 200 based on the ID of the received message in accordance with the rules regarding data transfer stored in the transfer rule storage unit 360, and notifies the frame generation unit 380 of the destination bus 200, the message ID notified by the frame interpretation unit 320, and the data to be transferred.
[0068] Furthermore, frame processing unit 350 sends the message received from frame interpretation unit 320 to fraud detection processing function group 370, and requests fraud detection processing function group 370 to determine whether or not the message is abnormal. Frame processing unit 350 does not forward the message that is determined to be abnormal by fraud detection processing function group 370.
[0069] The transfer rule storage unit 360 stores rules (hereinafter also referred to as transfer rules) regarding data transfer of each bus 200. Fig. 5 is a diagram showing an example of the transfer rules in this embodiment. The details of the transfer rules in Fig. 5 will be described later.
[0070] The fraud detection processing function group 370 is a function group that judges whether or not a message being received is an abnormal message. The functional configuration included in the fraud detection processing function group 370 will be described in detail later.
[0071] The frame generating section 380 generates an error frame in response to a request from the frame interpreting section 320 to transmit an error frame, and causes the frame transmitting / receiving section 310 to transmit the error frame.
[0072] Furthermore, frame generator 380 generates a message frame using the message ID and data received from frame processor 350, and sends the message frame to frame transmitter / receiver 310 together with bus information.
[0073] [1.4 Receiving ID list] 4 is a diagram showing an example of a receiving ID list in this embodiment. The receiving ID list is a list of message IDs of messages that the gateway 300 receives and processes.
[0074] In Fig. 4, the receiving ID list stores a message ID in each row. The receiving ID list in Fig. 4 has message IDs "1", "2", "3", and "4", and the gateway 300 receives messages with these message IDs. The gateway 300 stops receiving messages with message IDs that are not included in the receiving ID list.
[0075] Note that the ID values and the number of IDs included in the received ID list are merely examples for the purpose of explanation, and the configuration of the received ID list used in the gateway 300 is not limited to this.
[0076] [1.5 Transfer Rules] Fig. 5 is a diagram showing an example of transfer rules in this embodiment. In Fig. 5, the transfer rules store in each row a combination of a source bus and a destination bus of a message, and a message ID to be transferred.
[0077] Specifically, the first line of the transfer rule has source "bus 200a", destination "bus 200b", and ID "*", and the gateway 300 transfers messages received from bus 200a to bus 200b regardless of the ID. The second line of the transfer rule has source "bus 200b", destination "bus 200a", and ID "3", and the gateway 300 transfers messages received from bus 200b to bus 200a if the message has an ID of "3".
[0078] [1.6 Configuration of fraud detection processing function group] Fig. 6 is a block diagram showing an example of fraud detection processing function group 370 included in gateway 300 in this embodiment. In Fig. 6, fraud detection processing function group 370 includes a period determination unit 371, a rule determination information storage unit 372, an arbitration detection unit 373, and a received message information storage unit 374.
[0079] These configurations indicate functions, and the processing unit reads and executes a program stored in the storage unit in the gateway 300, and stores predetermined data in the storage unit. Alternatively, these configurations may be realized by transmitting and receiving data via an input / output unit, instead of recording predetermined data in the storage unit. Alternatively, these configurations may be realized by a combination of the above.
[0080] The period determination unit 371 determines, for each message having the same ID, whether the period (elapsed time) at which the message is received falls within a range that can be determined to be normal.
[0081] Period determination unit 371 obtains the message ID from the message received from frame processing unit 350, and obtains information necessary for determining the period associated with that ID. Specifically, it obtains the rule and the previous reception time from rule determination information storage unit 372.
[0082] The periodicity judgment unit 371 calculates the difference between the time when the current message was received and the previous reception time obtained from the rule judgment information storage unit 372, and judges whether the value of the difference (elapsed time) is within the range indicated by the rule obtained from the rule judgment information storage unit 372.
[0083] The periodicity determining unit 371 determines that the elapsed time is OK if it is within the range specified by the rules, and determines that the elapsed time is NG if it is outside the range specified by the rules.
[0084] Here, the rule may be information on the upper and lower limits of the time elapsed since the previous reception of a message with the same ID, or information on the reference elapsed time value and the width of the range from the reference time that is determined to be OK.
[0085] In addition, the periodicity judgment unit 371 judges whether the difference between the time when the message was received and the previous reception time is within the range indicated by the rule, but is not limited to this. For example, the periodicity judgment unit 371 may obtain the range of expected reception times by adding the range of elapsed time indicated by the rule to the previous reception time, and judge whether the reception time of the currently received message is within the range of expected reception times.
[0086] Furthermore, the periodicity determination unit 371 inquires of the arbitration detection unit 373 as to whether or not arbitration has occurred when the message has been received. The periodicity determination unit 371 obtains, from the arbitration detection unit 373, information indicating whether or not arbitration has occurred, and, if arbitration has occurred, the start time of the occurring arbitration.
[0087] When the periodicity judgment unit 371 judges the result as NG, if arbitration has occurred, or if the arbitration start time is earlier than the upper limit of the range indicated by the above rule, that is, if the value is small, it changes the judgment to OK. Also, if arbitration has not occurred, it does not change the judgment to NG.
[0088] The periodic determination unit 371 may inquire of the arbitration detection unit 373 whether arbitration has occurred every time a message is received. Also, only when the determination for the rule acquired from the rule determination information storage unit 372 is NG, the periodic determination unit 371 may inquire of the arbitration detection unit 373 whether arbitration has occurred.
[0089] In the case where the periodic judgment unit 371 inquires of the arbitration detection unit 373 as to whether or not arbitration has occurred only when the judgment for the rule obtained from the rule judgment information storage unit 372 is NG, the periodic judgment unit 371 notifies the arbitration detection unit 373 of the reception time of the message each time it receives a message, or stores the reception time in the received message information storage unit 374.
[0090] Furthermore, when arbitration has occurred in the arbitration detection unit 373, the periodicity judgment unit 371 may change the judgment to OK if the reception time of the message is less than the reference elapsed time value.
[0091] Furthermore, if the determination is OK, the periodicity determination unit 371 notifies the rule determination information storage unit 372 of the reception time of the message received at that time.
[0092] The rule determination information storage unit 372 stores the rules used by the periodic determination unit 371 and the reception time of the message for each ID included in the message. The rules may be information on the upper and lower limits of the time elapsed since the previous reception of a message with the same ID. The rules may also be information indicating a reference elapsed time value and a range from the reference elapsed time value within which the message is determined to be OK.
[0093] In response to an inquiry from the periodicity judgment unit 371, the arbitration detection unit 373 detects whether arbitration has occurred when the message is received. Figures 7A and 7B are diagrams showing message reception patterns when arbitration occurs in this embodiment. In Figures 7A and 7B, a triangular symbol indicates one message, the horizontal axis indicates time, and T1 and T2 indicate the time when the message is scheduled to be received. α indicates the width of the range in which the judgment for the rule acquired from the rule judgment information storage unit 372 is OK.
[0094] 7A and 7B, for example, time (T1-α) is the lower limit value at which the periodicity judgment unit 371 judges the time T1 to be OK, and time (T1+α) is the upper limit value at which the periodicity judgment unit 371 judges the time T1 to be OK.
[0095] Moreover, messages M1 and M3 are messages that the periodicity determination unit 371 expected to receive at time T1, and messages M2 and M4 are messages for which arbitration has started. The arbitration detection unit 373 notifies the periodicity determination unit 371 of the reception time of message M2 or message M4 as the arbitration start time.
[0096] The arbitration detection unit 373 determines that arbitration has occurred when messages are received at a predetermined time interval or less. For example, in Fig. 7A, messages M2 to M1 are transmitted consecutively, so arbitration is determined to have occurred from message M2 to message M1. In Fig. 7B, the time interval between message M4 and message M5, which was received at time T1 before message M4, is large, so arbitration is determined to have occurred from message M4.
[0097] 6, the arbitration detection unit 373 receives the reception time of the message from the periodicity determination unit 371, acquires the reception time of the previous message stored in the received message information storage unit 374, and determines whether arbitration has occurred. When the arbitration detection unit 373 determines that arbitration has occurred, it acquires arbitration occurrence state information, which is information indicating whether arbitration has occurred, from the received message information storage unit 374. When the acquired arbitration occurrence state information indicates that arbitration has not occurred, the arbitration detection unit 373 stores the reception time of the message as the arbitration occurrence start time in the received message information storage unit 374. In addition, the arbitration detection unit 373 stores the reception time of the current message in the received message information storage unit 374 as the reception time of the previous message, and stores the arbitration occurrence state information in the received message information storage unit 374.
[0098] Furthermore, when there is an inquiry from the periodic judgment unit 371 as to whether arbitration is occurring, the arbitration detection unit 373 judges whether arbitration is occurring from the message reception time. Then, if arbitration is occurring, the arbitration occurrence start time is obtained from the received message information storage unit 374, and notifies the periodic judgment unit 371 of this together with the judgment result that arbitration is occurring. On the other hand, when arbitration is not occurring, the arbitration detection unit 373 notifies only the judgment result indicating that arbitration is not occurring.
[0099] In addition, when arbitration has not occurred, the arbitration detection unit 373 notifies only the determination result indicating that arbitration has not occurred, but this is not limited to this. For example, the arbitration detection unit 373 may notify a value indicating the arbitration occurrence start time together with the determination result, or may notify the arbitration occurrence start time when the previous arbitration occurred.
[0100] The received message information storage unit 374 stores the reception time of the previous message used by the arbitration detection unit 373, arbitration occurrence state information, and arbitration occurrence start time.
[0101] The fraud detection processing function group 370 has been described as a function group that performs periodic judgment, but is not limited thereto. FIG. 8 is a diagram showing another example of the fraud detection processing function group 370 in this embodiment, and shows a modified example of the fraud detection processing function group 370. In FIG. 8, the fraud detection processing function group 370a includes six types of judgment functions. Specifically, the judgment functions include an ID judgment function that is a function of checking the ID field of a message, a data length judgment function that is a function of checking the data length of a message, a transmission period judgment function that is a function of checking the period (time interval) at which a message is transmitted, a transmission frequency judgment function that is a function of checking the frequency at which a message is transmitted, and a data value judgment function that is a function of checking the value (data value) of a data field of a message, and further includes a vehicle state judgment function that is a function of recognizing the state of the vehicle based on the judgment results of these judgment functions, the transmission period, the frequency, the data value, or the amount of change in the data value, and checking the vehicle state. Furthermore, the fraud detection processing function group 370a includes a comprehensive judgment function that comprehensively judges whether a received message is an abnormal message or not from the judgment results of these judgment functions. The result of the overall judgment function becomes the result of fraud detection by the fraud detection processing function group 370a.
[0102] In addition, the period determination unit 371, the rule determination information storage unit 372, the arbitration detection unit 373, and the received message information storage unit 374 of the fraud detection processing function group 370 in FIG. 6 may be incorporated into the transmission period determination function of the fraud detection processing function group 370a in FIG. 8.
[0103] These configurations indicate functions, and are realized by reading and executing a program stored in a storage unit by a processing unit in the gateway 300, storing predetermined data in the storage unit, or transmitting and receiving data via an input / output unit. Alternatively, these configurations may be realized by a combination of the above.
[0104] [1.7 ECU Configuration] 9 is a block diagram showing an example of an ECU 100 included in the in-vehicle network system 10 according to the present embodiment. In FIG. 9, the ECU 100 includes a frame transmitting / receiving unit 110, a frame interpreting unit 120, a received ID determining unit 130, a received ID list holding unit 140, a frame processing unit 150, a data acquiring unit 170, and a frame generating unit 180.
[0105] Note that these configurations indicate functions, and ECU 100 is provided as an information processing device that includes, for example, a processing unit realized by a processor, a storage unit realized by a semiconductor memory or the like, and an input / output unit realized by an input / output port.
[0106] The configuration exhibiting the above functions is realized by reading and executing a program stored in the storage unit by the processing unit, storing predetermined data in the storage unit, or transmitting and receiving data via the input / output unit. Alternatively, these configurations may be realized by a combination of the above.
[0107] The frame transmitting / receiving unit 110 transmits and receives messages to and from the bus 200 in accordance with the CAN protocol.
[0108] More specifically, the frame transmitting / receiving section 110 reads the message sent to the bus 200 one bit at a time, and transfers the read message to the frame interpreting section 120 .
[0109] Furthermore, the frame transmitting / receiving unit 110 sends out the message notified by the frame generating unit 180 to the bus 200 .
[0110] The frame interpretation unit 120 receives message values from the frame transmission / reception unit 110 and interprets the message by mapping them to each field in the CAN protocol. The frame interpretation unit 120 transfers a series of values that it has interpreted as an ID field to the received ID determination unit .
[0111] Frame interpretation unit 120 further determines, depending on the judgment result notified by received ID judgment unit 130, whether to transfer the value of the ID field of the message and the data fields appearing after the ID field to frame processing unit 150, or to cancel reception of the message.
[0112] Furthermore, if the frame interpretation unit 120 determines that the received message does not comply with the CAN protocol, it requests the frame generation unit 180 to transmit an error frame.
[0113] Furthermore, if frame interpretation section 120 determines that it has received an error frame transmitted by another node, it discards the message being read.
[0114] The received ID determination unit 130 receives the value of the ID field from the frame interpretation unit 120. Then, it determines whether or not to receive the read message according to the list of message IDs held by the received ID list holding unit 140. The received ID determination unit 130 notifies the frame interpretation unit 120 of the result of this determination.
[0115] The received ID list storage unit 140 stores a received ID list received by the ECU 100. The received ID list has the same format as that shown in Fig. 4, and therefore a description thereof will be omitted here.
[0116] Frame processing unit 150 performs processing according to the data of the received message. The content of the processing differs for each ECU 100.
[0117] For example, when the ECU 100a receives a message indicating that a door is open while the car is traveling at a speed exceeding 30 km / h, it executes a process to sound an alarm. When the ECU 100c receives a message indicating that the brakes are not applied and the door is opened, it executes a process to sound an alarm.
[0118] These processes are given as examples only for the purpose of explanation, and ECU 100 may execute processes other than those described above. Frame processing unit 150 causes frame generation unit 180 to generate frames to be sent in order to execute such processes.
[0119] The data acquisition unit 170 acquires data indicating the state of devices connected to the ECU 100 or output data indicating measured values by sensors, and transfers the data to the frame generation unit 180 .
[0120] In response to a request from the frame interpretation section 120 to transmit an error frame, the frame generation section 180 constructs an error frame and sends it to the frame transmission / reception section 110 .
[0121] Furthermore, frame generating unit 180 generates a message frame by attaching a predetermined message ID to the value of the data received from data acquiring unit 170 , and sends the message frame to frame transmitting / receiving unit 110 .
[0122] [1.8 Fraud detection processing] FIG. 10 is a flowchart showing an example of the fraud detection process in this embodiment.
[0123] First, the periodicity determination section 371 of the fraud detection processing function group 370 receives a message from the frame processing section 350 (step S1001).
[0124] The cycle determination unit 371 determines whether the cycle (elapsed time) of receiving the received message is within a range that can be determined to be normal for messages having the same ID (step S1002).
[0125] If the received message is not within the range that can be determined as normal (Yes in step S1003), the periodicity determination unit 371 proceeds to step S1004. If the received message is within the range that can be determined as normal (No in step S1003), the periodicity determination unit 371 proceeds to step S1007.
[0126] If the periodicity judgment unit 371 judges in step S1003 that the received message is not within the range in which it can be judged as normal (Yes in step S1003), the arbitration detection unit 373 detects whether arbitration occurred when the message was received (step S1004).
[0127] If arbitration has occurred when the message is received (Yes in step S1005), the arbitration detection unit 373 proceeds to step S1007. If arbitration has not occurred when the message is received (No in step S1005), the arbitration detection unit 373 proceeds to step S1006.
[0128] In step S1005, if arbitration detection unit 373 detects that arbitration is occurring (No in step S1005), periodicity determination unit 371 determines that the received message is not a normal message, that is, an abnormal message (step S1006). After that, fraud detection processing function group 370 ends the fraud detection processing.
[0129] If the periodicity determination unit 371 determines in step S1003 that the received message is within a range that can be determined as normal (No in step S1003), or if the arbitration detection unit 373 detects that arbitration occurred when receiving the message (Yes in step S1005) in step S1005, the periodicity determination unit 371 determines that the received message is normal (step S1007). After that, the fraud detection processing in the fraud detection processing function group 370 ends.
[0130] [1.9 Transfer process] 11 is a flowchart showing an example of a forwarding process in this embodiment. Since the forwarding process performed by the gateway 300 is substantially the same regardless of the direction of forwarding, an example will be described in which the gateway 300 forwards a message received from the bus 200a to the bus 200b.
[0131] First, the frame transmitting / receiving unit 310 reads a message from the bus 200a (step S1101). The frame transmitting / receiving unit 310 notifies the frame interpreting unit 320 of the data of each field of the read message.
[0132] Next, frame interpretation unit 320, in cooperation with reception ID determination unit 330, determines whether the message is to be received and processed based on the value (message ID) in the ID field of the read message (step S1102). If frame interpretation unit 320 determines that the message is not to be processed (No in step S1102), the message is not transferred.
[0133] If frame interpretation unit 320 determines in step S1102 that the message is to be received and processed (Yes in step S1102), it transfers the values of each field in the message to frame processing unit 350. After that, frame processing unit 350 determines the destination bus in accordance with the transfer rules stored in transfer rule storage unit 360 (step S1103).
[0134] Frame processing unit 350 notifies fraud detection processing function group 370 of the value of each field in the message received from frame interpretation unit 320, and requests a determination as to whether or not the message is abnormal. Fraud detection processing function group 370 determines whether or not the notified message is abnormal based on the value of each field of the notified message, and notifies frame processing unit 350 of the result of the determination (step S1104).
[0135] If the fraud detection processing function group 370 determines in step S1104 that the message is abnormal (Yes in step S1105), the message is not forwarded.
[0136] If the fraud detection processing function group 370 determines in step S1104 that the message is a normal message and not an abnormal message (No in step S1105), the frame processing unit 350 requests the frame generation unit 380 to transfer the message to the destination bus determined in step S1103.
[0137] Upon receiving the request from frame processing unit 350, frame generating unit 380 generates a message to be received by the specified transfer destination, and causes frame transmitting / receiving unit 310 to send this message (step S1106).
[0138] In the above example, after the forwarding destination of the received message is determined (step S1103), it is determined whether the message is an abnormal message (step S1104), but this is not limited to the above. The forwarding destination of the received message may be determined after determining whether the message is an abnormal message. Furthermore, the forwarding destination of the received message and the determination whether the message is an abnormal message may be performed in parallel.
[0139] [1.10 Effects] In this embodiment, the fraud detection processing function group 370 monitors messages flowing through the network of the in-vehicle network system, and when a message is received later than a predetermined period, it determines whether the message is abnormal by determining whether the delay was due to arbitration. This makes it possible to determine with higher accuracy whether a message is abnormal, even for messages that were difficult to determine whether they are normal or abnormal in a technology used in conventional fraud detection technology that determines that fraud has occurred when a message is received at a time interval shorter than a predetermined period. As a result, the safety of the in-vehicle network system is improved.
[0140] (Embodiment 2) [2. Overview] In the second embodiment, a fraud detection processing function group 370b is used instead of the fraud detection processing function group 370 of the first embodiment. In the fraud detection processing function group 370b, a periodicity determination unit uses the detection result of the arbitration detection unit 373 to determine the reception time of a message to be notified to the rule determination information storage unit. Such a fraud detection processing function group 370b can be included in the gateway 300 instead of the fraud detection processing function group 370 in FIG. 3 described in the first embodiment.
[0141] Incidentally, since the gateway including this fraud detection processing function group 370b and the in-vehicle network system including this gateway are basically the same as in the first embodiment, a description of their configuration will be omitted.
[0142] [2.1 Configuration of fraud detection processing function group] Fig. 12 is a block diagram showing the fraud detection processing function group 370b in this embodiment. In Fig. 12, the same components as those in Fig. 6 are given the same reference numerals, and the description thereof will be omitted. Also, some of the same configurations will be omitted from the illustration. Below, the fraud detection processing function group 370b will be described, focusing on the differences from the fraud detection processing function group 370.
[0143] The fraud detection processing function group 370b includes a cycle start determination section 375 and a transmission type determination section 376 in addition to the configuration of the fraud detection processing function group 370 in embodiment 1. Moreover, the fraud detection processing function group 370b includes a cycle determination section 371b instead of the cycle determination section 371.
[0144] These configurations indicate functions, and in the gateway 300, a program stored in a storage unit is read out by a processing unit, executed, and predetermined data is stored in the storage unit. Alternatively, instead of recording predetermined data in the storage unit, these configurations are realized by transmitting and receiving data via an input / output unit. Alternatively, these configurations are realized by a combination of the above.
[0145] The cycle start point determination unit 375 determines the value of the "last received time" to be used as a starting point for calculating the elapsed time when the cycle judgment unit 371b judges whether the cycle (elapsed time) at which the message was received is within a range that can be judged to be normal. Upon receiving an inquiry from the cycle judgment unit 371b, the cycle start point determination unit 375 determines the value of the "last received time" to be used as a starting point for calculating the elapsed time, and notifies the cycle judgment unit 371b.
[0146] The cycle start determination unit 375 notifies the transmission type determination unit 376 of the ID of the received message and requests it to determine the transmission type. The cycle start determination unit 375 determines the value of the “last received time” according to the result of the determination by the transmission type determination unit 376.
[0147] For example, suppose there is a transmission type (Type A) in which the time the message was received (currently received time) is used as the value of the "last received time," and a transmission type (Type B) in which the time the message was scheduled to be received (scheduled reception time), in other words, the last received time plus a standard elapsed time stored as a rule, is used as the value of the "last received time."
[0148] At this time, when the transmission type determination unit 376 determines that the transmission type is Type A, the cycle start point determination unit 375 notifies the cycle determination unit 371b of the current reception time as the "previous reception time." Also, when the transmission type determination unit 376 determines that the transmission type is Type B, the cycle start point determination unit 375 notifies the cycle determination unit 371b of the scheduled reception time as the "previous reception time."
[0149] In addition, the cycle start point determination unit 375 may also obtain, together with the message received from the cycle judgment unit 371b, information as to whether or not arbitration occurred when the message was received, and determine the starting time based on whether or not arbitration occurred.
[0150] For example, if arbitration has not occurred when the message is received, the cycle start determination unit 375 always notifies the cycle judgment unit 371b of the current reception time as the "previous reception time." Then, only if arbitration has occurred when the message is received, the cycle start determination unit 375 may request the transmission type judgment unit 376 to judge the transmission type, and may determine the start time according to the obtained transmission type using the method described above or the like.
[0151] In response to an inquiry from the cycle start determination unit 375, the transmission type determination unit 376 determines the transmission type from the ID of the received message and notifies the cycle start determination unit 375 of the type.
[0152] To determine the transmission type, for example, the transmission type determination unit 376 stores in advance a table in which pairs of IDs and the transmission types for those IDs are described, and in response to an inquiry from the cycle start point determination unit 375, the transmission type corresponding to the ID of the received message is determined from the table stored in advance.
[0153] The periodicity determination unit 371b performs the same process as the periodicity determination unit 371 in the first embodiment, and when it determines that the received message is ultimately a normal message, it requests the periodicity start determination unit 375 to determine the previous reception time to be requested to be stored by the rule determination information storage unit 372. In other words, the periodicity determination unit 371b notifies the rule determination information storage unit 372 of the previous reception time notified by the periodicity start determination unit 375, and requests it to be stored.
[0154] Although the cycle start determination unit 375 acquires information on whether arbitration has occurred when a message is received from the cycle judgment unit 371b, this is not limiting. For example, the cycle start determination unit 375 may directly acquire information on whether arbitration has occurred when a message is received from the arbitration detection unit 373.
[0155] [2.2 Fraud detection processing] Fig. 13 is a flowchart showing an example of fraud detection processing in this embodiment. Steps common to Fig. 10 are designated by the same reference numerals in Fig. 13, and some explanations will be omitted.
[0156] First, the periodicity determination section 371b of the fraud detection processing function group 370b receives a message from the frame processing section 350 (step S1001).
[0157] The processes from step S1002 to step S1007 are the same as those in FIG. 10, and therefore the description thereof will be omitted.
[0158] When the cycle determination unit 371 determines in step S1007 that the received message is a normal message, it requests the cycle start determination unit 375 to determine the previous reception time. The cycle determination unit 371b notifies the rule determination information holding unit 372 of the previous reception time notified by the cycle start determination unit 375, and updates the previous reception time held by the rule determination information holding unit 372 (S1008). Thereafter, the fraud detection process in the fraud detection processing function group 370b ends.
[0159] [2.3 Effects] In this embodiment, in the fraud detection process in the fraud detection processing function group 370b, the value of the "last received time" used when the periodicity determination unit 371 determines whether the period (elapsed time) at which a message is received is within a range that can be determined as normal is flexibly determined based on the transmission type or whether arbitration has occurred. This makes it possible to determine with higher accuracy whether a message is abnormal even in cases where the transmission method differs for each ID, or where periodicity detection cannot be performed correctly due to a difference in transmission timing when arbitration has occurred, as was previously possible. As a result, the safety of the in-vehicle network system is improved.
[0160] [3. Other Modifications] The present disclosure is not limited to the above-described embodiments. As long as it does not deviate from the spirit of the present disclosure, various modifications conceived by a person skilled in the art to the embodiments and forms constructed by combining components in different embodiments are also included in the scope of the present disclosure. For example, the following modifications are also included in the present disclosure.
[0161] (1) In the above embodiment 2, it has been described that the fraud detection processing function group 370b includes a period determination unit 371b, a rule determination information storage unit 372, an arbitration detection unit 373, a received message information storage unit 374, a period start point determination unit 375, and a transmission type determination unit 376, but this is not limited to this.
[0162] Fig. 14 is a diagram showing an example of a fraud detection processing function group in a modified example. As shown in Fig. 14, the fraud detection processing function group 370c includes a period determination unit 371c, a rule determination information storage unit 372, an arbitration detection unit 373, a received message information storage unit 374, a period start point determination unit 375c, a transmission type determination unit 376c, a period type learning unit 377, and a period type storage unit 378.
[0163] The cycle type learning unit 377 determines the cycle type for each ID based on the information received from the cycle determination unit 371c. As a method of determination, for example, the cycle type learning unit 377 records (accumulates) the reception time of the message received for each ID, and when a certain number of reception times have been accumulated, calculates the difference (elapsed time) between each reception time and the reception time immediately before for each ID.
[0164] The periodic type learning unit 377 determines whether the difference in the reception time is (1) approximately the same as the reference value, (2) shorter than the reference value, or (3) longer than the reference value when compared with a reference value of elapsed time determined for each ID.
[0165] Here, to determine whether or not the value is approximately the same as the reference value, predetermined threshold values (for upper and lower limits) are used. The cycle type learning unit 377 determines that the value is "approximately the same as the reference value" when the elapsed time is between the value obtained by subtracting the lower limit threshold value from the reference value and the value obtained by adding the upper limit threshold value to the reference value, determines that the value is "shorter than the reference value" when the elapsed time is smaller than the value obtained by subtracting the lower limit threshold value from the reference value, and determines that the value is "longer than the reference value" when the elapsed time is larger than the value obtained by adding the upper limit threshold value to the reference value.
[0166] The cycle type learning unit 377 notifies the cycle type holding unit 378 of the number of determined results (1. approximately the same as the reference value, 2. shorter than the reference value, 3. longer than the reference value) together with the ID.
[0167] The cycle type holding unit 378 holds the determination result of the cycle type notified by the cycle type learning unit 377, and notifies the cycle type in response to an inquiry from the transmission type determination unit 376. When the cycle type holding unit 378 receives a notification from the cycle type learning unit 377, if the cycle type holding unit 378 holds a determination result for the same ID as the ID already notified, the cycle type holding unit 378 may overwrite the determination result with the newly notified determination result, or may update the already held value with a value added thereto.
[0168] The cycle determining unit 371c notifies the cycle type learning unit 377 of information on messages that have been ultimately determined to be OK among the received messages.
[0169] When the transmission type determination unit 376c is requested by the cycle start point determination unit 375c to determine the transmission type, the transmission type determination unit 376c acquires a result of comparing the elapsed time for each reception timing related to the requested ID with the reference value of the elapsed time from the cycle type storage unit 378. If the number of times determined to be (2) shorter than the reference value is smaller than the number of times determined to be (3) longer than the reference value, the transmission type determination unit 376 determines that the transmission type is type A, if the number of times determined to be (2) shorter than the reference value and the number of times determined to be (3) longer than the reference value are approximately the same, the transmission type determination unit 376 determines that the transmission type cannot be determined otherwise. The determination that the number of times determined to be (2) shorter than the reference value is smaller than the number of times determined to be (3) longer than the reference value may be determined based on whether the determined numbers themselves differ by a predetermined number or more, or may be determined based on whether the ratio of the determined numbers is smaller than a predetermined value. It may be determined whether the ratio of (1) about the same as the reference value, (2) shorter than the reference value, or (3) longer than the reference value is found, and whether the difference between the ratios is equal to or greater than a predetermined value. The determination that the number determined to be shorter than the reference value (2) and the number determined to be longer than the reference value (3) are approximately the same may be determined by determining whether the determined numbers themselves are within a predetermined number, or by determining whether the ratio of the determined numbers is greater than a predetermined value or within a predetermined range. It may be determined whether the ratio of (1) about the same as the reference value, (2) shorter than the reference value, or (3) longer than the reference value is found, and whether the difference between the ratios is within a predetermined value.
[0170] The transmission type determination unit 376c notifies the cycle start point determination unit 375c of the determination result in response to a request from the cycle start point determination unit 375c. If the transmission type determination unit 376c cannot determine the transmission type, it notifies the cycle start point determination unit 375c of a predetermined type.
[0171] It should be noted that the periodic type learning unit 377 records the reception time of messages received for each ID, and when a certain number of reception times have been accumulated, it calculates the difference (elapsed time) between each reception time and the previous reception time for each ID, but this is not limited to this.
[0172] For example, the cycle type learning unit 377 may set aside time to learn the cycle type before the vehicle is shipped from the factory, accumulate the reception times of messages received during that time, and calculate the difference (elapsed time) between each reception time and the previous reception time for each ID.
[0173] Furthermore, the periodic type learning unit 377 may accumulate the reception times after shipment from the factory, and when a certain number or period of reception times has been accumulated, calculate the difference (elapsed time) between each reception time and the previous reception time for each ID.
[0174] In addition, the periodic type learning unit 377 may receive an instruction from a device outside the vehicle to accumulate the reception times of messages, accumulate the reception times, and then calculate the difference (elapsed time) between the current reception time and the reception time immediately preceding it for each ID when the reception times have been accumulated for a certain number or for a certain period of time until an instruction to stop accumulation is received from the external device.
[0175] In addition, the periodic type learning unit 377 may record the reception time each time a message is received, and after a certain number or period of reception times has been accumulated, the periodic type learning unit 377 may calculate the difference (elapsed time) between the reception time and the previous reception time each time a message is received.
[0176] Although the periodic type learning unit 377 records the reception time and obtains the difference (elapsed time) between the reception time of each message and the reception time immediately before for each ID at a certain timing, this is not limited to the above. For example, the periodic type learning unit 377 may obtain the difference (elapsed time) between the reception time of the previous message and each time a message is received, record (accumulate) the elapsed time, and record the latest reception time.
[0177] In addition, while it has been described that predetermined threshold values (for the upper limit and the lower limit) are used to determine whether or not a value is similar to a reference value, this is not limited to this. For example, one threshold value may be used, and the same value may be used for both the lower limit and the upper limit, or two values, a lower limit and an upper limit, may be used instead of a combination of a reference value and a threshold value.
[0178] In the above description, the cycle type learning unit 377 notifies the cycle type holding unit 378 of the number of determined results ((1) about the same as the reference value, (2) shorter than the reference value, or (3) longer than the reference value), but this is not limited to this. For example, the cycle type learning unit 377 may notify a ratio, or if there is a value already held in the cycle type holding unit 378, the cycle type learning unit 377 may notify the number obtained by adding the current value to that value.
[0179] This makes it possible to automatically determine the transmission type without having to set it in advance. Furthermore, even if the ECU is replaced for repairs, the transmission type can be automatically determined. As a result, it is possible to further improve the accuracy of fraud detection and reduce processing and manufacturing costs.
[0180] (2) In the above embodiment 2, it has been described that the fraud detection processing function group 370b includes a period determination unit 371b, a rule determination information storage unit 372, an arbitration detection unit 373, a received message information storage unit 374, a period start point determination unit 375, and a transmission type determination unit 376, but this is not limited to this.
[0181] Fig. 15 is a diagram showing an example of a fraud detection processing function group in a modified example. As shown in Fig. 15, the fraud detection processing function group 370d includes a period determination unit 371b, a rule determination information storage unit 372, an arbitration detection unit 373, a received message information storage unit 374, and a period start point determination unit 375d.
[0182] The cycle start point determination unit 375d determines the start point of the cycle depending on whether arbitration occurred when the message was received. For example, if arbitration did not occur, the cycle start point determination unit 375d notifies the cycle judgment unit 371b of the current reception time as the "previous reception time", and if arbitration occurred, the cycle start point determination unit 375d notifies the cycle judgment unit 371b of the scheduled reception time as the "previous reception time".
[0183] It should be noted that the cycle start point determination unit 375d notifies the cycle judgment unit 371b of whether to set the current reception time as the "previous reception time" or the scheduled reception time as the "previous reception time", but this is not limited to the above.
[0184] For example, the cycle start point determination unit 375d may set the current reception time as the "last reception time" the first time arbitration occurs, and thereafter, each time arbitration occurs consecutively, may notify the cycle determination unit 371b of the time that approaches the scheduled reception time by a predetermined amount of time or at a predetermined rate as the "last reception time." Also, the cycle determination unit 371b may be notified of the time that approaches the scheduled reception time from the first time arbitration occurs as the "last reception time."
[0185] Furthermore, the cycle start determination unit 375d may calculate in advance for each ID how close the current reception time is to the scheduled reception time to be notified to the cycle judgment unit 371b as the “previous reception time”, for example, by using a statistical value such as skewness or kurtosis, and notify the cycle judgment unit 371b of the time that is closer to the scheduled reception time from the current reception time by the previously calculated value as the “previous reception time”.
[0186] Also, not only skewness or kurtosis, but also values obtained from the median, mean, mode, etc., or values such as standard deviation may be used to determine how close the current reception time is to the scheduled reception time. At this time, each value may be used individually, or a value calculated from several values may be used. These may also be learned by the periodic type learning unit 377.
[0187] This allows the previous time to be determined more flexibly than if it were determined by a binary choice, thereby making it possible to further improve detection accuracy.
[0188] (3) In each of the above embodiments, the ECU 100 is described as including a frame transmission / reception unit 110, a frame interpretation unit 120, a received ID determination unit 130, a received ID list holding unit 140, a frame processing unit 150, a data acquisition unit 170, and a frame generation unit 180. However, the configuration of the ECU 100 included in the in-vehicle network system in the present disclosure is not limited to this.
[0189] Fig. 16 is a block diagram showing an example of an ECU in a modified example. The ECU 100e shown in Fig. 16 further includes a fraud detection processing function group 370. In this case, the frame processing unit 150 may request the fraud detection processing function group 370 to determine whether or not the message is abnormal, or the frame interpretation unit 120 may request the fraud detection processing function group 370 to determine whether or not the message is abnormal.
[0190] Fig. 17 is a block diagram showing an example of an ECU in a modified example. An ECU 100f shown in Fig. 17 is composed of a frame transmission / reception unit 110, a frame interpretation unit 120, and a frame generation unit 180. In this case, the frame interpretation unit 120 may receive all messages regardless of ID, for example, and request the fraud detection processing function group 370 to determine whether or not all messages are abnormal.
[0191] 17, the ECU 100f may further include a received ID determination unit 130 and a received ID list holding unit 140, and may receive only messages having message IDs written in the received ID list held by the received ID list holding unit, and may request the fraud detection processing function group 370 to determine whether or not the messages are abnormal. The fraud detection processing function group 370 may be replaced by any of the above-mentioned functions 370a to 370d.
[0192] This allows not only the gateway but also the ECU 100 to determine whether a message being sent to the bus is an abnormal message. As a result, for example, the redundancy of the mechanism for detecting fraud in an in-vehicle network system is improved, ensuring a higher level of safety.
[0193] Fig. 18 is a block diagram showing an example of an ECU in a modified example. The ECU 100g shown in Fig. 18 may include a transmission data acquisition unit 171 that acquires data to be transmitted to the bus 200 from another connected device or from the outside. The fraud detection processing function group 370e included in the ECU 100g may also determine whether the data received from the transmission data acquisition unit 171 is an abnormal message, and may request the frame generation unit 180 to transmit a message only when it is determined that the data is not an abnormal message. The configuration of the fraud detection processing function group 370e may be common to any of the configurations of the fraud detection processing function groups 370, 370a, 370b, 370c, and 370d.
[0194] This makes it possible to suppress the spread of an abnormal message to the network when, for example, an ECU 100f used together with a car navigation system transmits an abnormal message from a hijacked car navigation system, or to suppress the intrusion of an abnormal message transmitted from outside the vehicle into the in-vehicle network system.
[0195] (4) In each of the above embodiments, an example of not forwarding a received message as an action in response to detection of fraud has been described, but the present invention is not limited to this. For example, the gateway or ECU 100 having the above-described fraud detection processing function group may perform fraud detection processing while receiving a message, and when it is determined that the message is abnormal, it may invalidate the message being received from the network by transmitting an error frame.
[0196] This makes it possible to prevent other ECUs 100 connected to the bus on which the abnormal message was found from receiving the abnormal message. A similar action can also be applied to messages that are not to be forwarded.
[0197] In addition, the gateway 300 or ECU 100 equipped with the above-mentioned fraud detection processing function group may further notify a user or an external server, record the occurrence of fraud in a log, or transition the vehicle to a fail-safe mode.
[0198] This allows for flexible response after fraud detection. In addition, multiple messages determined to be anomalous may be treated as one or more data series, and for each series, a set of data values or reception intervals may be learned as a fraudulent label.
[0199] (5) In each of the above embodiments, an example of a standard format ID is shown, but an extended format ID may also be used.
[0200] (6) In the above embodiments, the message is transmitted in plain text, but it may be encrypted. Also, the message may include a message authentication code.
[0201] (7) In the above embodiment, an example was given in which the normal model and the reception log were stored in plain text, but they may be encrypted and stored.
[0202] (8) In the above embodiment, an in-vehicle network is shown as an example of a network communication system that communicates according to the CAN protocol. The technology according to the present disclosure is not limited to use in in-vehicle networks, and may be used in networks that communicate according to the CAN protocol other than in-vehicle networks, such as networks for robots, industrial equipment, etc.
[0203] In addition, the CAN protocol is used for the in-vehicle network system 10, but the present invention is not limited to this. For example, CAN-FD (CAN with Flexible Data Rate), FlexRay, Ethernet, LIN (Local Interconnect Network), MOST (Media Oriented Systems Transport), etc. may be used. Alternatively, a network may be a combination of these networks as sub-networks.
[0204] (9) Each device in the above embodiments is specifically a computer system consisting of a microprocessor, a ROM (Read Only Memory), a RAM (Random Access Memory), a hard disk unit, a display unit, a keyboard, a mouse, etc. A computer program is recorded in the RAM or the hard disk unit. Each device achieves its function by the microprocessor operating in accordance with the computer program. Here, a computer program is composed of a combination of multiple instruction codes that indicate commands for a computer to achieve a specified function.
[0205] (10) In each of the above embodiments, some or all of the constituent elements may be configured from a single system LSI (Large Scale Integration). The system LSI is an ultra-multifunctional LSI manufactured by integrating multiple components on a single chip, and specifically, is a computer system including a microprocessor, ROM, RAM, etc. A computer program is recorded in the RAM. The system LSI achieves its functions by the microprocessor operating in accordance with the computer program.
[0206] Furthermore, each of the components constituting each of the above devices may be individually implemented as a single chip, or some or all of them may be included in a single chip.
[0207] In addition, although we refer to it as a system LSI here, it may also be called an IC (Integrated Circuit), LSI, super LSI, or ultra LSI depending on the degree of integration. Also, the method of integration is not limited to LSI, but may be realized by a dedicated circuit or a general-purpose processor. After LSI manufacturing, it is also possible to use an FPGA (Field Programmable Gate Array) that can be programmed, or a reconfigurable processor that can reconfigure the connections or settings of the circuit cells inside the LSI.
[0208] Furthermore, if a new integrated circuit technology that can replace LSI appears due to the progress of semiconductor technology or a derivative technology, it is possible to integrate the functional blocks using that technology. The application of biotechnology is also a possibility.
[0209] (11) Some or all of the components constituting each of the above devices may be composed of an IC card or a standalone module that is detachable from each device. The IC card or module is a computer system composed of a microprocessor, ROM, RAM, etc. The IC card or module may include the above-mentioned ultra-multifunction LSI. The IC card or the module achieves its functions by the microprocessor operating according to a computer program. This IC card or this module may be tamper-resistant.
[0210] (12) The present disclosure may be embodied as any of the methods described above. It may also be embodied as a computer program for implementing these methods by a computer, or as a digital signal comprising a computer program.
[0211] The present disclosure may also be a computer program or a digital signal recorded on a computer-readable recording medium, such as a flexible disk, a hard disk, a CD-ROM, an MO, a DVD, a DVD-ROM, a DVD-RAM, a BD (Blu-ray (registered trademark) Disc), a semiconductor memory, etc. Also, the present disclosure may be a digital signal recorded on such a recording medium.
[0212] The present disclosure may also involve transmitting a computer program or a digital signal via a telecommunications line, a wireless or wired communication line, a network such as the Internet, data broadcasting, or the like.
[0213] The present disclosure may also be directed to a computer system having a microprocessor and a memory, the memory storing the computer program, and the microprocessor operating in accordance with the computer program.
[0214] Furthermore, the program or digital signal may be recorded on a recording medium and transferred, or the program or digital signal may be transferred via a network or the like, so that the program or digital signal may be implemented by another independent computer system.
[0215] (13) The above-described embodiments and modifications may be combined with each other.
[0216] The above describes a technique for determining a message used as a criterion for detecting unauthorized communication for the purpose of unauthorized control by an abnormal message in an in-vehicle network according to one or more aspects, based on embodiments and modifications thereof. In each of these embodiments and modifications thereof, a message used as a criterion for detecting unauthorized communication is determined by a gateway or ECU connected to the in-vehicle network system for communication, or a combination of these with a server computer. In this disclosure, a system including one or more processors and a storage unit that performs such unauthorized communication detection is called an unauthorized communication detection criterion determination system. Therefore, the unauthorized communication detection criterion determination system includes a system realized by a single device, such as a single gateway connected to the in-vehicle network system, and a system realized by multiple devices, such as a combination of such a gateway and an ECU, or a combination of a gateway or an ECU and a remote server computer.
[0217] In addition, this technology can be realized as a method that includes some or all of the processing steps executed by each component in each of the above-mentioned embodiments or their variations, or as a program that is executed by a processor of the fraudulent communication detection criteria determination system to cause the fraudulent communication detection criteria determination system to implement the method.
[0218] In addition, in the above embodiment or its modified example, the process executed by a specific component may be executed by another component instead of the specific component. Furthermore, the order of multiple processes may be changed, or multiple processes may be executed in parallel. [Industrial Applicability]
[0219] The present disclosure is applicable to in-vehicle network systems and the like. [Explanation of symbols]
[0220] 10 In-vehicle network system 100, 100a, 100b, 100c, 100d, 100e, 100f, 100g ECU 101 Engine 102 Brake 103 Door opening / closing sensor 104 Window opening / closing sensor 110 Frame Transmitter / Receiver 120 Frame Interpretation Unit 130 Reception ID determination unit 140 Reception ID list storage unit 150 Frame Processing Unit 170 Data Acquisition Section 171 Transmission data acquisition unit 180, 380 Frame Generation Unit 200, 200a, 200b bus 300 Gateway 310 Frame Transmitter / Receiver 320 Frame Interpretation Unit 330 Reception ID determination unit 340 Reception ID list storage unit 350 Frame Processing Unit 360 Transfer rule storage unit 370, 370a, 370b, 370c, 370d, 370e Fraud detection processing function group 371, 371b, 371c Period determination section 372 Rule Judgment Information Storage Unit 373 Arbitration Detector 374 Received message information storage unit 375, 375c, 375d Period origin determination section 376, 376c Transmission type determination unit 377 Periodic Type Learning Section 378 Periodic Type Holder
Claims
1. 1. A fraud detection method for detecting an abnormal message in an in-vehicle network, comprising: receiving a first message sent to the in-vehicle network; determining whether the reception time of the first message is within a predetermined range of times including a scheduled time that is an elapsed time from the reception time of a second message, which is received immediately before the first message and has the same data type as the first message; In the determination, if the reception time of the first message is within a predetermined range of times, the first message is determined to be a normal message; If the determination is that the reception time of the first message is not within a predetermined range of times, detecting whether arbitration occurred at the time of reception of the first message; If reconciliation has not occurred upon receipt of the first message, the first message is determined to be an abnormal message; if arbitration has occurred upon receipt of the first message, when one or a plurality of consecutive third messages and the first message are consecutively received following the one or a plurality of consecutive third messages, the reception time of the message having the earliest reception time among the one or a plurality of consecutive third messages is set as the start time of arbitration; If the start time of the arbitration is earlier than an upper limit of the predetermined range of times, the first message is determined to be a normal message; If the start time of the arbitration is after the upper limit of the predetermined range of times, the first message is determined to be an abnormal message; determining a starting time, which is a starting time for calculating a scheduled time of a fourth message that is received immediately after the first message and has the same data type as the first message, to be the reception time of the first message or the scheduled time of the first message, which is an elapsed time from the reception time of the second message, depending on a type of the first message; determining whether the reception time of the fourth message is within a predetermined range of times including a scheduled time, which is an elapsed time from the starting time; Fraud detection methods.
2. determining the starting time to be the reception time of the first message or the scheduled time of the first message depending on a difference between the reception time of the first message and the reception time of the second message; The fraud detection method according to claim 1.
3. classifying, into at least two types, the difference between the reception times of two adjacent messages in the reception order among a plurality of fifth messages that have the same data type as the first message and are received before the first message, and determining the starting time to be the reception time of the first message or the scheduled time of the first message according to the number of each of the at least two classified types; The fraud detection method according to claim 1 .
4. comparing a difference between the reception times of two messages that are adjacent to each other in the reception order among the plurality of fifth messages with a reference value; determining the starting time to be the reception time of the first message or the scheduled time of the first message depending on the number of cases in which the difference is shorter than the reference value and the number of cases in which the difference is longer than the reference value; The fraud detection method according to claim 3.
5. if the number of cases where the difference is shorter than the reference value is smaller than the number of cases where the difference is longer than the reference value, determining the origin time to be the reception time of the first message; The fraud detection method according to claim 4.
6. determining the start time to be the reception time of the first message when a first number is smaller than a second number when the difference is larger than the reference value and when the difference between the first number and the second number is equal to or larger than a predetermined number; The fraud detection method according to claim 4.
7. determining the origin time to be the reception time of the first message when a first number when the difference is shorter than the reference value is smaller than a second number when the difference is longer than the reference value and when a ratio of the first number to the second number is smaller than a predetermined value; The fraud detection method according to claim 4.
8. if a difference between a first number when the difference is shorter than the reference value and a second number when the difference is longer than the reference value is not equal to or greater than a predetermined number, determining the start time to be the scheduled time of the first message; The fraud detection method according to claim 4.
9. determining the origin time to be the scheduled time of the first message if a ratio of a first number where the difference is less than the reference value to a second number where the difference is greater than the reference value is not less than a predetermined value; The fraud detection method according to claim 4.
10. A fraud detection device that detects an abnormal message in an in-vehicle network, one or more processors; A storage unit, The one or more processors, using the storage unit, receiving a first message sent to the in-vehicle network; determining whether the reception time of the first message is within a predetermined range of times including a scheduled time that is an elapsed time from the reception time of a second message, which is received immediately before the first message and has the same data type as the first message; In the determination, if the reception time of the first message is within a predetermined range of times, the first message is determined to be a normal message; If the determination is that the reception time of the first message is not within a predetermined range of times, detecting whether arbitration occurred at the time of reception of the first message; If reconciliation has not occurred upon receipt of the first message, the first message is determined to be an abnormal message; if arbitration has occurred upon receipt of the first message, when one or a plurality of consecutive third messages and the first message are consecutively received following the one or a plurality of consecutive third messages, the reception time of the message having the earliest reception time among the one or a plurality of consecutive third messages is set as the start time of arbitration; If the start time of the arbitration is earlier than an upper limit of the predetermined range of times, the first message is determined to be a normal message; If the start time of the arbitration is after the upper limit of the predetermined range of times, the first message is determined to be an abnormal message; determining a starting time, which is a starting time for calculating a scheduled time of a fourth message that is received immediately after the first message and has the same data type as the first message, to be the reception time of the first message or the scheduled time of the first message, which is an elapsed time from the reception time of the second message, depending on a type of the first message; determining whether the reception time of the fourth message is within a predetermined range of times including a scheduled time, which is an elapsed time from the starting time; Fraud detection device.
11. A program for causing a computer to execute the fraud detection method according to claim 1.
Citation Information
Patent Citations
Network device and data transmission reception system
JP2014146868A
Communication system and communication device
JP2016100726A
Detection device, gateway device, detection method, and detection program
JP2018046432A
Communication system and communication method
WO2013094072A1
Vehicle communication device, in-vehicle network system, and vehicle communication method
WO2016038816A1
