Vehicle CAN bus intrusion prevention method and device
By introducing a watermark sequence generation and verification mechanism on the vehicle CAN bus, the problem of the vehicle CAN bus being vulnerable to illegal intrusion is solved, and effective protection of vehicle actuators is achieved, thereby improving vehicle security.
Patent Information
- Application Number
- CN202411350767.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2044-09-26
AI Technical Summary
Existing technologies cannot effectively protect the vehicle's CAN bus from unauthorized intrusion, leading to potential security threats and dangers.
A watermark sequence generation, addition, and comparison mechanism is adopted. Control information is transmitted via CAN bus, and the watermark and control information are matched and verified at the execution unit to ensure the legality of the information. Mutual verification between the watermark control module and the execution unit control module is used to identify and prevent unauthorized intrusion.
This improves vehicle security, prevents unauthorized attackers from sending illegal commands to vehicle components, and enhances the vehicle's anti-intrusion capabilities.
Smart Images

Figure CN119232460B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of vehicle control system security, and particularly relates to a vehicle CAN bus anti-intrusion device and method. BACKGROUND
[0002] With more and more software modules and external interfaces being added to vehicles, new attacks and vulnerabilities are emerging, and in order to deal with these vulnerabilities, various types of prevention mechanisms have been proposed, but they cannot meet the strong protection of specific ECUs to prevent intrusion of the vehicle network.
[0003] Illegal intrusion can reprogram or transmit false information to other controllers on the bus, which can cause immeasurable harm to the vehicle and even passengers. In 2015, the Fisker Group recalled 1.4 million vehicles in the United States due to safety problems of the vehicle network, further increasing people's concerns about the safety of the vehicle Internet of Things. One way to solve this problem is to add specific unique security enhancements to each individual embedded controller, but this greatly increases the workload or results in incompatible methods. SUMMARY
[0004] In view of the above problems, the present application provides a vehicle CAN bus anti-intrusion device and method to deal with the problem of illegal data report intrusion.
[0005] To achieve the above purpose, the specific technical scheme of the present application is as follows: a vehicle CAN bus anti-intrusion method, comprising the following steps:
[0006] 1) When the vehicle starts, the watermark control module randomly generates an n-bit watermark sequence X, and sends the watermark sequence X to the watermark storage unit of each execution component control module;
[0007] 2) When the driver needs the vehicle to complete a certain action, the vehicle master control module sends control information Y to the watermark control module; the control information is n bits, including address information and operation command two fields; in the specific embodiment of the present application, n = 16, the high 8 bits are address information, and the low 8 bits are operation command;
[0008] 3) The watermark control module adds watermark information to the control information Y and sends it to each execution component control module through the CAN bus;
[0009] 4) The information extraction unit of the execution component control module receives the control information sent by the CAN bus, extracts the watermark sequence X' and the control information Y' in turn, and stores the control information Y';
[0010] 5) using watermark comparison unit to compare X and X', if X and X' are consistent, the extracted control information Y' and the vehicle central control module sent control information Y are consistent, go to step 6), otherwise send a signal to the alarm module to prompt intrusion; ignore this command and go to step 2)
[0011] 6) the address comparison unit selects a vehicle execution component according to the address information in the address field of the control information Y', and transmits the command information in the command field of Y' to the vehicle execution component through the operation command transmission unit to complete the specific action.
[0012] Further, the watermark information adding method of step 3) is as follows:
[0013] 3.1) 0 in control information Y is represented by low level, wherein the voltage range of low level is (V1, V2), and the voltage standard value is L; 1 in control information Y is represented by high level, wherein the voltage range of high level is (V2, V3), and the voltage standard value is H;
[0014] 3.2) n-bit watermark X corresponds to n-bit control information Y one by one, the i-th watermark Xi=1 indicates that watermark is added to the i-th bit Yi of control information Y, and the voltage value corresponding to Yi is added by Δv; Xi=0 indicates that no watermark is added to the i-th bit Yi of control information Y, and the voltage value corresponding to Yi remains unchanged; wherein Δv is a watermark parameter, and its value should meet the requirement that the voltage range after adding watermark does not exceed the voltage range corresponding to high and low levels.
[0015] Further, the method of extracting the i-th bit watermark sequence Xi' and control information Yi' in step 4) is as follows:
[0016] 4.1) the information extraction unit reads the voltage value of the i-th bit control information sent by the CAN bus, denoted as Vri;
[0017] 4.2) if L+Δv-δ<Vri<L+Δv+δ, the extracted i-th bit watermark Xi' =1, and the extracted i-th bit control information Yi' =0; wherein δ is a disturbance factor;
[0018] 4.3) if L-δ<Vri<L+δ, the extracted i-th bit watermark Xi' =0, and the extracted i-th bit control information Yi' =0;
[0019] 4.4) if H+Δv-δ<Vri<H+Δv+δ, the extracted i-th bit watermark Xi' =1, and the extracted i-th bit control information Yi' =1;
[0020] 4.5) if H-δ<Vri<H+δ, the extracted i-th bit watermark Xi' =0, and the extracted i-th bit control information Yi' =1.
[0021] Further, the application also provides a vehicle CAN bus anti-intrusion device, characterized in that comprising: a vehicle general control module, a watermark control module, an execution component control module, an alarm module and vehicle execution components; the vehicle general control module is used for sending control information, controlling the vehicle execution components to complete the designated operation, and the output end thereof is connected with the watermark control module through a data line; the vehicle execution components control the vehicle to complete specific actions according to the control information sent by the vehicle general control module; each vehicle execution component corresponds to an execution component control module; the alarm module is used for alarming to remind the vehicle user when the vehicle is intruded; the watermark control module comprises a watermark generation unit and a watermark adding unit; the watermark generation unit is used for randomly generating a watermark sequence when the vehicle starts, and the output end thereof is connected with the watermark storage unit of the execution component control module through a data line; the watermark adding unit is used for adding watermark to the control information sent by the vehicle general control module and outputting through the CAN bus; the execution component control module comprises a watermark storage unit, an information extraction unit, a watermark comparison unit, an address comparison unit and an operation command transmission unit; wherein, the watermark storage unit is used for storing the randomly generated watermark sequence when the vehicle starts, and the output end thereof is connected with the watermark comparison unit; the information extraction unit is used for receiving the data of the CAN bus, extracting the watermark and the control information and storing, and the output end thereof is connected with the watermark comparison unit, the address comparison unit and the operation command transmission unit respectively; the address comparison unit receives the address information of the control information stored in the information extraction unit, and is used for judging whether the control information is sent to the execution component, and the output end thereof is connected with the information extraction unit; the watermark comparison unit compares whether the watermarks extracted by the watermark storage unit and the information extraction unit are consistent, and is used for judging whether there is intrusion, and the output end thereof is connected with the alarm module and the operation command transmission unit; the operation command transmission unit is used for transmitting the operation command in the control information to the vehicle execution component, and the step 2) is performed.
[0022] Compared with the prior art, the application can improve the safety of the vehicle, and can avoid illegal attackers from intruding the CAN bus to send illegal commands to the vehicle execution components. BRIEF DESCRIPTION OF DRAWINGS
[0023] Figure 1 It is a structure schematic diagram of the vehicle CAN bus anti-intrusion device.
[0024] Figure 2 It is a flow chart of the vehicle CAN bus anti-intrusion method. DETAILED DESCRIPTION
[0025] The application will be further described below in combination with the drawings and specific embodiments. It should be pointed out that only an optimal technical solution is used to elaborate the technical solution and design principle of the application in detail below, but the protection scope of the application is not limited thereto.
[0026] The embodiment is a preferred implementation of the present application, but the present application is not limited to the above implementation, and any obvious improvement, replacement or modification made by those skilled in the art without departing from the essential content of the present application shall fall within the protection scope of the present application.
[0027] The vehicle CAN bus anti-intrusion device provided by the present application comprises a vehicle control module, a watermark control module, an execution component control module, an alarm module and vehicle execution components. Figure 1 The vehicle control module is used for sending control information to control the vehicle execution components to complete designated operations, and the output end of the vehicle control module is connected with the watermark control module through a data line.
[0028] The vehicle control module sends n-bit control information, which comprises address information and operation commands, and in the embodiment, n=16, the high 8 bits are address information and the low 8 bits are operation commands.
[0029] The vehicle execution components control the vehicle to complete specific actions according to the control information sent by the vehicle control module, and each vehicle execution component corresponds to an execution component control module.
[0030] The alarm module is used for alarming and reminding the vehicle user when the vehicle is intruded.
[0031] The watermark control module comprises a watermark generation unit and a watermark adding unit, the watermark generation unit is used for randomly generating an n-bit watermark sequence when the vehicle is started, and the output end of the watermark generation unit is connected with the watermark storage unit of the execution component control module through a data line; and the watermark adding unit is used for adding watermark to the control information sent by the vehicle control module and outputting through the CAN bus.
[0032] The execution component control module comprises a watermark storage unit, an information extraction unit, a watermark comparison unit, an address comparison unit and an operation command transmission unit, the watermark storage unit is used for storing the randomly generated watermark sequence when the vehicle is started, and the output end of the watermark storage unit is connected with the watermark comparison unit; the information extraction unit is used for receiving the data of the CAN bus, extracting the watermark and the control information and storing, and the output end of the information extraction unit is connected with the watermark comparison unit, the address comparison unit and the operation command transmission unit; the address comparison unit receives the address information of the control information stored in the information extraction unit, and is used for judging whether the control information is sent to the present execution component, and the output end of the address comparison unit is connected with the information extraction unit; the watermark comparison unit compares whether the watermark extracted by the watermark storage unit and the information extraction unit is consistent, and is used for judging whether there is intrusion, and the output end of the watermark comparison unit is connected with the alarm module and the operation command transmission unit; and the operation command transmission unit is used for transmitting the operation commands in the control information to the vehicle execution components.
[0033] The present application provides a vehicle CAN bus anti-intrusion method, as shown in Figure 2As shown, comprising the following steps:
[0034] 1) When the vehicle starts, the watermark control module randomly generates an n-bit watermark sequence X, and sends the watermark sequence X to the watermark storage unit of each execution component control module;
[0035] 2) When the driver needs the vehicle to complete an action, the control information Y is sent to the watermark control module through the vehicle master control module; the control information is n bits, including address information and operation command two fields.
[0036] In a specific embodiment of the present application, n = 16, the high 8 bits are address information, and the low 8 bits are operation command.
[0037] 3) The watermark control module adds watermark information to the control information Y and sends it to each execution component control module through the CAN bus; as a preferred embodiment of the present application, the watermark information adding method is as follows:
[0038] 3.1) 0 in control information Y is represented by low level, wherein the voltage range of low level is (V1, V2), and the voltage standard value is L; 1 in control information Y is represented by high level, wherein the voltage range of high level is (V2, V3), and the voltage standard value is H.
[0039] In a specific embodiment of the present application, V1 = 0v, V2 = 2v, V3 = 5v, H = 3.6v, and L = 0.8v;
[0040] 3.2) n-bit watermark X corresponds to n-bit control information Y one by one, the i-th watermark Xi = 1 indicates that the i-th bit Yi of control information Y is added with watermark, and the voltage value corresponding to Yi is added with Δv; Xi = 0 indicates that the i-th bit Yi of control information Y is not added with watermark, and the voltage value corresponding to Yi remains unchanged; wherein Δv is a watermark parameter, and its value should meet the requirement that the voltage range after adding watermark does not exceed the voltage range corresponding to high and low levels.
[0041] In a specific embodiment of the present application, Δv = 0.6v.
[0042] 4) The information extraction unit of the execution component control module receives the control information sent by the CAN bus, extracts the watermark sequence X' and the control information Y' in turn, and stores the control information Y'.
[0043] As a preferred embodiment of the present application, the method for extracting the i-th bit watermark sequence Xi' and the control information Yi' is as follows:
[0044] 4.1) The information extraction unit reads the voltage value of the i-th bit control information sent by the CAN bus, denoted as Vri;
[0045] 4.2) If L+Av-5 < Vri < L+Av+5, the extracted i-th bit watermark Xi' = 1, the extracted i-th bit control information Yi' = 0; wherein, 5 is an interference factor, in the embodiment of the present application, 5 = 0.1v;
[0046] 4.3) If L-5 < Vri < L+5, the extracted i-th bit watermark Xi' = 0, the extracted i-th bit control information Yi' = 0;
[0047] 4.4) If H+Av-5 < Vri < H+Av+5, the extracted i-th bit watermark Xi' = 1, the extracted i-th bit control information Yi' = 1;
[0048] 4.5) If H-5 < Vri < H+5, the extracted i-th bit watermark Xi' = 0, the extracted i-th bit control information Yi' = 1;
[0049] 5) Comparing X and X' by using the watermark comparison unit, if X and X' are consistent, the extracted control information Y' and the vehicle general control module sent control information Y are consistent, turn to step 6), otherwise send a signal to the alarm module to prompt intrusion; ignore this command and turn to step 2).
[0050] 6) The address comparison unit selects a vehicle execution component according to the address information of the address field in the control information Y', and transmits the command information of the command field in Y' to the vehicle execution component to complete specific actions through the operation command transmission unit, and turns to step 2).
Claims
1. A vehicle CAN bus intrusion prevention method, characterized by, The method comprises the following steps: 1) When the vehicle starts, the watermark control module randomly generates an n-bit watermark sequence X and sends the watermark sequence X to the watermark storage unit of each execution component control module; 2) When the driver needs the vehicle to complete a certain action, the control information is sent by the vehicle master control module Y a water mark control module; the control information is n bits, including address information and operation command two fields; wherein, n = 16, the high 8 bits are address information, and the low 8 bits are operation command; 3) The watermark control module will control information Y Add watermark information and send to each execution component control module through CAN bus; 4) The information extraction unit of the execution component control module receives the control information sent by the CAN bus, sequentially extracts the watermark sequence X’ and control information Y’ and stores the control information Y’ ; 5) Compare using watermark comparison units X and X’ ,if X and X’ If they match, then the extracted control information Y’ Send control information to the vehicle's central control module Y If the command is consistent, proceed to step 6; otherwise, send a signal to the alarm module to indicate an intrusion; ignore this command and proceed to step 2). 6) The address comparison unit selects a vehicle execution component according to the address information of the address field in the control information Y', and transmits the command information of the command field in Y' to the vehicle execution component through the operation command transmission unit to complete a specific action, and returns to step 2); The watermark information adding method in step 3) is as follows: 3.1) Control information Y 0 is represented by a low level, wherein the voltage range of the low level is (V1, V2), and the voltage standard value is L; and Y 1 is represented by a high level, wherein the voltage range of the high level is (V2, V3), and the voltage standard value is H. 3.2) n-digit watermark X With n-bit control information Y One-to-one correspondence, i-th watermark Xi =1 indicates control information Y The i-th Yi Add watermark, Yi The corresponding voltage value plus Δ v , Xi =0 indicates control information. Y The i-th Yi No watermark added. Yi The corresponding voltage value remains unchanged; where Δ v The watermark parameter must be set such that the voltage range after adding the watermark does not exceed the voltage range corresponding to the high and low levels. The step 4) extracts the i-th watermark sequence Xi' and control information Yi' The method is as follows: 4.1) The information extraction unit reads the voltage value of the ith control information sent by the CAN bus, denoted as Vri; 4.2) if L + Δ v-δ < Vri < L + Δ v+δ, then the i-th bit of the extracted watermark Xi' = 1 , the i-th bit of the extracted control information Yi' = 0; where, δ is the interference factor; 4.3) if L -δ < Vri +δ, then the extracted i-th bit of the watermark Xi' = 0 , the extracted i-th bit of the control information Yi' = 0; 4.4) if H+Δ v-δ < Vri < H+Δ v+δ, then the extracted i-th bit of the watermark Xi' = 1 , the extracted i-th bit of the control information Yi' = 1; 4.5) if H -δ < Vri +δ, then the extracted i-th bit of the watermark Xi' = 0 , the extracted i-th bit of the control information Yi' = 1.
2. The vehicle CAN bus intrusion prevention method of claim 1, wherein, The method is implemented based on a vehicle CAN bus anti-intrusion device, and the device comprises a vehicle general control module, a watermark control module, an execution component control module, an alarm module and vehicle execution components; the vehicle general control module is used for sending control information to control the vehicle execution components to complete designated operations, and an output end thereof is connected with the watermark control module through a data line; the vehicle execution components control the vehicle to complete specific actions according to the control information sent by the vehicle general control module; each vehicle execution component corresponds to an execution component control module; the alarm module is used for alarming to remind the vehicle user when the vehicle is intruded; the watermark control module comprises a watermark generation unit and a watermark adding unit; the watermark generation unit is used for randomly generating a watermark sequence when the vehicle is started, and an output end thereof is connected with a watermark storage unit of the execution component control module through a data line; the watermark adding unit is used for adding watermark to the control information sent by the vehicle general control module and outputting through the CAN bus; the execution component control module comprises a watermark storage unit, an information extraction unit, a watermark comparison unit, an address comparison unit and an operation command transmission unit; wherein the watermark storage unit is used for storing the randomly generated watermark sequence when the vehicle is started, and an output end thereof is connected with the watermark comparison unit; the information extraction unit is used for receiving the data of the CAN bus, extracting the watermark and the control information and storing, and output ends thereof are connected with the watermark comparison unit, the address comparison unit and the operation command transmission unit respectively; the address comparison unit receives the address information of the control information stored in the information extraction unit, and is used for judging whether the control information is sent to the present execution component, and an output end thereof is connected with the information extraction unit; the watermark comparison unit compares whether the watermarks extracted by the watermark storage unit and the information extraction unit are consistent, and is used for judging whether there is intrusion, and an output end thereof is connected with the alarm module and the operation command transmission unit; the operation command transmission unit is used for transmitting the operation command in the control information to the vehicle execution component.
Citation Information
Patent Citations
Method and system for intrusion detection for CMMB (China Mobile Multimedia Broadcasting) play system based on watermark technology
CN102843588A
Deep SVDD-based vehicle external intrusion detection method and system
CN113359666A