Malicious encrypted traffic detection method and device, electronic equipment and storage medium
Through trust evaluation and randomness detection technology, malicious encrypted traffic is identified and blocked, and the problems of sensitive information leakage and source blocking caused by traffic feature dependence in the existing technology are solved, achieving efficient and privacy-protected malicious traffic detection.
Patent Information
- Application Number
- CN202410559016.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2024-11-08
AI Technical Summary
The existing malicious encrypted traffic detection scheme relies on the selection of traffic characteristics, resulting in the leakage of sensitive information in third-party outsourcing detection scenarios, and it is difficult to block the generation of malicious traffic from the source. It is also more suitable for lightweight detection schemes in limited computing scenarios. few.
Using trust evaluation and randomness detection technology, terminals and nodes are evaluated through the first layer of filtering. The second layer of filtering recognizes malicious encrypted traffic through random feature extraction and password system classifiers, stripping away the dependence on traffic characteristics, and achieving active pre-emptive Test.
It effectively balances the conflict between privacy issues arising from traffic outsourcing detection and detection efficiency, and blocks the generation of malicious encrypted traffic from the source, which is suitable for limited computing power scenarios.
Smart Images

Figure CN118921179A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of malicious encrypted traffic detection, and in particular to a malicious encrypted traffic detection method, device, electronic device, and storage medium. Background Art
[0002] At present, most of the mainstream malicious encrypted traffic detection solutions are non-decryption solutions, which are usually implemented based on traditional statistical analysis methods or machine learning algorithms. Such solutions need to rely on multiple traffic features to achieve a richer representation of encrypted traffic. However, these externally exposed traffic features are very likely to cause sensitive information leakage in third-party outsourced detection scenarios. Summary of the invention
[0003] The embodiments of the present application provide a malicious encrypted traffic detection method, device, electronic device, and storage medium to achieve malicious encrypted traffic detection that is not affected by encrypted traffic characteristics.
[0004] The present application embodiment adopts the following technical solutions:
[0005] In a first aspect, an embodiment of the present application provides a method for detecting malicious encrypted traffic, wherein the method comprises:
[0006] In the first layer of filtering, trust evaluation is performed on the terminals and / or nodes requesting access to the environment;
[0007] Performing a second layer of filtering on the credible or suspicious terminals and / or nodes in the trust evaluation result;
[0008] In the second layer of filtering, malicious encrypted traffic is obtained based on the encrypted traffic of the trusted or suspicious terminals and / or nodes through random feature extraction and cryptographic system classifier. The cryptographic system classifier is used to identify the cryptographic system based on the random features extracted from the random features.
[0009] In some embodiments, at the first level of filtering, trust evaluation is performed on the terminal and / or node requesting access to the environment, including:
[0010] Record access information of each joining terminal and / or node;
[0011] Set the trusted factors i (k), suspicious factor d i (k) and the access count c(k);
[0012] The trust factor s i (k) includes the similarity between the current node access information and the historical access information;
[0013] The suspicious factor d i(k) includes the degree of difference between the current node access information and the historical information;
[0014] The trust factor s i (k) and the access count c(k) are combined to calculate the credibility coefficient;
[0015] The suspicious factor d i (k) and the access count c(k) are fused to calculate the suspicious coefficient.
[0016] In some embodiments, the method further comprises:
[0017] If the current access information is different from any historical access information, s i (k) will be set to 0;
[0018] If the current access information overlaps with the historical access information, s i (k) will be set to
[0019] If the current access information is exactly the same as the historical access information, then s i (k) is set to 1;
[0020] If the current access information is different from any historical access information, d i (k) will be set to 1;
[0021] If the current access information overlaps with the historical access information, d i (k) will be set to
[0022] If the current access information is exactly the same as the historical access information, set d i (k) will be set to 0.
[0023] In some embodiments, at the first level of filtering, trust evaluation is performed on the terminal and / or node requesting access to the environment, further comprising:
[0024] Introduce peer review rules, where the collaborators of the target node evaluate the reputation of the target node to obtain the peer trust value;
[0025] The credibility coefficient, the suspicion coefficient and the peer trust value are placed as input items into a trust evaluation engine, and the trust evaluation engine sets a dynamically changing evaluation strategy.
[0026] In some embodiments, the method further comprises:
[0027] According to the dynamic evaluation strategy, the terminals and / or nodes corresponding to the trust values are divided into three categories: trusted, suspicious, and untrustworthy according to the trust threshold;
[0028] All traffic from untrusted nodes will be discarded directly.
[0029] Traffic from suspicious or trusted nodes is forwarded to the second layer of filtering.
[0030] In some embodiments, in the second layer of filtering, malicious encrypted traffic is obtained through random feature extraction and cryptographic system classifier according to the encrypted traffic of the trusted or suspicious terminal and / or node, including:
[0031] In the second layer of filtering, random features are extracted directly on the ciphertext payload of the encrypted traffic through random feature extraction according to the encrypted traffic;
[0032] Based on the extraction of random features, a randomness detection suite is used to extract randomness indicators on random 0 / 1 sequences.
[0033] In some embodiments, in the second layer of filtering, malicious encrypted traffic is obtained through random feature extraction and cryptographic system classifier according to the encrypted traffic of the trusted or suspicious terminal and / or node, including:
[0034] Constructing a feature space according to the selected randomness index as an input of the cryptographic system classifier;
[0035] Generate an identification result of the negotiated cryptographic system through a pre-trained data classification model, wherein the data classification model is obtained by training a FNN feed-forward neural network using multiple sets of data until convergence;
[0036] Access is allowed for encrypted traffic that belongs to the negotiated cipher system set;
[0037] Encrypted traffic that does not belong to the negotiated cryptographic system is discarded.
[0038] In a second aspect, an embodiment of the present application further provides a malicious encrypted traffic detection device, wherein the device comprises:
[0039] A first filtering module, configured to filter at the first layer and perform a trust evaluation on a terminal and / or a node requesting access to the environment;
[0040] A processing module, configured to perform a second layer of filtering on credible or suspicious terminals and / or nodes in the trust evaluation result;
[0041] The second filtering module is used for filtering at the second layer. According to the encrypted traffic of the trusted or suspicious terminals and / or nodes, malicious encrypted traffic is obtained through random feature extraction and a cryptographic system classifier. The cryptographic system classifier is used to identify the cryptographic system according to the random features extracted from the random features.
[0042] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to perform the above method.
[0043] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes the above method.
[0044] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: in the first layer of filtering, a trust evaluation is performed on the terminals and / or nodes requesting access to the environment; and a second layer of filtering is performed on the trusted or suspicious terminals and / or nodes in the results of the trust evaluation. In the second layer of filtering, malicious encrypted traffic is obtained based on the encrypted traffic of the trusted or suspicious terminals and / or nodes through random feature extraction and a cryptographic system classifier, and the cryptographic system classifier is used to identify the cryptographic system based on the random features extracted from the random features. Through the above method, with the help of randomness detection and trust evaluation technology, it is not affected by the characteristics of encrypted traffic. In addition, the above method can better balance the conflict between privacy issues and detection efficiency caused by traffic outsourcing detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0046] Figure 1 This is a schematic diagram of the malicious encrypted traffic detection method in an embodiment of the present application;
[0047] Figure 2 This is a schematic diagram of the implementation principle of the malicious encrypted traffic detection method in the embodiment of the present application;
[0048] Figure 3 This is a schematic diagram of the structure of a malicious encrypted traffic detection device in an embodiment of the present application;
[0049] Figure 4 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0051] The technical terms involved in this application are as follows:
[0052] Randomness testing is a technique used to measure the randomness distribution of the sequence to be tested, and is often implemented using a randomness testing suite.
[0053] Trust assessment is a technology that uses factors such as the target object's historical behavior patterns or evaluations from collaborative partners to judge the target's reputation, and evaluates the target's reputation based on certain evaluation strategies.
[0054] Negotiated cryptographic system: Before establishing a TLS / SSL connection, both parties need to negotiate to determine the encryption algorithm to be used and exchange session keys. The session traffic is generated by encrypting the negotiated cryptographic algorithm to ensure transmission security.
[0055] As the network security situation becomes increasingly severe, a large number of information systems have chosen to encrypt the transmission of their business data to reduce the risk of sensitive information leakage. This has further exacerbated the difficulty of malicious traffic analysis, and encrypted traffic analysis commissioned by three parties has gradually become a mainstream solution. However, for corporate parties with sensitive business data, three-party traffic analysis that relies on the collection of features such as traffic packet headers has obviously deviated from the original intention of autonomous risk control. Therefore, how to balance the conflict between detection efficiency and data privacy has become an urgent problem to be solved in the field of malicious encrypted traffic detection.
[0056] The inventors found during their research that the solutions in the related art have the following deficiencies:
[0057] (1) The recognition effect of malicious encrypted traffic detection schemes mostly depends on the selection of features, and these externally exposed features are very likely to cause sensitive information leakage in third-party detection scenarios.
[0058] (2) Most malicious encrypted traffic detection solutions are post-identification, that is, filtering malicious traffic in a certain network node, and cannot actively block the initiation of malicious traffic from the source.
[0059] (3) In order to achieve better recognition efficiency, malicious encrypted traffic detection solutions often pursue larger-scale training data and more complex learning models. However, little is known about lightweight traffic detection solutions that are suitable for scenarios with limited computing power.
[0060] In view of the above shortcomings, the malicious encrypted traffic detection method in the embodiment of the present application, with the help of random detection and trust assessment technology, the traffic detection scheme can get rid of the dependence on traffic feature selection, and at the same time, it is a good balance between the conflict between privacy issues and detection efficiency caused by traffic outsourcing detection. By using random detection to get rid of the dependence of traditional encrypted traffic detection schemes on feature selection, the generation of malicious encrypted traffic is blocked from the source through the trust filtering engine.
[0061] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0062] The present application embodiment provides a method for detecting malicious encrypted traffic, such as Figure 1 As shown, a schematic diagram of a malicious encrypted traffic detection method in an embodiment of the present application is provided, and the method at least includes the following steps S110 to S130:
[0063] Step S110 , at the first level of filtering, a trust evaluation is performed on the terminal and / or node requesting to access the environment.
[0064] In the first layer of filtering, it is necessary to request the terminals and nodes of the access environment to perform trust evaluation. The evaluation method does not use the common feature extraction, but uses the trust evaluation engine to block the generation of malicious traffic from the source.
[0065] It can be understood that the trust assessment engine can perform trust assessment on the terminal or node currently requesting access to the environment based on the dynamic assessment strategy. Only trusted terminals or nodes are allowed to access the environment, thereby cutting off the generation of malicious traffic at the source.
[0066] By maintaining an access record table, the access environment information of the current access node is obtained, and the historical access environment information is stored. It can be understood that the access environment information of the current access node is unique identification information that is not easy to be tampered with, such as a MAC address.
[0067] In addition, peer review can be added, in which collaborators make reputation evaluations on target nodes (nodes requesting access to the environment) based on peer review rules.
[0068] Step S120: performing a second-level filtering on the credible or suspicious terminals and / or nodes in the trust evaluation result.
[0069] For the credible or suspicious terminals and / or nodes in the trust evaluation result, the raw encrypted traffic is introduced into the second layer filtering.
[0070] It can be understood that the credible or suspicious terminals and / or nodes in the trust evaluation result are terminals or nodes that cannot be judged through historical environment information or peer evaluation.
[0071] For terminals or nodes that cannot be judged through historical environmental information and peer evaluation, the generated encrypted traffic is introduced into the random feature extraction process.
[0072] Step S130, in the second layer of filtering, malicious encrypted traffic is obtained based on the encrypted traffic of the trusted or suspicious terminals and / or nodes through random feature extraction and a cryptographic system classifier. The cryptographic system classifier is used to identify the cryptographic system based on the random features extracted from the random features.
[0073] Random feature extraction is mainly used to extract random features from the input encrypted traffic payload. The cryptographic system classifier mainly uses the extracted random features to identify the cryptographic system, identify the encrypted traffic payload that does not belong to the negotiated cryptographic algorithm set, and judge it as malicious encrypted traffic. Otherwise, it is allowed to access the environment.
[0074] Through the above method, node access information and peer evaluation indicators are used as trust evaluation factors. Under the guidance of dynamic trust evaluation strategy, the trust evaluation engine is used to identify the source of malicious nodes, and traffic detection is extended from passive single-point detection to active pre-detection.
[0075] Through the above method, with the help of the plug-and-play characteristics of the randomness detection suite (random feature extraction), it is seamlessly embedded in the traffic forwarding process to extract the randomness characteristics of the encrypted traffic. On this basis, malicious encrypted traffic is identified by utilizing a lightweight negotiated cryptographic system classifier (cryptographic system classifier), effectively eliminating the dependence of traditional traffic detection solutions on traffic features, and effectively solving the conflict between traffic feature privacy and detection efficiency in the third-party outsourced detection scenario.
[0076] In one embodiment of the present application, at the first level of filtering, a trust evaluation is performed on the terminal and / or node requesting access to the environment, including: recording the access information of each terminal and / or node; setting a trust factor s i (k), suspicious factor d i (k) and access count c(k); the trust factor s i (k) includes the similarity between the current node access information and the historical access information; the suspicious factor d i (k) includes the difference between the current node access information and the historical information; the trust factor s i (k) and the access count c(k) are combined to calculate the credibility coefficient; the suspicious factor d i (k) and the access count c(k) are fused to calculate the suspicious coefficient.
[0077] When implementing it, Figure 2As shown, the system needs to be initialized. During initialization, the system will grant the same initial trust value T to all nodes that join for the first time. 0 , which can generally be set to T 0 = 0.5, to ensure that each has an initial trust value T 0 All nodes have a fair chance to join the system.
[0078] For further information, please refer to Figure 2 The access information collection module will record the access information of each node, such as MAC address and other access information that cannot be forged, and maintain an access record table Y that records historical access information. acc .
[0079] Set the trusted factors i (k) and suspicious factor d i (k), c(k) represents the access count and is defined as μ is the counting threshold, k represents the number of node accesses, starting from the first access request of the node. When the number of accesses reaches the counting threshold, Will be set to 1.
[0080] Furthermore, the credibility factor s i (k) and the access count c(k) are combined to calculate the credibility coefficient, and the suspicious factor d i The suspicious coefficient is calculated by fusing the access count c(k) and the access count c(k).
[0081] In one embodiment of the present application, the method further includes: if the current access information is different from any historical access information, s i (k) will be set to 0; if the current access information overlaps with the historical access information, s i (k) will be set to If the current access information is exactly the same as the historical access information, then s i (k) is set to 1; if the current access information is different from any historical access information, d i (k) will be set to 1; if the current access information overlaps with the historical access information, d i (k) will be set to If the current access information is exactly the same as the historical access information, set d i (k) will be set to 0.
[0082] Credibility Factors i (k) is the similarity between the current node access information and the historical access information. If the current access information is different from any historical access information, s i (k) will be set to 0; if the current access information overlaps with the historical access information, s i (k) will be set to If the current access information is exactly the same as the historical access information, then set s i (k) to 1, where m is a number such that 0 < m < k and increments by 1 each time starting from 1.
[0083] Suspicious factor d i (k) is the degree of difference between the current node access information and the historical information. If the current access information is different from any historical access information, d i (k) will be set to 1; if the current access information overlaps with the historical access information, d i (k) will be set to If the current access information is exactly the same as the historical access information, set d i (k) will be set to 0.
[0084] In an embodiment of the present application, at the first - layer filtering, for the terminals and / or nodes requesting access to the environment, trust evaluation is performed, and it further includes: introducing a peer review rule, where the collaborators of the target node give an evaluation of the reputation of the target node to obtain a peer trust value; taking the trust coefficient, the suspicious coefficient, and the peer trust value as input items and placing them into a trust evaluation engine, and the trust evaluation engine sets an evaluation strategy that changes dynamically.
[0085] Introduce a peer review rule R_peer. This review rule is for the collaborators of the target node to evaluate the reputation of the target node itself, and the review is performed according to whether malicious payload delivery from the target node has been received. Place the above - mentioned trust factors (trust coefficient, suspicious coefficient, peer review rule) as input items into the trust evaluation engine, and the trust evaluation engine sets an evaluation strategy that changes dynamically.
[0086] In an embodiment of the present application, the method further includes: according to the dynamic evaluation strategy, dividing the terminals and / or nodes corresponding to the trust values into three categories: trusted, suspicious, and untrusted according to a trust threshold; directly discarding all traffic from untrusted node sources; forwarding traffic from suspicious or trusted node sources to the second - layer filtering.
[0087] According to the dynamic evaluation strategy, divide the nodes with a trust value of T i into three categories: trusted, suspicious, and untrusted according to a trust threshold. Directly discard all traffic from untrusted node sources, and forward traffic from suspicious or trusted node sources to the second - layer filtering.
[0088] In one embodiment of the present application, in the second layer of filtering, malicious encrypted traffic is obtained based on the encrypted traffic of the trusted or suspicious terminals and / or nodes through random feature extraction and a cryptographic system classifier, including: in the second layer of filtering, random features are extracted based on the encrypted traffic, and randomness features are directly extracted on the ciphertext payload of the encrypted traffic; based on the extracted random features, a randomness detection suite is used to extract randomness indicators on a random 0 / 1 sequence.
[0089] For the encrypted traffic forwarded to the second-layer filtering module, the random feature extraction module directly extracts random features from the ciphertext payload of the traffic, and uses the randomness detection suite to extract randomness indicators from the random 0 / 1 sequence.
[0090] It can be understood that the randomness detection suite provides a total of 15 randomness measurement indicators. Based on the discrimination of randomness indicators, 11 important randomness indicators are selected as identification features of the negotiated cryptographic system, including indicators such as serial test, single bit test, intra-block frequency test, and run test. The randomness detection suite is plug-and-play and can be embedded in the traffic forwarding process without any sense to extract the randomness characteristics of encrypted traffic.
[0091] In one embodiment of the present application, in the second layer of filtering, malicious encrypted traffic is obtained according to the encrypted traffic of the trusted or suspicious terminals and / or nodes through random feature extraction and a cryptographic system classifier, including: constructing a feature space according to the screened randomness index as the input of the cryptographic system classifier; generating an identification result of the negotiated cryptographic system through a pre-trained data classification model, wherein the data classification model is obtained by training a FNN feedforward neural network using multiple groups of data until convergence; access is allowed to encrypted traffic belonging to the negotiated cryptographic system set; and encrypted traffic that does not belong to the negotiated cryptographic system is discarded.
[0092] For encrypted traffic that belongs to the negotiated cipher system set, it is considered to belong to the negotiated cipher system set and meets the encryption algorithm requirements of the TLS / SSL protocol and can be released.
[0093] For encrypted traffic that belongs to the negotiated cipher system set, it is considered that it does not belong to the negotiated cipher system set and does not meet the encryption algorithm requirements of the TLS / SSL protocol, and is directly discarded.
[0094] The feature space is constructed using the selected randomness index as the input of the cryptographic system classifier. With the characteristics of the simple structure and low computing power of the FNN feedforward neural network, the cryptographic system classifier is embedded into the traffic detection process as a non-sensing middleware.
[0095] Specifically, the original FNN network model structure is modified to a double hidden layer 28-neuron structure that is more suitable for cryptographic system classification. The 11 selected important randomness metrics are used as model input, batch normalization is introduced to make the input data evenly and reasonably distributed, the loss function sigmoid is used as the activation function of the model output layer, and malicious or benign traffic is divided into two categories, and the Adam optimizer is used to find the optimal parameter combination of the cryptographic system classifier.
[0096] By using a lightweight negotiated cryptographic system classifier to identify malicious encrypted traffic, the traditional traffic detection solution is effectively stripped of its reliance on traffic features, and the conflict between traffic feature privacy and detection efficiency in the third-party outsourced detection scenario is well resolved.
[0097] Based on the block ciphers such as AES\DES\ChaCha20 and stream ciphers such as RC4 commonly used in TLS / SSL protocols, the embodiments of this application also add national secret algorithms such as SM4, and combine with cipher working modes such as CBC\GCM\ECB to annotate the training data. After multiple rounds of training iterations, the cipher system classifier can identify the negotiated cipher system.
[0098] Due to the negotiated cipher system set Φ, the encrypted traffic belonging to the negotiated cipher system set Φ is allowed to pass through the detection middleware, and the encrypted traffic not belonging to the negotiated cipher system is discarded, thereby achieving a second filtering of the encrypted traffic.
[0099] To better illustrate the malicious encrypted traffic detection method in the embodiment of the present application, please refer to Figure 2 , its implementation principle specifically includes the following steps:
[0100] (1) System initialization
[0101] When the system is initialized, it will grant all nodes that join for the first time an identical initial trust value T. 0 , which can generally be set to T 0 = 0.5, to ensure that each has an initial trust value T 0 All nodes have a fair chance to join the system.
[0102] (2) First-level filtering
[0103] The access information collection module records the access information of each node, such as MAC address and other unforgeable access information, and maintains an access record table Y that records historical access information. acc . Set the trusted factor s i (k) and suspicious factor d i (k), c(k) represents the access count and is defined as μ is the counting threshold, k represents the number of node accesses, starting from the first access request of the node. When the number of accesses reaches the counting threshold, Will be set to 1.
[0104] Credibility Factors i (k) is the similarity between the current node access information and the historical access information. If the current access information is different from any historical access information, s i (k) will be set to 0; if the current access information overlaps with the historical access information, s i (k) will be set to m / k; if the current access information is exactly the same as the historical access information, s i (k) is set to 1. Suspicious factor d i (k) is the difference between the current node access information and the historical information. If the current access information is different from any historical access information, d i (k) will be set to 1; if the current access information overlaps with the historical access information, d i (k) will be set to If the current access information is exactly the same as the historical access information, set d i (k) will be set to 0. Further, the trust factor s i The reliability coefficient calculated by fusing (k|) and access count c(k) is:
[0105]
[0106] The suspicious factor d i The suspicious coefficient is calculated by fusing (k) and the access count c(k):
[0107]
[0108] Introducing peer review rules peer , the evaluation rule is that the node's collaborators evaluate the reputation of the target node, and the evaluation is performed based on whether malicious payloads have been delivered from the target node. The above trust factors are placed as input items into the trust evaluation engine, and the trust evaluation engine sets a dynamically changing evaluation strategy. The Beta probability density function is often used in lightweight trust evaluation because it has the characteristics of simple calculation, high efficiency and convenience. The expression of the Beta probability density function is:
[0109]
[0110] Where θ is the action probability of the node, 0<θ<1; α is the number of times the node is evaluated as trustworthy by peers, α>0; β is the number of times the node is evaluated as untrustworthy by peers, β>0. Let tr i , the number of times the peer review reputation is untrustworthy is dsi , the calculated peer trust value is:
[0111]
[0112] At the same time, the credibility coefficient s is introduced i (k) and the suspicious coefficient d i (k), and the trust value is normalized and mapped to the interval [0, 1] for easy evaluation. At the same time, the fusion attenuation factor ρ i The trust evaluation can be sensitive to malicious behavior, and the attenuation factor ρ i Defined as:
[0113]
[0114] The final calculated trust value T i for:
[0115]
[0116] According to the dynamic evaluation strategy, the trust value is T i The nodes are divided into three categories according to the trust threshold: trusted, suspicious, and untrusted. All traffic from untrusted nodes will be directly discarded, and traffic from suspicious or trusted nodes will be forwarded to the second layer of filtering.
[0117] (3) Second layer of filtering
[0118] For the encrypted traffic forwarded to the second-layer filtering module, the random feature extraction module directly extracts random features from the ciphertext payload of the traffic, and uses the randomness detection suite to extract randomness indicators from the random 0 / 1 sequence. The randomness detection suite provides a total of 15 randomness metrics, and 11 important randomness indicators are selected as identification features of the negotiated cryptographic system based on the discrimination of randomness indicators, including serial test, single bit test, intra-block frequency test, run test and other indicators.
[0119] The feature space is constructed using the selected randomness indicators as the input of the cryptographic system classifier. With the characteristics of the simple structure and low computing power of the FNN feedforward neural network, the cryptographic system classifier is embedded in the traffic detection process as a non-sensing middleware. The original FNN network model structure is modified to a double hidden layer 28-neuron structure that is more suitable for cryptographic system classification. The 11 selected important randomness metrics are used as model input, and batch normalization processing is introduced to make the input data evenly and reasonably distributed. Sigmoid is used as the activation function of the model output layer to perform binary classification of malicious or benign traffic, and the Adam optimizer is used to find the optimal parameter combination of the cryptographic system classifier.
[0120] On the basis of block ciphers such as AES\DES\ChaCha20 and stream ciphers such as RC4 commonly used in TLS / SSL protocols, national secret algorithms such as SM4 are added, and combined with cipher working modes such as CBC\GCM\ECB, the training data is annotated. After multiple rounds of training iterations, the cipher system classifier is able to identify the negotiated cipher system, due to the negotiated cipher system set Φ. Encrypted traffic belonging to the negotiated cipher system set Φ is allowed to pass through the detection middleware, and encrypted traffic that does not belong to the negotiated cipher system is discarded, thereby achieving a second filtering of encrypted traffic.
[0121] The above method uses random feature extraction to realize cryptographic system identification, extracts random features from traffic ciphertext payloads, and screens out traffic that does not belong to the negotiated cryptographic system, effectively resolving the conflict between traffic feature privacy and detection efficiency in the scenario of three-party outsourced encrypted traffic detection, and supports deployment in scenarios with limited computing power. At the same time, the trust engine with dynamic evaluation strategies, with the help of multi-trust factor collection, blocks the generation of malicious encrypted traffic from the source, and promotes passive single-point detection to active full-process detection.
[0122] The embodiment of the present application also provides a malicious encrypted traffic detection device 300, such as Figure 3 As shown, a schematic diagram of the structure of a malicious encrypted traffic detection device in an embodiment of the present application is provided, wherein the malicious encrypted traffic detection device 300 comprises at least: a first filtering module 310, a processing module 320 and a second filtering module 330, wherein:
[0123] In one embodiment of the present application, the first filtering module 310 is specifically used to: perform trust evaluation on the terminal and / or node requesting to access the environment at the first level of filtering.
[0124] In the first layer of filtering, it is necessary to request the terminals and nodes of the access environment to perform trust evaluation. The evaluation method does not use the common feature extraction, but uses the trust evaluation engine to block the generation of malicious traffic from the source.
[0125] It can be understood that the trust assessment engine can perform trust assessment on the terminal or node currently requesting access to the environment based on the dynamic assessment strategy. Only trusted terminals or nodes are allowed to access the environment, thereby cutting off the generation of malicious traffic at the source.
[0126] By maintaining an access record table, the access environment information of the current access node is obtained, and the historical access environment information is stored. It can be understood that the access environment information of the current access node is unique identification information that is not easy to be tampered with, such as a MAC address.
[0127] In addition, peer review can be added, in which collaborators make reputation evaluations on target nodes (nodes requesting access to the environment) based on peer review rules.
[0128] In one embodiment of the present application, the processing module 320 is specifically used to perform a second layer of filtering on the trusted or suspicious terminals and / or nodes in the trust evaluation result.
[0129] For the credible or suspicious terminals and / or nodes in the trust evaluation result, the raw encrypted traffic is introduced into the second layer filtering.
[0130] It can be understood that the credible or suspicious terminals and / or nodes in the trust evaluation result are terminals or nodes that cannot be judged through historical environment information or peer evaluation.
[0131] For terminals or nodes that cannot be judged through historical environmental information and peer evaluation, the generated encrypted traffic is introduced into the random feature extraction process.
[0132] In one embodiment of the present application, the second filtering module 330 is specifically used for: in the second layer of filtering, according to the encrypted traffic of the trusted or suspicious terminal and / or node, malicious encrypted traffic is obtained through random feature extraction and a cryptographic system classifier, and the cryptographic system classifier is used to identify the cryptographic system according to the random features extracted by the random features.
[0133] Random feature extraction is mainly used to extract random features from the input encrypted traffic payload. The cryptographic system classifier mainly uses the extracted random features to identify the cryptographic system, identify the encrypted traffic payload that does not belong to the negotiated cryptographic algorithm set, and judge it as malicious encrypted traffic. Otherwise, it is allowed to access the environment.
[0134] It can be understood that the above-mentioned malicious encrypted traffic detection device can implement the various steps of the malicious encrypted traffic detection method provided in the aforementioned embodiment, and the relevant explanations about the malicious encrypted traffic detection method are applicable to the malicious encrypted traffic detection device and will not be repeated here.
[0135] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 4 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0136] The processor, network interface and memory can be connected to each other through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0137] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0138] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a malicious encrypted traffic detection device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0139] In the first layer of filtering, trust evaluation is performed on the terminals and / or nodes requesting access to the environment;
[0140] Performing a second layer of filtering on the credible or suspicious terminals and / or nodes in the trust evaluation result;
[0141] In the second layer of filtering, malicious encrypted traffic is obtained based on the encrypted traffic of the trusted or suspicious terminals and / or nodes through random feature extraction and cryptographic system classifier. The cryptographic system classifier is used to identify the cryptographic system based on the random features extracted from the random features.
[0142] The above application Figure 1The method performed by the malicious encrypted traffic detection device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0143] The electronic device may also perform Figure 1 The method executed by the malicious encrypted traffic detection device in the Figure 1 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.
[0144] The present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, enable the electronic device to execute Figure 1 The method performed by the malicious encrypted traffic detection device in the illustrated embodiment is specifically used to perform:
[0145] In the first layer of filtering, trust evaluation is performed on the terminals and / or nodes requesting access to the environment;
[0146] Performing a second layer of filtering on the credible or suspicious terminals and / or nodes in the trust evaluation result;
[0147] In the second layer of filtering, malicious encrypted traffic is obtained based on the encrypted traffic of the trusted or suspicious terminals and / or nodes through random feature extraction and cryptographic system classifier. The cryptographic system classifier is used to identify the cryptographic system based on the random features extracted from the random features.
[0148] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0149] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0150] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0151] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0152] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0153] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0154] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0155] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0156] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0157] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for detecting malicious encrypted traffic, wherein: The method comprises: In the first layer of filtering, trust evaluation is performed on the terminals and / or nodes requesting access to the environment; Performing a second layer of filtering on the credible or suspicious terminals and / or nodes in the trust evaluation result; In the second layer of filtering, malicious encrypted traffic is obtained based on the encrypted traffic of the trusted or suspicious terminals and / or nodes through random feature extraction and cryptographic system classifier. The cryptographic system classifier is used to identify the cryptographic system based on the random features extracted from the random features.
2. The method of claim 1, wherein: At the first level of filtering, trust evaluation is performed on the terminals and / or nodes requesting access to the environment, including: Record access information of each joining terminal and / or node; Set the trusted factors i (k), suspicious factor d i (k) and access count c(k); The trust factor s i (k) includes the similarity between the current node access information and the historical access information; The suspicious factor d i (k) includes the degree of difference between the current node access information and the historical information; The trust factor s i (k) and the access count c(k) are combined to calculate a credibility coefficient; The suspicious factor d i (k) and the access count c(k) are fused to calculate the suspicious coefficient.
3. The method of claim 2, wherein: The method further comprises: If the current access information is different from any historical access information, s i (k) will be set to 0; If the current access information overlaps with the historical access information, s i (k) will be set to If the current access information is exactly the same as the historical access information, then s i (k) is set to 1; If the current access information is different from any historical access information, d i (k) will be set to 1; If the current access information overlaps with the historical access information, d i (k) will be set to If the current access information is exactly the same as the historical access information, set d i (k) will be set to 0.
4. The method of claim 3, wherein: In the first layer of filtering, trust evaluation is performed on the terminals and / or nodes requesting access to the environment, which also includes: Introduce peer review rules, where the collaborators of the target node evaluate the reputation of the target node to obtain the peer trust value; The credibility coefficient, the suspicion coefficient and the peer trust value are placed as input items into a trust evaluation engine, and the trust evaluation engine sets a dynamically changing evaluation strategy.
5. The method of claim 4, wherein: The method further comprises: According to the dynamic evaluation strategy, the terminals and / or nodes corresponding to the trust values are divided into three categories: trusted, suspicious, and untrustworthy according to the trust threshold; All traffic from untrusted nodes will be directly discarded; Traffic from suspicious or trusted nodes is forwarded to the second layer of filtering.
6. The method of claim 1, wherein: In the second layer of filtering, based on the encrypted traffic of the trusted or suspicious terminals and / or nodes, malicious encrypted traffic is obtained through random feature extraction and cryptographic system classifier, including: In the second layer of filtering, random features are extracted directly on the ciphertext payload of the encrypted traffic through random feature extraction according to the encrypted traffic; Based on the extraction of random features, a randomness detection suite is used to extract randomness indicators on random 0 / 1 sequences.
7. The method of claim 1, wherein: In the second layer of filtering, based on the encrypted traffic of the trusted or suspicious terminals and / or nodes, malicious encrypted traffic is obtained through random feature extraction and cryptographic system classifier, including: Constructing a feature space according to the selected randomness index as an input of the cryptographic system classifier; Generate an identification result of the negotiated cryptographic system through a pre-trained data classification model, wherein the data classification model is obtained by training a FNN feed-forward neural network using multiple sets of data until convergence; Access is allowed for encrypted traffic that belongs to the negotiated cipher system set; Encrypted traffic that does not belong to the negotiated cryptographic system is discarded.
8. A malicious encrypted traffic detection device, wherein: The device comprises: A first filtering module, configured to filter at the first layer and perform a trust evaluation on a terminal and / or a node requesting access to the environment; A processing module, configured to perform a second layer of filtering on credible or suspicious terminals and / or nodes in the trust evaluation result; The second filtering module is used for filtering at the second layer. According to the encrypted traffic of the trusted or suspicious terminals and / or nodes, malicious encrypted traffic is obtained through random feature extraction and a cryptographic system classifier. The cryptographic system classifier is used to identify the cryptographic system according to the random features extracted from the random features.
9. An electronic device, comprising: processor; as well as A memory arranged to store computer executable instructions, which when executed cause the processor to perform any of the methods of claims 1-7.
10. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of application programs, causes the electronic device to execute any of the methods of claims 1 to 7.
