CAN bus intrusion detection method and device
By constructing a detection data feature matrix and filling it into the intrusion detection module of the CAN bus, the existing technology problems of CAN bus intrusion detection requiring human intervention and occupying large computing resources are solved, and efficient intrusion detection is achieved.
Patent Information
- Application Number
- CN202410928054.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-11
AI Technical Summary
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 of the controller are large.
By obtaining the current controller matrix, gateway matrix and preset key matrix, the detection data feature matrix is constructed and filled into the intrusion detection module of the CAN bus. The unused reserved positions are used to generate the detection data feature sequence for comparison. to obtain intrusion detection results.
It improves the automation rate of CAN bus intrusion detection, reduces labor costs, reduces the occupation of computing resources, and enhances the intensity and detection rate of detection data features.
Smart Images

Figure CN118713901A
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of vehicle technology, and in particular to a CAN bus intrusion detection method and device. 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 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] The embodiment of the present application provides a CAN bus intrusion detection method, the method comprising: obtaining a current controller matrix, a current gateway matrix and a preset key matrix, wherein the number of rows of the current controller matrix is equal to the number of columns of the current gateway matrix, the number of columns of the current controller matrix is equal to the number of rows of the preset key matrix, and the number of rows of the current gateway matrix is equal to the number of columns of the preset key matrix; multiplying the current controller matrix, the current gateway matrix and the preset key matrix in sequence to obtain a current detection data feature matrix of the controller; splitting the current detection data feature matrix to obtain a plurality of current detection data feature sub-matrices, and determining corresponding sub-data features based on each current detection data feature sub-matrix; and determining corresponding sub-data features based on all current detection data feature sub-matrices. The sub-data features generate a detection data feature sequence according to a preset sub-feature order, and send the preset sub-feature order to the intrusion detection module of the CAN bus; fill the detection data feature sequence into the reserved position of the detection message to be sent of the controller to obtain the detection message of the controller; send the detection message to the intrusion detection module, so that the filling content in the reserved position of the detection message is extracted by the intrusion detection module to obtain the received reception data feature sequence, compare the reception data feature sequence with the verification data feature sequence to obtain the CAN bus intrusion detection result, and the verification data feature sequence is determined by the intrusion detection module based on the preset sub-feature order, the current controller matrix, the current gateway matrix and the preset key matrix.
[0006] In one embodiment of the present application, the corresponding sub-data features are determined based on each current detection data feature sub-matrix, including: converting the first-base digits in each current detection data feature sub-matrix to obtain the sub-data features corresponding to each current detection data feature sub-matrix, wherein the sub-data features are binary digits.
[0007] In one embodiment of the present application, the first-base digits in each current detection data feature submatrix are base-converted to obtain sub-data features corresponding to each current detection data feature submatrix, including: the first-base digits in each current detection data feature submatrix are base-converted to obtain a binary data sequence corresponding to each current detection data feature submatrix; the last two numbers of the data sequence corresponding to the current detection data feature submatrix are taken as the sub-data features corresponding to the current detection data feature submatrix, to obtain the sub-data features corresponding to each current detection data feature submatrix.
[0008] In one embodiment of the present application, the detection data feature sequence is filled into the reserved position of the detection message to be sent by the controller, including: obtaining a position mapping relationship between the preset feature sequence position and the reserved position of the controller; based on the position mapping relationship, filling the data features in the detection data feature sequence into the corresponding reserved position of the detection message to be sent.
[0009] In one embodiment of the present application, after the detection message is sent to the intrusion detection module, the method also includes: the intrusion detection module extracts the filling content in the reserved position of the detection message to obtain a received reception data feature sequence; the intrusion detection module determines the verification data feature sequence based on the preset sub-feature order, the current controller matrix, the current gateway matrix and the preset key matrix; the reception data feature sequence is compared with the verification data feature sequence to obtain a CAN bus intrusion detection result.
[0010] In one embodiment of the present application, the intrusion detection module is a gateway or other controller in the same network segment as the controller.
[0011] In one embodiment of the present application, before sending the preset sub-feature sequence to the intrusion detection module of the CAN bus, the method also includes: obtaining a preset importance priority of the controller; if the preset importance priority is greater than a preset priority threshold, determining another controller in the same network segment as the controller as the intrusion detection module; if the preset importance priority is less than or equal to the preset priority threshold, determining the gateway as the intrusion detection module.
[0012] In one embodiment of the present application, after the received data feature sequence is compared with the detection data feature sequence to obtain the CAN bus intrusion detection result, the method also includes: continuously extracting the filling content of a preset number of frame detection messages sent by multiple controllers to obtain a new received data feature sequence corresponding to each controller in each frame, and comparing the new received data feature sequence corresponding to the same controller with the detection data feature sequence to obtain the CAN bus intrusion detection result of each controller corresponding to each frame of the detection message received; if there is at least one controller whose CAN bus intrusion detection result is intrusion, the frame where the detection message is located is recorded as an abnormal frame; counting the number of abnormal frames of the abnormal frame, if the number of abnormal frames is greater than a preset number threshold, triggering the determination of a to-be-sent gateway matrix, the to-be-sent gateway matrix and the current gateway matrix are different, and the to-be-sent gateway matrix and the current gateway matrix are two matrices in a preset gateway matrix set; generating a gateway intrusion message based on the to-be-sent gateway matrix, and sending it to each of the controllers, so that the controller determines a new current gateway matrix based on the gateway intrusion message.
[0013] In one embodiment of the present application, the method further includes: if the number of times the gateway matrix to be sent is determined exceeds a preset number threshold, each time the number of abnormal frames detected is greater than the preset number threshold, the last determined gateway matrix to be sent is column-transformed to obtain a new gateway matrix to be sent.
[0014] In one embodiment of the present application, after a gateway intrusion message is generated based on the to-be-sent gateway matrix and sent to each of the controllers, the method further includes: after each controller receives the gateway intrusion message, it reads a preset position in the gateway intrusion message to obtain a current gateway matrix; if the current gateway matrix changes, a new current controller matrix is determined according to the current gateway matrix; if the new current controller matrix exists, a new current detection data feature matrix is generated based on the received new current gateway matrix, the new current controller matrix and the preset key matrix; if the new current controller matrix does not exist, the number of determination failures of the new current controller matrix is counted, and when the number of determination failures is greater than a preset failure threshold, the last current gateway matrix that is successfully determined to the new current controller matrix is used as the target gateway matrix, and a random preset controller matrix corresponding to the controller is used as the current controller matrix, and a new current detection data feature matrix is generated based on the target gateway matrix, the current controller matrix and the preset key matrix.
[0015] The embodiment of the present application also provides a CAN bus intrusion detection device, which includes: an acquisition module, which is used to acquire a current controller matrix, a current gateway matrix and a preset key matrix, wherein the number of rows of the current controller matrix is equal to the number of columns of the current gateway matrix, the number of columns of the current controller matrix is equal to the number of rows of the preset key matrix, and the number of rows of the current gateway matrix is equal to the number of columns of the preset key matrix; a current detection data feature matrix generation module, which is used to multiply the current controller matrix, the current gateway matrix and the preset key matrix in sequence to obtain a current detection data feature matrix of the controller; a current detection data feature sub-matrix determination module, which is used to split the current detection data feature matrix to obtain multiple current detection data feature sub-matrices, and determine the corresponding sub-data features based on each current detection data feature sub-matrix; a detection data feature sequence A generating module is used to generate a detection data feature sequence based on sub-data features corresponding to all current detection data feature sub-matrices, and send the preset sub-feature sequence to an intrusion detection module of a CAN bus; a filling module is used to fill the detection data feature sequence into a reserved position of a detection message to be sent by the controller to obtain a detection message of the controller; a sending module is used to send the detection message to the intrusion detection module, so that the filling content in the reserved position of the detection message is extracted by the intrusion detection module to obtain a received reception data feature sequence, and the reception data feature sequence is compared with a verification data feature sequence to obtain a CAN bus intrusion detection result, wherein the verification data feature sequence is determined by the intrusion detection module based on the preset sub-feature sequence, the current controller matrix, the current gateway matrix and the preset key matrix.
[0016] 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.
[0017] 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.
[0018] The CAN bus intrusion detection method and device provided above, the method constructs the current detection data feature matrix based on the current gateway matrix, controller matrix and preset key matrix, thereby obtaining the detection data feature sequence, and synchronizes the preset sub-feature order of the detection data feature sequence with the intrusion detection module, and then fills the detection data feature sequence into the reserved position in the detection message to be sent of the controller to obtain the detection message of the controller, and then compares the received data feature sequence in the detection message with the verification data feature sequence determined by itself through the intrusion detection module to obtain the CAN bus intrusion detection result, and establishes the detection data feature sequence by using the unused reserved position in the CAN protocol. When the intrusion occurs, the detection data feature sequence will be destroyed, and the CAN bus can be detected to be destroyed by the intrusion, and the detection data feature sequence is obtained by designing the gateway matrix, controller matrix and preset key matrix in advance, and the data feature is strong, the detection rate is high, the calculation amount is small, and the occupation of computing resources can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] 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.
[0020] Figure 1 A flow chart of a CAN bus intrusion detection method provided in an embodiment of the present application;
[0021] Figure 2 A schematic diagram of the structure of a CAN bus intrusion detection device provided in an embodiment of the present application;
[0022] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] 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.
[0024] See also Figure 1 As shown, Figure 1 A flow chart of a CAN bus intrusion detection method provided in an embodiment of the present application, the method comprises the following steps:
[0025] Step S110, obtaining a current controller matrix, a current gateway matrix and a preset key matrix.
[0026] Among them, the number of rows of the current controller matrix is equal to the number of columns of the current gateway matrix, the number of columns of the current controller matrix is equal to the number of rows of the preset key matrix, and the number of rows of the current gateway matrix is equal to the number of columns of the preset key matrix.
[0027] As an equivalent example, a person skilled in the art may also stipulate that the number of columns of the current controller matrix is equal to the number of rows of the current gateway matrix, the number of rows of the current controller matrix is equal to the number of columns of the preset key matrix, and the number of columns of the current gateway matrix is equal to the number of rows of the preset key matrix, which does not exceed the scope protected by the above scheme.
[0028] Among them, each controller can pre-set one or more preset controller matrices different from other controllers, and select a preset controller matrix as the current controller matrix. The preset controller matrix corresponding to each controller can be different from the preset controller matrix corresponding to other controllers, which can increase the difficulty of intrusion. Of course, multiple preset controller matrices can also be set for multiple controllers to share. The specific implementation method can be selected by those skilled in the art as needed.
[0029] The preset key matrix can be pre-set and stored in the controller and the intrusion detection module. The preset key matrices corresponding to different controllers can be the same or different, as long as the intrusion detection module can find the preset key matrix corresponding to the controller through the identifier of the controller.
[0030] The gateway can set one or more preset gateway matrices, and generate a gateway intrusion message based on a preset gateway matrix, and send it to each controller, so that the controller obtains the preset gateway matrix through the gateway intrusion message as the current gateway matrix.
[0031] Optionally, a matrix mapping relationship may be pre-established between a preset gateway matrix and a preset controller matrix. Subsequently, when a gateway intrusion message is received and the current gateway matrix is parsed, the current controller matrix may be found based on the current gateway matrix and the matrix mapping relationship.
[0032] Correspondingly, the intrusion detection module stores the preset controller matrix of the corresponding controller, as well as the matrix mapping relationship between the preset controller matrix of each corresponding controller and the preset gateway matrix. Subsequently, the preset controller matrix corresponding to the controller to be detected can be found as the current controller matrix through the current gateway matrix, and then the local verification data feature sequence is generated through the current gateway matrix, the current controller matrix, the preset key matrix stored in itself, and the preset sub-feature sequence received from the controller. The generation method of the verification data feature sequence is consistent with the generation rule of the detection data feature sequence, and then the CAN bus intrusion detection result is obtained by comparing the received data feature sequence with the verification data feature sequence.
[0033] The controller may be one or more. In the related art, since the CAN bus can generally receive messages sent by multiple ECUs (Electronic Control Units), a person skilled in the art can pre-specify which one or which ECUs among all the ECUs connected to the CAN bus can serve as the controller in the method provided in this embodiment.
[0034] Step S120, multiplying the current controller matrix, the current gateway matrix and the preset key matrix in sequence to obtain the current detection data feature matrix of the controller.
[0035] With the current controller matrix D ECU is a matrix of 8 rows and columns, the current gateway matrix D GW is a matrix with Y rows and 8 columns and a preset key matrix D KEY Taking a matrix with X rows and Y columns as an example, the current detection data feature matrix is determined as follows:
[0036] D=D ECU *D KEY *D GW Formula (1),
[0037] Among them, D is the feature matrix of the current detection data, which is an 8*8 matrix. ECU is the current controller matrix, D GW is the current gateway matrix, D KEY is the preset key matrix.
[0038] Step S130 , splitting the current detection data feature matrix to obtain a plurality of current detection data feature sub-matrices, and determining corresponding sub-data features based on each current detection data feature sub-matrix.
[0039] In one embodiment, the corresponding sub-data features are determined based on each current detection data feature sub-matrix, including: converting the first-base digits in each current detection data feature sub-matrix to obtain the sub-data features corresponding to each current detection data feature sub-matrix, where the sub-data features are binary digits.
[0040] The first system may be decimal, and the second system may be hexadecimal. Of course, other systems known to those skilled in the art may also be used. This is only used as an example.
[0041] Each of the current detection data feature submatrices includes a preset number of decimal digits. Taking the above 8*8 matrix as an example, the current detection data feature submatrix may be a 2*2 matrix.
[0042] In one embodiment, the first-base digits in each current detection data feature submatrix are base-converted to obtain sub-data features corresponding to each current detection data feature submatrix, including: the first-base digits in each current detection data feature submatrix are base-converted to obtain a binary data sequence corresponding to each current detection data feature submatrix; the last two numbers of the data sequence corresponding to the current detection data feature submatrix are taken as the sub-data features corresponding to the current detection data feature submatrix, to obtain the sub-data features corresponding to each current detection data feature submatrix.
[0043] Step S140, generating a detection data feature sequence according to a preset sub-feature sequence based on the sub-data features corresponding to all current detection data feature sub-matrices, and sending the preset sub-feature sequence to the intrusion detection module of the CAN bus.
[0044] Since there are multiple sub-data features, the rules for combining the multiple sub-data features are involved at this time. This can be pre-specified by technical personnel in this field, or the controller can randomly generate a preset sub-feature order. In order to facilitate the subsequent comparison of the intrusion detection module, the preset sub-feature order needs to be sent to the intrusion detection module.
[0045] Step S150, filling the detection data feature sequence into the reserved position of the detection message to be sent by the controller to obtain the detection message of the controller.
[0046] In one embodiment, filling a detection data feature sequence into a reserved position of a detection message to be sent by a controller includes: obtaining a position mapping relationship between a preset feature sequence position and a reserved position of the controller; and filling data features in the detection data feature sequence into corresponding reserved positions of the detection message to be sent based on the position mapping relationship.
[0047] In order to accurately detect intrusion, the data characteristics of the reserved bits (unused bits, i.e., reserved positions) in each ECU's message should be obvious, and if the reserved bits of any message are not set according to the rules, the data characteristics will be destroyed.
[0048] Step S160, sending the detection message to the intrusion detection module, so that the intrusion detection module extracts the filling content in the reserved position of the detection message to obtain the received data feature sequence, and compares the received data feature sequence with the verification data feature sequence to obtain the CAN bus intrusion detection result.
[0049] The verification data feature sequence is determined by the intrusion detection module based on a preset sub-feature sequence, a current controller matrix, a current gateway matrix and a preset key matrix.
[0050] In one embodiment, after the detection message is sent to the intrusion detection module, the method also includes: the intrusion detection module extracts the filling content in the reserved position of the detection message to obtain a received data feature sequence; the intrusion detection module determines the verification data feature sequence based on a preset sub-feature order, a current controller matrix, a current gateway matrix and a preset key matrix; the received data feature sequence is compared with the verification data feature sequence to obtain a CAN bus intrusion detection result.
[0051] That is, due to the existence of the preset key matrix, even if the current controller matrix and the current gateway matrix are leaked, the intruder cannot know the specific data feature sequence. By re-verifying the determination of the data feature sequence on the intrusion detection module side, abnormal problems caused by the intrusion of the controller or the destruction of the transmission path can be discovered in time.
[0052] Following the above embodiment, after comparing the received data feature sequence with the detection data feature sequence to obtain the CAN bus intrusion detection result, the method also includes: continuously extracting the filling content of a preset number of frame detection messages sent by multiple controllers to obtain a new received data feature sequence corresponding to each controller in each frame, comparing the new received data feature sequence corresponding to the same controller with the detection data feature sequence to obtain the CAN bus intrusion detection result of each controller corresponding to each frame of the detection message received; if there is at least one controller whose CAN bus intrusion detection result is intrusion, the frame where the detection message is located is recorded as an abnormal frame; counting the number of abnormal frames of the abnormal frame, if the number of abnormal frames is greater than a preset number threshold, triggering the determination of a to-be-sent gateway matrix, the to-be-sent gateway matrix and the current gateway matrix are different, and the to-be-sent gateway matrix and the current gateway matrix are two matrices in the preset gateway matrix set; generating a gateway intrusion message based on the to-be-sent gateway matrix, and sending it to each controller, so that the controller determines a new current gateway matrix based on the gateway intrusion message.
[0053] When the bus is disturbed or wrong, it may also cause the data features to be destroyed. Therefore, it is possible to accumulate whether there are problems with the detection messages of the preset number of frames in each detection cycle, and if so, it is considered that an intrusion event may have occurred. Otherwise, it can be regarded as a problem with the bus itself. When it is determined that the number of abnormal frames is greater than the preset number threshold, that is, an intrusion event has occurred, then another preset gateway matrix (different from the current gateway matrix) in the preset gateway matrix set pre-set by the network manager can be used as the new current gateway matrix, that is, the gateway matrix to be sent. The cyclic order of each preset gateway matrix in the preset gateway matrix set can be pre-set, and the selection of the gateway matrix to be sent is carried out according to the cyclic order.
[0054] Similar to the detection message, the gateway intrusion message can also be obtained by filling the reserved position (preset position) in the message periodically sent by the gateway based on the data in the to-be-sent gateway matrix.
[0055] Following the above embodiment, the method further includes: if the number of times the to-be-sent gateway matrix is determined exceeds a preset number threshold, each time the number of abnormal frames detected is greater than the preset number threshold, the last determined to-be-sent gateway matrix is column-transformed to obtain a new to-be-sent gateway matrix.
[0056] It can be understood that the number of times the gateway matrix to be sent is determined exceeds the preset number threshold, that is, the gateway matrix of the gateway has been replaced many times in one intrusion detection cycle, exceeding the preset number threshold, which indicates that the current intrusion may be relatively frequent, and the intruder may have mastered the gateway matrix, controller matrix or even the preset key matrix. At this time, the original preset gateway matrix may not be able to effectively resist the intrusion. Based on this situation, the current gateway matrix can be changed, such as column transformation. This transformation rule is used as a new rule and may be able to resist further intrusions.
[0057] An exemplary column transformation method is that for the nth change (the number of newly detected abnormal frames is greater than the preset number threshold), the i-th column becomes the MOD(i+n, 8) column, so that n preset gateway matrices D can be derived. GW .
[0058] Following the above embodiment, after a gateway intrusion message is generated based on the gateway matrix to be sent and sent to each controller, the method also includes: after each controller receives the gateway intrusion message, it reads the preset position in the gateway intrusion message to obtain the current gateway matrix; if the current gateway matrix changes, a new current controller matrix is determined according to the current gateway matrix; if there is a new current controller matrix, a new current detection data feature matrix is generated based on the received new current gateway matrix, the new current controller matrix and the preset key matrix; if there is no new current controller matrix, the number of determination failures of the new current controller matrix is counted, and when the number of determination failures is greater than the preset failure threshold, the last current gateway matrix successfully determined to the new current controller matrix is used as the target gateway matrix, and a random preset controller matrix corresponding to the controller is used as the current controller matrix, and a new current detection data feature matrix is generated based on the target gateway matrix, the current controller matrix and the preset key matrix.
[0059] When the gateway is unreliable, since a new gateway matrix is derived, the controller end will inevitably not be able to find the preset controller matrix corresponding to the new current gateway matrix. The detection data feature matrix can be temporarily filled into the detection message, or the previous detection data feature matrix can be used to fill into the detection message, or other methods specified by technical personnel in this field can be used to generate the detection message.
[0060] Alternatively, the controller side stores the transformation order of the preset gateway matrix. By monitoring the transformation order of the current gateway matrix, once the order is incorrect, it is counted as a determination failure. When the determination failure number is greater than the preset failure threshold, the current gateway matrix that was last successfully determined to the new current controller matrix is used as the target gateway matrix.
[0061] When the gateway is unreliable, the current controller matrix in the controller also needs to be transformed, so it can be required that there is no derivative relationship between the preset controller matrices to prevent data features from being easily cracked.
[0062] The CAN bus intrusion detection method provided in the above embodiment constructs the current detection data feature matrix based on the current gateway matrix, controller matrix and preset key matrix to obtain the detection data feature sequence, and synchronizes the preset sub-feature order of the detection data feature sequence with the intrusion detection module, fills the detection data feature sequence into the reserved position in the detection message to be sent by the controller to obtain the detection message of the controller, and then compares the received data feature sequence in the detection message with the verification data feature sequence determined by itself through the intrusion detection module to obtain the CAN bus intrusion detection result, and establishes the detection data feature sequence by using the unused reserved position in the CAN protocol. When the intrusion occurs, the detection data feature sequence will be destroyed, and the CAN bus can be detected to be destroyed by the intrusion, and the detection data feature sequence is obtained by designing the gateway matrix, controller matrix and preset key matrix in advance. The data feature is strong, the detection rate is high, the calculation amount is small, and the occupation of computing resources can be reduced.
[0063] The CAN bus intrusion detection method provided in the above embodiment uses the unused data bits (reserved positions) in the CAN protocol to establish the data features of the entire vehicle CAN. When an intrusion occurs, the data features will be destroyed, and the CAN bus can be detected to be intruded and destroyed. Because the data features are designed in advance, the data features are strong, the detection rate is high, and the amount of calculation is small, which can reduce the occupation of computing resources. A method for generating a set of data features (construction of a detection data feature matrix and generation of a detection data feature sequence) is provided, which can be changed during an intrusion, thereby increasing the difficulty of being cracked; an anti-intrusion method is provided, which can effectively detect and prevent intrusions.
[0064] The following is an exemplary description of the CAN bus intrusion detection method provided in the above embodiment through a specific embodiment. Using the unused data bits in the CAN protocol, the data features of the whole vehicle CAN are established. When an intrusion occurs, the data features will be destroyed, and the CAN bus can be detected to be intruded and destroyed. And a set of data features are derived according to certain rules, so that when an intrusion is detected, the data features can be switched to further improve the anti-intrusion and cracking capabilities. Because the data features are designed in advance, the data features are strong, the detection rate is high, and the amount of calculation is small, which can reduce the occupation of computing resources.
[0065] In order to accurately detect intrusion, the data characteristics of the reserved bits (unused bits) in each ECU's message should be obvious, and if the reserved bits of any message are not set according to the rules, the data characteristics will be destroyed.
[0066] Here we design two matrices, the preset controller matrix D ECU and preset gateway matrix D GW, the two matrices together construct the data features of each ECU (detection data feature sequence). Preset gateway matrix D GW It is the data feature that the gateway fills in the reserved bit of the message it sends, and the gateway matrix D is preset GW It will change dynamically according to the number of intrusions, making it more difficult for external intrusions to crack.
[0067] Preset control matrix D ECU It is a matrix of 8 rows and columns, and the default gateway matrix D GW is a matrix with Y rows and 8 columns. Then introduce a preset key matrix D KEY , preset key matrix D KEY It is a matrix with X rows and Y columns. The preset key matrix D is introduced. KEY The purpose is to further increase the difficulty of intrusion and cracking, so that the intruder cannot pass the preset controller matrix D ECU and preset gateway matrix D GW Directly obtain the data characteristics of the cracked ECU.
[0068] Matrix D KEY Only the parties who detect the data features and send the data features know it, and the matrix D corresponding to each ECU KEY are different.
[0069] The determination method of the detection data feature matrix D can refer to formula (1). By multiplying these three matrices in this order, an 8*8 matrix D can be obtained, which is the detection data feature matrix. By selecting four matrix elements in sequence according to the row (taking the preset number of 4 as an example), 16 decimal four-digit numbers S (the current detection data feature sub-matrix) can be selected. Convert S to a hexadecimal number H=hex(S), and take the second to last number of H to form H1 (sub-data feature).
[0070] By converting the 16 decimal four-digit numbers S, 16 H1s can be obtained. One H1 corresponds to a four-bit binary number, that is, 16 H1s can correspond to 64-bit binary numbers. This 64-bit binary number is the data feature (detection data feature sequence) that the ECU fills into the reserved bits of the sent message. The filling order (preset sub-feature order) is customized by the ECU, but the detection data feature party (intrusion detection module) must know this order.
[0071] The data feature can be detected by the gateway or by another controller in the same network segment. If both are detected by the gateway, when the gateway is breached, other controllers will have no other anti-intrusion strategies. Therefore, some important controllers are detected by other controllers in the same network segment.
[0072] In addition, when an intrusion is detected, in order to increase the difficulty of cracking, it is necessary to change DGW , so the data characteristics will also be based on D GW Changes increase the difficulty of intrusion. GW , we need to generate a set of D GW , that is, to build a preset gateway matrix set in advance.
[0073] According to the initial design D GW , is a matrix with Y rows and 8 columns. The columns are transformed, that is, the i-th column becomes MOD(i+n,8) column for the nth transformation. In this way, n D GW . It can be used later when the preset gateway matrix needs to be derived.
[0074] Similarly, when the gateway is unreliable, D ECU It also needs to change to prevent the data features from being easily cracked. ECU , defined at the beginning of the design, each D ECU There is no derivative relationship between them.
[0075] An exemplary anti-intrusion step is as follows:
[0076] S1: When it is detected that the monitored data feature is destroyed, the intrusion flag is changed once continuously, indicating that it has been invaded once.
[0077] This step can be detected by the controller itself.
[0078] The intrusion flag is a signal in the CAN message. An exemplary transformation means that when there is no intrusion, it always sends 0, and when there is an intrusion, it sends 1 and then 0.
[0079] S2: The gateway module monitors the intrusion signs sent by each ECU on each network segment in real time, plus the number of times the data features monitored by itself are destroyed. If 20 intrusions are detected (the data features of the ECU are destroyed for 20 frames), it is considered to have been attacked and reported to the cloud platform.
[0080] That is, when the intrusion detection module is executed by both the controller and the gateway, the controller will send a synchronous message to the gateway after detecting an intrusion. The gateway accumulates the number of intrusions sent by other controllers and the number of intrusions counted by itself to count the number of abnormal frames.
[0081] The reason why it takes twenty intrusions to be considered an attack is that when the bus is disturbed or wrong, the data characteristics may also be destroyed.
[0082] The above takes the preset number threshold of 20 times as an example, and those skilled in the art can set the preset number threshold in digital form as needed.
[0083] S3: Gateway module transformation D GW It changes every time it is attacked.
[0084] That is, if the number of abnormal frames is greater than a preset number threshold, it triggers the determination of the gateway matrix to be sent.
[0085] S4: Each controller is based on the new D GW Regenerate new data features and send a message filled with the new data features.
[0086] The controller updates the current gateway matrix, and re-determines a new current detection data feature matrix based on the current gateway matrix, the current controller matrix, and the preset key matrix, thereby obtaining a new detection data feature sequence and a new detection message.
[0087] S5: Gateway module changes three times D GW If the number of intrusions / second is greater than 20, then D GW Swap rows to form D GW1 , fill the reserved bits according to the newly formed matrix.
[0088] That is, if the number of times the gateway matrix to be sent is determined is greater than the preset number threshold, the preset gateway matrix that has been sent will no longer be used in a circular manner. Instead, based on the aforementioned derivation rule, the rows of the current valid last gateway matrix to be sent are exchanged to obtain a new gateway matrix to be sent.
[0089] S6: Each ECU detects D GW After ten frames that do not conform to the transformation rules, (gateway D GW A set of D with rows swapped or not being generated GW In the last frame, the effective D GW and a random D ECU To form its own data characteristics. It will not be restored until the next power cycle.
[0090] This way, when intrusions are frequent, the difficulty of cracking can be increased, and when the gateway is breached, a certain degree of anti-intrusion capability can still be maintained.
[0091] By using the reserved bits of the CAN protocol to construct data features, abnormal intrusions can be accurately detected, and the data features are calculated through three matrices, making them difficult to crack. A set of data feature generation methods are also provided, which can be changed during intrusion. In addition, an anti-intrusion method is also provided, which can effectively detect and prevent intrusions.
[0092] The above setting of numerical values, such as 10 frames, three times, etc., is only an example, and those skilled in the art can set the numerical values as needed.
[0093] In one embodiment, a CAN bus intrusion detection device is provided, and the CAN bus intrusion detection device is used to perform the steps in the CAN bus intrusion detection method provided in any of the above embodiments. Figure 2 , Figure 2 A schematic diagram of the structure of a CAN bus intrusion detection device provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the CAN bus intrusion detection device 200 includes: an acquisition module 201, which is used to acquire a current controller matrix, a current gateway matrix and a preset key matrix, wherein the number of rows of the current controller matrix is equal to the number of columns of the current gateway matrix, the number of columns of the current controller matrix is equal to the number of rows of the preset key matrix, and the number of rows of the current gateway matrix is equal to the number of columns of the preset key matrix; a current detection data feature matrix generation module 202, which is used to multiply the current controller matrix, the current gateway matrix and the preset key matrix in sequence to obtain a current detection data feature matrix of the controller; a current detection data feature sub-matrix determination module 203, which is used to split the current detection data feature matrix to obtain multiple current detection data feature sub-matrices, and determine the corresponding sub-data features based on each current detection data feature sub-matrix; a detection data feature sequencer module 204, which is used to generate a detection data feature matrix; a detection data feature sequencer module 205, which is used to generate a detection data feature matrix; a detection data feature sequencer module 206, which is used to generate a detection data feature matrix; a detection data feature sequencer module 207, which is used to generate a detection data feature matrix; a detection data feature sequencer module 208, which is used to generate a detection data feature matrix; a detection data feature sequencer module 209 ... The column generation module 204 is used to generate a detection data feature sequence based on the sub-data features corresponding to all the current detection data feature sub-matrices, and send the preset sub-feature sequence to the intrusion detection module of the CAN bus; the filling module 205 is used to fill the detection data feature sequence into the reserved position of the detection message to be sent by the controller to obtain the detection message of the controller; the sending module 206 is used to send the detection message to the intrusion detection module, so that the filling content in the reserved position of the detection message is extracted by the intrusion detection module to obtain the received reception data feature sequence, and the reception data feature sequence is compared with the verification data feature sequence to obtain the CAN bus intrusion detection result. The verification data feature sequence is determined by the intrusion detection module based on the preset sub-feature sequence, the current controller matrix, the current gateway matrix and the preset key matrix.
[0094] In one embodiment, the current detection data feature submatrix determination module is configured to: convert the first-base digits in each current detection data feature submatrix to obtain sub-data features corresponding to each current detection data feature submatrix, where the sub-data features are binary digits.
[0095] In one embodiment, the current detection data feature submatrix determination module is configured to: convert the first-base digits in each current detection data feature submatrix to obtain a binary data sequence corresponding to each current detection data feature submatrix; take the last two numbers of the data sequence corresponding to the current detection data feature submatrix as the sub-data features corresponding to the current detection data feature submatrix, so as to obtain the sub-data features corresponding to each current detection data feature submatrix.
[0096] In one embodiment, the filling module is configured to: obtain a position mapping relationship between a preset feature sequence position and a controller reserved position; and fill the data features in the detection data feature sequence in the corresponding reserved position of the detection message to be sent based on the position mapping relationship.
[0097] In one embodiment, the device also includes an intrusion detection module selection module, which is used to obtain a preset importance priority of the controller before sending a preset sub-feature sequence to the intrusion detection module of the CAN bus; if the preset importance priority is greater than a preset priority threshold, another controller in the same network segment as the controller is determined as an intrusion detection module; if the preset importance priority is less than or equal to the preset priority threshold, the gateway is determined as an intrusion detection module.
[0098] In one embodiment, the device also includes an intrusion detection module, which is used to extract the filling content in the reserved position of the detection message to obtain a received data feature sequence; determine the verification data feature sequence based on a preset sub-feature order, a current controller matrix, a current gateway matrix and a preset key matrix; compare the received data feature sequence with the verification data feature sequence to obtain a CAN bus intrusion detection result.
[0099] In one embodiment, the device also includes a gateway matrix switching module, which is used to compare the received data feature sequence with the detection data feature sequence, and after obtaining the CAN bus intrusion detection result, continuously extract the filling content of the preset number of frame detection messages sent by multiple controllers to obtain the new received data feature sequence corresponding to each controller in each frame, and compare the new received data feature sequence corresponding to the same controller with the detection data feature sequence to obtain the CAN bus intrusion detection result of each controller corresponding to each frame of the detection message received; if there is at least one controller whose CAN bus intrusion detection result is intrusion, the frame where the detection message is located is recorded as an abnormal frame; the number of abnormal frames of the abnormal frame is counted, and if the number of abnormal frames is greater than the preset number threshold, the determination of the to-be-sent gateway matrix is triggered, the to-be-sent gateway matrix is different from the current gateway matrix, and the to-be-sent gateway matrix and the current gateway matrix are two matrices in the preset gateway matrix set; a gateway intrusion message is generated based on the to-be-sent gateway matrix, and sent to each controller, so that the controller determines a new current gateway matrix based on the gateway intrusion message.
[0100] In one embodiment, the gateway matrix switching module is further configured to: if the number of times the gateway matrix to be sent is determined exceeds a preset number threshold, each time the number of abnormal frames detected is greater than the preset number threshold, the last determined gateway matrix to be sent is column-transformed to obtain a new gateway matrix to be sent.
[0101] In one embodiment, the device also includes a current detection data feature matrix switching module, which is used to generate a gateway intrusion message based on the gateway matrix to be sent, and send it to each controller. After each controller receives the gateway intrusion message, it reads the preset position in the gateway intrusion message to obtain the current gateway matrix; if the current gateway matrix changes, a new current controller matrix is determined according to the current gateway matrix; if there is a new current controller matrix, a new current detection data feature matrix is generated based on the received new current gateway matrix, the new current controller matrix and the preset key matrix; if there is no new current controller matrix, the number of determination failures of the new current controller matrix is counted, and when the number of determination failures is greater than the preset failure threshold, the last current gateway matrix successfully determined to the new current controller matrix is used as the target gateway matrix, and a random preset controller matrix corresponding to the controller is used as the current controller matrix, and a new current detection data feature matrix is generated based on the target gateway matrix, the current controller matrix and the preset key matrix.
[0102] For the specific definition of the CAN bus intrusion detection device, please refer to the definition of the CAN bus intrusion detection method above, which will not be repeated here. Each module in the above-mentioned CAN bus intrusion detection device 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.
[0103] In this embodiment, the CAN bus intrusion detection device is essentially provided with multiple modules for executing the CAN bus intrusion detection method in any of the above embodiments. The specific functions and technical effects can be referred to the above embodiments and will not be repeated here.
[0104] In one embodiment, a vehicle is provided, the vehicle comprising the CAN bus intrusion detection device 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 described in detail here.
[0105] See also Figure 3 An embodiment of the present invention further provides an electronic device 500, including a processor 501, a memory 502 and a communication bus 503; the communication bus 503 is used to connect the processor 501 and the memory 802; the processor 501 is used to execute the computer program stored in the memory 502 to implement a method provided in any one of the above embodiments.
[0106] 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.
[0107] 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.
[0108] 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.
[0109] 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.
[0110] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0111] 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).
[0112] 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.
[0113] 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.
[0114] 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.
[0115] 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, characterized in that: The method comprises: Obtain a current controller matrix, a current gateway matrix, and a preset key matrix, wherein the number of rows of the current controller matrix is equal to the number of columns of the current gateway matrix, the number of columns of the current controller matrix is equal to the number of rows of the preset key matrix, and the number of rows of the current gateway matrix is equal to the number of columns of the preset key matrix; Multiplying the current controller matrix, the current gateway matrix and the preset key matrix in sequence to obtain a current detection data feature matrix of the controller; Splitting the current detection data feature matrix to obtain a plurality of current detection data feature sub-matrices, and determining corresponding sub-data features based on each current detection data feature sub-matrix; Generate a detection data feature sequence based on the sub-data features corresponding to all current detection data feature sub-matrices according to a preset sub-feature sequence, and send the preset sub-feature sequence to an intrusion detection module of the CAN bus; Filling the detection data feature sequence into the reserved position of the detection message to be sent by the controller to obtain the detection message of the controller; The detection message is sent to the intrusion detection module, so that the filling content in the reserved position of the detection message is extracted by the intrusion detection module to obtain a received data feature sequence, and the received data feature sequence is compared with the verification data feature sequence to obtain a CAN bus intrusion detection result. The verification data feature sequence is determined by the intrusion detection module based on the preset sub-feature sequence, the current controller matrix, the current gateway matrix and the preset key matrix.
2. The CAN bus intrusion detection method according to claim 1, characterized in that: Determine the corresponding sub-data features based on each current detection data feature sub-matrix, including: The first-base digits in each current detection data feature submatrix are converted to bases to obtain sub-data features corresponding to each current detection data feature submatrix, where the sub-data features are binary-base digits.
3. The CAN bus intrusion detection method according to claim 1, characterized in that: The first-base digits in each current detection data feature submatrix are converted to bases to obtain sub-data features corresponding to each current detection data feature submatrix, including: Convert the first-order digits in each current detection data feature submatrix to obtain a binary data sequence corresponding to each current detection data feature submatrix; The last two numbers of the data sequence corresponding to the current detection data feature submatrix are taken as the sub-data features corresponding to the current detection data feature submatrix, so as to obtain the sub-data features corresponding to each current detection data feature submatrix.
4. The CAN bus intrusion detection method according to claim 1, characterized in that: Filling the detection data feature sequence into a reserved position of the controller for the detection message to be sent, comprising: Obtaining a position mapping relationship between a preset feature sequence position and a controller reserved position; Based on the position mapping relationship, the data features in the detection data feature sequence are filled in the corresponding reserved positions of the detection message to be sent.
5. The CAN bus intrusion detection method according to claim 1, characterized in that: Before sending the preset sub-feature sequence to the intrusion detection module of the CAN bus, the method further includes: Obtaining a preset importance priority of the controller; If the preset important priority is greater than a preset priority threshold, another controller in the same network segment as the controller is determined as the intrusion detection module; If the preset important priority is less than or equal to the preset priority threshold, the gateway is determined as the intrusion detection module.
6. The CAN bus intrusion detection method according to any one of claims 1 to 5, characterized in that: After sending the detection message to the intrusion detection module, the method further includes: The intrusion detection module extracts the filling content in the reserved position of the detection message to obtain a received data feature sequence; The intrusion detection module determines a verification data feature sequence based on the preset sub-feature sequence, the current controller matrix, the current gateway matrix and the preset key matrix; The received data feature sequence is compared with the verification data feature sequence to obtain a CAN bus intrusion detection result.
7. The CAN bus intrusion detection method according to claim 6, characterized in that: After comparing the received data feature sequence with the detected data feature sequence to obtain a CAN bus intrusion detection result, the method further includes: Continuously extract the filling content of a preset number of frame detection messages sent by multiple controllers, obtain a new received data feature sequence corresponding to each controller in each frame, compare the new received data feature sequence corresponding to the same controller with the detection data feature sequence, and obtain the CAN bus intrusion detection result of each controller corresponding to each frame of the received detection message; If the CAN bus intrusion detection result of at least one controller is intrusion, the frame containing the detection message is recorded as an abnormal frame; Counting the number of abnormal frames of the abnormal frames, and if the number of abnormal frames is greater than a preset number threshold, triggering determination of a to-be-sent gateway matrix, the to-be-sent gateway matrix is different from the current gateway matrix, and the to-be-sent gateway matrix and the current gateway matrix are two matrices in a preset gateway matrix set; A gateway intrusion message is generated based on the to-be-sent gateway matrix, and is sent to each of the controllers, so that the controller determines a new current gateway matrix based on the gateway intrusion message.
8. The CAN bus intrusion detection method according to claim 7, characterized in that: The method further comprises: If the number of times the to-be-sent gateway matrix is determined exceeds a preset number threshold, each time the number of abnormal frames detected is greater than the preset number threshold, the last determined to-be-sent gateway matrix is column-transformed to obtain a new to-be-sent gateway matrix.
9. The CAN bus intrusion detection method according to claim 7, characterized in that: After generating a gateway intrusion message based on the to-be-sent gateway matrix and sending it to each of the controllers, the method further includes: After receiving the gateway intrusion message, each controller reads the preset position in the gateway intrusion message to obtain the current gateway matrix; If the current gateway matrix changes, determining a new current controller matrix according to the current gateway matrix; If the new current controller matrix exists, generating a new current detection data feature matrix based on the received new current gateway matrix, the new current controller matrix and the preset key matrix; If the new current controller matrix does not exist, the number of failed determinations of the new current controller matrix is counted; when the number of failed determinations is greater than a preset failure threshold, the last current gateway matrix successfully determined to be the new current controller matrix is used as the target gateway matrix, and a random preset controller matrix corresponding to the controller is used as the current controller matrix; a new current detection data feature matrix is generated based on the target gateway matrix, the current controller matrix and the preset key matrix.
10. A CAN bus intrusion detection device, characterized in that: The device comprises: An acquisition module, used to acquire a current controller matrix, a current gateway matrix and a preset key matrix, wherein the number of rows of the current controller matrix is equal to the number of columns of the current gateway matrix, the number of columns of the current controller matrix is equal to the number of rows of the preset key matrix, and the number of rows of the current gateway matrix is equal to the number of columns of the preset key matrix; A current detection data feature matrix generation module, used for sequentially multiplying the current controller matrix, the current gateway matrix and the preset key matrix to obtain the current detection data feature matrix of the controller; A current detection data feature submatrix determination module is used to split the current detection data feature matrix to obtain multiple current detection data feature submatrices, and determine corresponding sub-data features based on each current detection data feature submatrix; A detection data feature sequence generation module, used to generate a detection data feature sequence based on the sub-data features corresponding to all current detection data feature sub-matrices, and send the preset sub-feature sequence to the intrusion detection module of the CAN bus; A filling module, used to fill the detection data feature sequence into the reserved position of the detection message to be sent by the controller to obtain the detection message of the controller; A sending module is used to send the detection message to the intrusion detection module so that the filling content in the reserved position of the detection message is extracted by the intrusion detection module to obtain a received receiving data feature sequence, and the receiving data feature sequence is compared with a verification data feature sequence to obtain a CAN bus intrusion detection result. The verification data feature sequence is determined by the intrusion detection module based on the preset sub-feature sequence, the current controller matrix, the current gateway matrix and the preset key matrix.
Citation Information
Patent Citations
Automobile CAN bus data communication method and device and storage medium
CN111726274A
Vehicle-mounted CAN bus message intrusion detection method and related equipment
CN114172686A
Abnormal message detection method and device, electronic equipment and computer readable medium
CN117938539A
Bus anomaly detection method, terminal equipment and storage medium
CN117997669A
In-vehicle network intrusion detection system and method for controlling the same
KR101638613B1
Cited By
Vehicle-mounted CAN bus intrusion detection method based on time interval conditional entropy
CN122372288A
