This application is based upon and claims the benefit of priority from Japanese Patent Application No. 2020-032906 filed on Feb. 28, 2020, the content of which is incorporated herein by reference.
This invention relates to an illegal signal detection apparatus for detecting illegal signals input to communication network.
As a device of this type, a device that detects a denial-of-service (DoS) attack from a device outside a vehicle to an in-vehicle communication network is known (refer to, for example, JP 2016-143963 A). In the device disclosed in JP 2016-143963 A, an amount of data input from the device outside the vehicle to the in-vehicle communication network is detected, and when the amount of data equal to or larger than a threshold set in advance is detected, it is determined that the DoS attack occurs.
However, in the device disclosed in JP 2016-143963 A, it is not possible to determine whether the DoS attack occurs until the amount of data equal to or larger than the threshold set in advance is detected, and it takes time to determine whether the DoS attack occurs.
An aspect of the present invention is an illegal signal detection apparatus, including: a CPU and a memory coupled to the CPU. The CPU is configured to perform: reading a normal signal input to a communication network at a first cycle and an abnormal signal input to the communication network at a second cycle shorter than the first cycle; counting a number of the abnormal signal read in the reading; and determining whether a count value corresponding to the number of the abnormal signal read in the reading is equal to or greater than a predetermined threshold value when an abnormal state in which the abnormal signal is read in a predetermined unit time period continuously occurs for a predetermined time period. The CPU is configured to perform: the counting including weighting the count value so that the count value increases as compared with the number of the abnormal signal read in the reading with increase in the number of the abnormal signal read in the reading.
Another aspect of the present invention is an illegal signal detection apparatus, including: a CPU and a memory coupled to the CPU. The CPU is configured to function as: a signal read unit configured to read a normal signal input to a communication network at a first cycle and an abnormal signal input to the communication network at a second cycle shorter than the first cycle; a count unit configured to count a number of the abnormal signal read by the signal read unit; and a determination unit configured to determine whether a count value counted by the count unit is equal to or greater than a predetermined threshold value when an abnormal state in which the abnormal signal is read by the signal read unit in a predetermined unit time period continuously occurs for a predetermined time period. The count unit is configured to weight the count value so that the count value increases as compared with the number of the abnormal signal read by the signal read unit with increase in the number of the abnormal signal read by the signal read unit.
The objects, features, and advantages of the present invention will become clearer from the following description of embodiments in relation to the attached drawings, in which:
An embodiment of the present invention is hereinafter described with reference to
The ECUs 2 are connected so as to be able to communicate with each other by an in-vehicle communication network such as a controller area network (CAN). Each ECU 2 includes a computer including a CPU, a RAM, a ROM, and other peripheral circuits. Each ECU 2 executes various types of control based on output values from various sensors according to a program stored in a memory in advance.
A telematics control unit (TCU) 3 that performs wireless communication with the outside, and a data link connector (DLC) 4 to which a diagnostic machine that reads a failure code stored in the ECU 2 to perform failure diagnosis of the vehicle 1 or updates the program of the ECU 2 may be connected are further connected to the ECU 2 via the in-vehicle communication network. A gateway 5 is provided between the ECU 2 and the TCU 3 and DLC 4, and the gateway 5 relays communication between the in-vehicle communication network and the outside of the vehicle or communication between a plurality of in-vehicle communication networks.
As illustrated in
However, when the count value obtained by simply counting the number of times of reading is used, time until determination of the occurrence of the DoS attack becomes longer. Therefore, a load applied to the in-vehicle communication network during this time increases, and there is a possibility that each ECU connected to the in-vehicle communication network cannot operate normally. Therefore, the illegal signal detection apparatus 100 according to the embodiment of the present invention is configured as follows so as to shorten the time required for the determination.
As illustrated in
The signal read unit 53 reads all the data signals input to the gateway 5 via the in-vehicle communication network. The read data signals include the normal signals LS input at the predetermined cycle Tf and the abnormal signals IS input at the cycle Ts shorter than the predetermined cycle Tf. The normal signals LS include the data signals input from outside the vehicle via the TCU 3 and the DLC 4 and the data signals input from each ECU 2 in the vehicle. The abnormal signals IS include not only the data signals the cycle of which becomes shorter than the predetermined cycle Tf due to the variation in communication that might occur temporarily and the like but also illegal data signals such as spoofing input from a falsified ECU or an illegal external device connected to the in-vehicle communication network.
The count unit 54 counts the number of times of reading of the abnormal signals IS read by the signal read unit 53. In further detail, the count unit 54 performs weighted counting of an actual count value (number of times of reading) so that the count value increases as compared with the number of times of reading with an increase in the number of times of reading of the abnormal signals IS read by the signal read unit 53. That is, the count unit 54 performs the weighted counting of the actual count value so that an increase rate of the count value associated with the increase in the number of times of reading becomes larger than an increase rate of the number of times of reading (actual count value). For example, counting to accumulate a value obtained by weighting the actual count value is performed.
As indicated by the characteristic f1 in
The weighting setting unit 55 sets a weighting value α to the actual count value weighted by the count unit 54. The weighting setting unit 55 sets the weighting value α so that the count value m increases as compared with the number of times of reading as the number of times of reading of the abnormal signals IS read by the signal read unit 53 increases. The count unit 54 multiplies or adds the weighting value α set by the weighting setting unit 55 by or to the actual count value n, and counts the count value by or to which the weighting value α is multiplied or added as the weighted count value m.
Note that the weighting setting unit 55 may also set, for example, a value Ab obtained by exponentiating the predetermined value A by the total number b of the unit time periods in which the abnormal state occurs continuously as the weighting value α. Although the predetermined value A may be set arbitrarily, by setting the predetermined value A to a large value, the increase rate (increment R) of the weighted count value m may be made higher as the number of times of reading increases.
The relay unit 56 relays communication signals (data signals) transmitted/received between the ECU 2 and the TCU 3 and DLC 4. That is, the relay unit 56 transfers (relays) the data signals input from a transmission source to the in-vehicle communication network to be read by the signal read unit 53 to a transmission destination.
When the abnormal state in which the abnormal signal IS read by the signal read unit 53 is included in the unit time period T1 continuously occurs for the predetermined time period Tw, the determination unit 57 determines whether the weighted count value m counted by the count unit 54 is equal to or larger than a predetermined threshold value Q (
In further detail, the determination unit 57 includes a first determination unit 571 and a second determination unit 572. The first determination unit 571 determines whether the abnormal state continuously occurs for the predetermined time period Tw. The second determination unit 572 determines whether the count value m counted by the count unit 54 is equal to or larger than the predetermined threshold value Q in a case where the first determination unit 571 determines that the abnormal state continuously occurs. The second determination unit 572 determines whether the count value m is equal to or larger than the threshold value Q each time continuity of the abnormal state is determined by the first determination unit 571. The count unit 54 resets the count value m in a case where it is determined by the first determination unit 571 that the abnormal state does not continue.
Note that the first determination unit 571 and the second determination unit 572 are not necessarily required, and it may be configured to determine the above only by the determination unit 57. The second determination unit 572 may determine whether the count value m is equal to or larger than the threshold value Q in a case where the continuity of the abnormal state determined by the first determination unit 571 is not smaller than a predetermined number of times. For example, it is possible to start determining in a case where it continues three times or more, and thereafter determine each time the continuity is determined, or determine each time it continues twice. With such determination timing, it is possible to efficiently determine.
When it is determined by the determination unit 57 that the DoS attack occurs on the in-vehicle communication network, the communication restriction unit 58 restricts the communication as necessary. For example, relay of the data signals from the transmission source to the transmission destination is prohibited (blocked).
First, at S1 (S: processing step), it is determined whether new data signals LS and IS are read by a process by the signal read unit 53. S1 is repeated until it is affirmed. When it is affirmed at S1, the procedure shifts to S2, and the number of times of reading of the abnormal signals IS is counted by a process by the count unit 54.
Next, at S3, it is determined whether the abnormal state continuously occurs for a predetermined time by a process by the first determination unit 571. When it is denied at S3, the procedure shifts to S4, and the count value is reset by a process by the count unit 54. On the other hand, when it is affirmed at S3, the procedure shifts to S5, and it is determined whether the count value counted by the count unit 54 is equal to or larger than the predetermined threshold value Q by a process by the second determination unit 572.
When it is denied at S5, the procedure ends, whereas when it is affirmed, the procedure shifts to S6, and it is determined by a process by the determination unit 57 that the DoS attack on the in-vehicle communication network occurs. As a result, when it is determined that the DoS attack on the in-vehicle communication network occurs, it is possible to restrict the communication, for example, prohibit (block) the relay of the data signals by the communication restriction unit 58 as necessary.
A main operation of the gateway (illegal signal detection apparatus 100) 5 according to this embodiment is described more specifically. When a large number of illegal data signals are input from outside the vehicle to the in-vehicle communication network of the vehicle 1 via the TCU 3 (
The present embodiment can achieve advantages and effects such as the following:
(1) The gateway 5 includes: the signal read unit 53 configured to read normal signals LS input to the in-vehicle communication network at the predetermined cycle Tf and abnormal signals IS input to the in-vehicle communication network at the cycle Ts shorter than the predetermined cycle Tf; the count unit 54 configured to count the number of the abnormal signals IS read by the signal read unit 53; and the determination unit 57 configured to determine whether the count value m counted by the count unit 54 is equal to or greater than the predetermined threshold value Q when the abnormal state in which the abnormal signal IS is read by the signal read unit 53 in the predetermined unit time period T1 continuously occurs for the predetermined time period Tw (
With this configuration, since the actual count value is weighted so that the count value m increases as compared with the number of times of reading as the number of times of reading of the abnormal signals IS increases, it is possible to shorten the time for determining the occurrence of the DoS attack on the in-vehicle communication network. Therefore, it is possible to inhibit the increase in load applied to the in-vehicle communication network until the determination, and to inhibit a state in which the ECU connected to the in-vehicle communication network cannot operate normally. Since the normal signal LS generated during a normal operation has limited duration and is sufficiently shorter than the Dos attack, the normal signal LS stops before the weighted count value m increases, so that this does not reach a threshold and erroneous determination of the normal signal LS as the abnormal signal IS may be inhibited.
(2) The count unit 54 is configured to weight the actual count value so that the increment R of the count value added in each of the predetermined unit time period T1 increases with increase in the number of the abnormal signals IS read by the signal read unit 53. That is, the count unit 54 weights the actual count value so that the increase rate (increment R) of the count value m increases as the number of times of reading increases. As a result, the count value m easily exceeds the predetermined threshold value Q, so that it is possible to further shorten the time required for determining the occurrence of the DoS attack on the in-vehicle communication network.
(3) The gateway 5 further includes: the weighting setting unit 55 configured to set the weighting value α to the count value (
(4) The weighting setting unit 55 is configured to set the value Ab−1 obtained by exponentiating the predetermined value A by the number b−1 of the unit time period T1 in which the abnormal state continues as the weighting value α when the abnormal state continuously occurs for the predetermined time period Tw. This makes it possible to further increase the increase rate (increment R) of the count value m associated with the increase in the number of times of reading.
In the above-described embodiment, the illegal signal detection apparatus 100 is illustrated as the gateway 5 including the signal read unit 53, the count unit 54, the weighting setting unit 55, and the determination unit 57, but the configuration of the illegal signal detection apparatus is not limited thereto. For example, the signal read unit 53, the count unit 54, the weighting setting unit 55, and the determination unit 57 may be provided on a dedicated device that monitors the communication signals of the entire in-vehicle communication network other than the gateway 5, and they may be dispersed on the gateway 5, the ECU 2, the dedicated device and the like.
In the above-described embodiment, the count unit 54 performs the weighting to multiply the weighting value α set by the weighting setting unit 55 by the actual count value n, but this may be the weighting to add the weighting value set by the weighting setting unit 55 to the actual count value n.
In the above-described embodiment, the in-vehicle communication network using the CAN communication is illustrated as the communication network, but the communication network to which the illegal signal detection apparatus is applied is not limited to this. The communication network may be any network as long as the data signals are input thereto.
The above embodiment can be combined as desired with one or more of the above modifications. The modifications can also be combined with one another.
According to the present invention, it becomes possible to shorten the time required to determine whether the DoS attack to the in-vehicle communication network occurs.
Above, while the present invention has been described with reference to the preferred embodiments thereof, it will be understood, by those skilled in the art, that various changes and modifications may be made thereto without departing from the scope of the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
2020-032906 | Feb 2020 | JP | national |