Method for detecting suspicious traffic of a vehicle and related device

By configuring intrusion detection information and distributed rules in vehicles, and monitoring CAN and Ethernet traffic, the security problems of hybrid networks in modern vehicles are solved, and effective detection and prevention of attacks are achieved.

CN118872236BActive Publication Date: 2026-11-24YINWANG INTELLIGENT TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202280093435.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-21
Publication Date
2026-11-24
Estimated Expiration
2042-03-21

AI Technical Summary

Technical Problem

Modern vehicles contain hybrid networks of CAN and Ethernet. Attackers can exploit one of these networks to compromise the vehicle's electronic devices, and current technologies struggle to effectively protect these networks.

Method used

A method for detecting suspicious traffic in vehicles is provided. This method involves configuring intrusion detection information in electronic devices within the vehicle, monitoring CAN and Ethernet traffic, and deploying distributed rule configuration methods across multiple devices to detect abnormal traffic, including rules for flooding attacks, CAN frame validity verification, and Ethernet packet payload analysis.

Benefits of technology

It achieves effective protection for vehicle-to-everything (V2X) networks, can detect and prevent flooding attacks and other types of network attacks, and ensures the security of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118872236B_ABST
    Figure CN118872236B_ABST
Patent Text Reader

Abstract

A method for detecting suspicious traffic of a vehicle comprises: an electronic device (500, 700, 800) in the vehicle (300) acquires intrusion detection configuration information, wherein the intrusion detection configuration information is used to configure a security rule, the security rule is according to an identity of the electronic device (500, 700, 800) in a service flow for sending data received by the electronic device (500, 700, 800), and the data received by the electronic device (500, 700, 800) comprises at least one of the following: an Ethernet message carrying a service-oriented communication or a controller area network frame; and the electronic device (500, 700, 800) receives and detects data in the service flow according to the security rule. The present application also relates to a related device. According to the method, the vehicle can monitor Ethernet traffic and CAN traffic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and more specifically, to a method and related equipment for detecting suspicious traffic flow of vehicles. Background Technology

[0002] The number and variety of electronic devices in vehicles are increasing daily. Modern vehicles have multiple Controller Area Network (CAN) electronic devices and Ethernet electronic devices, which are connected to the CAN ports and Ethernet ports of a switch, respectively. CAN electronic devices are interconnected via the CAN bus to form a CAN network, where they communicate using the CAN communication protocol. Ethernet devices are connected to the ports of the switch to form an Ethernet network.

[0003] Because vehicles have two networks (CAN network and Ethernet network), attackers can compromise electronic devices through either network. Therefore, protecting the electronic devices within a hybrid in-vehicle network becomes a problem that needs to be addressed. Summary of the Invention

[0004] This application provides a method and related equipment for detecting suspicious traffic in a vehicle. According to this technical solution, the vehicle can monitor both Ethernet traffic and CAN traffic.

[0005] In a first aspect, embodiments of this application provide a method for detecting suspicious traffic in a vehicle, comprising: an electronic device in the vehicle acquiring intrusion detection configuration information, wherein the intrusion detection configuration information is used to configure security rules to detect anomalies in data received by the electronic device, the security rules being based on the identifier of the electronic device in a service flow that sends the received data, the data received by the electronic device including at least one of the following: Ethernet packets or controller area network (CAN) frames carrying service-oriented communication; and the electronic device receiving and detecting the data in the service flow according to the security rules.

[0006] Electronic devices in a vehicle can receive at least one of CAN frames and Ethernet messages carrying service-oriented communication. These devices can detect anomalies in the received data according to security rules. The security rules configured for the electronic devices are determined based on the identifiers of the electronic devices in the service flow; therefore, different electronic devices in the service flow may implement different security rules due to different identifiers. Therefore, this technical solution discloses a distributed rule configuration method that can be used to configure security rules for electronic devices in vehicles with hybrid networks. Distributing in-vehicle intrusion detection systems (IDS) with different sets of rules on more than one device helps to monitor traffic taking different routes based on the nature of traffic flowing through a specific device. This is because there is more than one switch in a vehicle, and thus more than one available route exists in modern automobiles. Therefore, according to this technical solution, the vehicle can monitor both Ethernet and CAN traffic.

[0007] In one possible design, if the data received by the electronic device includes Ethernet packets carrying service-oriented communication, and the electronic device is one of at least two switches that receive the Ethernet packets carrying service-oriented communication in the service flow, then the security rules include a first set of rules, wherein the first set of rules is used to detect flooding attacks.

[0008] According to the above technical solution, electronic devices in vehicles can detect flooding attacks based on security rules.

[0009] In one possible design, if the data received by the electronic device includes the CAN frame, and the electronic device is the first switch in the service flow, then the security rules include a second set of rules, wherein the second set of rules is used to verify whether the received CAN frame and the data within the received CAN frame are valid.

[0010] According to the above technical solution, the electronic equipment in the vehicle can monitor attacks in the CAN traffic.

[0011] In one possible design, if the data received by the electronic device includes the Ethernet message carrying service-oriented communication, the electronic device is the last switch in the service flow, and the electronic device is connected to a CAN electronic device, then the security rules include at least one of the following: a third set of rules, a fourth set of rules, and a fifth set of rules, wherein the third set of rules is used to verify whether the received data is valid and authorized based on the service information carried in the application layer header of the Ethernet message carrying service-oriented communication; the fourth set of rules is used to verify whether the control commands carried in the payload of the Ethernet message carrying service-oriented communication are valid; and the fifth set of rules is used to verify whether the data carried in the payload of the Ethernet message carrying service-oriented communication is valid.

[0012] According to the above technical solution, the electronic equipment in the vehicle can monitor both Ethernet traffic and CAN traffic.

[0013] In one possible design, if the electronic device is the destination device in the service flow and the electronic device is a CAN electronic device, then the security rules include a second set of rules, wherein the second set of rules is used to verify whether the received CAN frame is valid.

[0014] In one possible design, if the electronic device is the destination device in the service flow and the electronic device is an Ethernet electronic device, then the data received by the electronic device is an Ethernet packet carrying service-oriented communication. The security rules include at least one set of rules from a first set of rules, a third set of rules, a fourth set of rules, and a fifth set of rules. The first set of rules is used to detect flooding attacks; the third set of rules is used to verify the validity and authorization of the data based on information carried in the application header of the Ethernet packet carrying service-oriented communication; the fourth set of rules is used to verify the validity of control commands carried in the payload of the Ethernet packet carrying service-oriented communication; and the fifth set of rules is used to verify the validity of the data carried in the payload of the Ethernet packet carrying service-oriented communication.

[0015] According to the above technical solution, the electronic equipment in the vehicle can monitor both Ethernet traffic and CAN traffic.

[0016] In one possible design, the method further includes: if the data is an Ethernet message carrying service-oriented communication, sending Ethernet header information to a first control device to detect injected attacks; if the data is a CAN frame, sending a CAN ID to a second control device to detect injected attacks.

[0017] According to the above technical solution, the electronic equipment in the vehicle can detect attacks with long attack paths.

[0018] Secondly, embodiments of this application provide an electronic device having the function of implementing the method described in the first aspect. The function can be implemented in hardware or in hardware executing corresponding software. The hardware of the software includes one or more modules corresponding to the function.

[0019] Thirdly, embodiments of this application provide a computer-readable storage medium including instructions. When the instructions are executed on a computer, the computer performs the method described in the first aspect or any possible implementation thereof.

[0020] Fourthly, an electronic device is provided, including a processor and a memory. The processor is connected to the memory. The memory is used to store instructions, and the processor is used to execute the instructions. When the processor executes the instructions stored in the memory, the processor performs the method of the first aspect or any possible implementation thereof.

[0021] Fifthly, a chip system is provided, the chip system including a memory and a processor. The memory is used to store a computer program, and the processor is used to retrieve and run the computer program from the memory, causing a vehicle in which the chip system is located to perform the method described in the first aspect or any possible implementation thereof.

[0022] Sixthly, a computer program product is provided. When the computer program product is run on an electronic device, it causes the electronic device to perform the method described in the first aspect or any possible implementation thereof.

[0023] In a seventh aspect, a vehicle is provided, the vehicle including the electronic equipment described in any one of the second to sixth aspects. Attached Figure Description

[0024] Figure 1 The CAN frame is shown.

[0025] Figure 2 It is a SOME / IP message.

[0026] Figure 3 This is a schematic block diagram of multiple switches in a vehicle according to an embodiment of the present invention.

[0027] Figure 4 A flowchart of an embodiment of a method for detecting suspicious traffic flow of vehicles is shown.

[0028] Figure 5 This is a schematic block diagram of an electronic device 500 according to an embodiment of this application.

[0029] Figure 6 The root IDS is shown.

[0030] Figure 7 This is a schematic block diagram of an electronic device 700 according to an embodiment of this application.

[0031] Figure 8 This is a schematic block diagram of an electronic device 800 according to an embodiment of this application. Detailed Implementation

[0032] The technical solutions in this application are described below with reference to the accompanying drawings.

[0033] The CAN protocol is a signal-oriented communication protocol. A CAN frame mainly consists of a CAN ID and data bytes. The CAN ID indicates the priority of the CAN message on the CAN bus. The CAN data bytes within a CAN frame on the bus contain many CAN signals. For example, a CAN frame with a specific CAN ID can carry data for, for example, two CAN signals. The signal names, number of signals, and signal order in a CAN frame are defined by the original equipment manufacturer (OEM) (proprietary). The CAN bus is a broadcast communication medium in which CAN frames sent by a transmitting CAN electronics device are received by all other devices (including the transmitting CAN electronics device). A CAN electronics device is an electronic device that supports the CAN protocol and sends / receives data via CAN frames.

[0034] Figure 1 The CAN frame is shown.

[0035] Scalable Service-Oriented Middleware over IP (SOME / IP) is a protocol primarily designed for automotive use cases involving control messaging. SOME / IP is standardized by the Automotive Open System Architecture (AUTOSAR) standard. SOME / IP is a service-oriented communication protocol where service consumers (called clients) subscribe to and consume services provided by service providers (called servers).

[0036] Figure 2 It is a SOME / IP message.

[0037] The Service ID in the SOME / IP header uniquely identifies the service provided by the server, while the Client ID in the SOME / IP header uniquely identifies the client. The Message ID, Service ID, and Client ID in the SOME / IP header are unique and predefined for each service, just as the CAN ID in CAN is unique and predefined.

[0038] Communication using SOME / IP can be divided into two main categories.

[0039] In the first type (request / response), the service consumer initiates a remote procedure request, which is executed by the service provider, who may or may not respond to the service consumer. In this case, the payload of the SOME / IP message is a remote procedure call, etc.

[0040] In the second category (publish / subscribe), the service provider periodically sends data (variables, related variable groups, etc.) to the service consumer, either triggered by a specific event or based on a query from the service consumer. In this case, the payload of the SOME / IP message is a semaphore value or a CAN frame, etc.

[0041] It should be noted that the SOME / IP protocol is an example of a service-oriented communication protocol. Vehicles can use other service-oriented communication protocols. For example, a vehicle can use a data distribution service (DDS), or a vehicle can use both SOME / IP and DDS simultaneously.

[0042] Ethernet electronic devices are electronic devices that support the Ethernet protocol and use Ethernet packets to send / receive data. Ethernet electronic devices in a vehicle can send Ethernet packets carrying service-oriented communication to other Ethernet electronic devices in the vehicle via one or more switches. Correspondingly, Ethernet electronic devices can receive Ethernet packets carrying service-oriented communication forwarded by switches.

[0043] The payload of an Ethernet message carrying service-oriented communication may include one or more signals, one or more CAN frames, one or more CAN signals, etc. In some embodiments, a switch in a vehicle may receive a CAN frame from a CAN electronics device, convert the CAN frame into an Ethernet message, and forward the Ethernet message to other switches. In some embodiments, an Ethernet electronics device may receive a CAN frame from a CAN electronics device, convert the CAN frame into an Ethernet message, and send the Ethernet message to a switch.

[0044] For ease of description, in the following embodiments, it is assumed that the vehicle can implement service-oriented communication using only the SOME / IP protocol. Accordingly, the Ethernet packets carrying the service-oriented communication are SOME / IP packets.

[0045] Figure 3 This is a schematic block diagram of multiple switches in a vehicle according to an embodiment of the present invention.

[0046] like Figure 3 As shown, vehicle 300 includes switch 301, switch 302, switch 303 and switch 304. Figure 3 The ECU shown is a CAN electronic device. The telecommunication unit (TCU) 321, on-board diagnostic (OBD) system 322, in-vehicle infotainment (IVI) system 323, and domain controller (DC) 331 are Ethernet electronic devices.

[0047] Switch 301 has three Ethernet ports and one CAN port. The two Ethernet ports are used to connect the three Ethernet devices: TCU321, OBD 322, and IVI 323. The CAN port is used to connect to the ECU / CAN network.

[0048] Switch 304 has one Ethernet port and one CAN port. The Ethernet port is used to connect to DC 331, and the CAN port is used to connect to the ECU.

[0049] Figure 3 The switch shown can be considered a hybrid network. This hybrid network includes both CAN and Ethernet networks. Flex ray and Lin switches may also be used, but these are not the focus of this invention. The CAN network includes ECUs 311 to ECU 314 and ECUs 341 to ECU 344. The Ethernet network includes Ethernet electronic devices such as TCU 321, OBD 322, IVI 323, and DC331.

[0050] Messages can be sent within a CAN network or within an Ethernet network in a hybrid network. For example, a message can be sent from one CAN electronic device to another. For instance, a CAN frame can be sent from ECU 311 to ECU 344. Similarly, a CAN frame can be sent from ECU 311 to ECU 312. Likewise, a message can be sent from one Ethernet electronic device to another. For example, an Ethernet message can be sent from OBD 322 to DC 331.

[0051] Messages can be sent from a CAN network to an Ethernet network and vice versa. For example, a message can be sent from an Ethernet electronics device to a CAN electronics device. For example, OBD 322 can send diagnostic messages to an ECU (e.g., ECU 342). Similarly, messages can be sent from a CAN electronics device to an Ethernet electronics device. For example, an ECU (e.g., ECU 341) can send messages to an IVI 323 to display information such as charging status, fuel level, etc.

[0052] Switch 301 can receive CAN frames from an ECU (e.g., ECU 341) and convert them into Ethernet messages. The Ethernet messages can be sent to switch 304 via switches 302 and 303. If the destination device of the Ethernet message is an ECU, switch 304 can convert the Ethernet message into a CAN frame and send it to the destination device. The destination device of the Ethernet message (or CAN frame) is an electronic device that processes the data carried in the payload of the Ethernet message (or CAN frame).

[0053] Figure 4 A flowchart of an embodiment of a method for detecting suspicious traffic flow of vehicles is shown.

[0054] 401: Electronic devices in the vehicle acquire intrusion detection configuration information.

[0055] An electronic device is one that can receive CAN frames and / or SOME / IP messages from another electronic device. Figure 3 Taking the vehicle 300 shown as an example, the electronic devices can be CAN electronic devices (e.g., ECU 341, ECU 342, ECU 343 or ECU 344), Ethernet electronic devices (e.g., TCU 321 or DC 331) or switches (e.g., switch 301, switch 302, switch 303 or switch 304) in the vehicle 300.

[0056] The instruction detection configuration information is used to configure security rules for electronic devices to detect anomalies in the data received by the electronic device. For example, if the electronic device is an ECU, it can receive CAN frames from other ECUs or switches, and can check whether the received CAN frames are abnormal according to the security rules configured for it. Similarly, if the electronic device is an Ethernet device, it can check whether the received SOME / IP messages are abnormal according to the security rules configured for it. And if the electronic device is a switch, it can check whether the received SOME / IP messages and / or received CAN frames are abnormal according to the security rules configured for it.

[0057] "SOME / IP message (or CAN frame) error" means that the source or destination electronic device of the SOME / IP message (or CAN frame) is illegal, or that the SOME / IP message (or CAN frame) itself is illegal. The source electronic device of a SOME / IP message is the electronic device that generates the SOME / IP message, and the destination electronic device is the electronic device that ultimately receives the SOME / IP message. For example, if a SOME / IP message is sent from OBD 322 to DC 331, then the source electronic device is OBD 322, and the destination electronic device is DC 331. A legitimate source / destination electronic device is an authorized source / destination electronic device. In other words, a legitimate source electronic device is an electronic device capable of generating and sending that specific SOME / IP message (or CAN frame), and a legitimate destination electronic device is an electronic device capable of receiving that specific SOME / IP message (or CAN frame). "The SOME / IP message (or CAN frame) itself is illegal" means that the SOME / IP message (or CAN frame) is a message used for a flood attack, or that the SOME / IP message (or CAN frame) carries some abnormal data. Details of the abnormal data will be discussed below.

[0058] Security rules are based on the identification of electronic devices within a traffic flow that transmits the data they receive. The identification of an electronic device is its position or function within the traffic flow that transmits data. For example, if a SOME / IP message is sent from OBD 322 to DC 331, there are six electronic devices in the traffic flow used to send the SOME / IP message: OBD 322, switches 301 through 304, and DC 331. OBD 322 is identified as the source electronic device in the traffic flow, switch 301 as the first switch, switch 302 as the second, switch 303 as the third, switch 304 as the last, and DC 331 as the destination electronic device.

[0059] In different service flows, electronic devices can have different identifiers. For example, if a SOME / IP message is sent from DC 331 to OBD 322, then DC 331 is the source electronic device in the service flow, switch 304 is the first switch in the service flow, switch 303 is the second switch, switch 302 is the third switch, switch 301 is the last switch, and OBD 322 is the destination electronic device. For the service flow used to send a message from OBD 322 to DC 331 (hereinafter referred to as the "first service flow"), the identifier of OBD 322 is the source electronic device. However, for the service flow used to send a message from DC 331 to OBD 322 (hereinafter referred to as the "second service flow"), the identifier of OBD 322 is the destination electronic device. Similarly, in the first service flow, the identifier of switch 301 is the first switch, but in the second service flow, the identifier of switch 301 is the last switch. In the first service flow, switch 304 is identified as the last switch, but in the second service flow, switch 304 is identified as the first switch. Therefore, the identification of the electronic device is determined based on the service flow used to send SOME / IP messages (or CAN frames). In some embodiments, the identifications of switches 302 and 303 in the first and second service flows can also be considered as identifications relative to intermediate switches.

[0060] 402: Electronic devices receive and inspect data in a business flow in accordance with security rules.

[0061] according to Figure 4 The method shown allows the vehicle to monitor both Ethernet and CAN traffic. The vehicle's electronic devices can receive at least one of CAN frames and SOME / IP messages, and can detect anomalies in the received data according to security rules. The security rules configured for the electronic devices are determined based on the identifiers of the electronic devices in the traffic flow; therefore, different electronic devices in the traffic flow may implement different security rules due to different identifiers. Figure 4 The technical solution presented discloses a distributed rule configuration method that can be used to configure security rules for electronic devices in vehicles with hybrid networks. Distributing in-vehicle intrusion detection systems (IDS) with different sets of rules across multiple devices helps monitor traffic taking different routes based on the nature of traffic flowing through specific devices. This is because there is more than one switch in a vehicle, and therefore more than one available route in modern automobiles. Therefore, according to... Figure 4 The technical solution shown allows the vehicle to monitor both Ethernet and CAN traffic.

[0062] Five rules can be configured for electronic devices in a vehicle.

[0063] The first set of rules (hereinafter referred to as "R1") is used to detect flood attacks. Flood attacks are also known as denial-of-service (DoS) attacks.

[0064] In some embodiments, flooding attacks can be detected based on the number of packets sent from a source electronic device to a destination electronic device in a service flow. If the number of packets within a preset time period exceeds a preset number, the electronic device can determine that a flooding attack has occurred.

[0065] In some embodiments, flooding attacks can be detected based on the transmission frequency between the source and destination electronic devices in the path. The transmission frequency can be determined based on the number of messages sent from the source electronic device to the destination electronic device in the path and a preset time period. The number of messages divided by the preset time period is the transmission frequency. If the transmission frequency is greater than a preset threshold, the electronic device can determine that a flooding attack has occurred.

[0066] The second set of rules (hereinafter referred to as "R2") is used to verify the validity of received CAN frames. The ECU sends CAN frames periodically, and the length of the CAN data is usually the same. Therefore, if the electronic device detects an abnormal transmission frequency of the CAN frame or that the length of the CAN data exceeds a preset range, the electronic device can determine that a CAN frame-based attack has occurred. Furthermore, the electronic device can detect whether the value of the CAN signal is reasonable and does not violate the signal value range, and whether it exhibits correlation with other relevant CAN signal values. If the value of the CAN signal is reasonable and does not violate the signal value range, and exhibits correlation with other relevant CAN signal values, then the CAN frame is valid.

[0067] The third set of rules (hereinafter referred to as "R3") is used to verify whether the received data is valid and authorized based on the information carried in the application layer header of the Ethernet message carrying service-oriented communication.

[0068] In some embodiments, R3 may include a rule (hereinafter referred to as "R3-1") for checking whether a client is an authorized service consumer accessing a specific service. The client's identifier can be obtained from the client ID carried in the SOME / IP header of a received SOME / IP message. The identifier of a specific service can be obtained from the service ID carried in the SOME / IP header of a received SOME / IP message.

[0069] In some embodiments, R3 may include a rule (hereinafter referred to as "R3-2") for checking whether the server is an authorized service provider for a specific service. The server's identifier can be obtained from the service ID carried in the SOME / header of the received SOME / IP message. The identifier of a specific service can be obtained from the service ID carried in the SOME / header of the received SOME / IP message.

[0070] In some embodiments, R3 may include a rule (hereinafter referred to as "R3-3") for checking whether a response of the corresponding SOME / IP message type is received from the server when the client has not sent a request of the corresponding SOME / IP message type to the server. If the server receives a response of the message type when no request was sent, the response is an intrusion / abnormal response (according to the AUTOSARSOME / IP protocol, a response should only be sent when there is a request for the response). The SOME / IP message type can be identified by the message type in the SOME / IP header.

[0071] In some embodiments, R3 may include a rule (hereinafter referred to as "R3-4") for checking whether a response of the corresponding SOME / IP message type has been received from the server if the client has previously received a response of the corresponding SOME / IP message type. If a response has already been received, another response will indicate an intrusion / abnormality (according to the AUTOSAR SOME / IP protocol, a request should have only one response).

[0072] R3 may include one or more of the rules mentioned above (i.e., R3-1 to R3-4). R3 may also include other SOME / IP protocol analysis rules. For example, R3 may include rules that can detect violations of SOME / IP protocol flows defined by the AUTOSAR standard (R3-3 and R3-4 are examples of SOME / IP protocol flows defined by AUTOSAR). Furthermore, in addition to the information carried in the application header (i.e., the SOME / IP header), information carried in lower-level headers can also be used to verify received Ethernet packets. For example, the source Internet Protocol (IP) address and port of the client or server and / or the destination IP address and port of the client or server can also be used to verify received SOME / IP packets. For example, there exists a list of electronic devices allowed to send SOME / IP packets. If the source IP address in the IP header of the SOME / IP packet is in this list, the electronic device can determine that the SOME / IP packet is valid. If the source IP address in the IP header of the SOME / IP packet is not in this list, the electronic device can determine that the SOME / IP packet is suspicious traffic.

[0073] R3 can help detect intrusions, i.e., unauthorized attempts by individuals to violate protocol state by using or pretending to provide services, or by interrupting protocol flow, injecting intrusion messages, and other attacks.

[0074] The fourth set of rules (hereinafter referred to as "R4") is used to verify the validity of control commands carried in the payload of Ethernet messages that carry service-oriented communication.

[0075] When a SOME / IP message belongs to the request / response communication category, R4 is used to analyze the message payload. In the request / response communication model, a service consumer initiates a remote procedure request, which is executed by the service provider, which may or may not respond to the service consumer. In this case, the payload of the SOME / IP message is a remote procedure call.

[0076] When the payload is a SOME / IP method call, reader, setter, etc., R4 includes a set of rules for payload analysis. R4 checks, for example, whether the remote method calls in the payload are correct (as defined), follow the correct defined method parameters in the correct defined order, and comply with the defined parameter types, etc.

[0077] The anomaly detection features used by R4 can include the SOME / IP payload format defined by, for example, AUTOSAR extensible markup language (ARXML) files, other configuration files, etc.

[0078] The fifth set of rules (hereinafter referred to as "R5") is used to verify the validity of the data carried in the payload of Ethernet messages that carry service-oriented communication.

[0079] When a SOME / IP message belongs to the publish / subscribe communication category, R5 is used to analyze the message payload. In the publish / subscribe communication model, the service provider periodically sends data (variables, related variable groups, etc.) to the service consumer, either triggered by a specific event or based on a query from the service consumer. In this case, the payload of the SOME / IP message can be a signal value or a CAN frame, etc. These rules check, for example, whether the CAN frame follows the frequency, data length, whether the CAN signal value is reasonable and does not violate the signal value range, and whether it exhibits correlation with other relevant CAN signal values. If the SOME / IP payload is a CAN frame / signal, the rules in R5 used to check the CAN frame / signal can be the same as those in R2. For the sake of brevity, this will not be elaborated further here.

[0080] The anomaly detection features used by R5 may include SOME / IP payload format, CAN ID and / or CAN signal, data length, etc., defined by, for example, ARXML files, other configuration files, etc.

[0081] The safety rules for electronic devices can be determined based on the following principles.

[0082] Principle 1: If the received message type includes Ethernet messages carrying service-oriented communication, and the electronic device is one of two switches receiving Ethernet messages carrying service-oriented communication in the service flow, then the security rule for the electronic device may include R1. In other words, R1 is applied by the first switch (hereinafter referred to as "S1"), the last switch (hereinafter referred to as "Sn" if it is different from the first switch), and any intermediate switches (hereinafter referred to as "Si" if any). S1, Si, and Sn are switches capable of receiving SOME / IP messages in the service flow. In other words, if two or more switches receive SOME / IP messages in the service flow, and the target switch is one of two or more switches, then the security rule for the target switch may include R1.

[0083] Principle 2: If an electronic device can receive CAN frames and is the first switch in the traffic flow, then the security rules for the electronic device may include R2.

[0084] In some embodiments, the first switch can convert a CAN frame into a SOME / IP message and send the SOME / IP message to the next switch. The last switch in the traffic flow can extract the CAN frame from the SOME / IP message and send the CAN frame to the CAN electronics.

[0085] Principle 3: If an electronic device can receive SOME / IP messages, is the last switch in the service flow, and is connected to a CAN electronic device, then the security rules for the electronic device may include R3, R4, and R5 (only one of R4 and R5 is applied at a time, depending on the payload type).

[0086] Principle 4: If the electronic device is the destination electronic device in the business flow and the electronic device is a CAN electronic device, then the security rules for the destination electronic device may include R2.

[0087] Principle 5: If the electronic device is the destination electronic device in the service flow, and the electronic device is an Ethernet electronic device, then the security rules for the destination electronic device may include R1 and R3, and the security rules for the destination electronic device may also include at least one of R4 and R5. In other words, if the final destination device is an Ethernet device connected to an Ethernet port of the final destination switch Sn, then the destination electronic device may apply R1 to flow control, R3 to service authorization and protocol state analysis, and R4 or R5 to payload analysis of SOME / IP messages. The application of R4 or R5 depends on the payload type of the SOME / IP message, i.e., SOME / IP control message or CAN data. If the payload type of the SOME / IP message is a SOME / IP control message, then the destination electronic device may execute R4. If the payload type of the SOME / IP message is a CAN frame, then the destination electronic device may execute R5 (R5 may be similar to R2).

[0088] Furthermore, for the target electronic device, R4 or R5 will only be checked if R1 and R3 have been successfully checked, that is, if the SOME / IP message does not violate the business flow, service authorization, and SOME / IP protocol flow.

[0089] Based on the above principles, assume that switches 301 to 304 are the switches for the first service flow, and ECUs 341 to 344 and DC 331 are the destination electronic devices. The configuration results of the above electronic devices are shown in Table 1.

[0090] Table 1

[0091]

[0092]

[0093] For switch 301, if switch 301 receives a SOME / IP message from an Ethernet electronic device (e.g., TCU 321) and no intrusion is detected in the SOME / IP message according to R1, then switch 301 can forward the SOME / IP message to switch 302. If switch 301 receives a CAN frame from a CAN electronic device (e.g., ECU 311) and no intrusion is detected in the CAN frame according to R2, then switch 301 converts the CAN frame into a SOME / IP message and sends the SOME / IP message to switch 302.

[0094] For switches 302 and 303, these switches receive SOME / IP packets from the preceding switch, and these switches are not the last switch in the first traffic flow. Therefore, these switches may only apply R1 to the traffic flow inspection. If switches 302 / 303 do not detect an intrusion in the received SOME / IP packet according to R1, then switches 302 / 303 forward the SOME / IP packet to the next switch.

[0095] For switch 304, R4 or R5 will only be checked if R1 and R3 have been successfully checked, i.e., if the SOME / IP message does not violate service flow, service authorization, and SOME / IP protocol flow. Similarly, if the payload type of the SOME / IP message is a SOME / IP control message, switch 304 can execute R4. If the payload type of the SOME / IP message is a CAN frame, switch 304 can execute R5. If no intrusion is detected in the SOME / IP message or CAN frame after checking R4 or R5, then the message has not been compromised.

[0096] In some embodiments, if the final destination device is a DC, the DC can perform any one of R1, R3, and R4 or R5. In this case, the switch 304 does not need to apply R3, R4, or R5. If the final destination device is a CAN ECU, the CAN ECU can perform R2 instead of the switch performing R5.

[0097] In some embodiments, if the sender and receiver of a CAN frame are both CAN electronic devices connected to the same CAN bus, i.e., the CAN frame is not routed through any switch, the receiver can perform R2. For example, if ECU 311 sends a CAN frame to ECU 312 via the bus, ECU 312 can check the received CAN frame according to R2.

[0098] Figure 5 This is a schematic block diagram of an electronic device 500 according to an embodiment of this application. Figure 5 As shown, the electronic device 500 includes: a traffic resolver 501, a rule loader 502, a log reporter 503, and an IDS engine 504. This electronic device can be a switch, a CAN electronic device, or an Ethernet electronic device.

[0099] Several sets of rules are stored in a rule file, with each set of rules (from R1, R2, R3, R4, and R5) indexed separately in the rule file.

[0100] The IDS engine 504 reads the intrusion detection configuration information of the electronic device 500, which is used to indicate which set of rules the electronic device 500 should execute. The IDS engine 504 instructs the rule loader 502 which set of rules the electronic device 500 should execute.

[0101] Rule loader 502 loads the set of rules to be checked by IDS engine 504.

[0102] Traffic parser 501 extracts anomaly detection features from received CAN and SOME / IP traffic according to the rules loaded by rule loader 502. Traffic parser 501 then sends the anomaly detection features to IDS engine 504.

[0103] For example, if electronic device 500 performs R1 and R3, traffic parser 501 can extract the header and lower-layer header of the SOME / IP message. If electronic device 500 performs R4 or R5, traffic parser 501 can extract the payload of the SOME / IP message.

[0104] IDS engine 504 applies the intrusion detection rules loaded by rule loader 502 to the data extracted by traffic parser 501 to detect anomalies / intrusions.

[0105] Log reporter 503 records the anomaly detection results.

[0106] The same IDS engine can analyze both SOME / IP service-oriented communication and CAN traffic as separate CAN frames or encapsulated within SOME / IP messages. This same IDS engine can be used on different devices, each of which (switch, Ethernet device, CAN ECU) can only load a limited number of rules that need to be checked based on its configuration. Therefore, this IDS engine can be called a hybrid configurable IDS engine.

[0107] In some embodiments, the vehicle may also execute a sixth set of rules (hereinafter referred to as "R6") for detecting attacks with long attack paths. Long attack paths can occur when the service provider is in one network (e.g., CAN) and the service consumer is in another network (e.g., Ethernet), and vice versa. For example, a SOME / IP message from an external component (OBD, TCU, IVI) that is detected as a normal message by the service-oriented SOME / IP IDS rule set (e.g., R3) can be an intrusion detected by CAN IDS rules (e.g., R2) applied to the final destination CAN electronics device based on CAN frame data, CAN ID, and / or frequency. However, the IDS engine on the destination CAN electronics device does not have information about the SOME / IP header, and therefore, no information about the service that injected the malicious message or the source of the attack.

[0108] If all IDSs deployed in different locations within the vehicle network operate in isolation, none of them can detect attacks with long attack paths (e.g., attacks traversing from the SOME / IP network to the CAN network) or the complete attack path of such attacks. Consequently, they cannot detect services currently being injected with attacks. Therefore, distributed IDSs deployed on different devices need to work together to detect attacks with long attack paths.

[0109] R6 has rules related to SOME / IP service paths and is particularly helpful in detecting attacks with long attack paths when the service provider is from one network (e.g., CAN) and the service consumer is in another network (e.g., Ethernet), and vice versa. R6 is especially important when the first receiving switch and the final destination CAN electronics are different devices and intermediate switches are involved.

[0110] The anomaly detection features used in R6 include message ID, service ID, client ID from the SOME / IP header, and CAN ID from the CAN frame. R6 can be the final set of rules applied after R1, R2, R3, R4, or R5.

[0111] Vehicles can collect logs from all electronic devices deployed with R1, R2, R3, R4, and / or R5. The device application service path rules (i.e., R6) that execute the root IDS analyze which server / client (attack source) or which service is injecting attacks.

[0112] When a SOME / IP message corresponding to a certain service is to be sent from an Ethernet electronic device to a CAN electronic device, the root IDS obtains the Ethernet header information (e.g., message ID, service ID, client ID) of the SOME / IP message from the logs of the switches along the path of the message, as well as the CAN ID of the CAN frame from the logs of the destination CAN electronic device.

[0113] The message ID, service ID, and / or client ID of the SOME / IP message help link the CAN ID of the corresponding CAN frame in the SOME / IP message, thus linking the message to the service and finding the complete attack path.

[0114] In some embodiments, the device that deploys the root IDS may be a device located at a central position in the vehicle (e.g., the vehicle's central controller).

[0115] In some embodiments, the root IDS can be deployed in the cloud. In this case, the vehicle can collect anomaly detection features and send them to the cloud.

[0116] In some embodiments, the device that deploys the root IDS for SOME / IP messages may be different from the device that deploys the root IDS for CAN frames.

[0117] In some embodiments, the device that deploys the root IDS for SOME / IP messages can be the same as the device that deploys the root IDS for CAN frames.

[0118] For example, if an electronic device receives a SOME / IP message, it can send the Ethernet header information of the SOME / IP message to the first control device to detect injected attacks; if the electronic device receives a CAN frame, it can send the CAN ID of the CAN frame to the second control device to detect injected attacks. The first control device is the device that deploys the root IDS for SOME / IP messages, and the second control device is the device that deploys the root IDS for CAN frames.

[0119] Figure 6 The root IDS is shown.

[0120] like Figure 6 As shown, switch 301 receives a SOME / IP message from OBD 322, with the destination device being ECU 341. Switch 301 executes R1 and sends detailed information such as IP address and port to the root IDS. Switches 302 and 303 execute R1 and send detailed information such as IP address and port to the root IDS. Switch 304 executes R1, R3, and R4 and sends detailed information such as message ID, service ID, and client ID to the root IDS. ECU 341 executes R2 and sends the CAN ID to the root IDS. The root IDS can determine the service being injected with the attack based on the received information.

[0121] Figure 7 This is a schematic block diagram of an electronic device 700 according to an embodiment of this application. Figure 7 As shown, the electronic device 700 includes: an acquisition module 701, a detection module 702, and a receiving module 703.

[0122] The acquisition module 701 is used to acquire intrusion detection configuration information, wherein the intrusion detection configuration information is used to configure security rules to detect anomalies in the data received by the electronic device. The security rules are based on the identifier of the electronic device in the service flow that sends the data it receives. The data received by the electronic device includes at least one of the following: Ethernet packets or controller area network (CAN) frames carrying service-oriented communication.

[0123] The receiving module 703 is used to receive data from the service flow.

[0124] The detection module 702 is used to detect the data received by the receiving module 703 according to security rules.

[0125] In some embodiments, the electronic device 700 may further include a transmitting module. The transmitting module is configured to: if the data is an Ethernet message carrying service-oriented communication, send Ethernet header information to the first control device to detect injected attacks; if the data is a CAN frame, send a CAN ID to the second control device to detect injected attacks. In some embodiments, the first control device and the second control device may be the same control device. In some embodiments, the first control device and the second control device may be different control devices.

[0126] like Figure 8 As shown, electronic device 800 may include transceiver 801, processor 802, and memory 803. Memory 803 may be used to store code, instructions, etc., executed by processor 802. Electronic device 800 may be a vehicle or a component of a vehicle as described in the above embodiments. Electronic devices 700 and 800 may be... Figure 3 One of the electronic devices shown.

[0127] It should be understood that the processor 802 can be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by hardware integrated logic circuits in the processor or by software instructions. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The processor can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor, or the processor can be any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly executed by a hardware decoding processor, or executed using a combination of hardware and software modules in the decoding processor. The software modules can be located in mature storage media in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, and registers. The storage medium is located in memory; the processor reads information from the memory and, in conjunction with the hardware in the processor, completes the steps of the above methods.

[0128] It is understood that the memory 803 in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile memory and non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0129] This application also provides a chip system, which includes an input / output interface, at least one processor, at least one memory, and a bus. The at least one memory is used to store instructions, and the at least one processor is used to invoke the instructions from the at least one memory to perform the operations performed by the vehicle in the methods of the above embodiments.

[0130] This application also provides a computer storage medium that can store program instructions for performing the steps executed by the vehicle in the above-described method.

[0131] Optionally, the storage medium may specifically be memory 803.

[0132] This application also provides a computer program product that, when run on an electronic device, causes the electronic device to perform the steps of the method described above, which are performed by the vehicle.

[0133] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electrical hardware, or a combination of computer software and electrical hardware. Whether these functions are performed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but should not consider that such implementation is beyond the scope of this application.

[0134] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the above-described systems, devices, and units can be referred to the corresponding processes in the above-described method embodiments, and will not be repeated here.

[0135] In the embodiments of this application, "at least one" refers to one or more, and "multiple" refers to two or more. The term "and / or" describes the association relationship between related objects, indicating that three relationships may exist. For example, A and / or B can represent the following three cases: only A exists, A and B exist simultaneously, and only B exists, where A and B can be singular or plural. The symbol "I" generally represents the "or" relationship between related objects. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of one or more items. For example, at least one of a, b, and c can represent: a; b; c; a and b; a and c; b and c; or a, b, and c, where a, b, and c can be singular or plural.

[0136] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the unit division is only a logical functional division, and other division methods may be used in actual implementation. For example, multiple units or components may be merged or integrated into another system, or some features may be ignored or not performed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be implemented through some interfaces. Indirect coupling or communication connection between devices or units can be implemented electronically, mechanically, or in other forms.

[0137] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0138] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0139] When implemented as software functional units and sold or used as independent products, these functions can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to instruct a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: a USB flash drive, a portable hard drive, read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk, or any medium capable of storing program code.

[0140] The above descriptions are merely some specific implementations of this application and are not intended to limit the scope of protection of this application. Any variations or substitutions easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for detecting suspicious traffic flow of vehicles, characterized in that, include: The electronic device in the vehicle acquires intrusion detection configuration information, wherein the intrusion detection configuration information is used to configure security rules to detect anomalies in the data received by the electronic device. The security rules are based on the identifier of the electronic device in the service flow that sends the received data. The data received by the electronic device includes at least one of the following: Ethernet packets or controller area network (CAN) frames carrying service-oriented communication. The electronic device receives and detects data in the service flow according to the security rules; If the data received by the electronic device includes the Ethernet packets carrying service-oriented communication, and the electronic device is one of at least two switches that receive the Ethernet packets carrying service-oriented communication in the service flow, then the security rule includes a first set of rules, wherein the first set of rules is used to detect flooding attacks. If the data received by the electronic device includes the CAN frame, and the electronic device is the first switch in the service flow, then the security rule includes a second set of rules, wherein the second set of rules is used to verify whether the received CAN frame and the data within the received CAN frame are valid.

2. The method according to claim 1, characterized in that, If the data received by the electronic device includes Ethernet packets carrying service-oriented communication, the electronic device is the last switch in the service flow, and the electronic device is connected to a CAN electronic device, then the security rule includes at least one of the following: rule group three, rule group four, and rule group five, wherein... The third set of rules is used to verify whether the received data is valid and authorized based on the service information carried in the application layer header of the Ethernet message carrying service-oriented communication. The fourth set of rules is used to verify whether the control commands carried in the payload of the Ethernet message carrying service-oriented communication are valid. The fifth set of rules is used to verify whether the data carried in the payload of the Ethernet message carrying service-oriented communication is valid.

3. The method according to claim 1, characterized in that, If the electronic device is the destination device in the service flow, and the electronic device is a CAN electronic device, then the security rule includes a second set of rules, wherein the second set of rules is used to verify whether the received CAN frame is valid.

4. The method according to claim 1, characterized in that, If the electronic device is the destination device in the service flow, and the electronic device is an Ethernet electronic device, then the data received by the electronic device is an Ethernet message carrying service-oriented communication. The security rules include at least one set of rules from the first set of rules, the third set of rules, and the fourth and fifth sets of rules, wherein... The first set of rules is used to detect flooding attacks; The third set of rules is used to verify whether the data is valid and authorized based on the information carried in the application header of the Ethernet message carrying the service-oriented communication. The fourth set of rules is used to verify whether the control commands carried in the payload of the Ethernet message carrying service-oriented communication are valid. The fifth set of rules is used to verify whether the data carried in the payload of the Ethernet message carrying service-oriented communication is valid.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: If the data is an Ethernet packet carrying service-oriented communication, then an Ethernet header is sent to the first control device to detect injected attacks. If the data is the CAN frame, then the CAN ID is sent to the second control device to detect injected attacks.

6. An electronic device, characterized in that, include: An acquisition module is used to acquire intrusion detection configuration information, wherein the intrusion detection configuration information is used to configure security rules to detect anomalies in the data received by the electronic device, and the security rules are based on the identifier of the electronic device in the service flow that sends the received data. The data received by the electronic device includes at least one of the following: Ethernet packets or controller area network (CAN) frames carrying service-oriented communication. A receiving module is used to receive data from the service flow; The detection module is used to detect the data received by the receiving module according to the security rules; Wherein, if the data received by the electronic device includes the Ethernet packets carrying service-oriented communication, and the electronic device is one of at least two switches that receive the Ethernet packets carrying service-oriented communication in the service flow, then the security rule includes a first set of rules, wherein the first set of rules is used to detect flooding attacks; If the data received by the electronic device includes the CAN frame, and the electronic device is the first switch in the service flow, then the security rule includes a second set of rules, wherein the second set of rules is used to verify whether the received CAN frame and the data within the received CAN frame are valid.

7. The electronic device according to claim 6, characterized in that, If the data received by the electronic device includes Ethernet packets carrying service-oriented communication, the electronic device is the last switch in the service flow, and the electronic device is connected to a CAN electronic device, then the security rule includes at least one of the following: rule group three, rule group four, and rule group five, wherein... The third set of rules is used to verify whether the received data is valid and authorized based on the service information carried in the application header of the Ethernet message carrying the service-oriented communication. The fourth set of rules is used to verify whether the control commands carried in the payload of the Ethernet message carrying service-oriented communication are valid. The fifth set of rules is used to verify whether the data carried in the payload of the Ethernet message carrying service-oriented communication is valid.

8. The electronic device according to claim 6, characterized in that, If the electronic device is the destination device in the service flow, and the electronic device is a CAN electronic device, then the security rule includes a second set of rules, wherein the second set of rules is used to verify whether the received CAN frame is valid.

9. The electronic device according to claim 6, characterized in that, If the electronic device is the destination device in the service flow, and the electronic device is an Ethernet electronic device, then the data received by the electronic device is an Ethernet message carrying service-oriented communication. The security rules include at least one set of rules from the first set of rules, the third set of rules, and the fourth and fifth sets of rules, wherein... The first set of rules is used to detect flooding attacks; The third set of rules is used to verify whether the data is valid and authorized based on the information carried in the application header of the Ethernet message carrying the service-oriented communication. The fourth set of rules is used to verify whether the control commands carried in the payload of the Ethernet message carrying service-oriented communication are valid. The fifth set of rules is used to verify whether the data carried in the payload of the Ethernet message carrying service-oriented communication is valid.

10. The electronic device according to any one of claims 6 to 9, characterized in that, The electronic device also includes: The sending module is configured to: if the data is an Ethernet packet carrying service-oriented communication, send Ethernet header information to the first control device to detect injected attacks; or If the data is the CAN frame, then the CAN ID is sent to the second control device to detect injected attacks.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a vehicle, cause the vehicle to perform the method according to any one of claims 1 to 5.

12. An electronic device, characterized in that, The device includes a memory and a processor, the memory being used to store a computer program, and the processor being used to retrieve and run the computer program from the memory, causing the vehicle in which the electronic device is located to perform the method according to any one of claims 1 to 5.

13. A computer program product, characterized in that, When the computer program product is run on a vehicle, it causes the vehicle to perform the method according to any one of claims 1 to 5.

14. A vehicle, characterized in that, Includes the electronic device according to any one of claims 6 to 10.

15. A chip system, characterized in that, The system includes a memory and a processor, the memory being used to store a computer program, and the processor being used to retrieve and run the computer program from the memory, causing the vehicle in which the chip system is located to perform the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • A device for detection and prevention of an attack on a vehicle

    CN105050868A

  • Electronic system for detecting and preventing compromise of vehicle electrical and control systems

    US20150113638A1