A method, device, equipment and readable storage medium for detecting target flow

By decoding and bypassing feature detection, identifying and intercepting traffic that has been bypassed, the problem of abnormal traffic in the prior art is solved, and the protection effect is improved.

CN113965333BActive Publication Date: 2024-11-29SANGFOR TECH INC
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202010625138.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-01
Publication Date
2024-11-29
Estimated Expiration
2040-07-01

AI Technical Summary

Technical Problem

The prior art is difficult to identify abnormal traffic that has been bypassed, resulting in poor protection effects of firewall products.

Method used

By obtaining the target traffic, decoding process is used to obtain the target data, and bypass feature detection is performed on the target data to determine whether it is the traffic that has been bypassed.

Benefits of technology

Improve the accuracy of identification of bypassed processing traffic, enhance the protection effect of firewall products, and avoid bypassing security protection from abnormal traffic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113965333B_ABST
    Figure CN113965333B_ABST
Patent Text Reader

Abstract

The present application discloses a target traffic detection method, device, equipment and computer-readable storage medium, the method comprising: obtaining target traffic; decoding the target traffic according to the encoding type of the target traffic to obtain target data; performing bypass feature detection on the target data to obtain a detection result; the detection result is used to indicate whether the target traffic is bypassed traffic; in order to more accurately identify bypassed traffic, after obtaining the target traffic, if it is determined that it has been encoded, the method first performs decoding and then performs bypass feature detection. Through the technical solution of the present application, it is possible to more accurately detect whether a certain traffic is bypassed traffic, thereby providing a reference for subsequent operations, and further, to a certain extent, solve the problem that related technologies easily allow traffic with attack features to bypass security protection, resulting in poor protection effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and in particular to a target flow detection method, a target flow detection device, a target flow detection equipment and a computer-readable storage medium. Background Art

[0002] Firewall products need to detect traffic with attack characteristics, determine whether the traffic is safe based on the detection results, and then decide whether to release or intercept it. Most related technologies use static retrieval to match attack characteristics. When traffic with attack characteristics is processed by attackers using bypass methods (for example, encoding), firewall products may not be able to identify abnormal traffic, allowing abnormal traffic to successfully bypass firewall products.

[0003] Therefore, how to solve the problem that related technologies make it easy for abnormal traffic that has been bypassed to bypass security protection, resulting in poor protection effect, is a technical problem that technical personnel in this field need to solve. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide a target flow detection method, a target flow detection device, a target flow detection equipment and a computer-readable storage medium, which can solve the problem that related technologies make it easy for abnormal flow that has been bypassed to bypass security protection, resulting in poor protection effect.

[0005] To solve the above technical problems, the present application provides a target flow detection method, including:

[0006] Get targeted traffic;

[0007] Decoding the target traffic according to the encoding type of the target traffic to obtain target data;

[0008] Perform bypass feature detection on the target data to obtain a detection result; wherein the detection result is used to indicate whether the target traffic is traffic that has undergone bypass processing.

[0009] Optionally, performing bypass feature detection on the target data to obtain a detection result includes:

[0010] Performing coding feature detection on the target data to determine whether there are any undecoded coding features in the target data;

[0011] If the coding feature exists, a detection result is obtained, and the detection result is used to indicate that the target traffic is traffic that has been bypassed.

[0012] Optionally, performing bypass feature detection on the target data to obtain a detection result includes:

[0013] Acquire a first code length corresponding to the target flow and a second code length corresponding to the target data;

[0014] Obtaining a length difference using the first code length and the second code length, and determining whether the length difference is greater than a preset length threshold;

[0015] If it is greater than the preset length threshold, a detection result is obtained, and the detection result is used to indicate that the target traffic is traffic that has been bypassed.

[0016] Optionally, performing bypass feature detection on the target data to obtain a detection result includes:

[0017] Determining a consumption value when decoding the target flow;

[0018] Determining whether the consumption value is greater than a preset consumption threshold;

[0019] If it is greater than the preset consumption threshold, a detection result is obtained, and the detection result is used to indicate that the target flow is the flow that has been bypassed.

[0020] Optionally, the decoding the target traffic according to the encoding type of the target traffic to obtain target data includes:

[0021] Performing unreadable coding detection on the target traffic to determine whether the target traffic has been processed by the unreadable coding; wherein the unreadable coding is an unreadable coding method;

[0022] If the target traffic has been processed by unreadable coding, the coding type of the unreadable coding is identified, and the target traffic is decoded by using the unreadable decoding method corresponding to the coding type to obtain preprocessed data;

[0023] Performing readable coding detection on the preprocessed data to determine whether the preprocessed data has been processed by the readable coding; wherein the readable coding is a readable coding method;

[0024] If the readable coding process is performed, the coding type of the readable coding is identified, and the pre-processed data is decoded using a readable decoding method corresponding to the coding type to obtain the target data.

[0025] Optionally, obtaining the target flow includes:

[0026] Acquire data traffic, and perform protocol identification processing on the data traffic to obtain an identification result;

[0027] The data traffic is filtered according to the identification result to obtain the target traffic whose protocol type is the target type.

[0028] Optionally, after performing bypass feature detection on the target data to obtain a detection result, the method further includes:

[0029] If the detection result indicates that the target traffic is traffic that has been bypassed, the target traffic is intercepted and / or a prompt message is issued to prompt that the target traffic has been bypassed.

[0030] Optionally, after performing feature detection on the target data according to the feature matching rule to obtain the detection result, the method further includes:

[0031] If the detection result shows that the target traffic is not the traffic that has been bypassed, using an attack feature detection engine to perform attack feature detection on the target data to determine whether there is an attack feature;

[0032] If the attack feature exists, intercepting the target traffic;

[0033] If the attack feature does not exist, the target traffic is allowed to pass.

[0034] The present application also provides a target flow detection device, comprising:

[0035] An acquisition module is used to acquire target traffic;

[0036] A decoding module, used for decoding the target traffic according to the encoding type of the target traffic to obtain target data;

[0037] The detection module is used to perform bypass feature detection on the target data to obtain a detection result; wherein the detection result is used to indicate whether the target traffic is traffic that has been bypassed.

[0038] The present application also provides a target flow detection device, including a memory and a processor, wherein:

[0039] The memory is used to store the computer program;

[0040] The processor is used to execute the computer program to implement the above-mentioned target flow detection method.

[0041] The present application also provides a computer-readable storage medium for storing a computer program, wherein the computer program implements the above-mentioned target flow detection method when executed by a processor.

[0042] The target traffic detection method provided in the present application obtains the target traffic; decodes the target traffic according to the encoding type of the target traffic to obtain the target data; performs bypass feature detection on the target data to obtain the detection result; wherein the detection result is used to indicate whether the target traffic is the traffic that has been bypassed.

[0043] As can be seen from the above, the present application provides a method for detecting bypassed traffic. Generally, bypassed traffic is often encoded, but encoded traffic is not necessarily bypassed traffic. Therefore, in order to more accurately identify bypassed traffic, in the technical solution provided by the present application, after obtaining the target traffic, if it is determined that it has been encoded, it is not directly confirmed as bypassed traffic, but first decoded, and then bypass feature detection is performed on the decoded target traffic, so as to more accurately identify bypassed traffic.

[0044] The encoding method of bypassed traffic is often different from that of normal traffic. Therefore, the present application first decodes the target traffic, and determines some encoding characteristics of the target traffic through the target data obtained after decoding, and then determines whether the target traffic is bypassed traffic (i.e., bypass feature detection described in the present application). In addition, after decoding the target traffic, the essential features of the target traffic can be obtained, and the essential features can be used to perform feature matching with pre-set bypass features, thereby detecting whether the target traffic has been bypassed (also bypass feature detection described in the present application).

[0045] It can be seen that the present application provides a method for detecting bypassed traffic, through which the bypassed traffic can be detected, thereby facilitating firewall products to identify which traffic is bypassed traffic, and further facilitating firewall products to subsequently perform interception and other operations, thereby solving the problem that related technologies make it easy for abnormal traffic that has been bypassed to bypass security protection, resulting in poor protection effects.

[0046] In addition, the present application also provides a target flow detection device, a target flow detection equipment and a computer-readable storage medium, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0048] Figure 1 A flow chart of a target flow detection method provided in an embodiment of the present application;

[0049] Figure 2 A flow chart of a method for bypassing feature detection provided in an embodiment of the present application;

[0050] Figure 3 A flow chart of a method for determining target traffic and decoding the target traffic provided by an embodiment of the present application;

[0051] Figure 4 A flow chart of a subsequent processing method provided in an embodiment of the present application when the detection result indicates that the target traffic is not the traffic that has been bypassed;

[0052] Figure 5 A schematic diagram of the structure of a target flow detection device provided in an embodiment of the present application;

[0053] Figure 6 A schematic diagram of the structure of a target flow detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. 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 creative work are within the scope of protection of this application.

[0055] Intrusion Detection / Prevention System, abbreviated as IDS / IPS, or IDPS, is a system for detecting and preventing network intrusions. Among them, IPS requires real-time interception, while IDS is usually deployed in bypass. The key feature of this system is intrusion detection technology, which usually adopts feature-based pattern matching or anomaly-based algorithm modeling methods. When there is intrusion behavior in the detected network traffic, the network traffic is processed according to the corresponding action, thereby blocking or recording the intrusion behavior, and protecting the enterprise information system and network from attacks. IDPS systems are widely used in network security equipment, such as firewalls, situational awareness systems, etc.

[0056] Among them, pattern matching, also known as feature matching, is the most commonly used intrusion detection method of IPS and belongs to the misuse detection type. Specifically, the network traffic is matched with the intrusion features. If the data packet matches a certain feature, it is considered that an intrusion behavior exists. In the process of detecting and defending network traffic, the intruder's intrusion methods are also upgraded, and the frequently used intrusion methods include bypass methods. Bypass is evasion, also known as escape and penetration. Specifically, it is to add specific bypass methods to the network traffic to change the original characteristics of the intrusion traffic in the data packet, so that the IPS cannot correctly identify and block the deformed intrusion traffic. Bypass methods can include IP fragmentation, TCP segmentation and various encryption, obfuscation, encoding and other methods at the protocol layer.

[0057] Most related technologies match specific features of attack codes in a static retrieval manner, that is, after receiving network traffic, the data obtained after parsing the network traffic is directly matched with features. If the attack features are matched, the traffic is determined to be abnormal traffic, and the network traffic detection is completed.

[0058] This method can reduce the impact on system throughput performance and network latency while providing protection, and has little impact on system performance. However, the characteristics of network traffic are often bypassed by attackers (for example, by encoding). When the attack characteristics are masked by the attacker in an encoded manner, the network traffic can bypass the security protection steps, that is, it cannot be detected as attack traffic, so the traffic will flow into the corresponding device, making the device at risk of being attacked, resulting in poor protection effect.

[0059] In order to solve the above problems, the present application provides a target traffic detection method and corresponding equipment, devices and computer-readable storage medium. After the target traffic is acquired, it is decoded to obtain the target data, and then bypass feature detection is performed on the target data to determine whether the target traffic is bypassed traffic. This method can improve the depth and accuracy of detection, especially for the detection of bypass features, and thus can improve the effect of security protection to a certain extent.

[0060] Specifically, in a possible implementation, please refer to Figure 1 , Figure 1 A flow chart of a target flow detection method provided in an embodiment of the present application. The method includes:

[0061] S101: Obtain target traffic.

[0062] In this embodiment, some or all steps of the target traffic detection method can be executed by a specified device or terminal, and the specific type of the device or terminal is not limited in this embodiment, for example, it can be a network device such as a firewall, router, gateway, etc. in the network, or it can be a client in the network architecture. The target traffic can be traffic of any protocol type.

[0063] S102: Decoding the target traffic according to the encoding type of the target traffic to obtain target data.

[0064] After acquiring the target traffic, it is decoded to obtain the target data. In order to ensure the accuracy of decoding, the fixed features obtained after encoding in the target traffic (i.e., features that exist in all traffic obtained using a certain encoding method) can be detected, and the encoding type of the target traffic can be determined using the fixed features. The corresponding decoding method is selected according to the encoding type, and the target traffic is decoded according to the decoding method. The target data obtained after decoding can not only be combined with the subsequent step S103 to accurately detect the bypassed traffic, but also because the target data is obtained through decoding, it can record and reflect more essential features, and it is not easy to hide features. Therefore, attack feature detection can be performed based on the target data in the future, and the target traffic can also be prevented from bypassing security protection by masking features through encoding.

[0065] Specifically, after decoding the data at the encoded position in the target traffic, the decoded data is used to replace the data before decoding to obtain the target data. The specific content of the target data is related to the target traffic. This embodiment does not limit the specific content of the target data.

[0066] It should be noted that the decoding method used when decoding the target traffic is not limited in this embodiment, for example, the target traffic may be decoded by streaming decoding or non-streaming decoding. Non-streaming decoding is to decode all data packets of the target traffic uniformly after acquisition, or after decoding the first acquired target traffic, when receiving the subsequent part of the target traffic, the target traffic is decoded from the beginning.

[0067] Since the target traffic is generally sent and received in the form of data packets, and the decoding state has priority, which meets the characteristics of streaming decoding, in this embodiment, the target traffic can be decoded by streaming decoding. Specifically, when the target traffic is decoded by the streaming decoding method, it is necessary to record the offset of the currently decoded data packet and the decoding intermediate result and other decoding states. For example, the current data packet offset is 5, indicating the fifth data packet, or it can be 400KB, indicating that the position of the data packet in the entire target traffic starts from the 400KB; if the decoding is successful, the decoding intermediate state can be B, if the decoding is unsuccessful due to incomplete data, the decoding intermediate state can be A. Using the recorded decoding state, decoding can be continued after receiving subsequent data packets, without decoding the previously decoded data, reducing time consumption and improving decoding performance. Therefore, in this embodiment, it is preferred that the target traffic can be decoded by streaming decoding to obtain the target data.

[0068] S103: Perform bypass feature detection on the target data to obtain a detection result.

[0069] It should be noted that the encoding method of the bypassed traffic is often different from that of the normal traffic. Therefore, the present application first decodes the target traffic, and determines some encoding characteristics of the target traffic through the target data obtained after decoding, and then determines whether the target traffic is bypassed traffic; in addition, after decoding the target traffic, the essential characteristics of the target traffic can be obtained, and the essential characteristics can be used to detect whether the target traffic has been bypassed by feature matching and other methods. That is, whether it is bypassed traffic can be determined by step S103, that is, step S103 can include:

[0070] Obtaining a detection result according to the coding features of the target traffic reflected by the target data;

[0071] Alternatively, step S103 may include:

[0072] The features of the target data are extracted and matched with preset bypass features, and a detection result is obtained based on the matching result.

[0073] The detection result is used to indicate whether the target traffic is traffic that has been bypassed. After obtaining the target data, bypass feature detection is performed on the target data to obtain the detection result. Through the bypass feature detection described in step S103, it is possible to detect whether the target traffic has been bypassed. Further, after obtaining the detection result, subsequent operations can be performed based on the detection result. The specific content of the subsequent operations is not limited in this embodiment. For example, the target traffic can be released and the detection result can be sent, or the target traffic can be intercepted, or attack feature detection can be performed, or other detections can be performed. The specific details can be determined according to the actual application scenario. This application does not limit the subsequent operations.

[0074] The target flow detection method provided by the embodiment of the present application is applied, and the target flow is decoded after being obtained, so as to obtain the target data before encoding. The encoding method of the bypassed flow is often different from that of the normal flow. Therefore, the present application first decodes the target flow, and determines some encoding characteristics of the target flow through the target data obtained after decoding, and then determines whether the target flow is a bypassed flow; in addition, after decoding the target flow, the essential characteristics of the target flow can be obtained, and the essential characteristics can be used to detect whether the target flow has been bypassed by feature matching and other methods. After obtaining the target data, bypass feature detection is performed on it, and it can be determined whether the target flow is a bypassed flow. Therefore, through the technical solution of the present application, it can be more accurately detected whether a certain flow is a bypassed flow, so as to provide a reference for subsequent operations, and then it can solve the problem that the related technology easily allows the flow with attack features to bypass security protection, and the protection effect is poor.

[0075] Based on the above embodiment, in another possible implementation, multiple judgment detection methods can be used to perform bypass feature detection on the target data to obtain the detection result. Figure 2 , Figure 2 A flow chart of a bypass feature detection method provided in an embodiment of the present application, step S103 may include:

[0076] S201: Perform coding feature detection on target data to determine whether there are undecoded coding features in the target data.

[0077] In one possible case, the target traffic may be encoded multiple times, and the original features may be masked in multiple layers. Even after decoding, it may still contain coding features. Therefore, in an embodiment of the present application, after decoding the target traffic to obtain the target data, the target data is subjected to coding feature detection to determine whether there are any undecoded coding features in the target data. If so, it is determined that the target traffic is traffic that has been bypassed by multiple layers.

[0078] At present, there is a method in the prior art, that is, firstly decode the traffic. Since the decoding can reflect the essential original characteristics, the attack characteristics can be detected based on the decoded traffic, thereby overcoming the attacker's coding bypass processing. However, this method is often ineffective for multi-layer bypassed traffic, resulting in multi-layer bypassed traffic bypassing security protection. However, the present application can detect multi-layer bypassed traffic, thereby preventing multi-layer bypassed traffic from bypassing protection to a certain extent.

[0079] The undecoded coding feature is a fixed feature (i.e., a feature that exists in all traffic obtained by using a coding method). When there is an undecoded coding feature, the process proceeds to step S202, and when there is no undecoded coding feature, the process proceeds to step S203.

[0080] S202: Obtain a detection result, where the detection result is used to indicate that the target traffic is traffic that has undergone bypass processing.

[0081] When there are coded features, it means that the original features cannot be obtained after decoding the target traffic once, and the original features have been encoded multiple times. At this time, it can be determined that the target data is multi-layer bypass data, and the target traffic is multi-layer bypass traffic. It can be determined that it may be abnormal traffic, and it can be intercepted and / or warned later.

[0082] S203: Obtain a first code length corresponding to the target traffic and a second code length corresponding to the target data.

[0083] The code length described in this application may also be referred to as data length, which is used to indicate the length of data. The specific form of the code length is not limited in this embodiment, for example, it may be the number of characters of the data. In this embodiment, the first code length corresponding to the target flow and the second code length corresponding to the target data are counted respectively.

[0084] S204: Obtain a length difference using the first code length and the second code length, and determine whether the length difference is greater than a preset length threshold.

[0085] After obtaining the first code length and the second code length, use them to calculate the length difference. The preset length threshold is used to compare with the length difference, and its specific size can be set according to the actual situation. It should be noted that after decoding, the change in the length of normal traffic is generally limited, and its length change is generally within a certain range. In order to bypass the protection, the attack traffic is often longer than the length of normal traffic. Therefore, the length of the data obtained after decoding is quite different from the length of the attack traffic. When setting the size of the preset length threshold, it should be selected within this reasonable range so as to include most normal situations and prevent false alarms due to the preset length threshold being too small. At the same time, it should not be set too large to cause omissions of attack traffic. When the length difference is greater than the preset length threshold, enter step S205. When the code length is not greater than the preset length threshold, enter step S206.

[0086] S205: Obtain a detection result, where the detection result is used to indicate that the target traffic is traffic that has undergone bypass processing.

[0087] When the length difference is greater than the preset length threshold, it indicates that the length of the target data is abnormal and the target traffic may be traffic that has been bypassed. Therefore, the detection result is used to indicate that the target traffic is traffic that has been bypassed.

[0088] S206: Determine a consumption value when decoding the target flow;

[0089] The consumption value may be the decoding processing time, the CPU occupancy rate during decoding, the memory occupancy rate during decoding, etc. This application does not limit the type of consumption value.

[0090] After determining that the code length of the target data is not greater than the preset length threshold, the target data is subjected to performance consumption detection, which may be to count the decoding processing time corresponding to the target data, or to determine the CPU occupancy rate during decoding, or to determine the memory occupancy rate during decoding, etc. When the target traffic is bypassed traffic, some methods may be used to increase the difficulty of decoding, so that the time required to decode the target data is longer, the CPU occupancy rate is higher, or the memory occupancy rate is higher.

[0091] S207: Determine whether the consumption value is greater than a preset consumption threshold.

[0092] The consumption threshold is used for comparison with the consumption value, and its specific size can be set according to actual conditions. It should be noted that the consumption value is a negative impact on the system. The consumption of the system for decoding normal traffic is within a reasonable range. However, in some cases, the traffic that has been bypassed is often difficult to decode in order to achieve the purpose of preventing bypass, so the consumption of the system is relatively large. The preset consumption threshold can be greater than the consumption value of most normal traffic when selected to prevent false alarms, but it should not be too large to cause underreporting of attack traffic. When the consumption value is greater than the preset consumption threshold, step S208 is entered. When the consumption value is not greater than the preset consumption threshold, step S209 is entered.

[0093] S208: Obtain a detection result, where the detection result is used to indicate that the target traffic is traffic that has undergone bypass processing.

[0094] When the consumption value is greater than the preset consumption threshold, it means that the target traffic corresponding to the target data will cause abnormal performance consumption, so the target traffic may be traffic that has been bypassed.

[0095] S209: Preset operation.

[0096] When the consumption value is not greater than the preset consumption threshold, it means that the performance consumption caused by the target traffic corresponding to the target data is normal, so the preset operation can be executed. The specific content of the preset operation is not limited in this embodiment. For example, it can be no operation, that is, no operation is performed, or an alarm can be executed, or interception and other operations can be performed.

[0097] It should be noted that, in this embodiment, steps S201 to S202 can be referred to as coding feature detection, steps S203 to S205 can be referred to as length detection, and steps S206 to S208 can be referred to as performance detection.

[0098] The above-mentioned coding feature detection, length detection and performance detection are all based on the coding features reflected by the target data to detect whether the target traffic is bypassed traffic.

[0099] In addition, those skilled in the art should understand that this embodiment does not limit the execution order of coding feature detection, length detection and performance detection, nor does it limit whether each detection must be performed. For example, in another embodiment, only one or two detections may be performed, such as only performing quantity detection and length detection, or only performing length detection and performance detection. Further, in this embodiment, other types of detections may also be performed in step S103, such as bypass feature matching detection, using a preset bypass feature library to perform feature matching on the target data, and determine whether there is a feature that matches successfully. If so, the detection result is determined to be the flow that has been bypassed. The judgment criterion for successful matching can be the same feature, that is, there is a feature in the target data that is exactly the same as that in the feature library, or it can be a feature format match, that is, there is a feature in the target data that is the same as a feature format in the feature library. Those skilled in the art should understand that the feature matching operation can also be combined with coding feature detection, length detection and performance detection to obtain the detection result.

[0100] Based on the above embodiment, in a possible implementation, the target traffic may be of a specific type, such as traffic whose protocol is the target protocol. This embodiment is described by taking the Hypertext Markup Language (HTML) protocol as an example. Figure 3 , Figure 3 A flow chart of a method for determining target traffic and decoding target traffic provided in an embodiment of the present application includes:

[0101] S301: Acquire data traffic, and perform protocol identification processing on the data traffic to obtain an identification result.

[0102] Since attacks based on Hypertext Markup Language (HTML) are one of the most flexible and changeable types of attacks that firewall products need to protect against. Due to the characteristics of scripting languages, attacks based on Hypertext Markup Language can easily confuse vulnerability attack features with other content. Therefore, bypassing detection of Hypertext Markup Language traffic is a top priority for network security protection. Therefore, in this embodiment, the target traffic can be Hypertext Markup Language traffic, that is, HTML traffic. This embodiment does not limit the generation method and specific content of HTML traffic. The target traffic can be traffic obtained from one or more preset ports, or it can be HTML traffic sent by any device or terminal.

[0103] In this embodiment, the data traffic may be a mixed traffic including multiple types of traffic, including HTML traffic, i.e., target traffic. After acquiring the data traffic, a protocol identification process is performed on it to obtain an identification result. The specific identification method of the protocol identification process is not limited in this embodiment. For example, it may be identified based on the protocol field of the traffic, or it may be identified based on the header format of the traffic, or it may be identified based on the special identifier of the traffic. After the data traffic is subjected to protocol identification process, multiple identification results may be obtained, each of which corresponds to a type of traffic.

[0104] S302: Filter the data traffic according to the identification result to obtain the target traffic whose protocol type is HTML.

[0105] After the data traffic is identified, the data traffic is filtered according to the identification result, that is, the traffic of non-HTML protocol is filtered out, and the traffic of protocol type HTML is retained. For example, when the protocol field of the traffic is identified to obtain the identification result, the traffic of non-HTML protocol can be released, and the traffic of HTML protocol can be intercepted, and the subsequent operation is performed as the target traffic.

[0106] In addition, those skilled in the art should understand that Figure 3 Only HTML traffic is used as an example for illustration, but the present application is not limited to HTML traffic.

[0107] S303: Perform unreadable coding detection on the target traffic to determine whether the target traffic has been processed with unreadable coding.

[0108] Unreadable codes are unreadable coding methods such as Base64, Jscript.Encode, etc., which need to be decoded according to the corresponding decoding method. For unreadable codes, they cannot be mixed with readable code content before they are decoded. Therefore, in this embodiment, in order to ensure the accuracy of decoding, that is, to ensure that the target traffic is correctly decoded to obtain the correct target data, after obtaining the target traffic, an unreadable code detection is first performed on it to determine whether the target traffic has been processed with unreadable code. This embodiment does not limit the specific detection method. For example, a format detection method can be used to determine whether there is an unreadable code by performing a format detection on the target traffic; or the fixed features of various unreadable codes are detected. When the fixed features exist, it is determined that an unreadable code exists. When it is determined that the unreadable code has been processed, enter step S304.

[0109] S304: Identify the encoding type of the unreadable encoding, and decode the target traffic using the unreadable decoding method corresponding to the encoding type to obtain preprocessed data.

[0110] The preprocessed data is the data obtained after the target traffic is unreadablely decoded. If it is determined that the target traffic has been processed by unreadable coding, in order to decode the unreadable coding specifically to obtain correct data, the coding type of the unreadable coding can be identified, and the coding type is used to determine the corresponding unreadable decoding method, and the target traffic is decoded using the unreadable decoding method to obtain the preprocessed data. Different types of unreadable coding correspond to different decoding methods, and this embodiment does not limit the specific content of the unreadable decoding method.

[0111] S305: Perform readable coding detection on the pre-processed data to determine whether the pre-processed data has been processed with a readable coding.

[0112] The readable code is a readable coding method. After the pre-processed data is obtained through unreadable decoding, it is determined whether it has been processed by readable coding, so as to perform readable decoding for the readable coding processing.

[0113] S306: Identify the encoding type of the readable encoding, and use the readable decoding method corresponding to the encoding type to decode the pre-processed data to obtain the target data.

[0114] In order to correctly decode the preprocessed data, it is necessary to identify the encoding type of the readable code and use it to determine the corresponding readable decoding method. Specifically, when the preprocessed data is readable and decoded, the corresponding readable decoding method can be selected according to the encoding header of the preprocessed data to decode it, and the identification of the encoding type of the readable code is completed, that is, the preprocessed data is decoded using the logical hybrid decoding rule. The logical hybrid decoding rule performs logical hybrid processing on different decoding states, and different decoding states correspond to different decoding methods. During decoding, the state of the readable code (such as the encoding header) is checked, and a suitable decoding method is selected according to its state to decode it. The specific content of the state of the readable code is not limited in this embodiment. For example, the encoding header can be used as the state of the readable code. For example, the encoding header can be characters or character combinations such as "%u", "&#", etc. When the encoding header is detected as &#, the &# branch in the logical hybrid decoding rule is entered. Furthermore, the next character after the header can be detected, and the sub-branch of the logical hybrid decoding rule can be determined by using the next character. For example, the next character can be "x", a number or an entity code header, which correspond to the three sub-branches of "&#x+hex", "&#+dec" and entity code, so as to decode them according to the decoding method in the sub-branch. The decoding method of first performing unreadable decoding and then performing readable decoding can accurately decode the target traffic, preventing incorrect target data from being obtained due to decoding errors, thereby affecting the accuracy of the detection results.

[0115] In another possible implementation, when decoding of a section of data fails, the decoded data may be retained so as to be subsequently decoded together with other data, or retained until the target data.

[0116] Based on the above embodiment, in a possible implementation manner, after detecting the target flow, subsequent operations may be performed according to the detection result, which may include:

[0117] Step 11: If the detection result indicates that the target traffic is bypassed traffic, the target traffic is intercepted and / or a prompt message is issued to prompt that the target traffic is bypassed.

[0118] When the detection result is that the target traffic is bypassed traffic, it means that the target traffic may be attack traffic, so the target traffic can be intercepted. The specific method of interception is not limited in this embodiment. For example, the target traffic may not be responded to or forwarded.

[0119] Alternatively, a prompt message may be issued to indicate that the target traffic has been bypassed so as to remind the user to process it. Upon receiving the user's "interception instruction", the target traffic may be directly intercepted. Upon receiving the user's "instruction of not being sure whether it is attack traffic", the target traffic may continue to be detected for attack features, that is, attack feature detection may be performed based on the decoded target data. When attack features are detected, the traffic may be intercepted; when no attack features are detected, the traffic may be released.

[0120] In another possible implementation, when the target traffic passes the bypass feature detection in step S103, that is, when the detection result indicates that the target traffic is not bypassed, further detection may be performed on the target traffic, such as attack feature detection. Figure 4 , Figure 4 A flowchart of a subsequent processing method provided in an embodiment of the present application when the detection result indicates that the target traffic is not the traffic that has been bypassed includes:

[0121] S401: If the detection result shows that the target traffic is not the traffic that has been bypassed, the attack feature detection engine is used to perform attack feature detection on the target data.

[0122] The attack signature engine is used to detect attack signatures on target data. The specific detection method is not limited in this embodiment, and reference may be made to related technologies. Since the target traffic is decoded, the signatures in the target data are more original and essential. The attack signature detection on the target data is more accurate than the attack signature detection on the target traffic, which can solve the problem of low detection accuracy caused by the signatures in the target traffic being coded and masked.

[0123] S402: Determine whether there is an attack feature.

[0124] This embodiment does not limit the specific content of the attack signature, which may be related to the detection method adopted by the attack signature engine. According to different detection methods, the form and specific content of the attack signature may be different. When the attack signature exists, step S403 may be entered, and when the attack signature does not exist, step S404 may be entered.

[0125] S403: Intercept target traffic.

[0126] When attack features exist, it indicates that the target traffic may be attack traffic, so the target traffic is intercepted. The specific method of interception is not limited in this embodiment. For example, the target traffic may not be responded to or forwarded.

[0127] S404: Release the target traffic.

[0128] After determining that the target traffic does not have attack features, it can be released so that subsequent operations can be performed. The specific content of the subsequent operations is not limited.

[0129] The target flow detection device provided in an embodiment of the present application is introduced below. The target flow detection device described below and the target flow detection method described above can be referenced to each other.

[0130] Please refer to Figure 5 , Figure 5 A schematic diagram of the structure of a target flow detection device provided in an embodiment of the present application includes:

[0131] An acquisition module 610 is used to acquire target traffic;

[0132] The decoding module 620 is used to decode the target traffic according to the encoding type of the target traffic to obtain target data;

[0133] The detection module 630 is used to perform bypass feature detection on the target data to obtain a detection result; wherein the detection result is used to indicate whether the target traffic is traffic that has undergone bypass processing.

[0134] Optionally, the detection module 630 includes:

[0135] A coding feature determination unit, configured to perform coding feature detection on the target data to determine whether there are any undecoded coding features in the target data;

[0136] The first determination unit is used to obtain a detection result if the coding feature exists, and the detection result is used to indicate that the target traffic is traffic that has been bypassed.

[0137] Optionally, the detection module 630 includes:

[0138] A length acquisition unit, used to acquire a first code length corresponding to the target flow and a second code length corresponding to the target data;

[0139] a length determination unit, configured to obtain a length difference by using the first code length and the second code length, and determine whether the length difference is greater than a preset length threshold;

[0140] The second determination unit is used to obtain a detection result if the code length is greater than a preset length threshold, and the detection result is used to indicate that the target traffic is traffic that has undergone bypass processing.

[0141] Optionally, the detection module 630 includes:

[0142] a consumption value obtaining unit, used to determine a consumption value when decoding the target flow;

[0143] A consumption value judging unit, used to judge whether the consumption value is greater than a preset consumption threshold;

[0144] The third determination unit is used to obtain a detection result if the consumption value is greater than a preset consumption threshold, and the detection result is used to indicate that the target flow is a flow that has undergone bypass processing.

[0145] Optionally, the decoding module 620 includes:

[0146] an unreadable code determination unit, configured to perform unreadable code detection on the target traffic to determine whether the target traffic has been processed with an unreadable code; wherein the unreadable code is an unreadable coding method;

[0147] an unreadable decoding unit, for identifying a coding type of the unreadable coding if the unreadable coding has been processed, and decoding the target traffic using an unreadable decoding method corresponding to the coding type to obtain preprocessed data;

[0148] A judging unit, configured to perform readable coding detection on the pre-processed data to judge whether the pre-processed data has been processed by the readable coding; wherein the readable coding is a coding method with readability;

[0149] The readable decoding unit is used to identify the encoding type of the readable encoding after the readable encoding processing, and use the readable decoding method corresponding to the encoding type to decode the pre-processed data to obtain the target data.

[0150] Optionally, the acquisition module 610 includes:

[0151] The identification unit is used to obtain data traffic and perform protocol identification processing on the data traffic to obtain an identification result;

[0152] The filtering unit is used to filter the data traffic according to the identification result to obtain the target traffic whose protocol type is the target type.

[0153] Optionally, it also includes:

[0154] The processing module is used to intercept the target traffic and / or issue a prompt message to prompt that the target traffic has been bypassed if the detection result shows that the target traffic is bypassed.

[0155] Optionally, it also includes:

[0156] An attack feature judgment module, configured to, if the detection result indicates that the target traffic is not traffic that has been bypassed, use an attack feature detection engine to perform attack feature detection on the target data to determine whether there is an attack feature;

[0157] An attack interception module, used to intercept the target traffic if attack features exist;

[0158] The release module is used to release the target traffic if there is no attack feature.

[0159] The target traffic detection device provided by the embodiment of the present application is used to more accurately identify the traffic that has been bypassed. After obtaining the target traffic, if it is determined that it has been encoded, it is first decoded, and then bypass feature detection is performed to more accurately identify the traffic that has been bypassed. The encoding method of the bypassed traffic is often different from that of the normal traffic. The target data obtained after decoding is used to determine some encoding characteristics of the target traffic, and then determine whether the target traffic is bypassed traffic; in addition, after decoding the target traffic, the essential characteristics of the target traffic can be obtained, and the essential characteristics can be used to detect whether the target traffic has been bypassed. The device makes it easy for firewall products to identify which traffic is bypassed, and then facilitates the subsequent execution of interception and other operations by firewall products. It can solve the problem that the related technology makes it easy for abnormal traffic that has been bypassed to bypass security protection, resulting in poor protection effect.

[0160] The target flow detection device provided in the embodiment of the present application is introduced below. The target flow detection device described below and the target flow detection method described above can be referenced to each other.

[0161] Please refer to Figure 6 , Figure 6A schematic diagram of a target flow detection device provided in an embodiment of the present application. The target flow detection device 700 may include a processor 701 and a memory 702, and may further include one or more of a multimedia component 703, an information input / information output (I / O) interface 704, and a communication component 705.

[0162] The processor 701 is used to control the overall operation of the target flow detection device 700 to complete all or part of the steps in the above-mentioned target flow detection method; the memory 702 is used to store various types of data to support the operation of the target flow detection device 700, and these data may include, for example, instructions for any application or method used to operate on the target flow detection device 700, and data related to the application. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), programmable read-only memory (Programmable Read-Only Memory, PROM), read-only memory (Read-Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk. One or more.

[0163] The multimedia component 703 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone, which is used to receive external audio signals. The received audio signal may be further stored in the memory 702 or sent through the communication component 705. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 704 provides an interface between the processor 701 and other interface modules, and the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the target flow detection device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 707 may include: Wi-Fi components, Bluetooth components, NFC components.

[0164] The target flow detection device 700 can be implemented by one or more application-specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the target flow detection method given in the above embodiment.

[0165] The computer-readable storage medium provided in the embodiments of the present application is introduced below. The computer-readable storage medium described below and the target flow detection method described above can be referenced to each other.

[0166] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned target flow detection method are implemented.

[0167] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0168] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0169] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0170] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0171] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms include, include or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes 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, article or device.

[0172] The target flow detection method, target flow detection device, target flow detection equipment and computer-readable storage medium provided by the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A target flow detection method, characterized in that: include: Get target traffic; Decoding the target traffic according to the encoding type of the target traffic to obtain target data; Perform bypass feature detection on the target data to obtain a detection result; wherein the detection result is used to indicate whether the target traffic is traffic that has undergone bypass processing; The step of performing bypass feature detection on the target data to obtain a detection result includes: Determining a consumption value when decoding the target flow; Determining whether the consumption value is greater than a preset consumption threshold; If it is greater than the preset consumption threshold, the detection result is obtained, and the detection result is used to indicate that the target flow is the flow that has been bypassed.

2. The target flow detection method according to claim 1, characterized in that: The performing bypass feature detection on the target data to obtain a detection result includes: Performing coding feature detection on the target data to determine whether there are any undecoded coding features in the target data; If the coding feature exists, the detection result is obtained, and the detection result is used to indicate that the target traffic is traffic that has been bypassed.

3. The target flow detection method according to claim 1, characterized in that: The performing bypass feature detection on the target data to obtain a detection result includes: Acquire a first code length corresponding to the target flow and a second code length corresponding to the target data; Obtaining a length difference using the first code length and the second code length, and determining whether the length difference is greater than a preset length threshold; If it is greater than the preset length threshold, the detection result is obtained, and the detection result is used to indicate that the target traffic is the traffic that has been bypassed.

4. The target flow detection method according to claim 1, characterized in that: The decoding process of the target traffic according to the encoding type of the target traffic to obtain target data includes: Performing unreadable coding detection on the target traffic to determine whether the target traffic has been processed by the unreadable coding; wherein the unreadable coding is an unreadable coding method; If the target traffic has been processed by unreadable coding, the coding type of the unreadable coding is identified, and the target traffic is decoded by using the unreadable decoding method corresponding to the coding type to obtain preprocessed data; Performing readable coding detection on the preprocessed data to determine whether the preprocessed data has been processed by the readable coding; wherein the readable coding is a readable coding method; If the readable coding process is performed, the coding type of the readable coding is identified, and the pre-processed data is decoded using a readable decoding method corresponding to the coding type to obtain the target data.

5. The target flow detection method according to claim 1, characterized in that: The obtaining of target traffic includes: Acquiring data traffic, and performing protocol identification processing on the data traffic to obtain an identification result; The data traffic is filtered according to the identification result to obtain the target traffic whose protocol type is the target type.

6. The target flow detection method according to claim 1, characterized in that: After performing bypass feature detection on the target data to obtain a detection result, the method further includes: If the detection result indicates that the target traffic is bypassed traffic, the target traffic is intercepted and / or a prompt message is issued to prompt that the target traffic is bypassed.

7. The target flow detection method according to claim 1, characterized in that: After performing bypass feature detection on the target data to obtain a detection result, the method further includes: If the detection result shows that the target traffic is not the traffic that has been bypassed, using the attack feature detection engine to perform attack feature detection on the target data to determine whether there is an attack feature; If the attack feature exists, intercepting the target traffic; If the attack feature does not exist, the target traffic is allowed to pass.

8. A target flow detection device, characterized in that: include: An acquisition module is used to acquire target traffic; A decoding module, used for decoding the target traffic according to the encoding type of the target traffic to obtain target data; A detection module, used to perform bypass feature detection on the target data to obtain a detection result; wherein the detection result is used to indicate whether the target traffic is traffic that has been bypassed; Wherein, the detection module is specifically used to determine the consumption value when decoding the target traffic; Determining whether the consumption value is greater than a preset consumption threshold; If it is greater than the preset consumption threshold, the detection result is obtained, and the detection result is used to indicate that the target flow is the flow that has been bypassed.

9. A target flow detection device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store the computer program; The processor is used to execute the computer program to implement the target flow detection method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the target flow detection method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Network application fire wall method and system

    CN102938771A

  • Detection method and apparatus for network attack information

    CN107172035A

  • A malicious URL detection method combined with multiple features

    CN109922052A

  • Network security equipment, network attack detection method and device thereof, and medium

    CN110958252A

  • Detection of malicious scripting language code in a network environment

    US20150363598A1