CAN bus intrusion detection method and device based on signal correlation

Through the method of grouping and verification based on signal correlation, the problem of human intervention and large computing resource occupation in CAN bus intrusion detection is solved, and efficient and accurate intrusion detection and security protection are achieved.

CN118677688APending Publication Date: 2024-09-20CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410928059.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

In the existing technology, CAN bus intrusion detection requires human intervention, the intrusion recognition rate is low, the labor cost is high, and the computing resources are occupied.

Method used

CAN bus intrusion detection is based on signal correlation. By obtaining the messages to be detected on the CAN bus, parsing and grouping signal data, establishing preset signal correlation rules, verifying signal correlation, determining the intrusion status, and then realizing intrusion detection.

Benefits of technology

It improves the intrusion recognition rate, reduces manual participation and computing resource occupation, ensures the efficiency and accuracy of detection, and increases the difficulty of cracking the communication protocol when the intrusion is serious to protect vehicle safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118677688A
    Figure CN118677688A
Patent Text Reader

Abstract

The invention relates to the technical field of vehicles, and provides a CAN bus intrusion detection method and device based on signal correlation, and the method comprises the steps: obtaining a plurality of to-be-detected messages on a vehicle CAN bus, carrying out the analysis of the to-be-detected messages, obtaining vehicle signal data, carrying out the grouping of all vehicle signal data according to a preset correlation, and carrying out the detection of the intrusion of a CAN bus. Obtaining at least one vehicle signal data set and a preset signal correlation rule corresponding to the vehicle signal data set, and performing signal correlation verification on all vehicle signal data in the vehicle signal data set through the preset signal correlation rule so as to determine whether the CAN bus is invaded or not. By establishing correlation among various important signals, abnormal intrusion can be accurately detected, effectiveness of vehicle signal data can be ensured, playback and tampering attacks of CAN signals can be efficiently and accurately detected, manpower is saved, the intrusion recognition rate is increased, and the occupation of computing resources is small.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of vehicle technology, and in particular to a method and device for CAN bus intrusion detection based on signal correlation. Background Art

[0002] CAN (Controller Area Network) is an ISO internationally standardized serial communication protocol and a multi-master serial communication bus widely used in the automotive industry. The CAN bus has excellent real-time performance and is suitable for applications that require timely data transmission, such as automotive control systems, industrial automation, etc.

[0003] In the related art, for intrusion detection of the CAN bus, a support vector machine model or a neural network model can be used to identify whether the features between the associated data are correct, thereby identifying whether the CAN bus has been invaded. The forms of intrusion of the CAN bus include but are not limited to at least one of CAN message tampering, CAN message forgery, and CAN message replay. However, based on the support vector machine model or the neural network model, it is necessary to manually identify which data is associated data, and there is not much data with strong association. The recognition rate of tampering with weakly associated data is very low, the labor cost is high, and the overall detection occupies a lot of computing resources of the controller. Summary of the invention

[0004] The embodiments of the present application provide a CAN bus intrusion detection method and device based on signal correlation to solve the technical problems in the related art that the intrusion detection of the CAN bus requires human intervention, has a low intrusion recognition rate, high labor costs, and occupies a large amount of computing resources of the controller.

[0005] An embodiment of the present application provides a method for CAN bus intrusion detection based on signal correlation, the method comprising: acquiring multiple messages to be detected on a vehicle's CAN bus; parsing the messages to be detected to obtain vehicle signal data of each message to be detected; grouping all vehicle signal data according to preset correlations to obtain at least one vehicle signal data set, and determining a preset signal correlation rule based on the preset correlation of the vehicle signal data set; performing signal correlation verification on the vehicle signal data in the vehicle signal data set based on the preset signal correlation rule; and determining the intrusion status of the CAN bus according to the signal correlation verification result to implement intrusion detection of the CAN bus.

[0006] In one embodiment of the present application, before all vehicle signal data are grouped according to preset correlations to obtain at least one vehicle signal data set, and a preset signal correlation rule is determined based on the preset correlations of the vehicle signal data set, the method also includes: obtaining all initial signal data of the vehicle, determining at least part of the initial signal data as intrusion detection signal data; counting the correlations of all the intrusion detection signal data to obtain multiple preset correlations; and configuring a corresponding preset signal correlation rule for each preset correlation.

[0007] In one embodiment of the present application, a corresponding preset signal correlation rule is configured for each preset correlation, including: dividing the intrusion detection signal data with the same physical correlation into one intrusion detection signal data set, and determining the physical formula corresponding to the physical correlation as the preset signal correlation rule of the intrusion detection signal data set; dividing the intrusion detection signal data with the same logical design correlation into one intrusion detection signal data set, and determining the preset logical relationship corresponding to the logical design correlation as the preset signal correlation rule of the intrusion detection signal data set; dividing the remaining intrusion detection signal data into one intrusion detection signal data set according to a preset number, and designing a construction function relationship for each intrusion detection signal data set, and determining an introduced variable based on the construction function relationship and the intrusion detection signal data in the intrusion detection signal data set, and determining the introduced variable and the construction function relationship as the preset signal correlation rule of the intrusion detection signal data set, and determining the intrusion detection signal data in the intrusion detection signal data set as having an introduced variable correlation; wherein the preset correlation includes at least one of a physical law correlation, a logical design correlation, and an introduced variable correlation.

[0008] In one embodiment of the present application, the constructed functional relationship includes an addition relationship.

[0009] In one embodiment of the present application, signal correlation verification is performed on the vehicle signal data in the vehicle signal data set based on the preset signal correlation rule, including at least one of the following: if the preset signal correlation rule is a physical law correlation relationship, the vehicle signal data in the vehicle signal data set is substituted into the physical law function relationship corresponding to the physical law correlation relationship; if the physical law function relationship is established, the signal correlation verification result is determined as a successful verification; if the physical law function relationship is not established, the signal correlation verification result is determined as a failed verification; if the preset signal correlation rule is a logical design correlation relationship, the vehicle signal data in the vehicle signal data set is subjected to condition satisfaction judgment according to the logical condition corresponding to the logical design correlation relationship. If all the vehicle signal data in the vehicle signal data set satisfy the logical condition, or if all the vehicle signal data in the vehicle signal data set do not satisfy the logical condition, the signal correlation verification result is determined as a successful verification; if part of the vehicle signal data in the vehicle signal data set satisfies the logical condition, the signal correlation verification result is determined as a failed verification; if the preset signal correlation rule is to introduce a variable correlation relationship, the vehicle signal data in the vehicle signal data set is substituted into the constructed function relationship corresponding to the introduced variable correlation relationship; if the substitution result is equal to the introduced variable, the signal correlation verification result is determined as a successful verification; if the substitution result is not equal to the introduced variable, the signal correlation verification result is determined as a failed verification.

[0010] In one embodiment of the present application, if the intrusion status is intrusion, the method further includes: counting the number of failed sets of vehicle signal data sets whose signal correlation verification results are failed verifications corresponding to different preset signal correlation rules under multiple statistical time periods, and the quantity change trend of the number of failed sets corresponding to each preset signal correlation rule; determining the preset signal correlation rule whose quantity change trend is an increase as the target signal correlation rule; if the target signal correlation rule is a physical law correlation relationship and / or an introduced variable correlation relationship, the to-be-detected alarms corresponding to all vehicle signal data sets corresponding to the target signal correlation rule are counted The target message is recorded as the target message, and the controller corresponding to the target message is controlled to copy the newly generated vehicle signal data to the reserved position of the message to be detected, and the vehicle signal data in the copied message to be detected is changed into the big and small ends before being sent to the CAN bus; if the target signal related rule is a logical design related relationship, the message to be detected corresponding to all the vehicle signal data sets corresponding to the target signal related rule is recorded as the target message, and the controller corresponding to the target message is controlled to copy the newly generated vehicle signal data to the reserved position of the message to be detected, and the copied message to be detected is sent to the CAN bus.

[0011] In one embodiment of the present application, after performing signal correlation verification on the vehicle signal data in the vehicle signal data set based on the preset signal correlation rule, the method further includes: counting the number of failed sets of vehicle signal data sets whose signal correlation verification results are failed verification within a statistical time period; and determining the intrusion rate based on the number of failed sets and the length of the statistical time period.

[0012] In one embodiment of the present application, the method for determining the intrusion rate includes:

[0013] V=N / T,

[0014] Wherein, V is the intrusion rate, N is the number of failed sets of vehicle signal data sets whose signal correlation verification results are failed verification in a statistical time period, and T is the length of the statistical time period.

[0015] In one embodiment of the present application, the intrusion status of the CAN bus is determined based on the signal correlation verification result, including: if the signal correlation verification result is that the number of failed sets of vehicle signal data sets that failed verification is greater than a preset number threshold, the intrusion status is determined as intrusion; if the signal correlation verification result is that the number of failed sets of vehicle signal data sets that failed verification is less than or equal to the preset number threshold, the intrusion status is determined as no intrusion.

[0016] An embodiment of the present application also provides a CAN bus intrusion detection device based on signal correlation, the device comprising: an acquisition module, used to acquire multiple messages to be detected on the vehicle's CAN bus; a parsing module, used to parse the messages to be detected to obtain vehicle signal data of each message to be detected; a grouping module, used to group all vehicle signal data according to preset correlations to obtain at least one vehicle signal data set, and determine a preset signal correlation rule based on the preset correlation of the vehicle signal data set; a verification module, used to perform signal correlation verification on the vehicle signal data in the vehicle signal data set based on the preset signal correlation rule; an intrusion detection module, used to determine the intrusion status of the CAN bus according to the signal correlation verification result, so as to realize intrusion detection of the CAN bus.

[0017] An embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any one of the above embodiments when executing the computer program.

[0018] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method described in any one of the above embodiments is implemented.

[0019] The above-mentioned CAN bus intrusion detection method and device based on signal correlation, the method obtains multiple messages to be detected on the vehicle CAN bus, parses the messages to be detected to obtain vehicle signal data, groups all vehicle signal data according to preset correlation relationships, obtains at least one vehicle signal data set and a preset signal correlation rule corresponding to the vehicle signal data set, verifies the signal correlation of all vehicle signal data in the vehicle signal data set through the preset signal correlation rule, and then determines whether the CAN bus is invaded, and accurately detects abnormal intrusions by establishing correlations between various important signals, which can ensure the validity of vehicle signal data, and detects replay and tampering attacks of CAN signals with high efficiency and accuracy, without excessive human participation, saving manpower, and improving the recognition rate of intrusions. Compared with the method of identifying whether the features between related data are correct through a support vector machine model or a neural network model, the computing resources of the controller are also less occupied. In addition, when the intrusion is serious, the counterfeit signal increases the difficulty of cracking the communication protocol and protects the safety of the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor.

[0021] Figure 1 A flow chart of a CAN bus intrusion detection method based on signal correlation provided in an embodiment of the present application;

[0022] Figure 2 A schematic diagram of a structure of a CAN bus intrusion detection device based on signal correlation provided in an embodiment of the present application;

[0023] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0025] See also Figure 1 As shown, Figure 1 A flow chart of a CAN bus intrusion detection method based on signal correlation provided in an embodiment of the present application, the method comprises the following steps:

[0026] Step S110, obtaining a plurality of messages to be detected on the CAN bus of the vehicle.

[0027] The vehicle signal data detected by the controller is usually sent to the CAN bus in the form of a message. Each message to be detected includes at least one vehicle signal data.

[0028] Step S120, parsing the message to be detected to obtain vehicle signal data of each message to be detected.

[0029] The specific implementation method of parsing the message to be detected to obtain the vehicle signal data may be implemented in a manner known to those skilled in the art and is not limited here.

[0030] Step S130: group all vehicle signal data according to preset correlations to obtain at least one vehicle signal data set, and determine preset signal correlation rules based on the preset correlations of the vehicle signal data sets.

[0031] In one embodiment, before all vehicle signal data are grouped according to preset correlations to obtain at least one vehicle signal data set, and the preset signal correlation rules are determined based on the preset correlations of the vehicle signal data set, the method further includes: obtaining all initial signal data of the vehicle, determining at least part of the initial signal data as intrusion detection signal data; counting the correlations of all intrusion detection signal data to obtain multiple preset correlations; and configuring corresponding preset signal correlation rules for each preset correlation. Each preset correlation corresponds to at least two specific vehicle signal data, and after the vehicle signal data is parsed and obtained, the vehicle signal data can be grouped based on the preset correlations corresponding to the vehicle signal data.

[0032] A vehicle may generate a lot of initial signal data, and those skilled in the art may select at least part of them as iconic vehicle signal data for CAN bus intrusion detection and perform intrusion detection analysis as needed.

[0033] The preset correlation relationship can be pre-constructed by a person skilled in the art, for example, based on natural rules such as logical relationships and physical relationships, or based on rules designed by a person skilled in the art. An intrusion detection signal data set includes multiple intrusion detection signal data, so that it is possible to determine whether the vehicle signal data subsequently collected from the CAN bus meets the preset correlation relationship based on the preset correlation relationship between the multiple intrusion detection signal data to determine whether an intrusion event has occurred.

[0034] Through the above method, the correlation between the vehicle signals within each set is constructed, and the detection of CAN bus intrusion can be realized.

[0035] Step S140 , performing signal correlation verification on the vehicle signal data in the vehicle signal data set based on a preset signal correlation rule.

[0036] In one embodiment, a corresponding preset signal correlation rule is configured for each preset correlation, including: dividing intrusion detection signal data with the same physical correlation into an intrusion detection signal data set, and determining the physical formula corresponding to the physical correlation as the preset signal correlation rule of the intrusion detection signal data set; dividing intrusion detection signal data with the same logical design correlation into an intrusion detection signal data set, and determining the preset logical relationship corresponding to the logical design correlation as the preset signal correlation rule of the intrusion detection signal data set; dividing the remaining intrusion detection signal data (intrusion detection signal data that neither satisfies the logical design correlation nor the physical correlation) into an intrusion detection signal data set according to a preset number, and designing a construction function relationship for each intrusion detection signal data set, and determining the introduction variable based on the construction function relationship and the intrusion detection signal data in the intrusion detection signal data set, and determining the introduction variable and the construction function relationship as the preset signal correlation rule of the intrusion detection signal data set, and determining the intrusion detection signal data in the intrusion detection signal data set as having the introduction variable correlation; wherein the preset correlation includes at least one of the physical law correlation, the logical design correlation and the introduction variable correlation. The construction of the intrusion detection signal data set can be realized in the above manner, and according to different correlations, it can be physical laws, logical laws, or laws created by technicians in this field, so that the intrusion detection signal data belonging to the same intrusion detection signal data set have correlation, and the preset signal correlation rules are recorded to facilitate subsequent intrusion detection. Among them, the constructed function relationship includes an addition relationship.

[0037] Following the above embodiment, signal correlation verification is performed on the vehicle signal data in the vehicle signal data set based on the preset signal correlation rule, including at least one of the following:

[0038] If the preset signal correlation rule is a physical law correlation relationship, the vehicle signal data in the vehicle signal data set is substituted into the physical law function relationship corresponding to the physical law correlation relationship. If the physical law function relationship is established, the signal correlation verification result is determined as a successful verification. If the physical law function relationship is not established, the signal correlation verification result is determined as a failed verification.

[0039] If the preset signal correlation rule is a logic design correlation relationship, the vehicle signal data in the vehicle signal data set are subjected to condition satisfaction judgment according to the logic condition corresponding to the logic design correlation relationship; if all the vehicle signal data in the vehicle signal data set satisfy the logic condition, or if all the vehicle signal data in the vehicle signal data set do not satisfy the logic condition, the signal correlation verification result is determined as a successful verification; if part of the vehicle signal data in the vehicle signal data set satisfies the logic condition, the signal correlation verification result is determined as a failed verification;

[0040] If the preset signal correlation rule is to introduce variable correlation, the vehicle signal data in the vehicle signal data set is substituted into the constructed function relationship corresponding to the introduced variable correlation. If the substitution result is equal to the introduced variable, the signal correlation verification result is determined as a successful verification. If the substitution result is not equal to the introduced variable, the signal correlation verification result is determined as a failed verification.

[0041] Different verification methods can be used based on different signal correlations. Since the above calculation method is relatively simple, its resource usage is greatly reduced compared to the solutions of related technologies.

[0042] Continuing from the above-mentioned embodiment, it is characterized in that after performing signal correlation verification on vehicle signal data in a vehicle signal data set based on preset signal correlation rules, the method further includes: counting the number of failed sets of vehicle signal data sets whose signal correlation verification results are verification failures within a statistical time period; determining the intrusion rate based on the number of failed sets and the length of the statistical time period.

[0043] As an example, the intrusion rate is determined by:

[0044] V=N / T,

[0045] Wherein, V is the intrusion rate, N is the number of failed sets of vehicle signal data sets whose signal correlation verification results are failed verification in a statistical time period, and T is the length of the statistical time period.

[0046] The intrusion rate can indicate the current intrusion risk intensity, so that relevant staff can be prompted to take corresponding measures. When the intrusion rate is greater than the preset rate threshold, the driver can be prompted that the vehicle has a high intrusion risk and needs to use the vehicle with caution.

[0047] Step S150, determining the intrusion state of the CAN bus according to the signal correlation verification result to implement intrusion detection on the CAN bus.

[0048] In one embodiment, if the intrusion state is intrusion, the method further includes: counting the number of failed sets of vehicle signal data sets whose signal correlation verification results corresponding to different preset signal correlation rules under multiple statistical time periods are verification failures, and the quantity change trend of the number of failed sets corresponding to each preset signal correlation rule; determining the preset signal correlation rule with an increasing quantity change trend as the target signal correlation rule; if the target signal correlation rule is a physical law correlation relationship and / or an introduced variable correlation relationship, the to-be-detected message corresponding to all the vehicle signal data sets corresponding to the target signal correlation rule is recorded as the target message, and the controller corresponding to the target message is controlled to copy the newly generated vehicle signal data to the reserved position of the to-be-detected message, and the vehicle signal data in the copied to-be-detected message is changed to the big and small ends before sending it to the CAN bus; if the target signal correlation rule is a logical design correlation relationship, the to-be-detected message corresponding to all the vehicle signal data sets corresponding to the target signal correlation rule is recorded as the target message, and the controller corresponding to the target message is controlled to copy the newly generated vehicle signal data to the reserved position of the to-be-detected message, and the copied to-be-detected message is sent to the CAN bus.

[0049] Since there are often blank spaces in the message, the same number of blank spaces as the vehicle signal data bits can be used as reserved spaces. When an intrusion occurs, the vehicle signal data is copied to the reserved spaces to increase the difficulty of subsequent signal cracking. Furthermore, some signals can be changed to big and small ends to further increase the difficulty of signal cracking.

[0050] As an example, the big-endian mode means that the high byte of the data is stored in the low address of the memory, and the low byte of the data is stored in the high address of the memory, the address increases from small to large, and the data is placed from high to low; the little-endian mode means that the high byte of the data is stored in the high address of the memory, and the low byte of the data is stored in the low address of the memory, the high address part has a high weight, and the low address part has a low weight. Changing the big and small ends means that the original big-endian mode is changed to the little-endian mode, and correspondingly, the original little-endian mode is changed to the big-endian mode. The specific implementation can be implemented in a manner known to those skilled in the art, and is not limited here.

[0051] In one embodiment, the intrusion status of the CAN bus is determined based on the signal correlation verification result, including: if the signal correlation verification result is that the number of failed sets of vehicle signal data sets that failed verification is greater than a preset number threshold, the intrusion status is determined as intrusion; if the signal correlation verification result is that the number of failed sets of vehicle signal data sets that failed verification is less than or equal to the preset number threshold, the intrusion status is determined as no intrusion.

[0052] Since errors may exist in the transmission process, once a failure occurs, it is considered that an intrusion has occurred, which will cause a heavy burden on the system. Therefore, a preset number threshold can be set to adjust the sensitivity of intrusion detection.

[0053] The above-mentioned embodiment provides a CAN bus intrusion detection method based on signal correlation, which obtains multiple messages to be detected on the vehicle CAN bus, parses the messages to be detected to obtain vehicle signal data, and groups them to obtain at least one vehicle signal data set and a preset signal correlation rule corresponding to the vehicle signal data set. The signal correlation of all vehicle signal data in the vehicle signal data set is verified through the preset signal correlation rule to determine whether the CAN bus is invaded. By establishing the correlation between various important signals, abnormal intrusions can be accurately detected, the validity of vehicle signal data can be guaranteed, and the replay and tampering attacks of CAN signals can be detected efficiently and accurately, saving manpower, improving the recognition rate of intrusions, and occupying little computing resources.

[0054] By constructing the correlation between important signals (vehicle signal data), the validity of important signals is guaranteed and intrusion is detected, and the replay and tampering attacks of CAN signals can be detected efficiently and accurately. In addition, when the intrusion is serious, the counterfeit signal increases the difficulty of cracking the communication protocol and protects the safety of the vehicle.

[0055] The following is an exemplary description of the CAN bus intrusion detection method based on signal correlation provided in the above embodiment through a specific embodiment.

[0056] Various signals are transmitted on the vehicle CAN bus, such as vehicle speed, accelerator pedal opening, drive motor speed and wheel speed, etc. Some of these signals are correlated. One is the correlation in the physical dimension, such as vehicle speed and wheel speed. The wheel speed multiplied by the tire radius is the vehicle speed, and they both represent the vehicle's driving speed; the other is the correlation in the logical dimension, such as the driver's seat occupancy signal and the power gear position. If the driver's seat is not occupied, the power gear position cannot be in the Ready state. This is determined by the logic of the vehicle's functional design. When no one is in the driver's seat, high voltage is not allowed to be powered on.

[0057] Therefore, there are at least two kinds of naturally correlated signals on the vehicle. One is the correlation caused by physical laws (physical law correlation), and the other is the correlation caused by logical design (logical design correlation).

[0058] Suppose there are n signals X1, X2, ..., Xn that are logically correlated with each other, that is, when X1 is in a state, X2, X3, ..., Xn should also be in a corresponding logical state. X1 may have more than two states (for example, if X1 is a door lock signal, it may have invalid state, unlocking, unlocking, locking, locking, etc.), but for logic design, we only care about whether X1 is in this state, that is, being in this state is true, and not being in this state is false. (When true, X1 is described as 1, and when false, X1 is described as 0), then the set {X1, X2, ..., Xn} should be a set of {0, 0, ..., 0} or a set of {1, 1, ..., 1}. If it is not such a set, it means that the logical correlation is destroyed, the data is tampered with, and the bus is invaded.

[0059] An example is as follows: the four states of door lock status, vehicle speed, driver's seat, and back door status have logical design correlation. The door lock status has five states: invalid, unlocking, unlocked, locked, and locked; the vehicle speed has 0-300KM / H; the driver's seat has two states: occupied and unoccupied, and the back door has three states: fully open, half open, and closed. The vehicle has the following functional logic design (an example of logical conditions). When the driver's seat is not occupied, the vehicle cannot be started, and when the vehicle speed is greater than 3KM, the vehicle door locks must be locked and the back door must be closed. From the logic design, the following logic can be extracted: the vehicle speed is greater than 3KM, the driver's seat must be occupied, the car locks are locked, and the back door is closed. Then corresponding to these four signals, true and false states can be established, for example, the driver's seat is 1 when it is occupied and 0 when it is not occupied, the vehicle speed is 1 when it is greater than 3KM and 0 when it is less than 3KM; the set {door lock status, vehicle speed, driver's seat, rear door status} established by these four signals can only be the set of {0, 0, ..., 0} or the set of {1, 1, ..., 1} (either all satisfy the above logic or none of them satisfy the above logic), and other forms of sets can be considered problematic.

[0060] Therefore, according to the functional logic design, a series of sets S1, S2, ..., Sn can be extracted, and the conditions of the true and false states of these elements in the set can be established. A set S = {S1, S2, ..., Sn} can be established, and N1 is used to represent the number of sets that are not all 0 sets or all 1 sets in the set. It can be determined whether these sets in S are all 0 sets or all 1 sets to determine whether the logic-related signals have been tampered with, and further detect intrusion.

[0061] In addition, some important signals have strong physical correlation, such as P1, P2, ..., Pn, then P1 = F (P2, ..., Pn), this functional relationship can be derived from relevant physical theorems, or obtained by training neural network models with a large amount of data. For example, vehicle speed = wheel speed * radius (an example of a physical law functional relationship).

[0062] Based on the strong correlation of this physical law, a series of functional relationships F(P) of signals can be established, and N2 is used to represent the number of times these functional relationships do not hold true.

[0063] However, some important signals have no correlation with other signals, or the correlation is very weak. If they are tampered, it is impossible to detect them through the correlation signals, so it is necessary to select these signals and group them into groups of 3 or 4 (or other values ​​set by technicians in this field), that is, to construct the correlation relationship of the introduced variables.

[0064] One of the groups is Z1, Z2, Z3, and Z4. There is no correlation between them, so we introduce a variable B to make B=F(Z1, Z2, Z3, Z4). In this way, B is correlated with the four signals Z1, Z2, Z3, and Z4. We can determine whether there has been an intrusion by detecting whether the function formula (constructing the function relationship formula) is satisfied.

[0065] As an example, in order to reduce the amount of calculation and the occupation of bus resources by variable B, B only occupies 6 bits, and the functional relationship (constructing the functional relationship) is just the simplest addition B=F(Z1, Z2, Z3, Z4)=Q(Q(Z1)+Q(Z2)+Q(Z3)+Q(Z4)). Function Q takes the last 6 bits of the signal. In this way, we can get a series of sets S{Z1, Z2, Z3, Z4, B}, and N3 represents the number of sets in which the functional relationship does not hold. It should be noted that variable B (introduced variable) is a CAN signal artificially constructed to detect correlation. It can be sent together with the message to be detected, or it can be pre-stored in the intrusion detection device.

[0066] At this point, the total number of intrusions can be obtained as follows:

[0067] N=N1+N2+N3,

[0068] Among them, N is the number of failed sets of vehicle signal data sets whose signal correlation verification results are failed verification in a statistical time period, that is, the total number of intrusions, N1 is the number of failed sets of vehicle signal data sets whose signal correlation verification results are failed verification in a statistical time period corresponding to the logic design correlation relationship, N2 is the number of failed sets of vehicle signal data sets whose signal correlation verification results are failed verification in a statistical time period corresponding to the physical law correlation relationship, and N2 is the number of failed sets of vehicle signal data sets whose signal correlation verification results are failed verification in a statistical time period corresponding to the introduced variable correlation relationship.

[0069] After being able to detect intrusion, certain strategies are still needed to improve the defense capabilities of the vehicle and increase the difficulty of cracking. As an example, the following strategy can be adopted. If N1 increases, that is, a set of logical correlations is destroyed, the controller that sends the signal in the set copies another signal and fills it in the reserved position. If N2 increases, that is, several quantities of a physical correlation are tampered with, the controller that sends these quantities copies another signal and fills it in the reserved position, and the protocol of these quantities changes the big and small ends for sending. If N3 increases, that is, several quantities that artificially constitute the correlation are tampered with, the controller that sends these quantities copies another signal and fills it in the reserved position, and the protocol of these quantities changes the big and small ends for sending (except B, B is still calculated according to the functional relationship).

[0070] In one embodiment, after power is turned on and off again, N needs to be reset to zero and all policies are restored.

[0071] The above method can increase the difficulty of malicious hacking and ensure that intrusion detection can still be accurately detected. The above method can accurately detect abnormal intrusions by establishing correlations between various important signals, and provides a strategy to imitate some substitute signals and leading signals during intrusion, further improving the vehicle's anti-intrusion capabilities.

[0072] In one embodiment, a CAN bus intrusion detection device based on signal correlation is provided, and the CAN bus intrusion detection device based on signal correlation is used to perform the steps of the CAN bus intrusion detection method based on signal correlation provided in any of the above embodiments. Figure 2 , Figure 2 A schematic diagram of a CAN bus intrusion detection device based on signal correlation provided in an embodiment of the present application is shown in FIG. Figure 2As shown, the CAN bus intrusion detection device 200 based on signal correlation includes: an acquisition module 201, used to acquire multiple messages to be detected on the CAN bus of the vehicle; a parsing module 202, used to parse the messages to be detected to obtain the vehicle signal data of each message to be detected; a grouping module 203, used to group all vehicle signal data according to preset correlations, obtain at least one vehicle signal data set, and determine a preset signal correlation rule based on the preset correlation of the vehicle signal data set; a verification module 204, used to perform signal correlation verification on the vehicle signal data in the vehicle signal data set based on the preset signal correlation rule; an intrusion detection module 205, used to determine the intrusion status of the CAN bus according to the signal correlation verification result, so as to realize intrusion detection of the CAN bus.

[0073] In one embodiment, the device also includes a preset module, which is used to group all vehicle signal data according to preset correlations to obtain at least one vehicle signal data set, and before determining a preset signal correlation rule based on the preset correlation of the vehicle signal data set, obtain all initial signal data of the vehicle, determine at least part of the initial signal data as intrusion detection signal data; count the correlations of all the intrusion detection signal data to obtain multiple preset correlations; and configure a corresponding preset signal correlation rule for each preset correlation.

[0074] In one embodiment, the preset module is further configured to: divide the intrusion detection signal data having the same physical correlation into an intrusion detection signal data set, and determine the physical formula corresponding to the physical correlation as the preset signal correlation rule of the intrusion detection signal data set; divide the intrusion detection signal data having the same logical design correlation (having a set of logical relationships) into an intrusion detection signal data set, and determine the preset logical relationship corresponding to the logical design correlation as the preset signal correlation rule of the intrusion detection signal data set; divide the remaining intrusion detection signal data into an intrusion detection signal data set according to a preset number, and design a construction function relationship for each intrusion detection signal data set, and determine the introduced variables based on the construction function relationship and the intrusion detection signal data in the intrusion detection signal data set, and determine the introduced variables and the construction function relationship as the preset signal correlation rule of the intrusion detection signal data set, and determine the intrusion detection signal data in the intrusion detection signal data set as having the introduced variable correlation; wherein the preset correlation includes at least one of the physical law correlation, the logical design correlation and the introduced variable correlation.

[0075] In one embodiment, the verification module is further configured as follows: if the preset signal correlation rule is a physical law correlation relationship, the vehicle signal data in the vehicle signal data set is substituted into the physical law function relationship corresponding to the physical law correlation relationship; if the physical law function relationship holds, the signal correlation verification result is determined as a successful verification; if the physical law function relationship does not hold, the signal correlation verification result is determined as a failed verification; if the preset signal correlation rule is a logical design correlation relationship, the vehicle signal data in the vehicle signal data set is subjected to condition satisfaction judgment according to the logical condition corresponding to the logical design correlation relationship; if the vehicle signal data in the vehicle signal data set is If all the data meet the logical conditions, or if all the vehicle signal data in the vehicle signal data set do not meet the logical conditions, the signal correlation verification result is determined as a successful verification; if some of the vehicle signal data in the vehicle signal data set meet the logical conditions, the signal correlation verification result is determined as a failed verification; if the preset signal correlation rule is to introduce variable correlation, the vehicle signal data in the vehicle signal data set is substituted into the constructed function relationship corresponding to the introduced variable correlation; if the substitution result is equal to the introduced variable, the signal correlation verification result is determined as a successful verification; if the substitution result is not equal to the introduced variable, the signal correlation verification result is determined as a failed verification.

[0076] In one embodiment, the device also includes an intrusion handling module, which is used to count the number of failed sets of vehicle signal data sets whose signal correlation verification results are verification failures corresponding to different preset signal correlation rules under multiple statistical time periods, and the number change trend of the number of failed sets corresponding to each preset signal correlation rule if the intrusion state is intrusion; determine the preset signal correlation rule with an increasing number change trend as the target signal correlation rule; if the target signal correlation rule is a physical law correlation relationship and / or an introduced variable correlation relationship, the to-be-detected message corresponding to all the vehicle signal data sets corresponding to the target signal correlation rule is recorded as the target message, and the controller corresponding to the target message is controlled to copy the newly generated vehicle signal data to the reserved position of the to-be-detected message, and the vehicle signal data in the copied to-be-detected message is changed to the big and small ends before sending it to the CAN bus; if the target signal correlation rule is a logical design correlation relationship, the to-be-detected message corresponding to all the vehicle signal data sets corresponding to the target signal correlation rule is recorded as the target message, and the controller corresponding to the target message is controlled to copy the newly generated vehicle signal data to the reserved position of the to-be-detected message, and the copied to-be-detected message is sent to the CAN bus.

[0077] In one embodiment, the device also includes an intrusion rate determination module, which is used to count the number of failed sets of vehicle signal data sets whose signal correlation verification results are failed verification within a statistical time period after performing signal correlation verification on vehicle signal data in a vehicle signal data set based on preset signal correlation rules; and determine the intrusion rate based on the number of failed sets and the length of the statistical time period.

[0078] In one embodiment, the intrusion detection module is configured as follows: if the signal correlation verification result is that the number of failed sets of vehicle signal data sets that failed verification is greater than a preset number threshold, the intrusion status is determined as intrusion; if the signal correlation verification result is that the number of failed sets of vehicle signal data sets that failed verification is less than or equal to the preset number threshold, the intrusion status is determined as no intrusion.

[0079] For the specific definition of the CAN bus intrusion detection device based on signal correlation, please refer to the definition of the CAN bus intrusion detection method based on signal correlation mentioned above, which will not be repeated here. Each module in the above-mentioned CAN bus intrusion detection device based on signal correlation can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0080] In this embodiment, the CAN bus intrusion detection device based on signal correlation is essentially equipped with multiple modules to execute the CAN bus intrusion detection method based on signal correlation in any of the above-mentioned embodiments. The specific functions and technical effects can be referred to the above-mentioned embodiments and will not be repeated here.

[0081] In one embodiment, a vehicle is provided, the vehicle comprising the CAN bus intrusion detection device based on signal correlation provided by any of the above embodiments. The specific functions and technical effects of the vehicle can refer to the above embodiments, and will not be repeated here.

[0082] See also Figure 3 An embodiment of the present invention further provides an electronic device 300, including a processor 301, a memory 302 and a communication bus 303; the communication bus 303 is used to connect the processor 301 and the memory 302; the processor 301 is used to execute a computer program stored in the memory 302 to implement a method provided in any one of the above embodiments.

[0083] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. The computer program is used to enable a computer to execute a method provided in any one of the above embodiments.

[0084] The embodiment of the present application also provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of the steps included in the embodiment 1 of the embodiment of the present application.

[0085] The embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor.

[0086] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0087] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0088] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0089] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0090] It should be understood that the terms "first", "second", etc. mentioned in this application are used to distinguish similar objects, and do not necessarily represent that they refer to a specific order or sequence. The technical features in which these terms are located can be interchanged under appropriate circumstances, so that the embodiments of the application described here can be implemented in an order other than the illustrated or written description.

[0091] It should be understood that although the flowcharts provided in the embodiments of the present application indicate the steps by arrows, the order indicated by the arrows does not necessarily limit the order in which the steps are implemented. Those skilled in the art can perform the steps in other orders according to the requirements for different implementation scenarios.

[0092] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A CAN bus intrusion detection method based on signal correlation, characterized in that: The method comprises: Obtain multiple messages to be detected on the vehicle's CAN bus; Parsing the messages to be detected to obtain vehicle signal data of each message to be detected; Grouping all vehicle signal data according to preset correlations to obtain at least one vehicle signal data set, and determining a preset signal correlation rule based on the preset correlations of the vehicle signal data sets; Performing signal correlation verification on the vehicle signal data in the vehicle signal data set based on the preset signal correlation rule; The intrusion status of the CAN bus is determined according to the signal correlation verification result to realize intrusion detection of the CAN bus.

2. The CAN bus intrusion detection method based on signal correlation as claimed in claim 1, characterized in that: Before grouping all vehicle signal data according to preset correlations to obtain at least one vehicle signal data set, and determining a preset signal correlation rule based on the preset correlations of the vehicle signal data sets, the method further includes: Acquire all initial signal data of the vehicle, and determine at least part of the initial signal data as intrusion detection signal data; Counting the correlations of all the intrusion detection signal data to obtain a plurality of preset correlations; A corresponding preset signal correlation rule is configured for each preset correlation relationship.

3. The CAN bus intrusion detection method based on signal correlation as claimed in claim 2, characterized in that: Configure a corresponding preset signal correlation rule for each preset correlation relationship, including: Dividing the intrusion detection signal data having the same physical correlation into one intrusion detection signal data set, and determining the physical formula corresponding to the physical correlation as a preset signal correlation rule of the intrusion detection signal data set; Dividing the intrusion detection signal data having the same logic design correlation into one intrusion detection signal data set, and determining the preset logical relationship corresponding to the logic design correlation as the preset signal correlation rule of the intrusion detection signal data set; Divide the remaining intrusion detection signal data into an intrusion detection signal data set according to a preset number, design a construction function relationship for each intrusion detection signal data set, determine an introduced variable based on the construction function relationship and the intrusion detection signal data in the intrusion detection signal data set, and determine the introduced variable and the construction function relationship as a preset signal correlation rule of the intrusion detection signal data set, and determine the intrusion detection signal data in the intrusion detection signal data set as having an introduced variable correlation relationship; The preset correlation includes at least one of a physical law correlation, a logic design correlation and an introduced variable correlation.

4. The CAN bus intrusion detection method based on signal correlation as claimed in claim 3 is characterized in that: The constructed function relationship includes an addition relationship.

5. The CAN bus intrusion detection method based on signal correlation as claimed in claim 3, characterized in that: Performing signal correlation verification on the vehicle signal data in the vehicle signal data set based on the preset signal correlation rule includes at least one of the following: If the preset signal correlation rule is a physical law correlation relationship, the vehicle signal data in the vehicle signal data set is substituted into the physical law function relationship corresponding to the physical law correlation relationship, and if the physical law function relationship is established, the signal correlation verification result is determined as a verification success; if the physical law function relationship is not established, the signal correlation verification result is determined as a verification failure; If the preset signal correlation rule is a logic design correlation relationship, the vehicle signal data in the vehicle signal data set are subjected to condition satisfaction judgment according to the logic condition corresponding to the logic design correlation relationship; if all the vehicle signal data in the vehicle signal data set satisfy the logic condition, or if all the vehicle signal data in the vehicle signal data set do not satisfy the logic condition, the signal correlation verification result is determined as a successful verification; if part of the vehicle signal data in the vehicle signal data set satisfies the logic condition, the signal correlation verification result is determined as a failed verification; If the preset signal correlation rule is to introduce a variable correlation relationship, the vehicle signal data in the vehicle signal data set is substituted into the constructed function relationship corresponding to the introduced variable correlation relationship. If the substitution result is equal to the introduced variable, the signal correlation verification result is determined to be a successful verification; if the substitution result is not equal to the introduced variable, the signal correlation verification result is determined to be a failed verification.

6. The CAN bus intrusion detection method based on signal correlation as claimed in claim 5, characterized in that: If the intrusion status is intrusion, the method further includes: Counting the number of failed sets of vehicle signal data sets whose signal correlation verification results corresponding to different preset signal correlation rules are verification failures under multiple statistical time periods, and the number change trend of the number of failed sets corresponding to each preset signal correlation rule; Determine the preset signal-related rule with the quantity change trend being an increase as the target signal-related rule; If the target signal correlation rule is a physical law correlation relationship and / or an introduced variable correlation relationship, the to-be-detected message corresponding to all vehicle signal data sets corresponding to the target signal correlation rule is recorded as a target message, and the controller corresponding to the target message is controlled to copy the newly generated vehicle signal data to the reserved position of the to-be-detected message, and the vehicle signal data in the copied to-be-detected message is changed to a big-endian and a small-endian before being sent to the CAN bus; If the target signal correlation rule is a logical design correlation relationship, the message to be detected corresponding to the entire vehicle signal data set corresponding to the target signal correlation rule is recorded as the target message, and the controller corresponding to the target message is controlled to copy the newly generated vehicle signal data to the reserved position of the message to be detected, and the copied message to be detected is sent to the CAN bus.

7. The CAN bus intrusion detection method based on signal correlation according to any one of claims 1 to 6, characterized in that: After performing signal correlation verification on the vehicle signal data in the vehicle signal data set based on the preset signal correlation rule, the method further includes: Counting the number of failed sets of vehicle signal data sets whose signal correlation verification results are failed verification within a statistical time period; The intrusion rate is determined according to the number of failure sets and the length of the statistical time period.

8. The CAN bus intrusion detection method based on signal correlation as claimed in claim 7, characterized in that: The intrusion rate is determined by: V=N / T, Wherein, V is the intrusion rate, N is the number of failed sets of vehicle signal data sets whose signal correlation verification results are failed verification in a statistical time period, and T is the length of the statistical time period.

9. The CAN bus intrusion detection method based on signal correlation according to any one of claims 1 to 6, characterized in that: Determining the intrusion state of the CAN bus according to the signal correlation verification result includes: If the signal correlation verification result is that the number of failed sets of vehicle signal data sets that failed verification is greater than a preset number threshold, determining the intrusion state as intrusion; If the signal correlation verification result is that the number of failed sets of vehicle signal data sets that fail verification is less than or equal to the preset number threshold, the intrusion state is determined to be no intrusion.

10. A CAN bus intrusion detection device based on signal correlation, characterized in that: The device comprises: An acquisition module, used for acquiring a plurality of messages to be detected on the CAN bus of the vehicle; A parsing module, used for parsing the message to be detected to obtain vehicle signal data of each message to be detected; A grouping module, used to group all vehicle signal data according to a preset correlation relationship to obtain at least one vehicle signal data set, and determine a preset signal correlation rule based on the preset correlation relationship of the vehicle signal data set; A verification module, configured to perform signal correlation verification on the vehicle signal data in the vehicle signal data set based on the preset signal correlation rule; The intrusion detection module is used to determine the intrusion status of the CAN bus according to the signal correlation verification result, so as to realize the intrusion detection of the CAN bus.