An intelligent penetration testing method and system based on deep learning
Using deep learning technology to analyze and classify system logs, identify business types and select the best penetration method, it solves the problems of high labor costs and lack of targeted automation tools in existing penetration testing methods, and achieves efficient and intelligent penetration testing automation. process.
Patent Information
- Application Number
- CN202410881109.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-07-03
AI Technical Summary
Existing intelligent penetration testing methods have problems such as high labor costs, poor penetration coverage, and low efficiency. Automated tools lack pertinence and intelligence and flexibility, producing a large number of false positives.
Adopt an intelligent penetration testing method based on deep learning, collect and label classification system business operation logs, use word embedding technology and convolutional neural network to establish a system business type identification model, analyze the correlation between penetration success rate and penetration method, and select the best Test the best combination of penetration methods.
It realizes the automated process of business type identification and penetration method selection of the penetration testing system, improves the pertinence and efficiency of penetration testing, and reduces the false positive rate.
Smart Images

Figure CN118410497B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent penetration testing, and in particular to an intelligent penetration testing method and system based on deep learning. Background Art
[0002] Penetration testing is an authorized simulated attack on a computer system to assess its security and is a mechanism to prove that network defenses are functioning as intended. Penetration testing is a method of assessing the security of a computer network system by simulating the attack methods of malicious hackers. This process includes active analysis of any weaknesses, technical flaws or vulnerabilities in the system from a position where an attacker may be present and from which they are in a position to actively exploit security vulnerabilities.
[0003] The current mainstream intelligent penetration testing methods usually adopt manual penetration testing methods and automated tool penetration testing methods. The manual testing method is that professional technicians analyze the system and then manually penetrate it. It has the characteristics of strong targeting and high success rate, but the disadvantages of this method are high labor costs, poor penetration coverage and low efficiency. The automated tool penetration testing method has the advantages of strong coverage and high efficiency, but lacks targeting for system penetration, low intelligence and flexibility, and generates a large number of false alarms.
[0004] Therefore, how to realize a system based on deep learning that can automatically identify the business type of the system and intelligently select targeted penetration testing methods according to the business type is an urgent problem that needs to be solved. Summary of the invention
[0005] In order to solve the above technical problems, an intelligent penetration testing method based on deep learning is provided. This technical solution solves the problems raised in the above background technology.
[0006] In order to achieve the above purpose, the technical solution adopted by the present invention is:
[0007] An intelligent penetration testing method based on deep learning, comprising:
[0008] Collect business operation log records of each system, filter out valid records, and classify log record data by labeling;
[0009] Use word embedding technology to tokenize all log record text and convert them into word embedding vectors;
[0010] Further analyze the features of the labeled and classified log records and extract features from the log records;
[0011] The extracted log record word embedding vectors are integrated with other feature vectors to establish a system business type recognition model;
[0012] According to historical penetration detection reports, analyze the correlation between penetration success rate and penetration method of different business systems, and establish a mapping relationship between business type and penetration method;
[0013] Select the system to be penetrated, classify the system services through the system service type identification model, and select the best penetration method combination based on the classification results.
[0014] Preferably, the collecting of business operation log records of each system, screening of valid records therein, and labeling and classifying the log record data include:
[0015] Collect a large amount of business logs of different types of business systems from open data sets or third-party cooperation organizations and mark them as unlabeled business log data;
[0016] Clean the unlabeled business log data and filter out data records that are irrelevant to business operations and data records with abnormal missing data.
[0017] Classify and label the unlabeled business log data, and classify and batch label the business log data by obtaining the source of the business log data.
[0018] Preferably, the word embedding technology is used to segment all log record texts and convert them into word embedding vectors, including:
[0019] Obtain some classified and labeled business log data, segment the data, divide the data into training set, validation set, and test set according to the set ratio, and then use the word segmentation tool to perform word segmentation processing to build a corpus;
[0020] Select the Word2Vec model, set the initial model parameters based on the experience of similar tasks in the field, including vector dimension, window size, minimum word frequency and negative sampling, and train it based on the training set corpus data;
[0021] Use the validation set corpus data to conduct multiple experiments to observe the impact of different parameters on the model effect, select the best parameter combination through cross-validation, optimize model performance, and improve model generalization ability and recognition accuracy;
[0022] The trained model is evaluated through the test set corpus. The distribution similarity between the word vectors of the test set and the analogy words in the vector space is checked to evaluate the quality of word embedding. If the accuracy of the word vector distribution of the test set does not meet the preset standard, the training parameters are adjusted to train the model until the accuracy of the word vector distribution of the test set meets the preset standard.
[0023] Save the trained model, obtain all classified and labeled business log data, segment the data, and convert all data into word vectors by using the trained model.
[0024] Preferably, the further analyzing the features of the tagged and classified log records and extracting features from the log records includes:
[0025] Obtain the marked log records, group the log records according to the business serial number, and obtain the transmission message length, request response time, and log recording time of each log record in each group;
[0026] Analyze the log records grouped by business serial number, extract the statistical features and frequency domain features of each group of log records, and construct a feature vector;
[0027] The statistical eigenvector is constructed as follows:
[0028] Calculate the mean, standard deviation, skewness, and kurtosis of the message length and request response time of the log records, and organize the calculation results into a vector set ;in They are the mean, standard deviation, skewness and kurtosis of the message length, They are the mean, standard deviation, skewness, and kurtosis of request response time;
[0029] The frequency domain feature vector is constructed as follows:
[0030] Form a time series based on the time of the recorded logs , for time series Apply the window function to get the windowed signal , for the windowed signal Perform discrete Fourier transform and calculate the amplitude spectrum of different frequency components. The amplitude spectrum calculation formula is:
[0031] Where k is the frequency index, is the amplitude spectrum corresponding to the frequency index k, N is the window length, j is the imaginary unit, and n is the windowed signal sequence index;
[0032] Calculate the peak, mean, and variance of the frequency component amplitude value, and calculate the spectrum energy by square summing the amplitude values of each frequency component in the amplitude spectrum, and form the mean, variance, peak, and spectrum energy into a vector set .
[0033] Preferably, the step of integrating the extracted log record word embedding vector with other feature vectors to establish a system business type recognition model includes:
[0034] Get the word embedding vector, statistical feature vector and frequency domain feature vector of the log record, and integrate the feature vector into a complete feature vector ,in They are word embedding vector, statistical feature vector and frequency domain feature vector respectively;
[0035] Select a convolutional neural network model, divide the data set corresponding to the feature vector into training set, validation set and test set, set the convolutional network structure, including convolution layer, pooling layer and fully connected layer, and set the initial model parameters based on the experience of similar tasks in the field;
[0036] The model is trained based on the training set data, the feature vector is input into the model, and supervised learning is performed according to the classification labels of the training set data. After a single cycle of training, the validation set data is used for cross-validation to select the best parameter combination;
[0037] Use the test set data to evaluate the model training results by classifying the test set log data. If the classification accuracy of the test training results does not meet the standard, continue to adjust the model parameters until the classification accuracy of the training results meets the standard.
[0038] Save the trained model and deploy it to the actual application service.
[0039] Preferably, the analysis of the correlation between penetration success rate and penetration mode of different business systems based on historical penetration detection reports, and establishing a mapping relationship between business type and penetration mode, includes:
[0040] Obtain historical penetration testing reports from open data sets or third-party cooperative testing agencies, and classify the reports according to the business type of the penetration test subjects in the reports;
[0041] Obtain the penetration methods in the system reports of all business types, as well as the number of successful penetrations and the total number of penetrations of each penetration method in different business type systems, and mark the ratio of the number of successful penetrations to the total number of penetrations as the penetration success rate of the penetration method in the business system of this type;
[0042] Analyze each business type system, select several penetration methods with the highest penetration success rate for each business system, and mark them as the efficient penetration method combination of the system;
[0043] A business type-penetration method combination hash table is established based on the business type system and the corresponding several penetration methods with the highest success rate.
[0044] Preferably, the system to be penetrated is selected, system services are classified by a system service type identification model, and the best penetration mode combination is selected based on the classification result, including:
[0045] Obtain the business log data of the system to be penetrated, clean and preprocess the data, and extract feature vectors, which include word embedding vectors, statistical feature vectors, and frequency domain feature vectors;
[0046] Identify the data through the system business type identification model to obtain the business type of the system;
[0047] Obtain the business type-penetration method combination hash table, match the best penetration method combination for the business system according to the business type to the business type-penetration method combination hash table, and automatically perform penetration testing on the system.
[0048] Furthermore, an intelligent penetration testing system based on deep learning is proposed, which is used to implement the intelligent penetration testing method based on deep learning as described above, including:
[0049] A data collection module, which collects a large number of business logs from different types of business systems and cleans and classifies the business log data;
[0050] A word embedding vector analysis module, which builds a corpus training model based on business log data and converts all data into word vectors through the trained model;
[0051] A data feature analysis module, which groups log records according to business serial numbers, obtains detailed information of each group of log records, extracts statistical features and frequency domain features of each group of log records, and constructs statistical feature feature vectors and frequency domain feature vectors, performs model training according to a convolutional network algorithm, and establishes a system business type recognition model;
[0052] A system business type identification model building module, wherein the system business type identification model building module integrates the feature vectors into a complete feature vector based on the word embedding vector, statistical feature vector and frequency domain feature vector of the acquired log record;
[0053] A penetration mode selection module cleans and preprocesses the data according to the business log data of the system to be penetrated and extracts feature vectors, identifies the data through the system business type recognition model, obtains the business type of the system, and selects the best penetration mode to perform penetration testing on the system through the mapping relationship between the business type and the best penetration mode.
[0054] Compared with the prior art, the present invention has the following beneficial effects:
[0055] Collect business operation log records of each system, filter out valid records, and label and classify log record data; use word embedding technology to segment all log record texts and convert them into word embedding vectors; further analyze the characteristics of the labeled and classified log records, and extract features from the log records; integrate the extracted log record word embedding vectors with other feature vectors to establish a system business type recognition model; according to historical penetration detection reports, analyze the correlation between penetration success rate and penetration method of different business systems, and establish a mapping relationship between business type and penetration method; select the system to be penetrated and tested, classify the system business through the system business type recognition model, and select the best combination of penetration methods based on the classification results.
[0056] Through the system business type identification model based on deep learning training, the business type of the penetration test system is identified, the historical penetration test records are analyzed, and the penetration test method with the highest penetration success rate is intelligently selected, realizing an automated process of business type identification - penetration method selection - automatic penetration of the penetration test system. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 This is a flow chart of an intelligent penetration testing method based on deep learning of the present invention;
[0058] Figure 2 The flowchart of collecting business operation log records of each system, screening valid records therein, and labeling and classifying log record data is provided in the present invention;
[0059] Figure 3 The word embedding technology used in the present invention is used to segment all log record texts and convert them into word embedding vector flow chart;
[0060] Figure 4 A flow chart of feature extraction for log records for further analyzing the features of the log records after labeling and classification in the present invention;
[0061] Figure 5 The present invention integrates the extracted log record word embedding vector with other feature vectors to establish a system business type recognition model flow chart;
[0062] Figure 6 The present invention analyzes the correlation between penetration success rate and penetration mode of different business systems based on historical penetration detection reports, and establishes a mapping relationship flow chart between business type and penetration mode;
[0063] Figure 7 For the present invention, a system to be penetrated and tested is selected, system services are classified by a system service type identification model, and the best penetration mode combination flow chart is selected based on the classification result;
[0064] Figure 8 This is a schematic diagram of the structure of an intelligent penetration testing system based on deep learning of the present invention. DETAILED DESCRIPTION
[0065] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art may think of other obvious variations.
[0066] Reference Figure 1 As shown, an intelligent penetration testing method based on deep learning includes:
[0067] Collect business operation log records of each system, filter out valid records, and classify log record data by labeling;
[0068] Use word embedding technology to tokenize all log record text and convert them into word embedding vectors;
[0069] Further analyze the features of the labeled and classified log records and extract features from the log records;
[0070] The extracted log record word embedding vectors are integrated with other feature vectors to establish a system business type recognition model;
[0071] According to historical penetration detection reports, analyze the correlation between penetration success rate and penetration method of different business systems, and establish a mapping relationship between business type and penetration method;
[0072] Select the system to be penetrated, classify the system services through the system service type identification model, and select the best penetration method combination based on the classification results.
[0073] Reference Figure 2 As shown, the business operation log records of each system are collected, the valid records are screened, and the log record data is tagged and classified, including:
[0074] Collect a large amount of business logs of different types of business systems from open data sets or third-party cooperation organizations and mark them as unlabeled business log data;
[0075] Clean the unlabeled business log data and filter out data records that are irrelevant to business operations and data records with abnormal missing data.
[0076] Classify and label the unlabeled business log data, and classify and batch label the business log data by obtaining the source of the business log data.
[0077] Data collection and preprocessing are mainly used for model training and improving model recognition accuracy. The more business system operation logs are selected, the more accurate the recognition of the trained business system type recognition model will be. Data cleaning can remove irrelevant or erroneous data points in the data set, reduce data noise, and improve data set accuracy. Labeled data can provide supervised learning, so that machine learning models can learn the relationship between features and targets. Secondly, labeled data can also be used as a test basis for evaluating model performance.
[0078] Reference Figure 3 As shown in the figure, using word embedding technology, all log record texts are segmented and converted into word embedding vectors, including:
[0079] Obtain some classified and labeled business log data, segment the data, divide the data into training set, validation set, and test set according to the set ratio, and then use the word segmentation tool to perform word segmentation processing to build a corpus;
[0080] Select the Word2Vec model, set the initial model parameters based on the experience of similar tasks in the field, including vector dimension, window size, minimum word frequency and negative sampling, and train it based on the training set corpus data;
[0081] Use the validation set corpus data to conduct multiple experiments to observe the impact of different parameters on the model effect, select the best parameter combination through cross-validation, optimize model performance, and improve model generalization ability and recognition accuracy;
[0082] The trained model is evaluated through the test set corpus. The distribution similarity between the word vectors of the test set and the analogy words in the vector space is checked to evaluate the quality of word embedding. If the accuracy of the word vector distribution of the test set does not meet the preset standard, the training parameters are adjusted to train the model until the accuracy of the word vector distribution of the test set meets the preset standard.
[0083] Save the trained model, obtain all classified and labeled business log data, segment the data, and convert all data into word vectors by using the trained model.
[0084] The Word2Vec model can convert words into high-dimensional vector representations, making similar words close in the vector space. It is widely used in the field of natural language processing. Its advantage is that it can quickly and accurately capture similar semantics and understand their relationships, while supporting efficient processing of large-scale data. This feature makes it well adapted to the processing of logs or messages, and can accurately and efficiently convert log or message data into word embedding vector expressions.
[0085] Reference Figure 4As shown in the figure, further analyzing the features of the labeled and classified log records, and extracting features from the log records specifically include:
[0086] Obtain the marked log records, group the log records according to the business serial number, and obtain the transmission message length, request response time, and log recording time of each log record in each group;
[0087] Analyze the log records grouped by business serial number, extract the statistical features and frequency domain features of each group of log records, and construct a feature vector;
[0088] The statistical eigenvector is constructed as follows:
[0089] Calculate the mean, standard deviation, skewness, and kurtosis of the message length and request response time of the log records, and organize the calculation results into a vector set ;in They are the mean, standard deviation, skewness and kurtosis of the message length, They are the mean, standard deviation, skewness, and kurtosis of request response time;
[0090] The frequency domain feature vector is constructed as follows:
[0091] Form a time series based on the time of the recorded logs , for time series Apply the window function to get the windowed signal , for the windowed signal Perform discrete Fourier transform and calculate the amplitude spectrum of different frequency components. The amplitude spectrum calculation formula is: Where k is the frequency index, is the amplitude spectrum corresponding to the frequency index k, N is the window length, j is the imaginary unit, and n is the windowed signal sequence index;
[0092] Calculate the peak, mean, and variance of the frequency component amplitude value, and calculate the spectrum energy by square summing the amplitude values of each frequency component in the amplitude spectrum, and form the mean, variance, peak, and spectrum energy into a vector set .
[0093] Different business systems have different log data characteristics, including the length, frequency, and distribution characteristics of transmitted messages. For example, e-commerce systems have extremely high access frequencies during peak hours and relatively low access rates at ordinary times, while forum blog systems have extremely long message lengths and low data transmission frequencies. By extracting the frequency domain characteristics and statistical characteristics of logs, the performance of the model can be improved in various applications.
[0094] Reference Figure 5As shown in the figure, the extracted log record word embedding vector is integrated with other feature vectors to establish a system business type recognition model, which specifically includes:
[0095] Get the word embedding vector, statistical feature vector and frequency domain feature vector of the log record, and integrate the feature vector into a complete feature vector ,in They are word embedding vector, statistical feature vector and frequency domain feature vector respectively;
[0096] Select a convolutional neural network, divide the data set corresponding to the feature vector into training set, validation set and test set, set the convolutional network structure, including convolution layer, pooling layer and fully connected layer, and set the initial model parameters based on the experience of similar tasks in the field;
[0097] The model is trained based on the training set data, the feature vector is input into the model, and supervised learning is performed according to the classification labels of the training set data. After a single cycle of training, the validation set data is used for cross-validation to select the best parameter combination;
[0098] Use the test set data to evaluate the model training results by classifying the test set log data. If the classification accuracy of the test training results does not meet the standard, continue to adjust the model parameters until the classification accuracy of the training results meets the standard.
[0099] Save the trained model and deploy it to the actual application service.
[0100] The convolutional neural network structure is divided into convolutional layers, pooling layers, and fully connected layers. It can classify and identify data by automatically learning and extracting data features. Vector aggregation of word embedding vectors, statistical feature vectors, and frequency domain feature vectors can reduce the computational overhead of the model, speed up training, and reduce the risk of overfitting. The trained model can be deployed to actual application services to identify the business type of the business system.
[0101] Reference Figure 6 As shown in the figure, based on the historical penetration detection report, the correlation between the penetration success rate and penetration method of different business systems is analyzed, and the mapping relationship between business type and penetration method is established, which specifically includes:
[0102] Obtain historical penetration testing reports from open data sets or third-party cooperative testing agencies, and classify the reports according to the business type of the penetration test subjects in the reports;
[0103] Obtain the penetration methods in the system reports of all business types, as well as the number of successful penetrations and the total number of penetrations of each penetration method in different business type systems, and mark the ratio of the number of successful penetrations to the total number of penetrations as the penetration success rate of the penetration method in the business system of this type;
[0104] Analyze each business type system, select several penetration methods with the highest penetration success rate for each business system, and mark them as the efficient penetration method combination of the system;
[0105] A business type-penetration method combination hash table is established based on the business type system and the corresponding several penetration methods with the highest success rate.
[0106] Different systems have different focuses and sensitivities for avoiding vulnerabilities. For example, sensitive information in financial transaction systems is transaction amounts, account balances, and account IDs, and its security focuses on encryption, digital signatures, and information authentication. In addition to ensuring transaction security, e-commerce systems also need to focus on the concurrency and response speed supported by the server. By analyzing historical penetration test reports, you can filter out several penetration methods with the highest penetration success rate for each system, and select more targeted penetration test methods for different systems.
[0107] Reference Figure 7 As shown, select the system to be penetrated, classify the system services through the system service type identification model, and select the best penetration method combination based on the classification results, including:
[0108] Obtain the business log data of the system to be penetrated, clean and preprocess the data, and extract feature vectors, which include word embedding vectors, statistical feature vectors, and frequency domain feature vectors;
[0109] Identify the data through the system business type identification model to obtain the business type of the system;
[0110] Obtain the business type-penetration method combination hash table, match the best penetration method combination for the business system according to the business type to the business type-penetration method combination hash table, and automatically perform penetration testing on the system.
[0111] The system to be penetrated is identified and classified through the trained system business type recognition model, and then the corresponding optimal penetration method combination is automatically selected to automatically perform penetration testing, thus realizing an automated process of business type recognition - penetration method selection - automatic penetration of the system to be penetrated.
[0112] For further information, see Figure 8 As shown, based on the same inventive concept as the above-mentioned intelligent penetration testing method based on deep learning, this solution also proposes an intelligent penetration testing system based on deep learning, including:
[0113] A data collection module, which collects a large number of business logs from different types of business systems and cleans and classifies the business log data;
[0114] A word embedding vector analysis module, which builds a corpus training model based on business log data and converts all data into word vectors through the trained model;
[0115] A data feature analysis module, which groups log records according to business serial numbers, obtains detailed information of each group of log records, extracts statistical features and frequency domain features of each group of log records, and constructs statistical feature feature vectors and frequency domain feature vectors, performs model training according to a convolutional network algorithm, and establishes a system business type recognition model;
[0116] A system business type identification model building module, wherein the system business type identification model building module integrates the feature vectors into a complete feature vector based on the word embedding vector, statistical feature vector and frequency domain feature vector of the acquired log record;
[0117] A penetration mode selection module cleans and preprocesses the data according to the business log data of the system to be penetrated and extracts feature vectors, identifies the data through the system business type recognition model, obtains the business type of the system, and selects the best penetration mode to perform penetration testing on the system through the mapping relationship between the business type and the best penetration mode.
[0118] Furthermore, the present solution also proposes a storage medium on which a computer-readable program is stored, and when the computer-readable program is called, the above-mentioned intelligent penetration testing method based on deep learning is executed.
[0119] It is understandable that the storage medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; an optical medium, such as a DVD; or a semiconductor medium, such as a solid state drive (SSD).
[0120] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.
Claims
1. An intelligent penetration testing method based on deep learning, It is characterized in that include: Collect business operation log records of each system, filter out valid records, and classify log record data by labeling; Use word embedding technology to tokenize all log record text and convert them into word embedding vectors; Further analyze the features of the labeled and classified log records and extract features from the log records; The extracted log record word embedding vectors are integrated with other feature vectors to establish a system business type recognition model; According to historical penetration detection reports, analyze the correlation between penetration success rate and penetration method of different business systems, and establish a mapping relationship between business type and penetration method; Select the system to be penetrated, classify the system services through the system service type identification model, and select the best penetration method combination based on the classification results; The use of word embedding technology to segment all log record texts and convert them into word embedding vectors specifically includes: Obtain some classified and labeled business log data, segment the data, divide the data into training set, validation set, and test set according to the set ratio, and then use the word segmentation tool to perform word segmentation processing to build a corpus; Select the Word2Vec model, set the initial model parameters based on the experience of similar tasks in the field, including vector dimension, window size, minimum word frequency and negative sampling, and train it based on the training set corpus data; Use the validation set corpus data to conduct multiple experiments to observe the impact of different parameters on the model effect, select the best parameter combination through cross-validation, optimize model performance, and improve model generalization ability and recognition accuracy; The trained model is evaluated through the test set corpus. The distribution similarity between the word vectors of the test set and the analogy words in the vector space is checked to evaluate the quality of word embedding. If the accuracy of the word vector distribution of the test set does not meet the preset standard, the training parameters are adjusted to train the model until the accuracy of the word vector distribution of the test set meets the preset standard. Save the trained model, obtain all classified and labeled business log data, segment the data, and convert all data into word vectors by using the trained model; Further analyzing the features of the labeled and classified log records and extracting features from the log records specifically includes: Obtain the marked log records, group the log records according to the business serial number, and obtain the transmission message length, request response time, and log recording time of each log record in each group; Analyze the log records grouped by business serial number, extract the statistical features and frequency domain features of each group of log records, and construct a feature vector; The statistical eigenvector is constructed as follows: Calculate the mean, standard deviation, skewness, and kurtosis of the message length and request response time of the log records, and organize the calculation results into a vector set ;in In particular, the mean, standard deviation, skewness and kurtosis of the message length, They are the mean, standard deviation, skewness, and kurtosis of request response time; The frequency domain feature vector is constructed as follows: Form a time series based on the time of the recorded logs , for time series Apply the window function to get the windowed signal , for the windowed signal Perform discrete Fourier transform and calculate the amplitude spectrum of different frequency components. The amplitude spectrum calculation formula is: , where is the frequency index, is the frequency index The corresponding amplitude spectrum is is the window length, j is the imaginary unit, and n is the windowed signal sequence index; Calculate the peak, mean, and variance of the frequency component amplitude value, and calculate the spectrum energy by square summing the amplitude values of each frequency component in the amplitude spectrum, and form the mean, variance, peak, and spectrum energy into a vector set ; The step of integrating the extracted log record word embedding vector with other feature vectors to establish a system business type recognition model specifically includes: Get the word embedding vector, statistical feature vector and frequency domain feature vector of the log record, and integrate the feature vector into a complete feature vector ;in They are word embedding vector, statistical feature vector and frequency domain feature vector respectively; Select a convolutional neural network model, divide the data set corresponding to the feature vector into training set, validation set and test set, set the convolutional network structure, including convolution layer, pooling layer and fully connected layer, and set the initial model parameters based on the experience of similar tasks in the field; The model is trained based on the training set data, the feature vector is input into the model, and supervised learning is performed according to the classification labels of the training set data. After a single cycle of training, the validation set data is used for cross-validation to select the best parameter combination; Use the test set data to evaluate the model training results by classifying the test set log data. If the classification accuracy of the test training results does not meet the standard, continue to adjust the model parameters until the classification accuracy of the training results meets the standard. Save the trained model and deploy it to the actual application service.
2. According to claim 1, an intelligent penetration testing method based on deep learning, It is characterized in that The collecting of business operation log records of each system, screening of valid records therein, and labeling and classifying the log record data specifically include: Collect a large amount of business logs of different types of business systems from open data sets or third-party cooperation organizations and mark them as unlabeled business log data; Clean the unlabeled business log data and filter out data records that are irrelevant to business operations and data records with abnormal missing data. Classify and label the unlabeled business log data, and classify and batch label the business log data by obtaining the source of the business log data.
3. According to claim 2, an intelligent penetration testing method based on deep learning, It is characterized in that The above-mentioned process of analyzing the correlation between penetration success rate and penetration method of different business systems based on historical penetration detection reports and establishing a mapping relationship between business type and penetration method specifically includes: Obtain historical penetration testing reports from open data sets or third-party cooperative testing agencies, and classify the reports according to the business type of the penetration test subjects in the reports; Obtain the penetration methods in the system reports of all business types, as well as the number of successful penetrations and the total number of penetrations of each penetration method in different business type systems, and mark the ratio of the number of successful penetrations to the total number of penetrations as the penetration success rate of the penetration method in the business system of this type; Analyze each business type system, select several penetration methods with the highest penetration success rate for each business system, and mark them as the efficient penetration method combination of the system; A business type-penetration method combination hash table is established based on the business type system and the corresponding several penetration methods with the highest success rate.
4. According to claim 3, an intelligent penetration testing method based on deep learning, It is characterized in that The step of selecting a system to be penetrated and tested, classifying system services through a system service type identification model, and selecting the best penetration mode combination based on the classification results specifically includes: Obtain the business log data of the system to be penetrated, clean and preprocess the data, and extract feature vectors, which include word embedding vectors, statistical feature vectors, and frequency domain feature vectors; Identify the data through the system business type identification model to obtain the business type of the system; Obtain the business type-penetration method combination hash table, match the best penetration method combination for the business system according to the business type to the business type-penetration method combination hash table, and automatically perform penetration testing on the system.
5. An intelligent penetration testing system based on deep learning, used to implement an intelligent penetration testing method based on deep learning as described in any one of claims 1-4, It is characterized in that include: A data collection module, which collects a large number of business logs from different types of business systems and cleans and classifies the business log data; A word embedding vector analysis module, which builds a corpus training model based on business log data and converts all data into word vectors through the trained model; A data feature analysis module, which groups log records according to business serial numbers, obtains detailed information of each group of log records, extracts statistical features and frequency domain features of each group of log records, and constructs statistical feature feature vectors and frequency domain feature vectors, performs model training according to a convolutional network algorithm, and establishes a system business type recognition model; A system business type recognition model building module, wherein the system business type recognition model building module obtains word embedding vectors, statistical feature vectors and frequency domain feature vectors of log records, and integrates feature vectors into a complete feature vector; A penetration mode selection module cleans and preprocesses the data according to the business log data of the system to be penetrated and extracts feature vectors, identifies the data through the system business type recognition model, obtains the business type of the system, and selects the best penetration mode to perform penetration testing on the system through the mapping relationship between the business type and the best penetration mode.
