Multi-feature fusion CC encrypted traffic recognition algorithm
By integrating multiple features with the C&C encrypted traffic identification algorithm, it solves the problem of insufficient identification capabilities of existing technologies when processing encrypted traffic, enables in-depth analysis and risk assessment of C&C encrypted traffic, and enhances network security defense capabilities.
Patent Information
- Application Number
- CN202410687440.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing traffic identification technology has limitations when processing highly dynamic and encrypted traffic, and cannot effectively identify subtle changes in complex C&C communications, resulting in insufficient identification capabilities for new or variant network attacks and increasing the risk of data leakage or system destruction.
Using a multi-feature fusion C&C encrypted traffic identification algorithm, it analyzes encrypted traffic data, identifies and classifies encryption protocol types, version numbers and identifiers, generates encrypted traffic feature sets, calculates parameter deviation values, verifies abnormal patterns, builds state transition analysis models, and evaluates Risk levels, comprehensive risk assessment, and enhanced network security defense.
It improves the analysis accuracy and anomaly detection sensitivity of C&C encrypted traffic, provides rapid response capabilities, deeply understands the dynamic changes behind encrypted traffic, effectively predicts and defends against potential network attacks, and enhances overall network security defense.
Smart Images

Figure CN118656737A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of traffic identification technology, and in particular to a multi-feature fusion C&C encrypted traffic identification algorithm. Background Art
[0002] Traffic identification technology focuses on methods for monitoring, analyzing and classifying network traffic in a network environment, including capturing packets, analyzing traffic behavior, and identifying traffic types by applying specific algorithms and models. Traffic identification technology is widely used in many fields such as network security, network management, and network optimization. It involves machine learning, pattern recognition, and statistical analysis, etc., which are used to identify different types of network traffic, including encrypted traffic, video traffic, P2P traffic, etc. Effective traffic identification can help network administrators better understand network behavior, optimize network resource allocation, and improve network performance. It also plays an important role in detecting and defending against network attacks.
[0003] Among them, the multi-feature fusion C&C encrypted traffic identification algorithm is a technology specially designed to detect and identify encrypted traffic generated by C&C (command and control) servers, which are a key component of malware network activities and are used to remotely control infected machines and launch various network attacks. By integrating multiple network traffic features, such as packet size, time interval, traffic direction, etc., advanced analysis technology is used to identify abnormal patterns in encrypted communications. The main purpose is to improve network security defense capabilities, which can help network security systems to promptly detect and block malicious communications, thereby preventing data leakage or system damage and enhancing the overall security of the network.
[0004] Although existing traffic identification technologies provide basic network traffic monitoring and analysis tools, they show certain limitations when dealing with highly dynamic and encrypted traffic. For example, traditional traffic identification technologies rely on known packet patterns or behavioral analysis, and cannot effectively identify subtle changes under encryption protocols when faced with complex C&C communications. Existing methods lack sufficient depth when dealing with encrypted traffic, cannot see through the content below the encryption layer, and miss key abnormal behaviors. For example, single feature analysis ignores nonlinear patterns and changeable behavioral dynamics in C&C encrypted traffic, resulting in insufficient security system recognition of new or variant attacks. As a result, network managers are unable to promptly discover or accurately identify malicious activities in encrypted traffic when faced with increasingly complex network security threats, increasing the risk of data leakage or system damage. Summary of the invention
[0005] The purpose of the present invention is to solve the shortcomings existing in the prior art and propose a multi-feature fusion C&C encrypted traffic identification algorithm.
[0006] In order to achieve the above purpose, the present invention adopts the following technical solution: a multi-feature fusion C&C encrypted traffic identification algorithm, comprising the following steps:
[0007] S1: Analyze C&C encrypted traffic data, identify and classify encryption protocol types, version numbers, and C&C encrypted traffic identifiers, perform labeling, and use multi-feature fusion to obtain an encrypted traffic feature set;
[0008] S2: Based on the encrypted traffic feature set, compare the historical C&C encrypted communication data with the abnormal pattern data, sort and prioritize the deviation values of the C&C encryption parameters, and generate parameter abnormality indicators;
[0009] S3: According to the parameter anomaly indicator, verify the data of the associated C&C encrypted communication, compare the identified C&C encrypted communication data with the known abnormal transmission mode, perform multi-feature fusion, and obtain an abnormal pattern set;
[0010] S4: using the abnormal pattern set, targeting the nonlinear characteristics and hidden state of the C&C encrypted traffic, identifying the deviation of the C&C encrypted traffic state transition, and obtaining a state transition analysis model;
[0011] S5: Analyze the C&C encrypted traffic using the state transition analysis model, compare the analysis results of the C&C encrypted traffic with the known C&C communication mode, identify the risks in the state transition, and obtain the risk traffic features by fusion of multiple features;
[0012] S6: According to the risk traffic characteristics, the risk level of the C&C encrypted traffic is evaluated, the abnormal parameters of the C&C encrypted traffic are compared with the preset threshold, the encrypted traffic records exceeding the preset threshold are marked, and the risk assessment result is generated.
[0013] As a further solution of the present invention, the encrypted traffic feature set includes protocol type, version number, encrypted traffic identifier and timestamp, the parameter anomaly index includes version deviation of the encryption protocol, difference in algorithm identifier and traffic anomaly, the abnormal pattern set includes encryption protocol characteristics, abnormal data transmission frequency and traffic peak in the target time period, the state transition analysis model includes the state sequence of C&C encrypted traffic, state transition probability and identification criteria of abnormal state, the risk traffic characteristics include the risk level of the encryption protocol type, the changing version number and the traffic characteristics matching the known C&C communication pattern, and the risk assessment results include the risk level of C&C encrypted traffic records, abnormal parameters and encrypted traffic records exceeding the threshold.
[0014] As a further solution of the present invention, the steps of analyzing C&C encrypted traffic data, identifying and classifying the encryption protocol type, version number and C&C encrypted traffic identifier, performing labeling processing, and adopting multi-feature fusion to obtain the encrypted traffic feature set are as follows:
[0015] S101: Analyze the C&C encrypted traffic data, extract the core elements of the C&C encrypted traffic, including the C&C encryption protocol type, version number, and encrypted traffic identifier, classify and mark the core elements, and obtain the core protocol data;
[0016] S102: Using the core protocol data, encoding the C&C encryption protocol type and version number by assigning an identifier, associating the C&C encryption traffic identifier with the protocol data, aggregating and standardizing the protocol information, and generating a labeled protocol feature;
[0017] S103: Based on the labeled protocol features, combined with a variety of label information, multi-feature fusion is performed to combine the labeled data with the C&C encrypted traffic features, and an encrypted traffic feature set is obtained by integrating differentiated data.
[0018] As a further solution of the present invention, based on the encrypted traffic feature set, the historical C&C encrypted communication data and the abnormal pattern data are compared, the deviation values of the C&C encryption parameters are sorted and prioritized, and the steps of generating parameter abnormality indicators are specifically as follows:
[0019] S201: Matching the encrypted traffic feature set with historical C&C encrypted traffic data, identifying and comparing similar protocol types and version numbers in historical C&C encrypted communication data and real-time C&C encrypted data sets through C&C encrypted traffic identifiers, and obtaining matching deviation data;
[0020] S202: Calculating a deviation value based on the matching deviation data, quantifying the variation degree of the C&C encrypted traffic data parameter, identifying the deviation degree through numerical analysis, and generating a deviation quantification result;
[0021] S203: Sorting and prioritizing the deviations in the deviation quantification results, prioritizing the deviation values using a predetermined risk rating standard, marking the risky C&C encrypted traffic data parameters as priority processing, and obtaining parameter anomaly indicators.
[0022] As a further solution of the present invention, according to the parameter anomaly index, the data of the associated C&C encrypted communication is verified, the identified C&C encrypted communication data is compared with the known abnormal transmission mode, and multi-feature fusion is performed to obtain the abnormal pattern set. Specifically, the steps are as follows:
[0023] S301: Based on the parameter anomaly indicator, the data of the C&C encrypted communication is matched with the parameter anomaly indicator, key abnormal parameters of the C&C encrypted communication are identified and checked, including encryption degree, frequency and timing anomalies, and a matching data set is generated;
[0024] S302: using the matching data set, comparing the C&C real-time encrypted communication data with the known abnormal transmission pattern, checking the correspondence between the C&C encryption protocol type and the encryption parameters, and generating a pattern comparison result;
[0025] S303: Based on the pattern comparison result, multi-feature fusion processing is performed to integrate data features from differentiated sources, including C&C encryption protocol type, encryption parameters, and communication frequency, to optimize the recognition capability of C&C encrypted traffic deviations and obtain an abnormal pattern set.
[0026] As a further solution of the present invention, the abnormal pattern set is used to identify the deviation of the state transition of the C&C encrypted traffic according to the nonlinear characteristics and hidden state of the C&C encrypted traffic, and the steps of obtaining the state transition analysis model are specifically as follows:
[0027] S401: Based on the abnormal pattern set, identify key nonlinear characteristics and potential hidden states in the C&C encrypted traffic, extract characteristics of encryption frequency changes, data packet changes and time intervals, and obtain state feature data;
[0028] S402: Using the state feature data, adopting a hidden Markov model, simulating the potential conversion rules between the C&C encrypted traffic data and the state, analyzing the conversion path between the traffic and the state, and generating an initialization state model;
[0029] S403: Adjust the parameters of the initialization state model, analyze the conversion probability of C&C encrypted traffic and state, capture the dynamic changes of real-time C&C encrypted traffic, and obtain a state conversion analysis model through iterative testing and adjustment.
[0030] As a further solution of the present invention, the formula of the hidden Markov model is as follows:
[0031]
[0032] Among them, P(O|Q) is the probability of observing sequence O under state sequence Q, o t is the observation at time t, q t is the state at time t, P(o t |q t ) is state q t Next observation t The probability of w t is the weight coefficient at time t, λ tis the learning rate at time t, For state q t The sustainability adjustment factor.
[0033] As a further solution of the present invention, the steps of analyzing C&C encrypted traffic using the state transition analysis model, comparing the analysis results of C&C encrypted traffic with known C&C communication patterns, identifying risks in state transitions, and obtaining risk traffic features using multi-feature fusion are as follows:
[0034] S501: Based on the state transition analysis model, analyze the C&C encrypted traffic, identify abnormal patterns in state transitions, record atypical communication frequencies, changes in encrypted data packets, and the degree of deviation from normal encrypted communication patterns, and obtain abnormal state data;
[0035] S502: Compare the abnormal state data with the known C&C encrypted communication mode, verify the fit between the state transition and the known attack mode, identify potential risk state transitions, and generate risk state matching results;
[0036] S503: Based on the risk status matching result, multi-feature fusion technology is applied to integrate the characteristics of encryption protocol type, encryption level and communication line, verify the accuracy of C&C encryption risk identification, and obtain risk traffic characteristics.
[0037] As a further solution of the present invention, according to the risk traffic characteristics, the risk level of the C&C encrypted traffic is evaluated, the abnormal parameters of the C&C encrypted traffic are compared with the preset threshold, and the encrypted traffic records exceeding the preset threshold are marked. The steps of generating the risk assessment result are specifically as follows:
[0038] S601: According to the risk traffic characteristics, a decision tree classification algorithm is used to compare the risk characteristics of the C&C encrypted traffic with the set risk level standard, analyze the risk level of the C&C encrypted traffic record, mark the risky C&C encrypted traffic, and obtain risk level data;
[0039] S602: Compare the risk level data with a preset abnormal parameter threshold, identify traffic records exceeding the threshold, prioritize the C&C encrypted traffic records, and generate an over-threshold traffic mark;
[0040] S603: Based on the above-threshold traffic mark, organize and summarize the C&C encrypted traffic records with risk marks, extract key risk encryption information and adjust the risk firewall to obtain risk assessment results.
[0041] As a further solution of the present invention, the formula of the decision tree classification algorithm is as follows:
[0042]
[0043] Among them, Gini(p) is the Gini impurity for evaluating the quality of splitting, k is the total number of categories, and p is i is the sample ratio in the node, w i is the weight of category i, t is the time, d t,i is the time decay factor, f i is the frequency adjustment factor.
[0044] Compared with the prior art, the advantages and positive effects of the present invention are:
[0045] In the present invention, the manageability of C&C encrypted traffic data and the accuracy of analysis are improved by carefully classifying and labeling the types, versions and traffic identifiers of C&C encryption protocols. When comparing C&C encrypted traffic features with historical data, deviation value sorting and priority classification are introduced, which not only enhances the sensitivity of anomaly detection, but also provides a rapid response capability to potential threats. The nonlinear characteristics and hidden states of C&C encrypted traffic are analyzed using anomaly pattern sets to deeply understand the dynamic changes behind C&C encrypted traffic and more effectively predict and defend against potential network attacks. Comprehensively assessing risks through multi-feature fusion makes risk assessment not only rely on a single indicator, but a comprehensive judgment in multiple dimensions, thereby enhancing the defense of overall network security. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a schematic diagram of the main steps of the present invention;
[0047] Figure 2 It is a schematic diagram of the refinement of S1 of the present invention;
[0048] Figure 3 It is a schematic diagram of the refinement of S2 of the present invention;
[0049] Figure 4 It is a schematic diagram of the refinement of S3 of the present invention;
[0050] Figure 5 It is a schematic diagram of the refinement of S4 of the present invention;
[0051] Figure 6 It is a detailed schematic diagram of S5 of the present invention;
[0052] Figure 7 It is a detailed schematic diagram of S6 of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0054] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.
[0055] Embodiment 1
[0056] See also Figure 1 , the present invention provides a technical solution: a multi-feature fusion C&C encrypted traffic identification algorithm, comprising the following steps:
[0057] S1: Analyze C&C encrypted traffic data, identify and classify encryption protocol types, version numbers, and C&C encrypted traffic identifiers, perform labeling, use multi-feature fusion, and extract key data points of C&C encrypted traffic data to obtain encrypted traffic feature sets;
[0058] S2: Based on the encrypted traffic feature set, compare the historical C&C encrypted communication data with the abnormal pattern data, calculate the deviation value of the C&C encryption parameter configuration, sort and prioritize the deviation values, and generate parameter anomaly indicators;
[0059] S3: Verify the data of the associated C&C encrypted communication based on the C&C encrypted traffic, compare the identified C&C encrypted communication data with the known abnormal transmission pattern, perform multi-feature fusion, extract key matching information, and obtain the abnormal pattern set;
[0060] S4: Using the abnormal pattern set, we model the nonlinear characteristics and hidden states of C&C encrypted traffic, train the model based on the state transition data of C&C encrypted traffic, and analyze the abnormal patterns of state transition.
[0061] Obtain a state transition analysis model;
[0062] S5: Analyze the C&C encrypted traffic using the state transition analysis model, compare the analysis results of the C&C encrypted traffic with the known C&C communication mode, identify the risk features in the state transition, use multi-feature fusion, and analyze the matching data to obtain the risk traffic features;
[0063] S6: Evaluate the risk level of C&C encrypted traffic based on risk traffic characteristics, compare abnormal parameters of C&C encrypted traffic with preset thresholds, filter encrypted traffic records that exceed preset thresholds, organize and format risk data, and generate risk identification results.
[0064] The encrypted traffic feature set includes protocol type, version number, encrypted traffic identifier and timestamp. The parameter anomaly indicators include version deviation of the encryption protocol, difference in algorithm identifier and traffic anomaly. The abnormal pattern set includes encryption protocol characteristics, abnormal data transmission frequency and traffic peak in the target time period. The state transition analysis model includes the state sequence of C&C encrypted traffic, state transition probability and identification criteria for abnormal states. The risk traffic characteristics include the risk level of the encryption protocol type, the changing version number and the traffic characteristics matching the known C&C communication pattern. The risk assessment results include the risk level of C&C encrypted traffic records, abnormal parameters and encrypted traffic records exceeding the threshold.
[0065] See also Figure 2 , analyze C&C encrypted traffic data, identify and classify encryption protocol types, version numbers and C&C encrypted traffic identifiers, perform labeling processing, and use multi-feature fusion to obtain the encrypted traffic feature set. The specific steps are as follows:
[0066] S101: Analyze the C&C encrypted traffic data, extract the core elements of the C&C encrypted traffic, including the C&C encryption protocol type, version number, and encrypted traffic identifier, classify and mark the core elements, and the execution process of obtaining the core protocol data is as follows;
[0067] The S101 sub-step analyzes the C&C encrypted traffic data and processes the collected data, including data cleaning and formatting operations, to ensure that all input data is in a valid and consistent format. The data parsing algorithm is used to conduct in-depth analysis of each piece of traffic data to extract key information from the traffic, such as the C&C encryption protocol type, version number, and encrypted traffic identifier. The extraction of key elements relies on specific parsing rules. For example, the protocol type can be identified through the header information of the data packet, and the version number and encrypted traffic identifier are contained in the payload of the data packet. Once the core elements are accurately extracted, the elements are classified and labeled, and a classification model is established. The model operates according to pre-defined protocol type and version rules. The classified data is stored in a structured database to facilitate subsequent operations and analysis to obtain core protocol data. The formula is: Where S is the standardized score of the core protocol data, p i is the protocol type weight of the ith data point, v i is the version number weight, t i Importance factor for encrypted traffic.
[0068] S102: Using the core protocol data, encoding the C&C encryption protocol type and version number by assigning an identifier, associating the C&C encryption traffic identifier with the protocol data, aggregating and standardizing the protocol information, and generating the labeled protocol features. The execution process is as follows;
[0069] Sub-step S102 uses the core protocol data to assign a unique identifier to each C&C encryption protocol type and its version number through a specially designed encoding device. A hash function based on protocol characteristics is used, which can convert the protocol type and version number into a short, unique code. After the encoding is completed, the identifier is associated with the C&C encrypted traffic identifier, and the database association query function is implemented to ensure that each encrypted traffic can be correctly associated with the corresponding protocol data. All protocol information is aggregated and standardized, which involves further cleaning and conversion of the data to ensure that all data conforms to the standard format for analysis and storage, and generate labeled protocol features. The formula is: Where C is the consistency score of the encoded protocol dataset, c j is the coding quality of the i-th protocol, b j The quality of the traffic data related to the protocol.
[0070] S103: Based on the labelled protocol features, multiple label information is combined to perform multi-feature fusion, and the labelled data is combined with the C&C encrypted traffic features. By integrating differentiated data, the execution process of the encrypted traffic feature set is obtained as follows;
[0071] Sub-step S103 is based on the labeling protocol features. Combining multiple label information for feature fusion is a key step to improve the accuracy of data analysis. Through an integrated learning framework, label data from different sources and types are brought together, and different weights are assigned to each label. The data is integrated by weighted average. It can effectively integrate information from different dimensions and enhance the expressiveness of the data. After integration, an encrypted traffic feature set is generated. The formula is: Among them, F is the comprehensive characteristic value of the encrypted traffic feature set, d k is the data value of the kth feature, w k is the weight of the feature.
[0072] See also Figure 3 ,Based on the encrypted traffic feature set, the historical C&C encrypted communication data and the abnormal pattern data are compared, and the deviation values of the C&C encryption parameters are sorted and prioritized. The specific steps for generating parameter anomaly indicators are as follows:
[0073] S201: Match the encrypted traffic feature set with the historical C&C encrypted traffic data, identify and compare the same protocol type and version number in the historical C&C encrypted communication data and the real-time C&C encrypted data set through the C&C encrypted traffic identifier, and obtain the matching deviation data. The execution process is as follows;
[0074] Sub-step S201 matches the encrypted traffic feature set with the historical C&C encrypted traffic data, extracts the encrypted traffic features monitored in real time, such as protocol type and version number, creates a feature set, matches the feature set through the preset C&C communication database, and ensures that each feature is compared with the historical C&C encrypted traffic features recorded in the database. The specific process includes extracting the protocol type and version number of each record in the database, comparing them one by one with the corresponding features of the real-time data, calculating the consistency and deviation between the two, and quantifying the deviation of key features through a specific calculation model. The deviation model assigns different weight coefficients according to the importance of the feature and stores the result as matching deviation data. The formula is: Among them, F is the feature set of C&C encrypted traffic, x i and i are the i-th feature values in the real-time data set and the historical data set respectively, w i is the weight of the ith feature, and n is the total number of features.
[0075] S202: Based on the matching deviation data, the deviation value is calculated, the variation degree of the C&C encrypted traffic data parameters is quantified, and the deviation degree is identified through numerical analysis. The execution process of generating the deviation quantification result is as follows;
[0076] Sub-step S202 is based on matching deviation data and quantifies the degree of variation of C&C encrypted traffic data parameters by defining a specific deviation value calculation formula. Each deviation will be assigned a weight coefficient, and the weight is adjusted according to the potential impact on the security of encrypted communications. For example, the deviation of the key exchange mechanism has a higher risk weight than the deviation of the protocol version. Each deviation value will be accurately calculated and converted into a numerical deviation score, which not only reflects the degree of variation of each parameter, but also provides a quantitative basis for risk assessment and generates deviation quantification results. The formula is: Among them, R i is the deviation quantization result of the i-th feature, Δ i is the deviation value, μ and σ are the mean and standard deviation respectively.
[0077] S203: sorting and prioritizing the deviations in the deviation quantification results, prioritizing the deviation values using a predetermined risk rating standard, marking the risky C&C encrypted traffic data parameters as priority processing, and obtaining the execution flow of the parameter anomaly indicator as follows;
[0078] Sub-step S203 sorts and prioritizes the deviations in the deviation quantification results, and prioritizes the higher-risk deviations by using pre-set risk rating standards, such as different risk classifications based on the deviation scores. This involves comparing the deviation value with a predetermined risk level threshold to identify high-risk C&C encrypted traffic data parameters that need to be processed first. Priority classification can effectively guide security operators to respond quickly to potential high-risk activities in daily network security monitoring, mark risky C&C encrypted traffic data parameters as priority processing, and obtain parameter anomaly indicators.
[0079] See also Figure 4 ,According to the parameter anomaly index, the data of the associated C&C encrypted communication is verified, the identified C&C encrypted communication data is compared with the known abnormal transmission mode, and multi-feature fusion is performed to obtain the abnormal pattern set. The specific steps are as follows:
[0080] S301: Based on the parameter anomaly index, the data of C&C encrypted communication is matched with the parameter anomaly index, and the key abnormal parameters of C&C encrypted communication are identified and checked, including encryption degree, frequency and timing anomalies. The execution process of generating a matching data set is as follows;
[0081] Sub-step S301 matches the real-time monitored C&C encrypted communication data with the parameter anomaly indicators based on the parameter anomaly indicators. The key anomaly parameters involved include the degree of encryption, the communication frequency, and the timing of the communication. For example, the abnormality of the degree of encryption refers to the use of non-standard or known vulnerable encryption algorithms, the frequency anomaly is manifested as a communication frequency that is significantly different from the normal mode, and the timing anomaly involves the activity of the communication at atypical times. For the abnormal parameters, the data points that are significantly different from the normal communication mode will be analyzed and marked to generate a matching data set. The formula is: Among them, M is the score of abnormal matching degree, a j is the weight of the jth abnormal parameter, d j is the observed value of the jth parameter in the real-time monitoring data, e j is the corresponding standard value in the historical anomaly indicator, and k is the number of anomaly parameters considered.
[0082] S302: Using the matching data set, the C&C real-time encrypted communication data is compared with the known abnormal transmission pattern, and the corresponding relationship between the C&C encryption protocol type and the encryption parameters is checked. The execution process of generating the pattern comparison result is as follows;
[0083] Sub-step S302 uses the matching data set to compare the real-time C&C encrypted communication data with the known abnormal transmission patterns in the database. By comparing the protocol type and encryption parameters of the C&C encrypted communication, the corresponding relationship is analyzed, especially encryption parameters such as the choice of encryption algorithm and changes in key length. The comparison not only considers a single feature, but also comprehensively considers multiple data points, including the specific version of the protocol and the encryption technology implemented. By deeply analyzing the degree of match between the data and the threat situation, the pattern comparison results are generated. The formula is: Among them, P is the score of pattern matching, b i is the matching weight of the i-th feature, v i is the actual observed value of the i-th feature in the real-time data, u i is the standard value of the same feature, and m is the total number of features involved in the comparison.
[0084] S303: Based on the pattern comparison results, multi-feature fusion processing is performed to integrate data features from differentiated sources, including C&C encryption protocol type, encryption parameters, and communication frequency, to optimize the ability to identify C&C encrypted traffic deviations, and the execution process of the abnormal pattern set is obtained as follows;
[0085] Sub-step S303 performs multi-feature fusion processing based on the pattern comparison results, aiming to enhance the ability to identify C&C encrypted traffic deviations by comprehensively considering features from different data sources, such as C&C encryption protocol type, encryption parameters, and communication frequency. Improve the detection accuracy of abnormal patterns through algorithm optimization and feature fusion. In particular, for marginalized data features, by enhancing weights or adjusting their influence in the overall model, optimize the overall threat detection model, including known threat patterns, predict unknown potential threat patterns, and obtain an abnormal pattern set. The formula is: Among them, F is the score of multi-feature fusion, c p is the fusion weight of the pth feature, f p is the normalized value of the pth feature, and n is the total number of features considered for fusion.
[0086] See also Figure 5 ,Using the abnormal pattern set, aiming at the nonlinear characteristics and hidden states of C&C encrypted traffic,,the deviation of the state transition of C&C encrypted traffic is identified, and the steps of obtaining the state transition analysis model are as follows:
[0087] S401: Based on the abnormal pattern set, identify the key nonlinear characteristics and potential hidden states in the C&C encrypted traffic, extract the characteristics of the encryption frequency change, data packet change and time interval, and obtain the execution flow of the state feature data as follows;
[0088] Based on the abnormal pattern set, sub-step S401 uses the entropy analysis method to calculate the entropy values of the three dimensions of packet frequency, size and time interval of encrypted traffic, divide the traffic data into multiple time windows, each window contains several data packets, calculate the entropy value in each window, and summarize it into an entropy value array. Calculate the average value of the array and set the entropy threshold equal to this average value. Filter out windows with entropy values greater than the threshold, which contain abnormal or encrypted behaviors. Further feature extraction is performed on the window data, including the average value, standard deviation, minimum and maximum value of the packet size, statistical characteristics of the time interval, etc. Combined with the features, a feature matrix is constructed, where each row represents the statistical characteristics of a window and each column represents a different feature dimension, forming a state feature data set. The formula is: Among them, H is the weighted entropy, p i is the probability of the i-th packet feature appearing, w i is the weight of the corresponding feature, and k is the total number of different packet features in the window.
[0089] S402: Using the state feature data and the hidden Markov model, the potential conversion rules between the C&C encrypted traffic data and the state are simulated, the conversion path of the traffic and the state is analyzed, and the execution process of generating the initialization state model is as follows;
[0090] Sub-step S402 uses the state feature data to set the parameters of the hidden Markov model, including the number of states, the observation probability matrix, the state transition matrix, and the initial state probability. By analyzing the state feature data, the various parameters of the model are estimated. The number of states is defined as the number of types of encrypted traffic characteristics, such as regular traffic, encrypted traffic, abnormal traffic, etc. The observation probability matrix is estimated using the maximum likelihood estimation method, and the probability of observing various features under different states is calculated based on the state feature data. By observing the state sequence, the state transition matrix, that is, the probability of transition from one state to another, is estimated, and the initial state probability is set according to the frequency of occurrence of each state at the beginning of the data set to generate an initialized state model.
[0091] The formula of the hidden Markov model is as follows:
[0092]
[0093] Among them, P(O|Q) is the probability of observing sequence O under state sequence Q, o t is the observation at time t, q t is the state at time t, P(o t |q t ) is state q t Next observation t The probability of w tis the weight coefficient at time t, λ t is the learning rate at time t, For state q t The sustainability adjustment factor.
[0094] The execution flow is as follows:
[0095] Based on the original state transition probability P(o t |q t ), introducing the time factor w t To adjust the importance of observations at each time point, w t It is calculated by the state change frequency in the past t time, and the learning rate λ is added t , parameters are dynamically adjusted according to the frequency of similar patterns in historical data to improve the model's adaptability to new trends, Considering the persistence of the state, if a state has appeared frequently in the past, the weight is increased to ensure the sensitivity of the model to common states, integrate parameters, and continuously optimize the prediction accuracy of state transitions by iteratively updating weight coefficients and learning rates. Through the continuous multiplication of a series of factors, a weighted state transition probability matrix is generated.
[0096] S403: Adjust the parameters of the initialization state model, analyze the conversion probability of C&C encrypted traffic and state, and capture the dynamic changes of real-time C&C encrypted traffic. Through iterative testing and adjustment, the execution process of the state conversion analysis model is obtained as follows;
[0097] The S403 sub-step adjusts the parameters of the initialized state model, adjusts and optimizes the model parameters according to the project management risk assessment method, applies the initialized hidden Markov model to the newly collected C&C encrypted traffic data, and observes the deviation between the model prediction and the actual data. By calculating the prediction error in each state, the state transition matrix and the observation probability matrix are adjusted to make the model better fit the data characteristics. Using the cross-validation method, the data set is split for multiple tests to evaluate the stability and prediction accuracy of the model. After each iteration, the performance of the new and old models is compared, and the model parameters with better performance are selected as the model to ensure that the dynamic changes of C&C encrypted traffic can be effectively captured, the accuracy of the prediction can be improved, and the state transition analysis model is obtained. The formula is: in, is the state transition probability from state i to state j, A ij is the current probability, is the predicted state transition probability, and α(t) is the dynamic learning rate.
[0098] See also Figure 6, use the state transition analysis model to analyze C&C encrypted traffic, compare the analysis results of C&C encrypted traffic with known C&C communication patterns, identify risks in state transitions, and use multi-feature fusion to obtain risk traffic features. The specific steps are as follows:
[0099] S501: Based on the state transition analysis model, the C&C encrypted traffic is analyzed, the abnormal pattern in the state transition is identified, the atypical communication frequency, the change of the encrypted data packet and the degree of deviation from the normal encrypted communication pattern are recorded, and the execution process of obtaining the abnormal state data is as follows;
[0100] Based on the state transition analysis model, sub-step S501 first divides the encrypted traffic data into multiple time periods. For each time period, the changes in the communication frequency and data packet size are calculated. For the communication frequency and data packet size of each time period, the change rate compared with the previous time period is calculated. The change rate is used to detect deviations from the normal communication mode. By setting the threshold and, identifying the time period where the change rate exceeds the threshold as an abnormal state, the degree of deviation of the abnormal state from the normal mode is calculated to obtain the abnormal state data. The formula is: Where D is the score of the deviation index, μ Δf and μ Δs are the average values of the communication frequency and the packet size change rate, σ Δf and σ Δs is the corresponding standard deviation, T is the total number of observed time periods, and f t The communication frequency for each time period, s t is the packet size, Δf t and Δs t are the communication frequency and the rate of change of data packets compared with the previous period, respectively.
[0101] S502: Compare the abnormal state data with the known C&C encrypted communication mode, verify the fit of the state transition with the known attack mode, identify potential risk state transitions, and generate the execution process of the risk state matching result as follows;
[0102] Sub-step S502 compares the abnormal state data with the known C&C encrypted communication mode, collects and marks abnormal state data sets from different network environments, including sudden data traffic peaks, communication records at atypical access time points, etc. Using a specially developed matching engine, each abnormal data is compared one by one with the known C&C encrypted communication mode stored in the database. The database collects network attack cases and corresponding communication modes worldwide. By calculating the difference indicators between each abnormal state and the known mode, including time series analysis results, statistical differences in data packet size distribution, communication frequency, etc., potential risk state transitions are identified and risk state matching results are generated. The formula is: Among them, R is the matching risk score, D obs,i is the value of the abnormal data on the i-th feature, D ref,i is the value of the reference mode on the i-th feature, ω i is the weight of the i-th feature.
[0103] S503: Based on the risk status matching result, the multi-feature fusion technology is applied to integrate the characteristics of the encryption protocol type, encryption degree and communication line, verify the accuracy of C&C encryption risk identification, and obtain the execution process of risk traffic characteristics as follows;
[0104] Sub-step S503 constructs a feature set based on the risk status matching results. The set includes multi-dimensional data points from encryption protocol type, encryption level and communication behavior. For each encryption protocol type, protocol-related data features are extracted from network traffic, such as TLS version information, encryption suite details, etc. The characteristics of the encryption level involve information such as key length and encryption algorithm used during key exchange. Communication behavior characteristics include communication frequency, data packet size distribution, etc. A comprehensive feature vector is created by logically combining the features. Each feature vector is processed by the risk assessment engine. The engine calculates the match between the feature vector and the known C&C encryption communication mode, verifies the accuracy of C&C encryption risk identification, and obtains risk traffic characteristics. The formula is: Among them, F is the feature score after fusion, T j is the conversion function of the i-th feature, X j is the original observation value of the i-th feature, λ j is the fusion weight of the j-th feature.
[0105] See also Figure 7 ,According to the risk traffic characteristics, the risk level of C&C encrypted traffic is evaluated, the abnormal parameters of C&C encrypted traffic are compared with the preset threshold, and the encrypted traffic records exceeding the preset threshold are marked. The specific steps for generating risk assessment results are as follows:
[0106] S601: Based on the risk traffic characteristics, a decision tree classification algorithm is used to compare the risk characteristics of the C&C encrypted traffic with the set risk level standard, analyze the risk level of the C&C encrypted traffic record, mark the risky C&C encrypted traffic, and obtain the risk level data. The execution process is as follows;
[0107] Substep S601 sets a series of risk rating standards based on risk traffic characteristics. The standards cover different security threat levels from low to high. Each standard specifically defines the threshold of risk characteristics, such as encryption strength, communication frequency, protocol anomalies and other indicators. The C&C encrypted traffic characteristics are carefully reviewed, and the characteristic data of each traffic record is compared with the risk rating standards one by one. Using the integrated risk calculation model, the model evaluates the overall risk level by weighting the risk scores of different characteristics, marks the risky C&C encrypted traffic, and generates risk level data.
[0108] The formula for the decision tree classification algorithm is as follows:
[0109]
[0110] Among them, Gini(p) is the Gini impurity for evaluating the quality of splitting, k is the total number of categories, and p is i is the sample ratio in the node, w i is the weight of category i, t is the time, d t,i is the time decay factor, f i is the frequency adjustment factor.
[0111] The execution flow is as follows:
[0112] Initialize the weights w of all categories i and the time decay factor d t ,i and the frequency adjustment factor f i , the factor can be pre-set based on the statistical information of historical data or learned through training data. For each node split decision, the sample proportion p of each category is calculated i , and combined with the corresponding weights, time decay and frequency factors, the weighted Gini impurity of each category is calculated, and the split attribute with the minimum weighted Gini impurity is selected. The process is repeated until a complete decision tree is built, and a decision tree model dynamically optimized according to the current data stream is obtained.
[0113] S602: Compare the risk level data with the preset abnormal parameter threshold, identify the traffic records exceeding the threshold, and prioritize the C&C encrypted traffic records to generate the execution process of the exceeding threshold traffic mark as follows;
[0114] Substep S602 compares the risk level data with the preset abnormal parameter threshold, which is set based on the frequency and severity of historical security events to ensure that features that represent high-risk behavior are monitored. A quantitative model is used to calculate whether the risk score of each record exceeds the threshold. For records that exceed the threshold, they are prioritized according to the risk level, and the ranking reflects the urgency of processing, and an over-threshold traffic mark is generated. The formula is: Among them, S is the ranking score, R total is the total risk score, and α and β are parameters that adjust the shape of the curve.
[0115] S603: Based on the over-threshold traffic mark, the C&C encrypted traffic records with risk marks are sorted and summarized, key risk encryption information is extracted and risk firewalls are adjusted, and the execution process of obtaining the risk assessment results is as follows;
[0116] Sub-step S603 organizes and summarizes the C&C encrypted traffic records with risk tags based on the over-threshold traffic tags, and creates a detailed risk report, including detailed information of all marked traffic such as timestamps, source and destination addresses, encryption protocol types, etc. The risk firewall is adjusted to ensure that it can provide effective protection for the currently identified risk patterns. This includes updating the firewall's rule set, strengthening the monitoring and blocking of specific encrypted communication patterns, and obtaining risk assessment results. The formula is: Among them, F new is the updated firewall rule set, F old is the existing rule set, γ is the adjustment coefficient, ζ n is the adjustment intensity for the nth risk type, R n Identification frequency for risk types.
[0117] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.
Claims
1. Multi-feature fusion C&C encrypted traffic identification algorithm, characterized by: The following steps are involved: Analyze C&C encrypted traffic data, identify and classify encryption protocol types, version numbers, and C&C encrypted traffic identifiers, perform labeling, and use multi-feature fusion to obtain an encrypted traffic feature set; Based on the encrypted traffic feature set, historical C&C encrypted communication data and abnormal pattern data are compared, deviation values of C&C encryption parameters are sorted and prioritized, and parameter abnormality indicators are generated; According to the parameter anomaly indicator, verify the data of the associated C&C encrypted communication, compare the identified C&C encrypted communication data with the known abnormal transmission mode, perform multi-feature fusion, and obtain an abnormal pattern set; By using the abnormal pattern set, the deviation of the state transition of the C&C encrypted traffic is identified according to the nonlinear characteristics and hidden state of the C&C encrypted traffic, and a state transition analysis model is obtained; Analyze the C&C encrypted traffic using the state transition analysis model, compare the analysis results of the C&C encrypted traffic with the known C&C communication mode, identify the risks in the state transition, and obtain the risk traffic features by fusion of multiple features; According to the risk traffic characteristics, the risk level of the C&C encrypted traffic is evaluated, the abnormal parameters of the C&C encrypted traffic are compared with the preset thresholds, the encrypted traffic records exceeding the preset thresholds are marked, and the risk assessment results are generated.
2. The multi-feature fusion C&C encrypted traffic identification algorithm according to claim 1 is characterized in that: The encrypted traffic feature set includes protocol type, version number, encrypted traffic identifier and timestamp; the parameter anomaly indicator includes version deviation of the encryption protocol, difference in algorithm identifier and traffic anomaly; the abnormal pattern set includes encryption protocol features, abnormal data transmission frequency and traffic peak in a target time period; the state transition analysis model includes the state sequence of C&C encrypted traffic, state transition probability and identification criteria for abnormal states; the risk traffic features include the risk level of the encryption protocol type, the changed version number and traffic features matching the known C&C communication mode; the risk assessment results include the risk level of C&C encrypted traffic records, abnormal parameters and encrypted traffic records exceeding the threshold.
3. The multi-feature fusion C&C encrypted traffic identification algorithm according to claim 1 is characterized in that: The steps for analyzing C&C encrypted traffic data, identifying and classifying encryption protocol types, version numbers, and C&C encrypted traffic identifiers, labeling them, and fusing multiple features to obtain the encrypted traffic feature set are as follows: Analyze C&C encrypted traffic data, extract the core elements of C&C encrypted traffic, including C&C encryption protocol type, version number, and encrypted traffic identifier, classify and mark the core elements, and obtain core protocol data; Using the core protocol data, encoding the C&C encryption protocol type and version number by assigning an identifier, associating the C&C encryption traffic identifier with the protocol data, aggregating and standardizing the protocol information, and generating a labeled protocol feature; Based on the labeled protocol features, multiple label information is combined to perform multi-feature fusion, combine the labeled data with the C&C encrypted traffic features, and obtain an encrypted traffic feature set by integrating differentiated data.
4. The multi-feature fusion C&C encrypted traffic identification algorithm according to claim 1 is characterized in that: Based on the encrypted traffic feature set, historical C&C encrypted communication data and abnormal pattern data are compared, the deviation values of C&C encryption parameters are sorted and prioritized, and the steps of generating parameter abnormality indicators are specifically as follows: Matching the encrypted traffic feature set with historical C&C encrypted traffic data, identifying and comparing similar protocol types and version numbers in historical C&C encrypted communication data and real-time C&C encrypted data sets through C&C encrypted traffic identifiers, and obtaining matching deviation data; Based on the matching deviation data, a deviation value is calculated, the variation degree of the C&C encrypted traffic data parameter is quantified, and the deviation degree is identified through numerical analysis to generate a deviation quantification result; The deviations in the deviation quantification results are sorted and prioritized, the deviation values are prioritized using a predetermined risk rating standard, the risky C&C encrypted traffic data parameters are marked as priority processing, and a parameter anomaly index is obtained.
5. The multi-feature fusion C&C encrypted traffic identification algorithm according to claim 1 is characterized in that: According to the parameter anomaly index, verify the data of the associated C&C encrypted communication, compare the identified C&C encrypted communication data with the known abnormal transmission mode, perform multi-feature fusion, and obtain the abnormal pattern set in the following steps: Based on the parameter anomaly indicator, the data of C&C encrypted communication is matched with the parameter anomaly indicator, key abnormal parameters of C&C encrypted communication are identified and checked, including encryption degree, frequency and timing anomalies, and a matching data set is generated; Using the matching data set, the C&C real-time encrypted communication data is compared with the known abnormal transmission pattern, the correspondence between the C&C encryption protocol type and the encryption parameters is checked, and a pattern comparison result is generated; According to the pattern comparison results, multi-feature fusion processing is performed to integrate data features from differentiated sources, including C&C encryption protocol type, encryption parameters, and communication frequency, to optimize the recognition capability of C&C encrypted traffic deviations and obtain an abnormal pattern set.
6. The multi-feature fusion C&C encrypted traffic identification algorithm according to claim 1 is characterized in that: By using the abnormal pattern set, the deviation of the state transition of the C&C encrypted traffic is identified according to the nonlinear characteristics and hidden state of the C&C encrypted traffic, and the steps of obtaining the state transition analysis model are specifically as follows: Based on the abnormal pattern set, key nonlinear characteristics and potential hidden states in C&C encrypted traffic are identified, characteristics of encryption frequency changes, data packet changes and time intervals are extracted, and state feature data is obtained; Using the state feature data, a hidden Markov model is used to simulate the potential conversion rules between the C&C encrypted traffic data and the state, analyze the conversion path of the traffic and the state, and generate an initialization state model; The parameters of the initialization state model are adjusted, the conversion probability of C&C encrypted traffic and state is analyzed, the dynamic change of real-time C&C encrypted traffic is captured, and the state conversion analysis model is obtained through iterative testing and adjustment.
7. The multi-feature fusion C&C encrypted traffic identification algorithm according to claim 6 is characterized in that: The formula of the hidden Markov model is as follows: Among them, P(O|Q) is the probability of observing sequence O under state sequence Q, o t is the observation at time t, q t is the state at time t, P(o t |q t ) is state q t Next observation t The probability of w t is the weight coefficient at time t, λ t is the learning rate at time t, For state q t The sustainability adjustment factor.
8. The multi-feature fusion C&C encrypted traffic identification algorithm according to claim 1 is characterized in that: The steps of analyzing C&C encrypted traffic using the state transition analysis model, comparing the analysis results of C&C encrypted traffic with known C&C communication patterns, identifying risks in state transitions, and obtaining risk traffic features using multi-feature fusion are as follows: Based on the state transition analysis model, the C&C encrypted traffic is analyzed to identify abnormal patterns in state transitions, and the atypical communication frequency, changes in encrypted data packets, and the degree of deviation from normal encrypted communication patterns are recorded to obtain abnormal state data; Compare the abnormal state data with known C&C encrypted communication patterns, verify the fit between the state transition and the known attack pattern, identify potential risk state transitions, and generate risk state matching results; According to the risk status matching results, multi-feature fusion technology is applied to integrate the characteristics of encryption protocol type, encryption degree and communication line, verify the accuracy of C&C encryption risk identification, and obtain risk traffic characteristics.
9. The multi-feature fusion C&C encrypted traffic identification algorithm according to claim 1 is characterized in that: According to the risk traffic characteristics, the risk level of the C&C encrypted traffic is evaluated, the abnormal parameters of the C&C encrypted traffic are compared with the preset threshold, and the encrypted traffic records exceeding the preset threshold are marked. The steps of generating the risk assessment result are specifically as follows: According to the risk traffic characteristics, a decision tree classification algorithm is used to compare the risk characteristics of the C&C encrypted traffic with the set risk level standard, analyze the risk level of the C&C encrypted traffic record, mark the risky C&C encrypted traffic, and obtain risk level data; Compare the risk level data with a preset abnormal parameter threshold, identify traffic records exceeding the threshold, prioritize C&C encrypted traffic records, and generate an over-threshold traffic mark; Based on the above-threshold traffic mark, C&C encrypted traffic records with risk marks are sorted and summarized, key risk encryption information is extracted and risk firewalls are adjusted to obtain risk assessment results.
10. The multi-feature fusion C&C encrypted traffic identification algorithm according to claim 9 is characterized in that: The formula of the decision tree classification algorithm is as follows: Among them, Gini(p) is the Gini impurity for evaluating the quality of splitting, k is the total number of categories, and p is i is the sample ratio in the node, w i is the weight of category i, t is the time, d t,i is the time decay factor, f i is the frequency adjustment factor.
Citation Information
Cited By
Railway infrastructure multi-source data fusion system and method
CN119475223A
Anonymous traffic detection method, device and equipment
CN119628876A
Electronic tag structure capable of preventing liquid from transferring
CN119647510A
Database detection operation method of biological feedback equipment
CN120089398A
Equipment access method and device, electronic device and storage medium
CN120602250A
