Vehicle safety detection method and device, vehicle and storage medium
Analyze alarm events of intelligent connected cars through chain attack rules to identify complex attacks, which solves the problem of traditional security technology being unable to detect complex network attacks and improves the accuracy and efficiency of security detection.
Patent Information
- Application Number
- CN202410839967.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-15
AI Technical Summary
Intelligent connected cars are faced with the problem of detecting complex network attacks. Traditional security technology cannot identify complex attacks that combine multiple technical means, making it difficult to prevent network security threats.
Using chain attack rules, by obtaining and analyzing the current and historical alarm events of the vehicle, chain attack rules are generated to identify complex attack events, reduce false alarms, and improve the accuracy of security detection.
It achieves timely detection and prevention of complex attack events in intelligent connected cars, improves the accuracy and efficiency of network security detection, and reduces false alarm rates.
Smart Images

Figure CN118784292A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to the field of information security and security situation awareness technology for intelligent connected vehicles, and specifically to a vehicle safety detection method, device, vehicle and storage medium. Background Art
[0002] With the rapid development of smart cockpits and smart driving, the electrical and electronic (EE) architecture of smart connected vehicles has evolved from a distributed architecture to a domain-centralized architecture and a centrally centralized architecture, and the automotive software architecture has also transformed and upgraded to a service-oriented architecture (SOA). The most commonly used carriers for cybersecurity attacks are automotive telematics and application services, remote keyless entry systems, electronic control units, in-vehicle intelligent application programming interfaces (APIs), in-vehicle infotainment systems, in-vehicle mobile applications, and electric vehicle charging systems and facilities. Therefore, smart connected vehicles face cybersecurity and data security threats from the cloud, vehicle side, application mobile side, pipe side, enterprise internal, supply chain, and other aspects.
[0003] Due to the continuous upgrading and complexity of network attack methods, traditional security technologies can no longer guarantee network security. Complex attacks threaten network security. The characteristics of such attacks are that they use multiple technical means and are difficult to be identified by a single detection technology. In related technologies, security event correlation analysis is achieved by constructing a security event trigger relationship topology diagram or a network security knowledge graph. This method is a general correlation analysis method and does not realize the detection of complex attacks. Therefore, how to detect complex attacks in network attacks is a technical problem that needs to be solved urgently. Summary of the invention
[0004] The present application provides a vehicle safety detection method, device, vehicle and storage medium to at least solve the technical problem that complex attacks cannot be detected in the related art. The technical solution of the present application is as follows:
[0005] According to a first aspect of the present application, a vehicle safety detection method is provided, the method comprising: obtaining a current alarm event of a target vehicle; the current alarm event is used to indicate that an event of the vehicle is abnormal; based on a chain attack rule, determining a first event matching the current alarm event and a second event associated with the first event; the chain attack rule comprises a plurality of attack events with an associated relationship; and determining whether the target vehicle has a safety hazard based on the first event and the second event.
[0006] According to the above technical means, based on the chain attack rule, the attack event associated with the abnormal warning event is detected, so as to determine whether the target vehicle is safe based on the first event and the second event, so as to timely discover and prevent safety risks. The chain attack rule can identify multiple complex attack events with correlations, thereby detecting complex attack events in the target vehicle, and by analyzing the correlation between events and determining the attack event, it can reduce false alarms and improve the accuracy of safety detection.
[0007] In a possible implementation, the method further includes: acquiring historical warning events; the historical warning events include a plurality of abnormal events related to the vehicle; and associating the historical warning events to generate chain attack rules.
[0008] According to the above technical means, by analyzing multiple historical warning events related to the vehicle, the chain attack rule can predict the potential security threats of the vehicle. In addition, the historical warning events are associated to generate the chain attack rule, which improves the accuracy of analyzing the current warning event of the vehicle based on the chain attack rule and enhances the recognition of complex attack events.
[0009] In another possible implementation, historical alarm events are associated to generate chain attack rules, including: based on the time dimension, historical alarm events are divided into multiple first event sequences; the historical alarm events included in the first event sequence are arranged in chronological order; for each first event sequence, the first event sequence is deduplicated to obtain multiple processed second event sequences; based on a preset algorithm, the multiple processed second event sequences are associated to obtain chain attack rules.
[0010] According to the above technical means, by analyzing the time series of historical alarm events, the attack mode and attack behavior of historical alarm events can be more clearly identified, thereby improving the accuracy of chain attack rules in identifying attack events. In addition, deduplication and correlation analysis of the first event sequence reduce the interference of repeated events, which helps to more accurately analyze the correlation relationship between multiple first event sequences, making the chain attack rule more accurate.
[0011] In another possible implementation, based on a preset algorithm, multiple processed second event sequences are associated to obtain chain attack rules, including: based on the minimum support, multiple third event sequences are determined from multiple second event sequences; the third event sequence is a second event sequence in multiple second event sequences whose occurrence frequency is greater than a first preset threshold; the third event sequence includes: a preceding event and a succeeding event; based on the minimum confidence, multiple third event sequences are associated to determine an initial association rule; the initial association rule is a third event sequence in which, in multiple third event sequences, when the preceding event of the third event sequence occurs, the frequency of occurrence of the succeeding event is greater than the second preset threshold; the initial association rule includes multiple historical alarm events and the first occurrence time of multiple historical alarm events; based on the first occurrence time of multiple historical alarm events, multiple historical alarm events in the initial association rule are sorted; the sorted initial association rules are deduplicated to obtain chain attack rules.
[0012] According to the above technical means, the frequent events in multiple second time series are determined by the minimum support and the minimum confidence, so as to determine the initial association rules. And based on the first occurrence time of multiple historical alarm events, the initial association rules after sorting are deduplicated to obtain chain attack rules. By sorting the historical alarm events, it is ensured that the events are analyzed in the order of the actual occurrence time, which is helpful to analyze the timeline and evolution process of the attack events, and more accurately generate chain complex attack rules. And, through time sorting, the correlation between events can be identified and potential chain attack patterns can be discovered. In addition, the historical alarm events are sorted according to the first occurrence time, so as to quickly locate the first occurrence of the alarm event, thereby improving the efficiency of association analysis.
[0013] In another possible implementation, the chain attack rules include: multiple historical alarm events and component information of multiple historical alarm events; the method also includes: based on the component information of multiple historical alarm events, dividing the chain attack rules into chain attack rules within the components and chain attack rules between components.
[0014] According to the above technical means, the chain attack rules can be divided into chain attack rules within components and chain attack rules between components, so that security detection can be performed based on the corresponding chain attack rules for different components or events between components, thereby improving the efficiency of event detection.
[0015] In another possible implementation, based on a preset algorithm, multiple processed second event sequences are associated to obtain a chain attack rule, including: determining multiple attribute information of the multiple second event sequences; based on a preset algorithm, multiple second event sequences with the same attribute information are associated to obtain a chain attack rule.
[0016] According to the above technical means, by analyzing multiple attribute information of the second event sequence, multiple second event sequences with the same attribute information are associated, so that the obtained chain attack rules can identify more complex attack patterns.
[0017] In another possible implementation, the second event sequence includes an attack event, and the attribute information includes address information of the second event sequence; based on a preset algorithm, multiple second event sequences with the same attribute information are associated to obtain a chain attack rule, including: determining that the second event sequence includes multiple first historical alarm events of the same type of attack events; based on the address information of the multiple first historical alarm events, determining whether the attack events included in the multiple first historical alarm events belong to the same complex attack event; in the case that the attack events included in the multiple first historical alarm events belong to the same complex attack event, based on the preset algorithm, the multiple first historical alarm events are associated to generate a chain attack rule.
[0018] According to the above technical means, the same type of attack events can be identified and associated, and the address information can be used to determine whether they belong to the same complex attack event, so that the historical alarm events belonging to the same complex attack event can be more accurately associated to generate the corresponding chain attack rules. In addition, the address information can determine the source of the attack event, so as to accurately associate related attack events and avoid treating unrelated events as attack events.
[0019] In another possible implementation, the second event sequence includes abnormal information of vehicle parts, and the attribute information includes attribute information of vehicle parts; based on a preset algorithm, multiple second event sequences with the same attribute information are associated to obtain chain attack rules, including: based on the attribute information of vehicle parts, determining multiple second historical alarm events corresponding to different parts of the same vehicle in the second event sequence; based on a preset algorithm, multiple second historical alarm events are associated to generate chain attack rules.
[0020] According to the above technical means, by associating the warning events corresponding to different components of the same vehicle, a more comprehensive analysis of potential attack events of the vehicle can be conducted, so as to identify the potential connections between components and improve the accuracy of attack event monitoring, so as to timely discover and deal with component problems that affect vehicle safety.
[0021] In another possible implementation, the second event sequence includes an attack event; the attribute information includes attribute information of the attack event; based on a preset algorithm, multiple second event sequences with the same attribute information are associated to obtain a chain attack rule, including: based on the attribute information of the attack event, determining multiple third historical alarm events corresponding to the same attack event in the second event sequence; based on a preset algorithm, the multiple third historical alarm events are associated to generate a chain attack rule.
[0022] According to the above technical means, by analyzing the attribute information of the attack event, the historical alarm events of complex attack patterns can be more accurately identified, so as to quickly identify the association between the historical alarm events, thereby improving the accuracy of the chain attack rule in detecting attack events.
[0023] In another possible implementation, historical alarm events are associated to generate chain attack rules, including: determining multiple single attack rules based on historical alarm events; a single attack rule includes two attack events with an associated relationship; and according to a logical recursive relationship between multiple attack events, the multiple single attack rules are associated to obtain a chain attack rule.
[0024] According to the above technical means, by analyzing the logical relationship between multiple attack events and associating multiple single attack rules, a complex attack pattern consisting of multiple steps can be identified based on the chain attack rules, so as to accurately identify the actual attack behavior and predict the next attack event for pre-emptive prevention and processing.
[0025] In yet another possible implementation, the chain attack rule is a rule in an extensible markup language (XML) format.
[0026] According to the above technical means, XML format rules can clearly define the hierarchy and logical relationship of chain attack rules. In addition, compared with linear rules, XML format rules can achieve compressed storage of rules, reduce the space complexity of rule storage, and XML format rules are faster in parsing rules in rule matching algorithms, which improves the efficiency of association analysis.
[0027] According to the second aspect provided by the present application, a vehicle safety detection device is provided, which includes: an acquisition module and a determination module. The acquisition module is used to acquire the current alarm event of the target vehicle; the current alarm event is used to indicate that there is an abnormality in the event of the vehicle; the determination module is used to determine a first event matching the current alarm event and a second event associated with the first event based on a chain attack rule; the chain attack rule includes multiple attack events with an associated relationship; the determination module is also used to determine whether there is a safety hazard in the target vehicle based on the first event and the second event.
[0028] In a possible implementation, the device further includes: a generation module. The acquisition module is further used to acquire historical warning events; the historical warning events include multiple abnormal events related to the vehicle; and the generation module is used to associate the historical warning events to generate chain attack rules.
[0029] In another possible implementation, the generation module is specifically used to divide the historical alarm events into multiple first event sequences based on the time dimension; the historical alarm events included in the first event sequence are arranged in chronological order; for each first event sequence, the first event sequence is deduplicated to obtain multiple processed second event sequences; based on a preset algorithm, the multiple processed second event sequences are associated to obtain a chain attack rule.
[0030] In another possible implementation, a generation module is specifically used to determine multiple third event sequences from multiple second event sequences based on minimum support; the third event sequence is a second event sequence in the multiple second event sequences whose occurrence frequency is greater than a first preset threshold; the third event sequence includes: a preceding event and a succeeding event; based on the minimum confidence, the multiple third event sequences are associated to determine an initial association rule; the initial association rule is a third event sequence in which, when the preceding event of the third event sequence occurs, the frequency of occurrence of the succeeding event is greater than a second preset threshold in the multiple third event sequences; the initial association rule includes multiple historical alarm events and the first occurrence time of multiple historical alarm events; based on the first occurrence time of multiple historical alarm events, the multiple historical alarm events in the initial association rule are sorted; the sorted initial association rules are deduplicated to obtain chain attack rules.
[0031] In another possible implementation, the chain attack rule includes: a plurality of historical alarm events and component information of the plurality of historical alarm events; and the above device further includes: a division module. The division module is used to divide the chain attack rule into a chain attack rule within a component and a chain attack rule between components based on the component information of the plurality of historical alarm events.
[0032] In another possible implementation, the generation module is specifically configured to determine multiple attribute information of multiple second event sequences; based on a preset algorithm, multiple second event sequences with the same attribute information are associated to obtain a chain attack rule.
[0033] In another possible implementation, the second event sequence includes attack events, and the attribute information includes address information of the second event sequence; a generation module is specifically used to determine that the second event sequence includes multiple first historical alarm events of the same type of attack events; based on the address information of the multiple first historical alarm events, determine whether the attack events included in the multiple first historical alarm events belong to the same complex attack event; in the case that the attack events included in the multiple first historical alarm events belong to the same complex attack event, based on a preset algorithm, associate the multiple first historical alarm events to generate a chain attack rule.
[0034] In another possible implementation, the second event sequence includes abnormal information of vehicle parts, and the attribute information includes attribute information of the vehicle parts; a generation module is specifically used to determine, based on the attribute information of the vehicle parts, multiple second historical alarm events corresponding to different parts of the same vehicle in the second event sequence; based on a preset algorithm, multiple second historical alarm events are associated to generate chain attack rules.
[0035] In another possible implementation, the second event sequence includes an attack event; the attribute information includes attribute information of the attack event; a generation module is specifically used to determine, based on the attribute information of the attack event, multiple third historical alarm events corresponding to the same attack event in the second event sequence; based on a preset algorithm, the multiple third historical alarm events are associated to generate a chain attack rule.
[0036] In another possible implementation, the generation module is specifically used to determine multiple single attack rules based on historical alarm events; a single attack rule includes two attack events with associated relationships; based on the logical recursive relationship between the multiple attack events, the multiple single attack rules are associated to obtain a chain attack rule.
[0037] In yet another possible implementation, the chain attack rule is a rule in XML format.
[0038] According to the third aspect provided by the present application, a vehicle is provided, comprising: a processor; a memory for storing processor executable instructions; wherein the processor is configured to execute instructions to implement the method of the above-mentioned first aspect and any possible implementation manner thereof.
[0039] According to the fourth aspect provided by the present application, a computer-readable storage medium is provided. When the instructions in the computer-readable storage medium are executed by the processor of the vehicle, the vehicle is enabled to execute the method in the above-mentioned first aspect and any possible implementation method thereof.
[0040] According to the fifth aspect provided by the present application, a computer program product is provided, the computer program product comprising computer instructions, and when the computer instructions are executed on a vehicle, the vehicle executes the method of the above-mentioned first aspect and any possible implementation manner thereof.
[0041] Therefore, the above technical features of the present application have the following beneficial effects:
[0042] (1) Based on the chain attack rule, the attack event associated with the abnormal alarm event is detected, so as to determine whether the target vehicle is safe based on the first event and the second event, so as to timely discover and prevent safety risks. The chain attack rule can identify multiple complex attack events with correlations, thereby detecting complex attack events in the target vehicle, and by analyzing the correlation between events and determining the attack event, it can reduce false alarms and improve the accuracy of safety detection.
[0043] (2) By analyzing multiple historical warning events related to the vehicle, the chain attack rule can predict the potential security threats of the vehicle. In addition, the historical warning events are associated to generate the chain attack rule, which improves the accuracy of analyzing the current warning event of the vehicle based on the chain attack rule and enhances the recognition of complex attack events.
[0044] (3) By analyzing the time series of historical alarm events, the attack patterns and attack behaviors of historical alarm events can be more clearly identified, thereby improving the accuracy of chain attack rules in identifying attack events. In addition, deduplication and correlation analysis of the first event sequence reduces the interference of repeated events, which helps to more accurately analyze the correlation relationship between multiple first event sequences, making the chain attack rule more accurate.
[0045] (4) Through the minimum support and minimum confidence, the frequent events in multiple second time series are determined to determine the initial association rules. And based on the first occurrence time of multiple historical alarm events, the initial association rules after sorting are deduplicated to obtain chain attack rules. By sorting the historical alarm events, it is ensured that the events are analyzed in the order of the actual occurrence time, which helps to analyze the timeline and evolution process of the attack events and generate chain complex attack rules more accurately. In addition, through time sorting, the correlation between events can be identified and potential chain attack patterns can be discovered. In addition, the historical alarm events are sorted according to the first occurrence time so as to quickly locate the first alarm event, thereby improving the efficiency of association analysis.
[0046] (5) The chain attack rules can be divided into chain attack rules within components and chain attack rules between components, so that security detection can be performed based on the corresponding chain attack rules for events in different components or between components, thereby improving the efficiency of event detection.
[0047] (6) By analyzing multiple attribute information of the second event sequence, multiple second event sequences with the same attribute information are associated so that the obtained chain attack rules can identify more complex attack patterns.
[0048] (7) It can identify and associate attack events of the same type. Through address information, it can be determined whether they belong to the same complex attack event, so that historical alarm events belonging to the same complex attack event can be more accurately associated to generate corresponding chain attack rules. In addition, address information can determine the source of the attack event, so as to accurately associate related attack events and avoid treating unrelated events as attack events.
[0049] (8) By associating the warning events corresponding to different components of the same vehicle, a more comprehensive analysis of potential attack events of the vehicle can be conducted to identify the potential connections between components and improve the accuracy of attack event monitoring, so as to timely discover and deal with component problems that affect vehicle safety.
[0050] (9) By analyzing the attribute information of attack events, historical alarm events of complex attack patterns can be more accurately identified, so as to quickly identify the associations between historical alarm events, thereby improving the accuracy of chain attack rules in detecting attack events.
[0051] (10) By analyzing the logical relationship between multiple attack events and associating multiple single attack rules, complex attack patterns consisting of multiple steps can be identified based on chain attack rules, so as to accurately identify the actual attack behavior and predict the next attack event for preemptive prevention and processing.
[0052] (11) Rules in XML format can clearly define the hierarchy and logical relationship of chain attack rules. Moreover, compared with linear rules, rules in XML format can achieve compressed storage of rules, reduce the space complexity of rule storage, and are faster in parsing rules in the rule matching algorithm, thus improving the efficiency of association analysis.
[0053] It should be noted that the technical effects brought about by any implementation method in the second to fifth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here.
[0054] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application, and do not constitute improper limitations on the present application.
[0056] Figure 1 is an architecture diagram of a vehicle safety detection system according to an exemplary embodiment;
[0057] Figure 2 is a flow chart of a vehicle safety detection method according to an exemplary embodiment;
[0058] Figure 3 is a flow chart of another vehicle safety detection method according to an exemplary embodiment;
[0059] Figure 4 is a flow chart of another vehicle safety detection method according to an exemplary embodiment;
[0060] Figure 5 is a flow chart of another vehicle safety detection method according to an exemplary embodiment;
[0061] Figure 6 is a flow chart of another vehicle safety detection method according to an exemplary embodiment;
[0062] Figure 7 is a flow chart of another vehicle safety detection method according to an exemplary embodiment;
[0063] Figure 8 is a flow chart of another vehicle safety detection method according to an exemplary embodiment;
[0064] Fig. 9 is a flow chart of another vehicle safety detection method according to an exemplary embodiment;
[0065] Fig.10 is a flow chart of another vehicle safety detection method according to an exemplary embodiment;
[0066] Fig.11 is a complex attack detection logic diagram of a vehicle according to an exemplary embodiment;
[0067] Fig.12 A chain attack rule mining logic diagram is shown according to an exemplary embodiment;
[0068] Fig.13 is a flow chart of another vehicle safety detection method according to an exemplary embodiment;
[0069] Fig.14is a block diagram of a vehicle safety detection device according to an exemplary embodiment;
[0070] Fig.15 is a block diagram of a vehicle according to an exemplary embodiment. DETAILED DESCRIPTION
[0071] In order to enable ordinary persons in the art to better understand the technical solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0072] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0073] With the continuous upgrading and rapid development of smart cockpits and smart driving, the EE architecture of smart connected cars has evolved from a distributed architecture to a domain-centralized architecture and a centrally centralized architecture. The automotive software architecture has also transformed and upgraded towards SOA. The number of external interfaces of cars has increased, and the interaction between vehicles and roads and other external information has become more frequent, and the attack surface of cars has gradually expanded. Last year, there were more than a dozen large-scale data leaks related to automotive companies, involving a lot of data such as internal corporate information and user personal information. The "2023 Global Automotive Industry Cybersecurity Report" released by Upstream shows that telematics and application services, remote keyless entry systems, electronic control units, in-vehicle smart APIs, in-vehicle infotainment systems, in-vehicle mobile applications, and electric vehicle charging systems and facilities are the most commonly used carriers of cybersecurity attacks in 2022. In the past five years, security threats caused by long-distance cybersecurity attacks accounted for 70% of global automotive security threats, and global automotive companies have suffered losses of more than US$500 billion due to cybersecurity attacks. Intelligent connected vehicles face network and data security threats from the cloud, vehicle, mobile application, pipe, enterprise, supply chain, etc., which bring risks such as data leakage, service termination, and even personal safety.
[0074] Cyber attacks have become one of the most prominent security threats in today's information society. Due to the continuous escalation and complexity of attack methods, traditional security technologies can no longer guarantee the security of the network. Complex attacks threaten the security of the network. The characteristics of this attack are that it uses multiple technical means and is difficult to be identified by a single detection technology. In the related art, a network security event correlation analysis method and system with application number CN113179267A, the security events are correlated and aggregated by the session flow ID of the session-related information contained in the message format of the security event and audit data reported by the underlying component, the source IP address and the destination IP address of the relevant security event in three dimensions to form a security event trigger relationship topology map. This method is a general correlation analysis method, which is suitable for intuitive topological display of network security event correlation, and does not realize the research on complex attack detection. In a distributed network security event correlation analysis method based on a knowledge graph with application number CN108270785A, a security event correlation analysis method and system are designed and implemented based on the constructed network security knowledge graph, and chained complex attack detection is also not realized. Therefore, how to detect complex attacks in network attacks is a technical problem that needs to be solved urgently.
[0075] In response to the above problems, the present application proposes a vehicle safety detection method, in which, based on the chain attack rule, the attack event associated with the abnormal alarm event is detected, so as to determine whether the target vehicle is safe based on the first event and the second event, so as to timely discover and prevent safety risks. The chain attack rule can identify multiple complex attack events with correlation relationships, thereby detecting complex attack events in the target vehicle, and by analyzing the correlation between events and determining the attack event, it can reduce false alarms and improve the accuracy of safety detection.
[0076] For ease of understanding, the vehicle safety detection method provided in this application is specifically introduced below with reference to the accompanying drawings.
[0077] Figure 1 is an architecture diagram of a vehicle safety detection system according to an exemplary embodiment. Figure 1As shown, the vehicle safety detection system 100 includes: an intrusion detection system (IDS) module 101, a cloud-based vehicle security operation center (VSOC) platform 102, a correlation analysis module 103, and a vehicle unknown threat perception platform 104. Among them, the IDS module 101 includes: can_ids1011, Eth_ids1012, and host_ids1013. The IDS module 101 is connected to the cloud-based VSOC platform 102, the cloud-based VSOC platform 102 is connected to the correlation analysis module 103, and the correlation analysis module 103 is connected to the vehicle unknown threat perception platform 104.
[0078] In some embodiments, the IDS module 101 is used to monitor the abnormal conditions of the vehicle-mounted controller area network (CAN) network, monitor the abnormal conditions of the Ethernet flowing into the controller, and monitor the abnormal behavior of the controller operating system. Among them, can_ids1011 is used to monitor the abnormal conditions of the vehicle-mounted CAN network, Eth_ids1012 is used to monitor the abnormal conditions of the Ethernet flowing into the controller, and host_ids1013 is used to monitor the abnormal behavior of the controller operating system. The cloud VSOC platform 102 is used to display the alarm information and its distribution of the IDS module 101, and stores a large amount of real-time alarm information on the vehicle side to construct sample inputs for complex attack rules. The association analysis module 103 is used to read the alarm information of the cloud VSOC platform 102, mine the associated alarm information sequence, and realize the chain-like complex attack event identification. The vehicle unknown threat perception platform 104 is used to collect the analysis results of the association analysis module 103, and perform intuitive visualization and abnormal alarm.
[0079] It should be noted that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0080] Figure 2 is a flow chart of a vehicle safety detection method according to an exemplary embodiment. Figure 2 As shown, the vehicle safety detection method includes the following steps:
[0081] S201. Obtain the current alarm event of the target vehicle.
[0082] The current warning event is used to indicate that an event of the vehicle is abnormal.
[0083] As a possible implementation method, the detection device can obtain the current alarm event of the target vehicle in real time, so as to analyze the current alarm time and determine whether there is a safety hazard in the target vehicle.
[0084] S202: Determine, based on the chain attack rule, a first event matching the current alarm event and a second event associated with the first event.
[0085] The chain attack rule includes multiple attack events with correlation relationships.
[0086] As a possible implementation, after the detection device obtains the current warning event of the target vehicle, it can also determine the first event matching the current warning event and the second event associated with the first event based on the chain attack rule, so as to determine whether the target vehicle has a safety hazard based on the first event and the second event. The second event associated with the first event is a hidden attack event, and the chain attack rule is a rule in XML format.
[0087] Exemplarily, the detection device can match the current alarm event of the target vehicle with the chain attack rule to realize complex attack identification. When the current alarm event of the target vehicle matches the chain attack rule, it is difficult for the detection device to match the attack sequence represented by the chain attack rule. The chain attack rule defined in XML format has a flexible representation structure and can realize the description of a complete attack scenario. For example: for a chain attack rule with a logical representation of event A->event B->event C, the actual event sequence may not be event A, event B, event C in sequence, but may be a sequence of event A, event D, event F, event B, event C or event A, event D, event B, event E, event C. The event subsequence contains complex attack events A, event B, and event C, and the above event sequence can be correctly associated. Therefore, when the detection device matches the current alarm event with the chain attack rule, several typical matching modes such as cyclic matching and matching with unmatched chain attack rules can be adopted. In order to make the matching cycle quickly and transfer to other branches to continue matching, each time a match is performed, the detection device can save the intermediate results of the current match in the memory, and use the event queue (backlogs) waiting for matching to indicate the chain attack rules that are currently being matched but have not been matched. When the match times out or a chain attack rule is successfully matched, the detection device can release the backlogs from the memory.
[0088] It should be understood that the chain attack rules are rules in XML format. Compared with linear rule representation, more complex attack scenarios and attack elements can be represented through XML format, and accurate representation of complex attacks can be achieved. The nested representation of XML rules can easily represent the parallel and sequential relationships of events. On the one hand, XML and rule trees can be converted to each other. The parallel relationship in the complex attack steps can be converted into brother nodes in the rule tree. On the other hand, the sequential relationship between the antecedent and the consequent in the chain attack rules can be converted into the inheritance relationship between the parent node and the child node in the tree. Compared with the complex attack elements of the Internet, the elements of complex attacks on the vehicle side are more concise, and a single rule is consistent with the rules of the vehicle-side IDS. While ensuring the accurate representation of the attack, the components where the attack event occurred can be further located, providing data support for subsequent attack tracing and threat analysis in the cloud.
[0089] S203: Determine whether the target vehicle has a safety hazard based on the first event and the second event.
[0090] As a possible implementation method, the detection device determines the first event that matches the current alarm event and the second event associated with the first event based on the chain attack rule, and then determines whether the target vehicle has a safety hazard based on the first event and the second event.
[0091] Exemplarily, the detection device can determine the degree of impact of the first event and the second event on the target vehicle based on the attack modes of the first event and the second event, thereby determining whether the target vehicle has hidden dangers based on the degree of impact, and if the target vehicle has hidden dangers, issue an alarm message so that relevant management personnel can repair the problem in time.
[0092] In some embodiments, the detection device may also obtain historical alarm events so as to associate the historical alarm events and generate chain attack rules. Figure 3 As shown, the vehicle safety detection method provided by the present application also includes the following steps S301-S302:
[0093] S301. Obtain historical alarm events.
[0094] Among them, historical warning events include multiple abnormal events related to the vehicle.
[0095] As a possible implementation manner, the detection device may obtain historical warning events of multiple vehicles so as to generate a chain attack rule based on the historical warning times of the multiple vehicles.
[0096] Exemplarily, the detection device can take all historical warning events in the historical security event library of multiple vehicles as a set, and define each warning event as a Boolean variable to indicate whether this warning event occurs. The detection device can represent the historical warning events through a time window, so that multiple event sets within the time window are represented by an attack event sequence. Among them, the detection device obtains historical warning events mainly to provide sample input for the construction of chain attack rules, and converts the input into an attack event sequence.
[0097] S302: Correlate historical alarm events to generate chain attack rules.
[0098] As a possible implementation method, after the detection device obtains historical alarm events, it can associate the historical alarm events to generate chain attack rules.
[0099] Exemplarily, the detection device can associate historical alarm events and generate chain attack rules through the following steps: based on association analysis technology, read historical alarm events, and construct frequent pattern (FP) trees and frequent item sets through minimum support and minimum confidence theories to generate chain attack rules.
[0100] Specifically, the detection device constructs the FP tree based on the minimum support theory to obtain frequent item sets in historical alarm events. The FP-Growth algorithm is used to find frequent item sets without generating candidate sets, construct the FP tree, and improve the efficiency of chain attack rule mining. The data structure of the FP tree helps to efficiently mine frequent item sets, and can quickly find all attack event sequences containing a given item. Based on the reconstruction of events and recursive search, frequent item set mining is realized. Among them, the minimum support theory is to add an event to the frequent item set when the number of occurrences of an event exceeds a certain threshold.
[0101] Specifically, the generation of chain attack rules is mainly based on the minimum confidence theory, which realizes the acquisition of complex attack association rules in historical alarm events. The basis of chain attack rule mining is frequent item sets, which represent a group of items that often appear at the same time in a data set. The detection device discovers frequent event sets based on frequent item sets, expresses the causal relationship of attack events within the set, and realizes the relationship mining of possible causal relationships, dependencies, association laws, etc. between attack events within the set through chain attack rule mining. Among them, the minimum confidence theory is that when the probability of the occurrence of the previous event exceeds a certain threshold when the previous event occurs, the two events have a temporal correlation. Through multiple correlation mining, a longer chain event flow rule, namely the chain attack rule, can be obtained.
[0102] It should be understood that real-time IDS alarm information capture is the real-time extraction of raw data during the complex attack detection process. The detection device rule matching and discovery of chain attack rules are achieved by matching real-time IDS alarm information with complex attack event rules. When a complete complex attack event rule is matched, a chain complex attack event is discovered. The chain complex attack of association analysis mainly identifies two types of complex attacks in the real-time event stream, namely complex attacks within components and complex attack links between components. The attack process of a complex attack generally includes multiple attack steps, and each attack behavior can be regarded as an independent attack. A complex attack is a complete attack process composed of these attacks in an orderly combination. The chain attack rule realizes the formatted representation of the entire complex attack.
[0103] In other embodiments, the detection device may further divide the historical alarm events into multiple first event sequences based on the time dimension, thereby performing deduplication processing on each first event sequence to obtain multiple processed second event sequences, so as to associate the multiple processed second event sequences based on a preset algorithm to obtain a chain attack rule. Figure 4 As shown, the above step S302, associating historical alarm events to generate chain attack rules, can be specifically implemented as the following steps S401-S403:
[0104] S401. Based on a time dimension, divide historical alarm events into a plurality of first event sequences.
[0105] The historical alarm events included in the first event sequence are arranged in chronological order.
[0106] As a possible implementation manner, after the detection device obtains the historical alarm events, it can arrange the historical alarm events in chronological order based on the time dimension and divide them into multiple first event sequences.
[0107] Exemplarily, historical alarm events belong to one-dimensional data and have a sequential relationship in time. Therefore, the detection device can divide the historical alarm events into time windows to generate event sequences to obtain two-dimensional data, and then perform frequent item set mining on the historical alarm events in different time windows to obtain multiple first event sequences.
[0108] S402: For each first event sequence, perform deduplication processing on the first event sequence to obtain a plurality of processed second event sequences.
[0109] As a possible implementation method, the detection device divides the historical alarm events into multiple first event sequences based on the time dimension, and can also deduplicate the first event sequence for each first event sequence to obtain multiple processed second event sequences, so as to obtain chain attack rules based on the multiple processed second event sequences.
[0110] Exemplarily, for each first event sequence among multiple first event sequences, the detection device can extract repeated events within the time window of historical alarm events to obtain a processed event set, and then perform attribute dimensionality reduction on the fields contained therein to obtain multiple processed second event sequences.
[0111] S403: Based on a preset algorithm, the processed multiple second event sequences are associated to obtain a chain attack rule.
[0112] As a possible implementation manner, the detection device deduplicates each first event sequence, obtains multiple processed second event sequences, and can also associate the multiple processed second event sequences based on a preset algorithm to obtain a chain attack rule.
[0113] Exemplarily, after the detection device reduces the dimension of historical alarm events and divides them by time windows, it obtains a four-tuple input event sequence, and uses the Fp-growth algorithm based on the processed event sequence, minimum support min_support, minimum confidence min_conf and other parameters as input data to realize the mining of unknown security event pattern rules of alarm events. The detection device compresses all items in the database that meet the minimum support by using the tree structure FP-Tree to realize a compact, miniature database. While avoiding the input / output operation of scanning the database multiple times, the valuable database information for mining frequent items is refined, reducing the algorithm time overhead.
[0114] In some other embodiments, the detection device can also determine the frequent events in multiple second time series through the minimum support and minimum confidence, thereby determining the initial association rule, and sorting the first occurrence time of multiple historical alarm events, deduplicating the sorted initial association rules, and obtaining the chain attack rule. Figure 5 As shown, the above step S403, based on the preset algorithm, associates the processed multiple second event sequences to obtain the chain attack rule, which can be specifically implemented as the following steps S4031-S4034:
[0115] S4031. Determine multiple third event sequences from multiple second event sequences based on the minimum support.
[0116] The third event sequence is a second event sequence in which the occurrence frequency of the plurality of second event sequences is greater than a first preset threshold; the third event sequence includes: a preceding event and a succeeding event.
[0117] As a possible implementation manner, the detection device may determine multiple third event sequences from multiple second event sequences based on the minimum support.
[0118] Exemplarily, the detection device can select multiple second event sequences with a frequency greater than a first preset threshold from multiple second event sequences as multiple third event sequences based on the minimum support. The first preset threshold is set by relevant management personnel according to actual conditions, and the embodiments of the present application do not limit this.
[0119] S4032: Based on the minimum confidence level, multiple third event sequences are associated to determine an initial association rule.
[0120] Among them, the initial association rule is a third event sequence in which, among multiple third event sequences, when the preceding event of the third event sequence occurs, the frequency of occurrence of the succeeding event is greater than a second preset threshold, and the initial association rule includes multiple historical alarm events and the first occurrence time of multiple historical alarm events.
[0121] As a possible implementation manner, after the detection device determines multiple third event sequences from multiple second event sequences, it can also associate the multiple third event sequences based on the minimum confidence level to determine the initial association rule, so as to determine the chain attack rule based on the initial association rule.
[0122] Exemplarily, the detection device can determine, based on the minimum confidence level, for each third event sequence in a plurality of third event sequences, from the plurality of third event sequences, the frequency of occurrence of the subsequent event when the preceding event of the third event sequence occurs, thereby taking the plurality of third event sequences whose frequencies are greater than a second preset threshold as initial association rules.
[0123] S4033. Sort the multiple historical alarm events in the initial association rule based on the first occurrence time of the multiple historical alarm events.
[0124] As a possible implementation method, after the detection device determines the initial association rule, it can sort the multiple historical alarm events in the initial association rule based on the first occurrence time of the multiple historical alarm events, so as to deduplicate the multiple historical alarm events in the initial association rule and obtain the chain attack rule.
[0125] Exemplarily, the detection device may determine the first occurrence time of each historical alarm event in the initial association rule based on timestamp information of the multiple historical alarm events, so as to sort the multiple historical alarm events in the initial association rule according to the first occurrence time of each historical alarm event.
[0126] It should be understood that the mining algorithm of chain attack rules needs to generate chain attack rules through frequent item sets. The detection device can remove the timestamps in the event sequence so that events occurring at different time points can become frequent events. In order to solve the problem that the mining algorithm cannot determine the order of the antecedents and consequents in the rule set after removing the timestamps, it is necessary to confirm the order of the antecedents and consequents in the rules after rule mining. The detection device realizes the order confirmation of the rules based on the time when the antecedents and consequents first appear and the relative order in the attack event sequence.
[0127] S4034: De-duplicate the sorted initial association rules to obtain chain attack rules.
[0128] As a possible implementation, the detection device may sort the multiple historical alarm events in the initial association rule based on the first occurrence time of the multiple historical alarm events, and then perform deduplication processing on the sorted initial association rules to obtain the chain attack rules.
[0129] Exemplarily, the detection device may perform deduplication processing on the sorted initial association rules, remove repeated historical alarm event sequences and unclear historical alarm event sequences in the initial association rules, and thus obtain chain attack rules.
[0130] In some other embodiments, the chain attack rule includes: a plurality of historical alarm events and component information of the plurality of historical alarm events. The detection device may also divide the chain attack rule into a chain attack rule within a component and a chain attack rule between components based on the component information of the plurality of historical alarm events.
[0131] Exemplarily, after obtaining the chain attack rule, the detection device can also determine the component information of the historical alarm events in the chain attack rule, thereby dividing the chain attack rule into chain attack rules within the component and chain attack rules between components based on the component information.
[0132] In some other embodiments, the detection device may also determine multiple attribute information of multiple second event sequences, and based on a preset algorithm, associate multiple second event sequences with the same attribute information to obtain a chain attack rule. Figure 6 As shown, the above step S403, based on a preset algorithm, associates the processed multiple second event sequences to obtain a chain attack rule, which can be specifically implemented as the following steps S601-S602:
[0133] S601: Determine multiple attribute information of multiple second event sequences.
[0134] As a possible implementation manner, the detection device may respectively determine multiple attribute information of multiple second event sequences, so as to associate multiple second event sequences with the same attribute information based on the attribute information to obtain a chain attack rule.
[0135] Exemplarily, the detection device can extract the source IP, destination IP, component ID, attack event ID, and timestamp attributes of the second event sequence. The source IP and destination IP are used to determine whether multiple attacks of the same type belong to the same complex attack. The component ID is used to associate attack events between different components of the same vehicle model. The timestamp is used to determine whether multiple attack events are in the same time window, and is used to divide the minimum tuple of the association analysis input and organize it into two-dimensional data.
[0136] S602: Based on a preset algorithm, multiple second event sequences with the same attribute information are associated to obtain a chain attack rule.
[0137] As a possible implementation manner, after determining multiple attribute information of multiple second event sequences, the detection device may also associate multiple second event sequences with the same attribute information based on a preset algorithm to obtain a chain attack rule.
[0138] Exemplarily, the detection device can determine the second event sequence of the same type based on the address information of the second event sequence in the attribute information, i.e., the source IP and the destination IP, and associate them based on a preset algorithm to obtain a chain attack rule. The detection device can also determine the second event sequence corresponding to different parts of the same vehicle based on the attribute information including the attribute information of the vehicle parts, i.e., the part ID, and associate them based on a preset algorithm to obtain a chain attack rule. The detection device can also determine the second event sequence corresponding to the same attack event based on the attribute information of the attack event in the attribute information, i.e., the attack event ID, and associate them based on a preset algorithm to obtain a chain attack rule.
[0139] In some other embodiments, the second event sequence includes an attack event, and the attribute information includes address information of the second event sequence. The detection device can also determine, based on the address information of the second event sequence, a plurality of first historical alarm events including the same type of attack event in the second event sequence, so as to generate a chain attack rule based on the plurality of first historical alarm events. Figure 7 As shown, the above step S602, based on a preset algorithm, associates multiple second event sequences with the same attribute information to obtain a chain attack rule, which can be specifically implemented as the following steps S701-S703:
[0140] S701: Determine that a second event sequence includes a plurality of first historical alarm events of the same type of attack events.
[0141] As a possible implementation method, the detection device can determine that the second event sequence includes multiple first historical alarm events of the same type of attack events, so as to determine whether the attack events included in the multiple first historical alarm events belong to the same complex attack event based on the address information of the multiple first historical alarm events.
[0142] Exemplarily, the detection device may respectively determine the attack event type of each historical alarm event in the second event sequence, thereby determining a plurality of first historical alarm events in the second event sequence that include attack events of the same type.
[0143] S702: Determine, based on address information of multiple first historical alarm events, whether attack events included in the multiple first historical alarm events belong to the same complex attack event.
[0144] As a possible implementation method, after the detection device determines that the second event sequence includes multiple first historical alarm events of the same type of attack events, it can also determine whether the attack events included in the multiple first historical alarm events belong to the same complex attack event based on the address information of the multiple first historical alarm events, so as to generate a chain attack rule based on the same complex attack event.
[0145] S703: When the attack events included in the multiple first historical alarm events belong to the same complex attack event, the multiple first historical alarm events are associated based on a preset algorithm to generate a chain attack rule.
[0146] As a possible implementation, after the detection device determines whether the attack events included in the multiple first historical alarm events belong to the same complex attack event based on the address information of the multiple first historical alarm events, it can also associate the multiple first historical alarm events based on a preset algorithm to generate a chain attack rule when the attack events included in the multiple first historical alarm events belong to the same complex attack event. When the attack events included in the multiple first historical alarm events do not belong to the same complex attack event, the detection device can again determine that the historical alarm events include multiple first historical alarm events of another attack event of the same type, and determine whether the attack events included in the multiple first historical alarm events belong to the same complex attack event based on the address information of the multiple first historical alarm events, so that when the attack events included in the multiple first historical alarm events belong to the same complex attack event, the multiple first historical alarm events are associated based on a preset algorithm to generate a chain attack rule.
[0147] In some other embodiments, the second event sequence includes abnormal information of vehicle parts, and the attribute information includes attribute information of vehicle parts. The detection device can also determine multiple second historical alarm events corresponding to different parts of the same vehicle in the second event sequence based on the attribute information of the vehicle parts, and then associate the multiple second historical alarm events based on a preset algorithm to generate a chain attack rule. Figure 8 As shown, the above step S602, based on a preset algorithm, associates multiple second event sequences with the same attribute information to obtain a chain attack rule, which can be specifically implemented as the following steps S801-S802:
[0148] S801. Determine, based on attribute information of vehicle components, a plurality of second historical warning events corresponding to different components of the same vehicle in a second event sequence.
[0149] As a possible implementation manner, the detection device may determine, based on the attribute information of the vehicle components, a plurality of second historical warning events corresponding to different components of the same vehicle in the second event sequence.
[0150] S802: Based on a preset algorithm, multiple second historical alarm events are associated to generate a chain attack rule.
[0151] As a possible implementation method, the detection device can determine multiple second historical alarm events corresponding to different parts of the same vehicle in the historical alarm events based on the attribute information of the vehicle parts, and can also associate the multiple second historical alarm events based on a preset algorithm to generate a chain attack rule.
[0152] For example, the output of chain attack rules is generally expressed as various patterns of rules such as 1:1, 1:n, and m:n. This representation method has redundant rules. Among them, the 1:1 pattern rule can more conveniently determine the order of precedence, and the longer and more complex regulations based on the combination of small 1:1 rules contain more information than the 1:n compound rules. Therefore, when generating chain attack rules, the detection device only selects 1:1 rules, which can reduce the false alarm rate of rule matching and improve the accuracy of complex attack identification.
[0153] It should be understood that based on the preset algorithm, multiple second historical alarm events are associated, and the generated chain attack rules are original rules, that is, the rules inside the parts. Because the original rules are redundant, the space complexity of rule storage is increased, unnecessary steps of rule matching complex attack algorithms are added, and the time complexity is increased. Therefore, the original rules cannot be directly applied to the identification of complex attacks. The detection device needs to process the original rules to obtain efficient chain attack rules that can be applied to event matching. The detection device can filter out 1:1 rules from the original rules, determine the order of 1:1 rules, remove rules with incorrect order of antecedents and consequents, and connect based on single-step rules. First, connect by part name, and combine single rules with the same part name into longer composite chain rules to realize composite rules inside the parts. The detection device can also combine composite rules with high IP similarity into larger composite rules to realize association rules between parts.
[0154] In some other embodiments, the second event sequence includes an attack event; and the attribute information includes attribute information of the attack event. The detection device may also determine, based on the attribute information of the attack event, a plurality of third historical alarm events corresponding to the same attack event in the second event sequence, thereby associating the plurality of third historical alarm events based on a preset algorithm to generate a chain attack rule. Fig. 9 As shown, the above step S602, based on a preset algorithm, associates multiple second event sequences with the same attribute information to obtain a chain attack rule, which can be specifically implemented as the following steps S901-S902:
[0155] S901: Determine, based on attribute information of an attack event, a plurality of third historical alarm events corresponding to the same attack event in a second event sequence.
[0156] As a possible implementation manner, the detection device may determine a plurality of third historical alarm events corresponding to the same attack event in the second event sequence based on the attribute information of the attack event.
[0157] S902: Based on a preset algorithm, multiple third historical alarm events are associated to generate a chain attack rule.
[0158] As a possible implementation method, after the detection device determines multiple third historical alarm events corresponding to the same attack event in the second event sequence based on the attribute information of the attack event, it can associate the multiple third historical alarm events based on a preset algorithm to generate a chain attack rule.
[0159] In some other embodiments, the detection device may also determine multiple single attack rules based on historical alarm events, and then associate multiple single attack rules based on the logical recursive relationship between multiple attack events to obtain chain attack rules. Fig.10 As shown, the above step S302, associating historical alarm events to generate chain attack rules, can be specifically implemented as the following steps S1001-S1002:
[0160] S1001. Determine multiple single attack rules based on historical alarm events.
[0161] Among them, a single attack rule includes two attack events with a correlation relationship.
[0162] As a possible implementation manner, the detection device may determine a plurality of single attack rules according to historical alarm events, so as to associate and compound the plurality of single attack rules to obtain a chain attack rule.
[0163] Exemplarily, the detection device may determine multiple single attack rules based on historical alarm events, including redundant rules, which cannot be directly applied to the association analysis of chain attack rules. Therefore, the detection device may make judgments based on the order of multiple single attack rules, and there are inclusion relationships such as {event A->{event B, event C}} and {event A->event B}&{event B->event C} between multiple single attack rules, where {event A->{event B, event C}} is represented as a composite rule, and {event A->event B}&{event B->event C} are represented as two single-step rules.
[0164] S1002: According to the logical recursive relationship between multiple attack events, multiple single attack rules are associated to obtain a chain attack rule.
[0165] As a possible implementation, after the detection device determines multiple single attack rules based on historical alarm events, it can associate the multiple single attack rules according to the logical recursive relationship between the multiple attack events to obtain a chain attack rule.
[0166] Exemplarily, the detection device can associate multiple single attack rules according to the logical recursive relationship between multiple attack events. For example, the rule {event A->{event B, event C}} cannot express the relationship between event B and event C, but can only determine that event A is sent before event B and event C. The two single-step rules can be connected into a composite rule through a logical recursive relationship, namely, a chain attack rule: {event A->event B->event C}. Compared with {event A->{event B, event C}}, the composite rule contains less information than the two single-step rules, which can further narrow the judgment scope of the attack mode and reduce the misjudgment rate of complex attacks. Therefore, it is necessary to deduplicate the original rules to reduce the impact of redundant rules.
[0167] Fig.11is a complex attack detection logic diagram of a vehicle according to an exemplary embodiment. Fig.11 As shown, the complex attack detection of vehicles mainly includes: capturing historical events, constructing FP trees, generating association rules (i.e., chain attack rules), obtaining real-time IDS alarm information for rule matching, and discovering chain complex attacks.
[0168] Fig.12 is a chain attack rule mining logic diagram according to an exemplary embodiment. Fig.12 As shown in the figure, the chain attack rules mainly include four parts: historical event preprocessing, rule mining, rule screening, and rule combination. Among them, the historical event preprocessing includes: dividing the original security event set (i.e. the above-mentioned historical alarm events) into time windows to obtain event sequences, removing duplication and reducing the dimension of the event sequences, and extracting the minimum field of the event sequence. The minimum field extraction attributes include: source IP, destination IP, component ID, attack event ID, and timestamp. The event sequence processed in the historical event preprocessing is input into the Fp-growth algorithm of rule mining, and frequent item sets are mined based on the minimum support min_supprot parameter and the minimum confidence min_conf parameter to obtain unknown security event pattern rules (i.e. the above-mentioned initial association rules). The unknown security event pattern rules of rule mining judge the rule order in rule screening (i.e. the above-mentioned initial association rules are sorted based on the first occurrence of the historical alarm events in the initial association rules), and the rules are deduplicated to obtain chain attack rules. The rules inside the components are obtained based on the component information of the historical alarm events in the chain attack rules, and the rules between components are obtained based on the rules inside the components.
[0169] Fig.13 is a flowchart of another vehicle safety detection method according to an exemplary embodiment, in which the chain attack rules are represented by an FP tree in XML format, including multiple root node rules and leaf node rules. Backlogs represent the rules that are currently being matched but have not been matched in the chain attack rules. Fig.13As shown, the process includes the following steps: obtaining an event, determining whether there are Backlogs in the system, and if there are no Backlogs in the system, matching the event with all the root nodes of the rule tree directives, and determining whether the event matches all the root nodes of the rule tree directives successfully. If the event does not match all the root nodes of the rule tree directives successfully, the process ends. If the event matches all the root nodes of the rule tree directives successfully, determine whether there are leaf nodes. If there are Backlogs in the system, matching the event with the root node of Backlogs, and determining whether the event matches the root node of Backlogs successfully. If the event does not match the root node of Backlogs successfully, the process ends. If the event matches the root node of Backlogs successfully, determine whether there are leaf nodes. If there are leaf nodes, it means that the event matches successfully, the corresponding rule number is reported, and the leaf node is deleted from Backlogs, and the process ends. If there are no leaf nodes, all subtrees of the node are put into the system Backlogs, and the original rule number is recorded, and the process ends.
[0170] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, the vehicle safety detection device or the vehicle includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0171] The embodiments of the present application can exemplarily divide the functional modules of the vehicle safety detection device or the vehicle according to the above method. For example, the vehicle safety detection device or the vehicle may include various functional modules corresponding to the various functional divisions, or two or more functions may be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0172] Fig.14 is a block diagram of a vehicle safety detection device according to an exemplary embodiment. Fig.14The vehicle safety detection device 1400 includes: an acquisition module 1401 and a determination module 1402. The acquisition module 1401 is used to acquire the current alarm event of the target vehicle; the current alarm event is used to indicate that the event of the vehicle is abnormal; the determination module 1402 is used to determine the first event matching the current alarm event and the second event associated with the first event based on the chain attack rule; the chain attack rule includes multiple attack events with associated relationships; the determination module 1402 is also used to determine whether the target vehicle has a safety hazard based on the first event and the second event.
[0173] In a possible implementation, the device further includes: a generating module 1403. The acquiring module 1401 is further used to acquire historical warning events; the historical warning events include multiple abnormal events related to the vehicle; the generating module 1403 is used to associate the historical warning events and generate chain attack rules.
[0174] In another possible implementation, the generation module 1403 is specifically used to divide the historical alarm events into multiple first event sequences based on the time dimension; the historical alarm events included in the first event sequence are arranged in chronological order; for each first event sequence, the first event sequence is deduplicated to obtain multiple processed second event sequences; based on a preset algorithm, the multiple processed second event sequences are associated to obtain a chain attack rule.
[0175] In another possible implementation, the generation module 1403 is specifically used to determine multiple third event sequences from multiple second event sequences based on the minimum support; the third event sequence is a second event sequence in the multiple second event sequences whose occurrence frequency is greater than a first preset threshold; the third event sequence includes: a preceding event and a succeeding event; based on the minimum confidence, the multiple third event sequences are associated to determine an initial association rule; the initial association rule is a third event sequence in which, when the preceding event of the third event sequence occurs, the frequency of occurrence of the succeeding event is greater than the second preset threshold in the multiple third event sequences; the initial association rule includes multiple historical alarm events and the first occurrence time of multiple historical alarm events; based on the first occurrence time of multiple historical alarm events, the multiple historical alarm events in the initial association rule are sorted; the sorted initial association rules are deduplicated to obtain chain attack rules.
[0176] In another possible implementation, the chain attack rule includes: multiple historical alarm events and component information of multiple historical alarm events; the above device also includes: a division module 1404. The division module 1404 is used to divide the chain attack rule into a chain attack rule within a component and a chain attack rule between components based on the component information of the multiple historical alarm events.
[0177] In another possible implementation, the generation module 1403 is specifically configured to determine multiple attribute information of multiple second event sequences; based on a preset algorithm, associate multiple second event sequences with the same attribute information to obtain a chain attack rule.
[0178] In another possible implementation, the second event sequence includes an attack event, and the attribute information includes address information of the second event sequence; a generation module 1403 is specifically used to determine that the second event sequence includes multiple first historical alarm events of the same type of attack events; based on the address information of the multiple first historical alarm events, determine whether the attack events included in the multiple first historical alarm events belong to the same complex attack event; in the case that the attack events included in the multiple first historical alarm events belong to the same complex attack event, based on a preset algorithm, associate the multiple first historical alarm events to generate a chain attack rule.
[0179] In another possible implementation, the second event sequence includes abnormal information of vehicle parts, and the attribute information includes attribute information of the vehicle parts; the generation module 1403 is specifically used to determine, based on the attribute information of the vehicle parts, multiple second historical alarm events corresponding to different parts of the same vehicle in the second event sequence; based on a preset algorithm, the multiple second historical alarm events are associated to generate a chain attack rule.
[0180] In another possible implementation, the second event sequence includes an attack event; the attribute information includes attribute information of the attack event; the generation module 1403 is specifically used to determine, based on the attribute information of the attack event, multiple third historical alarm events corresponding to the same attack event in the second event sequence; based on a preset algorithm, the multiple third historical alarm events are associated to generate a chain attack rule.
[0181] In another possible implementation, the generation module 1403 is specifically used to determine multiple single attack rules based on historical alarm events; a single attack rule includes two attack events with associated relationships; based on the logical recursive relationship between the multiple attack events, the multiple single attack rules are associated to obtain a chain attack rule.
[0182] In yet another possible implementation, the chain attack rule is a rule in XML format.
[0183] According to the above technical means, based on the chain attack rule, the attack event associated with the abnormal warning event is detected, so as to determine whether the target vehicle is safe based on the first event and the second event, so as to timely discover and prevent safety risks. The chain attack rule can identify multiple complex attack events with correlations, thereby detecting complex attack events in the target vehicle, and by analyzing the correlation between events and determining the attack event, it can reduce false alarms and improve the accuracy of safety detection.
[0184] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0185] Fig.15 FIG. 1 is a block diagram of a vehicle according to an exemplary embodiment. Fig.15 As shown, vehicle 1500 includes, but is not limited to, a processor 1501 and a memory 1502 .
[0186] The memory 1502 is used to store executable instructions of the processor 1501. It can be understood that the processor 1501 is configured to execute instructions to implement the vehicle safety detection method in the above embodiment.
[0187] It should be noted that those skilled in the art can understand that Fig.15 The vehicle structure shown in the figure does not constitute a limitation on the vehicle, and the vehicle may include Fig.15 More or fewer components may be shown, or certain components may be combined, or the components may be arranged differently.
[0188] The processor 1501 is the control center of the vehicle, which uses various interfaces and lines to connect various parts of the entire vehicle, and executes various functions of the vehicle and processes data by running or executing software programs and / or modules stored in the memory 1502, and calling data stored in the memory 1502, so as to monitor the vehicle as a whole. The processor 1501 may include one or more processing units. Optionally, the processor 1501 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1501.
[0189] The memory 1502 may be used to store software programs and various data. The memory 1502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one functional module (such as a determination unit, a processing unit, etc.), etc. In addition, the memory 1502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0190] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 1502 including instructions, and the above instructions can be executed by the processor 1501 of the vehicle 1500 to implement the vehicle safety detection method in the above embodiment.
[0191] In actual implementation, Fig.14 The functions of the acquisition module 1401, the determination module 1402, the generation module 1403 and the division module 1404 in the embodiment can be realized by Fig.15 The processor 1501 in the embodiment calls the computer program stored in the memory 1502 to implement. The specific execution process can refer to the description of the method part in the above embodiment, which will not be repeated here.
[0192] Optionally, the computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0193] In an exemplary embodiment, the embodiment of the present application also provides a computer program product including one or more instructions, and the one or more instructions can be executed by the processor 1501 of the vehicle to complete the vehicle safety detection method in the above embodiment.
[0194] It should be noted that when the instructions in the above-mentioned computer-readable storage medium or one or more instructions in the computer program product are executed by the vehicle's processor, the various processes of the above-mentioned method embodiment are implemented and the same technical effect as the above-mentioned method can be achieved. To avoid repetition, they will not be repeated here.
[0195] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0196] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0197] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0198] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0199] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the full classification part or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute the full classification part or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, ROM, RAM, disk or CD and other media that can store program code.
[0200] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A vehicle safety detection method, characterized in that: include: Get the current warning event of the target vehicle; The current warning event is used to indicate that an event of the vehicle is abnormal; Based on a chain attack rule, determining a first event matching the current alarm event and a second event associated with the first event; the chain attack rule includes a plurality of attack events having an associated relationship; According to the first event and the second event, it is determined whether the target vehicle has a safety hazard.
2. The method according to claim 1, characterized in that The method further comprises: Acquire historical warning events; the historical warning events include multiple abnormal events related to the vehicle; The historical alarm events are associated to generate the chain attack rule.
3. The method according to claim 2, characterized in that The step of associating the historical alarm events to generate the chain attack rule includes: Based on the time dimension, the historical alarm events are divided into a plurality of first event sequences; the historical alarm events included in the first event sequences are arranged in chronological order; For each first event sequence, performing deduplication processing on the first event sequence to obtain a plurality of processed second event sequences; Based on a preset algorithm, the processed multiple second event sequences are associated to obtain the chain attack rule.
4. The method according to claim 3, characterized in that The step of associating the processed multiple second event sequences based on a preset algorithm to obtain the chain attack rule includes: Based on the minimum support, multiple third event sequences are determined from the multiple second event sequences; the third event sequence is a second event sequence whose occurrence frequency is greater than a first preset threshold in the multiple second event sequences; the third event sequence includes: a preceding event and a succeeding event; Based on the minimum confidence, the multiple third event sequences are associated to determine an initial association rule; the initial association rule is a third event sequence in which, when the preceding event of the third event sequence occurs, the frequency of occurrence of the succeeding event is greater than a second preset threshold value in the multiple third event sequences; the initial association rule includes multiple historical alarm events and the first occurrence time of the multiple historical alarm events; Based on the first occurrence time of the multiple historical alarm events, the multiple historical alarm events in the initial association rule are sorted; The sorted initial association rules are deduplicated to obtain the chain attack rules.
5. The method according to claim 4, characterized in that The chain attack rule includes: a plurality of historical alarm events and component information of the plurality of historical alarm events; the method further includes: Based on the component information of the multiple historical alarm events, the chain attack rules are divided into chain attack rules within components and chain attack rules between components.
6. The method according to claim 3, characterized in that The step of associating the processed multiple second event sequences based on a preset algorithm to obtain the chain attack rule includes: determining a plurality of attribute information of the plurality of second event sequences; Based on the preset algorithm, the plurality of second event sequences having the same attribute information are associated to obtain the chain attack rule.
7. The method according to claim 6, characterized in that The second event sequence includes an attack event, and the attribute information includes address information of the second event sequence; and the step of associating the plurality of second event sequences having the same attribute information based on the preset algorithm to obtain the chain attack rule includes: Determining that the second event sequence includes a plurality of first historical alarm events of the same type of attack events; Determining, according to the address information of the multiple first historical alarm events, whether the attack events included in the multiple first historical alarm events belong to the same complex attack event; In the case that the attack events included in the multiple first historical alarm events belong to the same complex attack event, the multiple first historical alarm events are associated based on the preset algorithm to generate the chain attack rule.
8. The method according to claim 6, characterized in that The second event sequence includes abnormal information of components of the vehicle, and the attribute information includes attribute information of components of the vehicle; The step of associating the plurality of second event sequences having the same attribute information based on the preset algorithm to obtain the chain attack rule includes: Determining, based on the attribute information of the vehicle components, a plurality of second historical alarm events corresponding to different components of the same vehicle in the second event sequence; Based on the preset algorithm, the multiple second historical alarm events are associated to generate the chain attack rule.
9. The method according to claim 6, characterized in that The second event sequence includes an attack event; the attribute information includes attribute information of the attack event; and the plurality of second event sequences having the same attribute information are associated based on the preset algorithm to obtain the chain attack rule, including: Determining, based on the attribute information of the attack event, a plurality of third historical alarm events corresponding to the same attack event in the second event sequence; Based on the preset algorithm, the multiple third historical alarm events are associated to generate the chain attack rule.
10. The method according to claim 2, characterized in that The step of associating the multiple historical alarm events to generate the chain attack rule includes: Determine multiple single attack rules according to the historical alarm events; a single attack rule includes two attack events with associated relationships; According to the logical recursive relationship between the multiple attack events, the multiple single attack rules are associated to obtain the chain attack rule.
11. The method according to any one of claims 1 to 10, characterized in that: The chain attack rules are rules in XML format.
12. A vehicle safety detection device, characterized in that: The device comprises: an acquisition module and a determination module; The acquisition module is used to acquire the current alarm event of the target vehicle; the current alarm event is used to indicate that there is an abnormality in the event of the vehicle; The determination module is used to determine a first event matching the current alarm event and a second event associated with the first event based on a chain attack rule; the chain attack rule includes a plurality of attack events having an associated relationship; The determination module is further used to determine whether the target vehicle has a safety hazard based on the first event and the second event.
13. A vehicle, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: When the computer-executable instructions stored in the computer-readable storage medium are executed by a processor of a vehicle, the vehicle is capable of performing the method of any one of claims 1 to 11.
