Multi-system collaborative security testing methods for open-source operating system environments
By training anomaly and threat prediction models in an open source operating system environment, real-time monitoring and early warning of power systems are achieved, solving the problem of low efficiency in identifying and diagnosing anomalies and threats in traditional technologies, and reducing potential risks of the power system.
Patent Information
- Application Number
- CN202410855653.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-06-28
AI Technical Summary
Traditional operating systems have difficulty in quickly identifying and diagnosing specific types of anomalies and threats in power systems, resulting in inefficiencies and potential risks that delay the implementation of preventive measures.
A multi-system collaborative security testing method for open source operating system environments is proposed. By collecting abnormal and threat sample characteristic data in advance, training a prediction model to determine abnormal risks and threat types, and predicting abnormal time nodes, it achieves real-time monitoring and control of the power system. Early warning.
By identifying and predicting abnormal threats in advance, the potential risks and losses of the power system are reduced, and the accuracy and efficiency of security decision-making are improved.
Smart Images

Figure CN118410485B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of security testing, and in particular to a multi-system collaborative security testing method for an open source operating system environment. Background Art
[0002] In recent years, with the continuous expansion of the scale of the national grid and the continuous growth of electricity demand, the scale and complexity of the national grid are also increasing. Traditional operating systems are facing increasing challenges in handling large-scale concurrent tasks, data management, and security protection. More and more research institutions and companies have begun to pay attention to the integration of operating systems and the power industry, and conduct related research and development. These studies mainly focus on the application of operating systems in power equipment, the interaction between power equipment and operating systems, and the security and stability of power equipment operating systems.
[0003] However, the research work on these power systems still faces many challenges. The traditional operation and maintenance model mainly relies on manual experience and passive response, which has the following shortcomings:
[0004] Existing technologies have difficulty in timely and accurate identification and diagnosis of specific types of anomalies and threats. When anomalies or security incidents occur, a lot of manual analysis and judgment work is often required, which is inefficient and prone to subjective cognitive bias. The inability to quickly identify the root cause of the problem delays the implementation of targeted repair and protection strategies.
[0005] In addition, existing technologies are also deficient in analyzing abnormal time points after an event occurs. The lack of accurate prediction of abnormal time nodes makes it impossible to efficiently determine the time window for the occurrence of abnormalities or threats, resulting in low efficiency in troubleshooting and system maintenance, and difficulty in timely controlling the spread of abnormalities and the scope of impact.
[0006] A Chinese patent with publication number CN117667669A discloses a functional testing method, system, medium and equipment based on a mutation genetic algorithm, which relates to the technical field of functional testing of aerospace embedded operating systems. The method can help testers to intuitively and quickly verify the main functional modules of the Linux kernel, fully exposing the potential risk points and bugs of the Linux kernel module. However, the method mainly identifies internal bugs rather than external attacks, and it is difficult to predict the time node of the threat outbreak.
[0007] To this end, the present invention proposes a multi-system collaborative security testing method for an open source operating system environment. Summary of the invention
[0008] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a multi-system collaborative security testing method for an open source operating system environment, which facilitates taking necessary preventive measures and response preparations in advance, thereby reducing the potential risks and losses caused by anomalies.
[0009] To achieve the above object, the present invention proposes a multi-system collaborative security testing method for an open source operating system environment, comprising the following steps:
[0010] Step 1: Collect abnormal sample feature data and abnormal sample label data in advance;
[0011] Step 2: Collect threat sample feature data and threat sample label data in advance;
[0012] Step 3: For each threat type, collect time series sample feature data and time series sample label data in advance;
[0013] Step 4: Take the abnormal sample feature data as input and the abnormal sample label data as output to train the abnormal prediction model; take the threat sample feature data as input and the threat sample label data as output to train the threat type prediction model; for each threat type, take the time series sample feature data as input and the time series sample feature data as output to train the time series prediction model corresponding to the threat type;
[0014] Step 5: Collect the test structured features of the power system to be tested, and determine whether the power system to be tested has abnormal risks based on the test structured features and the abnormal prediction model. If there is an abnormal risk, go to step 6; otherwise, do nothing;
[0015] Step 6: Based on the test structured features and threat type prediction model, determine the actual threat type corresponding to the abnormal risk;
[0016] Step 7: Collect the time series characteristic data of the power system to be tested, and obtain the predicted abnormal time node based on the time series characteristic data and the time series prediction model of the actual threat type;
[0017] The pre-collection of abnormal sample feature data and abnormal sample label data includes the following steps:
[0018] Step 11: Deploy a general data acquisition agent in each open source operating system environment of the test power equipment system;
[0019] Step 12: Each data collection agent collects the original operation data of each operation time node from the operation background of each test power equipment system;
[0020] Step 13: Perform semantic analysis on each piece of collected raw operation data to extract abnormal structured features;
[0021] Step 14: manually label each piece of original operation data with an abnormal label; the abnormal label is one of 0 and 1. When the original operation data shows that the system operation is abnormal, the abnormal label is 1, otherwise, the abnormal label is 0; the abnormal structured features of all original operation data constitute abnormal sample feature data; the abnormal labels of all original operation data constitute abnormal sample label data;
[0022] The pre-collection of threat sample feature data and threat sample label data includes the following steps:
[0023] Step 21: The original operation data with the abnormal label of 1 is used as the abnormal original operation data, and known attack threat event records are collected from the threat channel of the abnormal original operation data;
[0024] Step 22: Analyze the threat type of the attack threat event of the abnormal original operation data through the attack threat event record, and mark each abnormal original operation data with a threat type label; the threat type label is one of 1, 2, 3, ..., N, N is the total number of threat types, and each threat type label corresponds to one threat type;
[0025] Step 23: The abnormal structured features of all abnormal original operation data constitute threat sample feature data, and the threat type labels of all abnormal original operation data constitute threat sample label data;
[0026] The method of pre-collecting time series sample feature data and time series sample label data is:
[0027] The threat type is numbered as i. For the i-th threat type, perform the following steps:
[0028] Step 31: Determine a threat indicator set and a target indicator according to the i-th threat type;
[0029] Step 32: In the operation time node corresponding to the abnormal original operation data, various threat indicators and target indicators of the corresponding test power equipment system are collected, and in the operation time node, the time series of various threat indicators constitute a threat indicator time series in the operation time node, and the time series of target indicators constitute a target indicator time series in the operation time node;
[0030] Step 33: Use the sliding window technology to construct the input sequence and label sequence for the threat indicator time series and the target indicator time series;
[0031] Step 34: The input sequences of all abnormal original operation data are combined into time series sample feature data of the i-th threat type, and the label sequences of all abnormal original operation data are combined into time series sample label data of the i-th threat type;
[0032] The method of training the abnormal prediction model is:
[0033] Each group of abnormal structured features of the abnormal sample feature data is used as the input of the abnormal prediction model, the abnormal prediction model uses the predicted value of the abnormal label of the original running data corresponding to the abnormal structured feature as the output, uses the abnormal label corresponding to the original running data as the prediction target, uses the difference between the predicted value of the abnormal label and the abnormal label as the first prediction error, and uses minimizing the mean of the sum of squares of the first prediction errors of each original running data as the training target; the abnormal prediction model is trained until the mean of the sum of squares of the first prediction errors reaches convergence, and the training is stopped; the abnormal prediction model is a classification model;
[0034] The method of training the threat type prediction model is:
[0035] Each group of abnormal structured features of threat sample feature data is used as input of a threat type prediction model, the threat type prediction model uses the predicted value of the threat type label of the abnormal original operation data corresponding to the abnormal structured feature as output, uses the threat type label corresponding to the abnormal original operation data as a prediction target, uses the difference between the predicted value of the threat type label and the threat type label as a second prediction error, and uses minimizing the mean of the sum of squares of the second prediction errors of each abnormal original operation data as a training target; the threat type prediction model is trained until the mean of the sum of squares of the second prediction errors reaches convergence, and the training is stopped; the threat type prediction model is a classification model;
[0036] For each threat type, the time series sample feature data is used as input and the time series sample feature data is used as output, and the method of training the time series prediction model corresponding to the threat type is as follows:
[0037] For the i-th threat type:
[0038] Each group of input sequences in the time series sample feature data of the i-th threat type is used as the input of the time series prediction model, the time series prediction model uses the predicted sequence of the label sequence corresponding to the input sequence as the output, uses the label sequence corresponding to the input sequence as the prediction target, uses the Euclidean distance between the predicted sequence of the label sequence and the label sequence as the third prediction error, and uses minimizing the mean of the third prediction errors of each group of input sequences as the training target; the time series prediction model is trained until the mean of the third prediction error reaches convergence, and the training is stopped;
[0039] The method of collecting the test structured features of the power system to be tested and judging whether the power system to be tested has abnormal risks based on the test structured features and the abnormality prediction model is as follows:
[0040] For the power system to be tested, corresponding original operation data are collected at each operation time node as a set of test operation data;
[0041] Perform semantic analysis on the test run data and extract abnormal structured features as test structured features;
[0042] Input the test structured features into the anomaly prediction model, obtain the predicted value of the anomaly label output by the anomaly prediction model, and use the predicted value of the anomaly label as the test anomaly state value;
[0043] If the test abnormal state value is 1, it is judged that the power system to be tested has abnormal risk;
[0044] The method of determining the threat type corresponding to the abnormal risk as the actual threat type based on the test structured features and the threat type prediction model is as follows:
[0045] The test structured features are used as input of the threat type prediction model to obtain the predicted value of the threat type label output by the threat type prediction model, and the threat type corresponding to the predicted value of the threat type label is used as the actual threat type;
[0046] The method of collecting the time series characteristic data of the power system to be tested and obtaining the predicted abnormal time node based on the time series characteristic data and the time series prediction model of the actual threat type is as follows:
[0047] In the background of the power system to be tested, the time series of various threat indicators corresponding to the actual threat type in the current operation time node are collected, and the time series of various threat indicators constitute the test threat indicator time series;
[0048] Use the sliding window technology to construct a test input sequence with the same length as the input sequence from the test threat indicator time series;
[0049] Input the test input sequence into the time series prediction model to obtain the predicted sequence of the label sequence output by the time series prediction model;
[0050] For the prediction sequence of the label sequence, based on the preset warning logic corresponding to the actual threat type, the predicted abnormal time node is obtained;
[0051] The early warning logic refers to finding the time node when the power system to be tested is judged to be abnormal from the prediction sequence of the tag sequence.
[0052] The present invention provides an electronic device, comprising: a processor and a memory, wherein the memory stores a computer program that can be called by the processor;
[0053] The processor executes the above-mentioned multi-system collaborative security testing method for an open source operating system environment by calling the computer program stored in the memory.
[0054] The present invention provides a computer-readable storage medium having a rewritable computer program stored thereon;
[0055] When the computer program is executed on a computer device, the computer device is enabled to execute the above-mentioned multi-system collaborative security testing method for an open source operating system environment.
[0056] Compared with the prior art, the present invention has the following beneficial effects:
[0057] The present invention collects abnormal sample feature data and abnormal sample label data in advance, collects threat sample feature data and threat sample label data in advance, collects time series sample feature data and time series sample label data in advance for each threat type, takes the abnormal sample feature data as input and the abnormal sample label data as output, trains an abnormal prediction model; takes the threat sample feature data as input and the threat sample label data as output, trains a threat type prediction model; for each threat type, takes the time series sample feature data as input and the time series sample feature data as output, trains a time series prediction model corresponding to the threat type, collects test structured features of a power system to be tested, and judges whether the power system to be tested has abnormal risks based on the test structured features and the abnormal prediction model. If there is an abnormal risk, the actual threat type corresponding to the abnormal risk is determined based on the test structured characteristics and the threat type prediction model, and the time series feature data of the power system to be tested is collected. Based on the time series feature data and the time series prediction model of the actual threat type, the predicted abnormal time node is obtained; first, the abnormal prediction model is trained to determine whether there is an abnormal threat in the power system of different operating systems, and then the threat type of the existing abnormal threat is determined by training the threat type prediction model. After determining the threat type, the time when the threat type will have a fatal impact on the system is predicted by using the trained time series prediction model, thereby providing an important reference for the safety decision-making of the power system, so as to facilitate the adoption of necessary preventive measures and response preparations in advance, thereby reducing the potential risks and losses caused by the abnormality. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 This is a flowchart of a multi-system collaborative security testing method for an open source operating system environment in Example 1 of the present invention;
[0059] Figure 2This is a schematic diagram of the structure of an electronic device in Embodiment 2 of the present invention;
[0060] Figure 3 This is a schematic diagram of the computer-readable storage medium structure in Example 3 of the present invention. DETAILED DESCRIPTION
[0061] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] Example 1
[0063] like Figure 1 As shown, the multi-system collaborative security testing method for an open source operating system environment includes the following steps:
[0064] Step 1: Collect abnormal sample feature data and abnormal sample label data in advance.
[0065] Step 2: Collect threat sample feature data and threat sample label data in advance.
[0066] Step 3: For each threat type, collect time series sample feature data and time series sample label data in advance.
[0067] Step 4: Take the abnormal sample feature data as input and the abnormal sample label data as output to train the abnormal prediction model; take the threat sample feature data as input and the threat sample label data as output to train the threat type prediction model; for each threat type, take the time series sample feature data as input and the time series sample feature data as output to train the time series prediction model corresponding to the threat type.
[0068] Step 5: Collect the test structured features of the power system to be tested, and determine whether the power system to be tested has abnormal risks based on the test structured features and the abnormal prediction model. If there is an abnormal risk, go to step 6; otherwise, do nothing.
[0069] Step 6: Based on the test structured features and threat type prediction model, determine the actual threat type corresponding to the abnormal risk.
[0070] Step 7: Collect the time series characteristic data of the power system to be tested, and obtain the predicted abnormal time node based on the time series characteristic data and the time series prediction model of the actual threat type.
[0071] The pre-collection of abnormal sample feature data and abnormal sample label data includes the following steps:
[0072] Step 11: Deploy a general data acquisition agent in each open source operating system environment of the test power equipment system; specifically, the open source operating system environment includes but is not limited to Linux, FreeBSD, etc.; the test power equipment system is a number of pre-selected power equipment systems for testing, and a different open source operating system is installed on each test power equipment system to collect the training sample data required for subsequent model training.
[0073] Step 12: Each data acquisition agent collects the original operation data of each operation time node from the operation background of each test power equipment system; specifically, the original operation data includes but is not limited to semi-structured and unstructured data such as system logs, system indicators, network traffic, etc.; the operation time node can be determined by dividing the periodic time, for example, every other day is an operation time node.
[0074] Step 13: Perform semantic analysis on each piece of collected original operation data to extract abnormal structured features, which include but are not limited to system type ID, status code, indicator value, timestamp, abnormal event, network traffic peak value, network traffic average value, etc.
[0075] Step 14: Manually label each piece of original operation data with an abnormal label; the abnormal label is 0 or 1. When the original operation data shows that the system operation is abnormal, the abnormal label is 1, otherwise, the abnormal label is 0; the abnormal structured features of all original operation data constitute abnormal sample feature data; the abnormal labels of all original operation data constitute abnormal sample label data.
[0076] Furthermore, the pre-collection of threat sample feature data and threat sample label data includes the following steps:
[0077] Step 21: Take the original operation data with the abnormal label of 1 as the abnormal original operation data, and collect known attack threat event records from the threat channels of the abnormal original operation data, wherein the threat channels include but are not limited to system logs, system alarms and other channels.
[0078] Step 22: Domain experts analyze the threat types of attack threat events by recording the attack threat events of the abnormal original operation data, and label each abnormal original operation data with a threat type label; the threat type label is one of 1, 2, 3, ..., N, where N is the total number of threat types, and each threat type label corresponds to a threat type; specifically, the threat types include but are not limited to equipment failure, network attack, malicious code, DDOS attack, etc.
[0079] Step 23: The abnormal structured features of all abnormal original operation data constitute threat sample feature data, and the threat type labels of all abnormal original operation data constitute threat sample label data.
[0080] Furthermore, the method of pre-collecting time series sample feature data and time series sample label data is:
[0081] The threat type is numbered as i. For the i-th threat type, perform the following steps:
[0082] Step 31: According to the i-th threat type, determine the threat indicator set and the target indicator; as an example: if the threat type is a network attack type threat, the threat indicator set may include network traffic, number of connections, etc., and the target indicator may be a system crash label (0 or 1, indicating no crash and crash, respectively); if the threat type is a code type threat, the threat indicator set may be system call frequency, file activity, and the target indicator may be a file leakage label (0 or 1, indicating no file leakage and file leakage, respectively).
[0083] Step 32: In the operation time node corresponding to the abnormal original operation data, various threat indicators and target indicators of the corresponding test power equipment system are collected. In the operation time node, the time series of various threat indicators constitute a threat indicator time series within the operation time node, and the time series of target indicators constitute a target indicator time series within the operation time node.
[0084] Step 33: Use the sliding window technique to construct the input sequence and label sequence for the threat indicator time series and the target indicator time series.
[0085] It should be noted that the sliding window technology is a conventional technical means in this field. The following is a simple example:
[0086] Assume that we take [1, 2, 3, 4, 5, 6] as the threat indicator time series, [7, 8, 9, 10, 11, 12] as the target indicator time series, use a window size of 3, an input sequence length of 3, a label sequence length of 3, and a prediction range of the target indicator after 1 unit of time, then it can be divided into 3 groups of input sequences and label sequences, namely:
[0087] The first group: input sequence: [1, 2, 3], label sequence: [8, 9, 10];
[0088] The second group: input sequence: [2, 3, 4], label sequence: [9, 10, 11];
[0089] The third group: input sequence: [3, 4, 5], label sequence: [10, 11, 12].
[0090] Step 34: The input sequences of all abnormal original operation data are combined into time series sample feature data of the i-th threat type, and the label sequences of all abnormal original operation data are combined into time series sample label data of the i-th threat type.
[0091] Furthermore, the method of training the abnormal prediction model with abnormal sample feature data as input and abnormal sample label data as output is:
[0092] Each group of abnormal structured features of the abnormal sample feature data is used as the input of the abnormal prediction model, the abnormal prediction model takes the predicted value of the abnormal label of the original running data corresponding to the abnormal structured feature as the output, takes the abnormal label corresponding to the original running data as the prediction target, takes the difference between the predicted value of the abnormal label and the abnormal label as the first prediction error, and takes minimizing the mean of the sum of squares of the first prediction errors of each original running data as the training target; the abnormal prediction model is trained until the mean of the sum of squares of the first prediction errors reaches convergence and the training is stopped; the abnormal prediction model is any one of the classification models, and the classification model includes but is not limited to SVM model, DNN model, DBN model, etc.
[0093] Furthermore, the method of training the threat type prediction model with the threat sample feature data as input and the threat sample label data as output is:
[0094] Each group of abnormal structured features of threat sample feature data is used as the input of a threat type prediction model, the threat type prediction model uses the predicted value of the threat type label of the abnormal original operation data corresponding to the abnormal structured feature as the output, uses the threat type label corresponding to the abnormal original operation data as the prediction target, uses the difference between the predicted value of the threat type label and the threat type label as the second prediction error, and uses minimizing the mean of the sum of squares of the second prediction errors of each abnormal original operation data as the training target; the threat type prediction model is trained until the mean of the sum of squares of the second prediction errors reaches convergence and the training is stopped; the threat type prediction model is any one of the classification models.
[0095] Furthermore, for each threat type, the time series sample feature data is used as input and the time series sample feature data is used as output, and the method of training the time series prediction model corresponding to the threat type is:
[0096] For the i-th threat type:
[0097] Each group of input sequences in the time series sample feature data of the i-th threat type is used as the input of the time series prediction model, the time series prediction model uses the predicted sequence of the label sequence corresponding to the input sequence as the output, the label sequence corresponding to the input sequence as the prediction target, the Euclidean distance between the predicted sequence of the label sequence and the label sequence as the third prediction error, and minimizing the mean of the third prediction errors of each group of input sequences as the training target; the time series prediction model is trained until the mean of the third prediction error reaches convergence and the training is stopped; the time series prediction model includes but is not limited to an RNN model and an LSTM model.
[0098] Furthermore, the method of collecting the test structured features of the power system to be tested and judging whether the power system to be tested has abnormal risks based on the test structured features and the abnormality prediction model is as follows:
[0099] For the power system to be tested, corresponding original operation data are collected at each operation time node as a set of test operation data.
[0100] Semantically parse the test run data and extract abnormal structured features as test structured features.
[0101] The test structured features are input into the anomaly prediction model to obtain the predicted value of the anomaly label output by the anomaly prediction model, and the predicted value of the anomaly label is used as the test anomaly state value.
[0102] If the test abnormal state value is 1, it is determined that the power system to be tested has abnormal risk, and if the test abnormal state value is 0, it is determined that the power system to be tested does not have abnormal risk.
[0103] Furthermore, the method of determining the threat type corresponding to the abnormal risk as the actual threat type based on the test structured features and the threat type prediction model is as follows:
[0104] The test structured features are used as input of the threat type prediction model to obtain the predicted value of the threat type label output by the threat type prediction model, and the threat type corresponding to the predicted value of the threat type label is used as the actual threat type.
[0105] Furthermore, the method of collecting the time series characteristic data of the power system to be tested and obtaining the predicted abnormal time node based on the time series characteristic data and the time series prediction model of the actual threat type is as follows:
[0106] The time series of various threat indicators corresponding to the actual threat type within the current operating time node are collected in the background of the power system to be tested, and the time series of various threat indicators constitute the test threat indicator time series.
[0107] The test threat indicator time series is constructed using the sliding window technology to create a test input sequence with the same length as the input sequence.
[0108] The test input sequence is input into the time series prediction model to obtain the predicted sequence of the label sequence output by the time series prediction model.
[0109] For the prediction sequence of the label sequence, the predicted abnormal time node is obtained based on the preset warning logic corresponding to the actual threat type.
[0110] The early warning logic refers to finding the time node when the power system to be tested is judged to be abnormal from the prediction sequence of the label sequence, and the preset early warning logic is determined according to the actual threat type; for example, when the threat type is a network attack type threat, because the target indicator is a system crash label, the prediction sequence of the label sequence is a sequence composed of 0 and 1, then the early warning logic can be when the first 1 appears in the prediction sequence of the label sequence. The unit time corresponding to the time is used as the predicted abnormal time node.
[0111] Example 2
[0112] Figure 2 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 2 As shown, the present application also provides an electronic device 100. The electronic device 100 may include one or more processors and one or more memories. The memories store computer readable codes, and when the computer readable codes are executed by one or more processors, the multi-system collaborative security testing method for an open source operating system environment as described above may be executed.
[0113] The method or device according to the embodiment of the present application can also be used by Figure 2 The electronic device architecture shown in FIG. Figure 2 As shown, the electronic device 100 may include a bus 101, one or more CPUs 102, a ROM 103, a RAM 104, a communication port 105 connected to a network, an input / output component 106, a hard disk 107, etc. The storage device in the electronic device 100, such as the ROM 103 or the hard disk 107, may store the multi-system collaborative security testing method for an open source operating system environment provided in the present application.
[0114] Furthermore, the electronic device 100 may further include a user interface 108. Figure 2 The architecture shown is only exemplary and can be omitted according to actual needs when implementing different devices. Figure 2 One or more components of an electronic device are shown.
[0115] Example 3
[0116] Figure 3 Schematic diagram of a computer-readable storage medium structure provided by an embodiment of the present application. Figure 3 As shown, computer-readable instructions are stored on the computer-readable storage medium 200. When the computer-readable instructions are executed by the processor, the multi-system collaborative security testing method for an open source operating system environment according to the embodiment of the present application described with reference to the above figures can be executed. The computer-readable storage medium 200 includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc.
[0117] In addition, according to the implementation of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the present application provides a non-transitory machine-readable storage medium, the non-transitory machine-readable storage medium stores machine-readable instructions, the machine-readable instructions can be run by a processor to execute instructions corresponding to the method steps provided by the present application, and when the computer program is executed by a central processing unit (CPU), the above functions defined in the method of the present application are executed.
[0118] The methods, apparatuses, and devices of the present application may be implemented in many ways. For example, the methods, apparatuses, and devices of the present application may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present application are not limited to the order specifically described above unless otherwise specified. In addition, in some embodiments, the present application may also be implemented as programs recorded in a recording medium, which include machine-readable instructions for implementing the method according to the present application. Therefore, the present application also covers recording media storing programs for executing the method according to the present application.
[0119] In addition, the parts of the above-mentioned technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive redundancy.
[0120] The specific implementation modes as described above further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation mode of the present invention and is not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
[0121] The above preset parameters or preset thresholds are all set by technicians in this field according to actual conditions or obtained through large-scale data simulation.
[0122] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A multi-system collaborative security testing method for an open source operating system environment, characterized in that: The following steps are involved: Step 1: Collect abnormal sample feature data and abnormal sample label data in advance; Step 2: Collect threat sample feature data and threat sample label data in advance; Step 3: For each threat type, collect time series sample feature data and time series sample label data in advance; Step 4: Take the abnormal sample feature data as input and the abnormal sample label data as output to train the abnormal prediction model; take the threat sample feature data as input and the threat sample label data as output to train the threat type prediction model; for each threat type, take the time series sample feature data as input and the time series sample feature data as output to train the time series prediction model corresponding to the threat type; Step 5: Collect the test structured features of the power system to be tested, and determine whether the power system to be tested has abnormal risks based on the test structured features and the abnormal prediction model. If there is an abnormal risk, go to step 6; otherwise, do nothing; Step 6: Based on the test structured features and threat type prediction model, determine the actual threat type corresponding to the abnormal risk; Step 7: Collect the time series characteristic data of the power system to be tested, and obtain the predicted abnormal time node based on the time series characteristic data and the time series prediction model of the actual threat type; For each threat type, the method of pre-collecting time series sample feature data and time series sample label data is as follows: The threat type is numbered as i. For the i-th threat type, perform the following steps: Step 31: Determine a threat indicator set and a target indicator according to the i-th threat type; Step 32: In the operation time node corresponding to the abnormal original operation data, various threat indicators and target indicators of the corresponding test power equipment system are collected, and in the operation time node, the time series of various threat indicators constitute a threat indicator time series in the operation time node, and the time series of target indicators constitute a target indicator time series in the operation time node; Step 33: Use the sliding window technology to construct the input sequence and label sequence for the threat indicator time series and the target indicator time series; Step 34: The input sequences of all abnormal original operation data are combined into time series sample feature data of the i-th threat type, and the label sequences of all abnormal original operation data are combined into time series sample label data of the i-th threat type; For each threat type, the time series sample feature data is used as input and the time series sample feature data is used as output, and the method of training the time series prediction model corresponding to the threat type is as follows: For the i-th threat type: Each group of input sequences in the time series sample feature data of the i-th threat type is used as the input of the time series prediction model, the time series prediction model uses the predicted sequence of the label sequence corresponding to the input sequence as the output, uses the label sequence corresponding to the input sequence as the prediction target, uses the Euclidean distance between the predicted sequence of the label sequence and the label sequence as the third prediction error, and uses minimizing the mean of the third prediction errors of each group of input sequences as the training target; the time series prediction model is trained until the mean of the third prediction error reaches convergence, and the training is stopped; The method of collecting the time series characteristic data of the power system to be tested and obtaining the predicted abnormal time node based on the time series characteristic data and the time series prediction model of the actual threat type is as follows: In the background of the power system to be tested, the time series of various threat indicators corresponding to the actual threat type in the current operation time node are collected, and the time series of various threat indicators constitute the test threat indicator time series; Use the sliding window technology to construct a test input sequence with the same length as the input sequence from the test threat indicator time series; Input the test input sequence into the time series prediction model to obtain the predicted sequence of the label sequence output by the time series prediction model; For the prediction sequence of the label sequence, based on the preset warning logic corresponding to the actual threat type, the predicted abnormal time node is obtained; The early warning logic refers to finding the time node when the power system to be tested is judged to be abnormal from the prediction sequence of the tag sequence.
2. The multi-system collaborative security testing method for an open source operating system environment according to claim 1, characterized in that: The pre-collection of abnormal sample feature data and abnormal sample label data includes the following steps: Step 11: Deploy a general data acquisition agent in each open source operating system environment of the test power equipment system; Step 12: Each data collection agent collects the original operation data of each operation time node from the operation background of each test power equipment system; Step 13: Perform semantic analysis on each piece of collected raw operation data to extract abnormal structured features; Step 14: Manually label each piece of original operation data with an abnormal label; the abnormal label is 0 or 1. When the original operation data shows that the system operation is abnormal, the abnormal label is 1, otherwise, the abnormal label is 0; the abnormal structured features of all original operation data constitute abnormal sample feature data; the abnormal labels of all original operation data constitute abnormal sample label data.
3. The multi-system collaborative security testing method for an open source operating system environment according to claim 2, characterized in that: The pre-collection of threat sample feature data and threat sample label data includes the following steps: Step 21: The original operation data with the abnormal label of 1 is used as the abnormal original operation data, and known attack threat event records are collected from the threat channel of the abnormal original operation data; Step 22: Analyze the threat type of the attack threat event of the abnormal original operation data through the attack threat event record, and mark each abnormal original operation data with a threat type label; the threat type label is one of 1, 2, 3, ..., N, N is the total number of threat types, and each threat type label corresponds to one threat type; Step 23: The abnormal structured features of all abnormal original operation data constitute threat sample feature data, and the threat type labels of all abnormal original operation data constitute threat sample label data.
4. The multi-system collaborative security testing method for an open source operating system environment according to claim 3, characterized in that: The method of training the abnormal prediction model is: Each group of abnormal structured features of the abnormal sample feature data is used as the input of the abnormal prediction model, the abnormal prediction model takes the predicted value of the abnormal label of the original running data corresponding to the abnormal structured feature as the output, takes the abnormal label corresponding to the original running data as the prediction target, takes the difference between the predicted value of the abnormal label and the abnormal label as the first prediction error, and takes minimizing the mean of the sum of squares of the first prediction errors of each original running data as the training target; the abnormal prediction model is trained until the mean of the sum of squares of the first prediction errors reaches convergence and the training is stopped; the abnormal prediction model is a classification model.
5. The multi-system collaborative security testing method for an open source operating system environment according to claim 4, characterized in that: The method of training the threat type prediction model is: Each group of abnormal structured features of threat sample feature data is used as the input of a threat type prediction model. The threat type prediction model uses the predicted value of the threat type label of the abnormal original operation data corresponding to the abnormal structured feature as the output, the threat type label corresponding to the abnormal original operation data as the prediction target, the difference between the predicted value of the threat type label and the threat type label as the second prediction error, and minimizing the mean of the sum of squares of the second prediction errors of each abnormal original operation data as the training target; the threat type prediction model is trained until the mean of the sum of squares of the second prediction errors reaches convergence and the training is stopped; the threat type prediction model is a classification model.
6. The multi-system collaborative security testing method for an open source operating system environment according to claim 5, characterized in that: The method of collecting the test structured features of the power system to be tested and judging whether the power system to be tested has abnormal risks based on the test structured features and the abnormality prediction model is as follows: For the power system to be tested, corresponding original operation data are collected at each operation time node as a set of test operation data; Perform semantic analysis on the test run data and extract abnormal structured features as test structured features; Input the test structured features into the anomaly prediction model, obtain the predicted value of the anomaly label output by the anomaly prediction model, and use the predicted value of the anomaly label as the test anomaly state value; If the test abnormal state value is 1, it is judged that there is an abnormal risk in the power system to be tested.
7. The multi-system collaborative security testing method for an open source operating system environment according to claim 6, characterized in that: The method of judging the actual threat type corresponding to the abnormal risk based on the test structured features and the threat type prediction model is as follows: The test structured features are used as input of the threat type prediction model to obtain the predicted value of the threat type label output by the threat type prediction model, and the threat type corresponding to the predicted value of the threat type label is used as the actual threat type.
8. An electronic device, characterized in that: include: Processor and memory; The memory stores a computer program that can be called by the processor; The processor executes the multi-system collaborative security testing method for an open source operating system environment as described in any one of claims 1 to 7 in the background by calling the computer program stored in the memory.
9. A computer-readable storage medium, characterized in that: A rewritable computer program is stored thereon; When the computer program runs on a computer device, the computer device executes the multi-system collaborative security testing method for an open source operating system environment as described in any one of claims 1 to 7 in the background.
