Network encrypted traffic detection method, device, electronic device and storage medium
By parsing and converting the decrypted traffic data on the WAF device, and transmitting it to the security device deployed in the bypass for detection, it solves the problem of network security equipment's insufficient ability to detect encrypted traffic, realizes coverage detection of encrypted traffic, and reduces access costs. Cost and latency, improved network stability.
Patent Information
- Application Number
- CN202410874764.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-07-02
AI Technical Summary
Existing network security equipment has insufficient detection capabilities for encrypted traffic, resulting in the need to change network topology and access methods, increasing access costs and implementation difficulty, and may lead to complex network link structures and increased delays.
By parsing and decrypting the traffic data on the WAF device, converting it into detectable traffic, and transmitting it to the security device deployed in the bypass for detection, it avoids directly decrypting the encrypted traffic, dynamically allocates processing threads, and builds a simulated TCP state machine and mirror. Traffic edits the mac address to ensure detection coverage without changing the network topology.
It achieves effective detection of encrypted traffic, reduces access costs and implementation difficulty, avoids security risks and business delays, improves network stability, and reduces overall network delays.
Smart Images

Figure CN118432941B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security technology, and in particular to a network encryption flow detection method, device, electronic equipment and storage medium. Background Art
[0002] With the widespread use of encryption technology and the increasing demand for data privacy and security, encrypted traffic has exploded. Although encryption technology protects user privacy, the abuse of technology has also profoundly changed the landscape of network security, making it easier to commit fraud and illegal online transactions, while also making it easier for hackers to evade detection of ransomware, phishing, and data leaks. In real attack and defense scenarios, attackers will generate various types of encrypted traffic in malicious activities such as obtaining target information, obtaining permissions, and maintaining access and control, mainly in the following three scenarios:
[0003] (1) In order to evade detection by security products and security operators, malicious code usually uses encrypted communications to disguise or hide plaintext traffic characteristics;
[0004] (2) Malicious attacks in encrypted channels mainly refer to attacks such as malicious sniffing and brute force cracking by attackers using the created encrypted channels;
[0005] (3) Malicious or illegal encryption applications mainly refer to some malicious and illegal applications that use encrypted communications, such as illegal VPNs.
[0006] Network security devices can protect the network from unauthorized access and attacks, and ensure the confidentiality, integrity and availability of network data. These devices enable users to keep abreast of network status by monitoring network traffic, connections and sessions. Common network security devices include Web Application Firewall WAF, Intrusion Prevention System IPS, Intrusion Detection System IDS, etc. Among them, Web Application Firewall WAF can decrypt traffic data, filter and block network traffic, and ensure that the site can resist malicious users and robot attacks according to rules and policies, blocking bad traffic and allowing good traffic to pass.
[0007] However, the detection capability of network security devices deployed in bypass mode, such as IPS and IDS, for encrypted traffic is not as sufficient as that of WAF devices, which is a shortcoming of network encrypted traffic detection. In order to solve the above technical problems of insufficient encrypted traffic detection, existing technologies often need to completely change the network topology and access method, which leads to very high access costs and great implementation difficulties. Even if the change of network topology is successfully implemented, the logical connection of so many devices in series will lead to a complex structure of the entire network link, poor stability, and greatly increased overall network delay. Summary of the invention
[0008] In view of the above-mentioned defects or deficiencies in the prior art, the present invention provides a network encrypted traffic detection method, device, electronic device and storage medium, which converts the decrypted traffic data parsed in the WAF detection phase into detectable traffic and transmits it to other network security devices for traffic detection without changing the network topology and access method, thereby enhancing the detection of encrypted traffic.
[0009] One aspect of the present invention provides a method for detecting network encrypted traffic, comprising:
[0010] Obtain the system log of the WAF device, and parse the original HTTP request from the system log;
[0011] According to the network traffic configuration information pre-set by the WAF device and sent to the bypass deployment security device, the HTTP request is distributed to multiple different processing threads according to the TCP four-tuple data, and the number of the processing threads is dynamically allocated according to the number of virtual CPU processors;
[0012] The received TCP four-tuple data is stored in the TCP session cache corresponding to the thread through the processing thread; a simulated TCP state machine is constructed for each TCP four-tuple data in the TCP session cache, and a timeout time of the CLOSING state of the simulated TCP state machine is set so that the repeated message delayed by the previous connection will not affect the next connection of the same four-tuple;
[0013] Convert HTTP requests into data link layer network frame information of the OSI model and then send them to the packet sender;
[0014] The data link layer network frame information of the OSI model is sent from the network port of the WAF device to the bypass deployed security device in the form of mirrored traffic through the data packet transmitter.
[0015] Furthermore, the mirrored traffic editing steps are also included:
[0016] Use command line tools to edit and rewrite network packets, and change the MAC address information in the mirrored traffic to the source MAC address and destination MAC address information in the original traffic to ensure that the source MAC address and destination MAC address of the mirrored traffic are consistent with those of the original traffic.
[0017] Furthermore, the bypass deployed security equipment includes an IPS intrusion prevention system and an IDS intrusion detection system.
[0018] Furthermore, the simulated TCP state machine has only three states, namely: CLOSE state, ESTABLISH state and CLOSING state.
[0019] Another aspect of the present invention further provides a network encrypted traffic detection device, comprising:
[0020] The log parsing module is configured to: obtain the system log of the WAF device, and parse the original HTTP request from the system log;
[0021] The traffic distribution module is configured to: distribute HTTP requests to a plurality of different processing threads according to TCP four-tuple data according to the network traffic configuration information preset by the WAF device and sent to the bypass deployment security device, and dynamically allocate the number of the processing threads according to the number of virtual CPU processors;
[0022] The session cache module is configured to: store the received TCP four-tuple data in the TCP session cache corresponding to the thread through the processing thread; construct a simulated TCP state machine for each TCP four-tuple data in the TCP session cache, and set the timeout time of the CLOSING state of the simulated TCP state machine so that the repeated message delayed by the previous connection will not affect the next connection of the same four-tuple;
[0023] The data conversion module is configured to: convert the HTTP request into the data link layer network frame information of the OSI model, and then send it to the data packet transmitter;
[0024] The data sending module is configured to: send the data link layer network frame information of the OSI model from the network port of the WAF device to the bypass deployment security device in the form of mirrored traffic through the data packet transmitter.
[0025] Furthermore, it also includes a mirror traffic editing module, which is used to edit and rewrite network data packets through a command line tool, and change the MAC address information in the mirror traffic to the source MAC address and destination MAC address information in the original traffic, so as to ensure that the source MAC address and destination MAC address of the mirror traffic are consistent with the source MAC address and destination MAC address of the original traffic.
[0026] Furthermore, the bypass deployed security equipment includes an IPS intrusion prevention system and an IDS intrusion detection system.
[0027] Furthermore, the simulated TCP state machine has only three states, namely: CLOSE state, ESTABLISH state and CLOSING state.
[0028] Another aspect of the present invention further provides an electronic device, comprising:
[0029] one or more processors;
[0030] a storage device for storing one or more computer programs;
[0031] When the one or more computer programs are executed by the one or more processors, the one or more processors implement the above-mentioned network encryption traffic detection method.
[0032] Another aspect of the present invention provides a computer-readable storage medium storing a computer program, which implements the above-mentioned method for detecting network encrypted traffic when executed by a processor.
[0033] The network encrypted traffic detection method, device, electronic device and storage medium provided by the present invention can, on the one hand, enable other network security devices to directly detect the decrypted plaintext of the encrypted traffic generated by the WAF device, avoiding the repeated uninstallation of certificates due to direct decryption of the encrypted traffic, thereby causing security risks and business delays; on the other hand, it can achieve detection coverage of most network encrypted traffic without completely changing the network topology and network device access method, reducing access costs and implementation difficulties, without complicating the network link structure, improving network stability, and greatly reducing overall network delays. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0035] Figure 1 This is a schematic diagram of the system composition of a network security device provided by an embodiment of the present application;
[0036] Figure 2 It is a flowchart of a network encrypted traffic detection method provided by an embodiment of the present application;
[0037] Figure 3 This is a data processing logic diagram of a network encryption traffic detection method provided by an embodiment of the present application;
[0038] Figure 4 It is a structural diagram of a network encrypted traffic detection device provided by an embodiment of the present application;
[0039] Figure 5 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0042] It should be understood that although the terms first, second, third, etc. may be used to describe the acquisition modules in the embodiments of the present invention, the acquisition modules should not be limited to these terms. These terms are only used to distinguish the acquisition modules from each other.
[0043] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0044] It should be noted that the directional words such as "upper", "lower", "left", and "right" described in the embodiments of the present invention are described at the angles shown in the drawings and should not be understood as limiting the embodiments of the present invention. In addition, in the context, it should also be understood that when it is mentioned that an element is formed "on" or "under" another element, it can not only be formed directly "on" or "under" another element, but also be formed "on" or "under" another element indirectly through an intermediate element.
[0045] Figure 1 The diagram is a schematic diagram of the system composition of network security equipment. The network 100 includes a load balancer 101 located on the main road, a WAF device 102 for decrypting encrypted traffic, a core switch 103, a Web server group 104, and a core switch 105 and a situational awareness system 106 located on the bypass for forwarding decrypted traffic. The situational awareness system 106 includes an intrusion detection system (IDS), an intrusion prevention system (IPS), a behavior analysis system (BAS), and a data leakage protection system (DLP).
[0046] This embodiment provides a method for detecting network encrypted traffic, which enhances the detection of network encrypted traffic by converting the decrypted traffic data parsed by the WAF device into detectable traffic and transmitting it to other network security devices in the situation awareness system for traffic detection, while avoiding changes in network topology and device access methods.
[0047] Specifically used to implement the network encrypted traffic detection method of the present invention is an HTTP redirection relay service technology component installed on a WAF device. Figure 2-3 The network encrypted traffic detection method of this embodiment includes the following steps:
[0048] Step S101, obtaining a system log of a WAF device, and parsing the original HTTP request from the system log.
[0049] First, the WAF (Web Application Firewall) device connected in series to the network has the ability to unload SSL certificates, that is, the WAF device can decrypt network encrypted traffic. Specifically, the WAF device needs to detect and analyze the encrypted traffic passing through it to identify and block potential malicious traffic. In order to detect encrypted traffic, the WAF device needs to be able to decrypt SSL / TLS encrypted data streams to check the content, identify potential attacks, and block or filter them accordingly. The plaintext of the encrypted traffic decrypted by the WAF device is saved in the syslog log. Syslog is a log transmission protocol. The syslog log is the log that the WAF device sends to the outside according to the Syslog protocol after decrypting, parsing, and detecting the encrypted traffic.
[0050] This step receives the syslog log sent by the WAF device through the syslog log receiver in the HTTP redirection relay service technology component, and parses the original HTTP request from it. The original HTTP request is the plaintext data after the WAF device decrypts the encrypted traffic.
[0051] Step S102, according to the network traffic configuration information pre-set by the WAF device and sent to the bypass deployed security device, the HTTP request is distributed to multiple different processing threads according to the TCP four-tuple data, and the number of the processing threads is dynamically allocated according to the number of virtual CPU processors.
[0052] In this step, users can configure the data traffic to be sent to other security devices in the WAF configuration interface, and generate different processing threads according to the above configuration, and each processing thread processes and sends data separately. Furthermore, other security devices other than WAF devices are deployed in bypass mode, including IPS devices, IDS devices, etc.
[0053] Specifically, the HTTP request is distributed to multiple different session redirection worker threads according to the TCP four-tuple data (source IP, source port, destination IP, destination port). More preferably, the number of session redirection worker threads can be dynamically allocated according to the number of virtual CPU processors in the WAF device where the HTTP redirection relay service technology component is located. Among them, the virtual CPU processor is a computing resource allocated to a virtual machine instance in a virtualized environment. It represents the CPU computing power of the system for parallel processing. For example, for a device with 16 cores and 2 hyperthreads, the number of virtual CPU processors is 32. The principle of the above dynamic allocation is to ensure that the number of worker threads is above a preset proportion of the number of virtual CPU processors, for example, above 80%, so as to ensure that the WAF device has the maximum processing throughput.
[0054] Step S103, through the session redirection worker thread, stores the received TCP four-tuple data in the TCP session cache corresponding to the thread; constructs a simulated TCP state machine for each TCP four-tuple data in the TCP session cache, and sets the timeout time of the CLOSING state of the simulated TCP state machine, so that the repeated message delayed by the previous connection will not affect the next connection of the same four-tuple.
[0055] In this step, each session redirection worker thread will have its own exclusive cache, which is called session cache in this embodiment, and is used to cache TCP session information, instead of all session redirection worker threads sharing one cache. The benefits of this are: first, it avoids the need to lock cache access, improving the performance of cache reading and writing; second, it improves the locality advantage of the cache and reduces the copying between different CPU caches. The key cached in the TCP session cache is the TCP four-tuple, namely: source IP, source port, destination IP, destination port, and the key value is state and time.
[0056] Furthermore, this step ensures that there is no conflict between TCP sessions with the same TCP 4-tuple data, because TCP session conflicts may cause communication confusion, data loss, or connection failure. Specific impacts include:
[0057] Data confusion: If two TCP sessions with the same four-tuple exist at the same time, packets may be sent to the wrong session, resulting in data confusion and parsing errors.
[0058] Connection failures: When network devices cannot distinguish between TCP sessions of the same quadruple, connection failures may occur because the device cannot properly route packets to the correct session.
[0059] Data loss: In the presence of TCP session conflicts, some data packets may be misrouted or lost, resulting in incomplete communication data.
[0060] For example, suppose there are two computers A and B in a network, and they have established the same four-tuple TCP connection with server C. For example, the source IP, destination IP, source port number, and destination port number of the data packet sent by A to C are exactly the same as the data packet sent by B to C. In this case, server C may not be able to accurately route the received data packet to the correct computer, resulting in data confusion or loss.
[0061] In order to achieve the above object, the solution adopted by the present invention is:
[0062] The real TCP state machine has 11 states. Since the HTTP redirection relay service technology component of the present invention receives the information of the 7-layer HTTP request, it cannot receive the 4-layer TCP syn, ack and fin packets, and cannot maintain a real TCP state machine. Therefore, the present invention preferably maintains a simulated TCP state machine with only three states, which are CLOSE->ESTABLISH->CLOSING. The state transition process of the simulated TCP state machine is as follows:
[0063] (1) Initially, a TCP 4-tuple is in the CLOSE state;
[0064] (2) After receiving an HTTP request of the four-tuple, the TCP session changes to the ESTABLISH state;
[0065] (3) When all HTTP requests of the four-tuple in the queue are processed, the TCP session changes to the CLOSING state;
[0066] (4) The CLOSING state will be maintained for a period of time. If a new HTTP request is received during this period, the TCP session will change back to the ESTABLISH state. Otherwise, the TCP session will change back to the CLOSE state.
[0067] For the above situation, in order to ensure that the TCP session state is consistent with the actual state as much as possible and to ensure that the receiver can parse correctly, the core issue is to ensure that the timeout of the CLOSING state is set reasonably. For a real TCP state machine, when one end actively closes the connection and the four waves are completed, the connection enters the TIME_WAIT state. The present invention has found that the duration / delay of the TIME_WAIT state can avoid having two TCP sessions with the same four-tuple at the same time as long as the repeated message (i.e., crosstalk data) delayed by the previous connection does not affect the next connection with the same four-tuple, and can also allow two adjacent TCP sessions to have a minimum interval time, thereby ensuring that the receiver can parse correctly.
[0068] The present invention refers to the setting of the real TCP state machine. Preferably, the timeout period of the CLOSING state of the present invention is set to 2 minutes, but is not limited to this. As long as the repeated message delayed by the previous connection does not affect the next connection of the same four-tuple, it can ensure that the TCP session state inferred by the simulated TCP state machine is as consistent as possible with the actual state, and TCP sessions with the same four-tuple do not conflict, and the receiver can always parse correctly.
[0069] Step S104, converting the HTTP request into data link layer network frame information of the OSI model, and then sending it to the data packet transmitter.
[0070] Specifically, the HTTP request is converted into the data link layer network frame information of the OSI model (i.e., the data unit operated at the data link layer in the OSI model) through the open source network packet processing library tool, and then sent to the packet sender for processing. The HTTP request of the syslog log is restored into the data link layer network frame information of the OSI model, that is, the generated log is restored into network traffic that can be accessed and detected by other security devices.
[0071] Step S105, the data link layer network frame information of the OSI model is sent from the network port of the WAF device to the bypass deployment security device in the form of mirrored traffic through the data packet transmitter.
[0072] The mirrored traffic in this step refers to the real-time copy of the traffic in the network to the bypass-deployed security device. The original traffic direction remains unchanged, and the security device monitors, detects and analyzes the network and application system status through the mirrored traffic. The mirrored traffic is generally sent to the switch, and then sent to the bypass-deployed security device through the switch, or it can be sent directly to the bypass-deployed security device. Since a large number of bypass security devices, such as IDS, receive mirrored traffic for analysis and processing, the use of mirrored traffic can maximize compatibility with existing security devices.
[0073] When constructing the mirror traffic, one way is: the mac address information of the mirror traffic is not the information collected in the actual device, and its source mac address and destination mac address are hard-coded by the user in the program configuration file, which is a pair of fixed values, but this method is not conducive to the security settings of the network and the use of the mac address. More preferably, the source mac address and destination mac address of the mirror traffic are kept consistent with the source mac address and destination mac address of the real traffic, so that the uniqueness of the mac address can be fully utilized to quickly locate the device, and limit the access of devices with specific mac addresses to network resources, so as to implement network access control and security policies. Specifically, the present invention uses a command line tool to edit and rewrite network data packets, modify the mac address information in the mirror traffic file, and change it to the source / destination mac address information in the original traffic, so as to achieve the consistency of the source mac address and destination mac address of the mirror traffic with the source mac address and destination mac address of the real traffic.
[0074] The network encrypted traffic detection method provided in this embodiment, on the one hand, enables other network security devices to directly detect the decrypted plaintext of the encrypted traffic generated by the WAF device, avoiding the repeated uninstallation of certificates due to direct decryption of the encrypted traffic, thereby causing security risks and business delays; on the other hand, it can achieve detection coverage of most network encrypted traffic without completely changing the network topology and network device access method, reducing access costs and implementation difficulties, without complicating the network link structure, improving network stability, and greatly reducing overall network delays.
[0075] See also Figure 4 Another embodiment of the present invention further provides a network encrypted traffic detection device 200, including a log parsing module 201, a traffic distribution module 202, a session cache module 203, a data conversion module 204, and a data sending module 205. The network encrypted traffic detection device 200 can execute the network encrypted traffic detection method in the method embodiment.
[0076] Specifically, the network encrypted traffic detection device 200 includes:
[0077] The log parsing module 201 is configured to: obtain the system log of the WAF device, and parse the original HTTP request from the system log;
[0078] The traffic distribution module 202 is configured to: distribute HTTP requests to multiple different processing threads according to TCP four-tuple data according to the network traffic configuration information preset by the WAF device and sent to the bypass deployment security device, and dynamically allocate the number of the processing threads according to the number of virtual CPU processors;
[0079] The session cache module 203 is configured to: store the received TCP four-tuple data in the TCP session cache corresponding to the thread through the session redirection worker thread; construct a simulated TCP state machine for each TCP four-tuple data in the TCP session cache, and set the timeout time of the CLOSING state of the simulated TCP state machine so that the repeated message delayed by the previous connection will not affect the next connection of the same four-tuple;
[0080] The data conversion module 204 is configured to: convert the HTTP request into the data link layer network frame information of the OSI model, and then send it to the data packet transmitter;
[0081] The data sending module 205 is configured to: send the data link layer network frame information of the OSI model from the network port of the WAF device to the bypass deployment security device in the form of mirrored traffic through the data packet transmitter.
[0082] Furthermore, a dynamic allocation module 206 is included, which is configured to dynamically allocate the number of session redirection worker threads according to the number of virtual CPU processors.
[0083] Furthermore, it also includes a mirror traffic editing module, which is used to edit and rewrite network data packets through a command line tool, and change the MAC address information in the mirror traffic to the source MAC address and destination MAC address information in the original traffic, so as to ensure that the source MAC address and destination MAC address of the mirror traffic are consistent with the source MAC address and destination MAC address of the original traffic.
[0084] It should be noted that the network encrypted traffic detection device 200 provided in this embodiment corresponds to a technical solution that can be used to execute each method embodiment. Its implementation principle and technical effect are similar to the method and will not be repeated here.
[0085] Figure 5 This is a schematic diagram of the structure of an electronic device 300 provided in another embodiment of the present invention, and the electronic device is used to implement the network encrypted traffic detection method in the method embodiment. The electronic device 300 in the embodiment of the present invention may include but is not limited to a WAF device. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0086] like Figure 5As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 to a random access memory (RAM) 303 to implement the method of the embodiment of the present invention. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0087] Typically, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Figure 5 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0088] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention also provides a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the network encryption traffic detection method as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of the embodiment of the present invention are executed.
[0089] The above description is only a preferred embodiment of the present invention. Those skilled in the art should understand that the scope of disclosure involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but also should cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) to form a technical solution.
Claims
1. A method for detecting network encrypted traffic, characterized in that: include: Obtain the system log of the WAF device, and parse the original HTTP request from the system log; According to the network traffic configuration information pre-set by the WAF device and sent to the bypass deployment security device, the HTTP request is distributed to multiple different processing threads according to the TCP four-tuple data, and the number of the processing threads is dynamically allocated according to the number of virtual CPU processors; The received TCP four-tuple data is stored in the TCP session buffer corresponding to the thread by the processing thread; A simulated TCP state machine is constructed for each TCP four-tuple data in the TCP session cache, and the timeout of the CLOSING state of the simulated TCP state machine is set so that the repeated message delayed by the previous connection will not affect the next connection of the same four-tuple; Convert HTTP requests into data link layer network frame information of the OSI model and then send them to the packet sender; The data link layer network frame information of the OSI model is sent from the network port of the WAF device to the bypass deployed security device in the form of mirrored traffic through the data packet sender; Use command line tools to edit and rewrite network packets, and change the MAC address information in the mirrored traffic to the source MAC address and destination MAC address information in the original traffic to ensure that the source MAC address and destination MAC address of the mirrored traffic are consistent with those of the original traffic.
2. A method for detecting network encrypted traffic according to claim 1, characterized in that: The bypass deployed security devices include IPS intrusion prevention system and IDS intrusion detection system.
3. A method for detecting network encrypted traffic according to claim 1, characterized in that: The simulated TCP state machine has only three states, namely: CLOSE state, ESTABLISH state and CLOSING state.
4. A network encrypted traffic detection device, characterized in that: include: The log parsing module is configured to: obtain the system log of the WAF device, and parse the original HTTP request from the system log; The traffic distribution module is configured to: distribute HTTP requests to a plurality of different processing threads according to TCP four-tuple data according to the network traffic configuration information preset by the WAF device and sent to the bypass deployment security device, and dynamically allocate the number of the processing threads according to the number of virtual CPU processors; The session cache module is configured to: store the received TCP four-tuple data in a TCP session cache corresponding to the thread through the processing thread; A simulated TCP state machine is constructed for each TCP four-tuple data in the TCP session cache, and the timeout of the CLOSING state of the simulated TCP state machine is set so that the repeated message delayed by the previous connection will not affect the next connection of the same four-tuple; The data conversion module is configured to: convert the HTTP request into the data link layer network frame information of the OSI model, and then send it to the data packet transmitter; The data sending module is configured to: send the data link layer network frame information of the OSI model from the network port of the WAF device to the bypass deployment security device in the form of mirrored traffic through the data packet sender; The mirror traffic editing module is configured to edit and rewrite network data packets through command line tools, and change the MAC address information in the mirror traffic to the source MAC address and destination MAC address information in the original traffic to ensure that the source MAC address and destination MAC address of the mirror traffic are consistent with the source MAC address and destination MAC address of the original traffic.
5. A network encrypted traffic detection device according to claim 4, characterized in that: The bypass deployed security devices include IPS intrusion prevention system and IDS intrusion detection system.
6. A network encrypted traffic detection device according to claim 5, characterized in that: The simulated TCP state machine has only three states, namely: CLOSE state, ESTABLISH state and CLOSING state.
7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more computer programs; When the one or more computer programs are executed by the one or more processors, the one or more processors implement a network encryption traffic detection method as described in any one of claims 1-3.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements a network encrypted traffic detection method as described in any one of claims 1-3.
Citation Information
Patent Citations
Apparatus and method for TCP protocol and data recovery based on parallel processing
CN101488960A
Network security monitoring method and system based on WAF equipment and electronic device
CN112165447A
Real-time VoLTE voice restoration and detection method and device facing network traffic
CN116233317A
Architecture for Network Entity and Event Models
US20230261956A1
