Method for implementing L3VPN anonymous network in Windows system

By creating a virtual network card in Windows system and redirecting the virtual IP address using the WFP kernel driver protection module, the problem of intranet address leakage and security threats in L3VPN is solved, low-invasive transformation and security improvement are achieved, and multiple networks are supported. Protocol and IP version.

CN118764312BActive Publication Date: 2024-11-15BEIJING ZHIZHANGYI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411205307.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-11-15
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

The existing L3VPN has problems with intranet address leakage and security threats in Windows systems. User needs are difficult to meet, and the system changes are large, and performance and stability problems are serious.

Method used

By creating a virtual network card in the Windows system and configuring a virtual address list, establishing the correspondence between the real IP address and the virtual IP address, using the WFP kernel driver protection module to redirect Socket requests to the obfuscated IP address, realizing the five-yuan data packet Group information replacement and redirection, hiding the real drainage address of the virtual network card.

Benefits of technology

It has achieved low invasive transformation, improved system security, prevented intranet address leakage and attacks, supported common network protocols and IP versions, and ensured future sustainability and competitiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118764312B_ABST
    Figure CN118764312B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of network security technology, and more specifically to a method for implementing an L3VPN anonymous network in a Windows system, the method comprising: L3VPN application creates a virtual network card, and configures a virtual address list for the virtual network card; the application layer initiates a request, redirects the request matching the real IP address to the obfuscated IP address through the WFP kernel driver protection module, and sends it to the L3VPN application layer; the sending data restoration module receives the first data packet, and replaces the five-tuple information in the first data packet; the L3VPN application layer obtains the received second data packet, and forwards it to the receiving data obfuscation module, replaces the five-tuple information in the second data packet, generates a second data packet after the obfuscated IP address, redirects it to the restored IP address through the WFP kernel driver protection module, and returns the second data packet to the application layer. The present invention can improve network security and prevent the leakage of intranet addresses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network security, and more specifically to a method for realizing an L3VPN anonymous network in a Windows system. Background Art

[0002] L3VPN (Layer 3 Virtual Private Network), as a virtual private network under the three-layer network architecture, is a VPN technology implemented at the network layer (the third layer of the OSI model). It cleverly integrates the virtual network card and the system routing mechanism, and directly points the route of the target resource to the virtual network card, allowing the system to intercept and process network data packets from the upper-layer application on the virtual network card. The data packet is then securely transmitted to the VPN gateway through SSL or other enhanced encryption channels, and then forwarded by the VPN gateway to the target host in the intranet. In the opposite direction, the reply data of the target host in the intranet is also forwarded to the client through the VPN gateway, and the client writes it to the virtual network card, which is then submitted to the upper-layer application by the virtual network card. L3VPN is widely used in remote office and access scenarios of enterprises, governments and operators. Its core advantages greatly improve the security of network communications through tunnel technology, advanced encryption technology, key management mechanism and strict user and device identity authentication.

[0003] This design of L3VPN also comes with certain security risks. Specifically, since the routing rules of the virtual network card are directly embedded in the operating system, these rules can be easily revealed if commands such as route print are used, thereby exposing the intranet topology and increasing the risk of intranet address leakage. In addition, attackers may also use powerful network packet capture tools such as Wireshark to capture and parse the original request and response data transmitted through the virtual network card, further threatening the security of the intranet, and in serious cases, may also cause intranet penetration and attack incidents.

[0004] To optimize these potential security issues, L3VPN on Windows systems usually adopts the following two anti-sniffing strategies:

[0005] Solution 1: Active defense strategy: During the operation of L3VPN, system policies or security software are used to prohibit the execution of commands that may leak network information, such as route print. At the same time, real-time monitoring is implemented to detect and prevent the launch of network sniffing tools such as Wireshark, thereby blocking potential security threats at the source.

[0006] Solution 2: Technological innovation strategy. Abandon the traditional virtual network card routing method and use a self-developed Windows kernel-level driver to handle the acquisition and transmission of L3 network data. This method bypasses the virtual network card level and directly encrypts and decrypts data at the kernel level, avoiding interception and analysis by sniffing tools.

[0007] However, when using Solution 1 L3VPN, users need to view network card information and use network packet capture tools, so this solution is not universal. Solution 2 uses a self-developed Windows kernel driver to replace the virtual network card, which makes significant changes to the original system, is too invasive, and inevitably has performance and stability issues.

[0008] Therefore, the present invention proposes a method for implementing an L3VPN anonymous network in a Windows system to improve network security and prevent leakage of intranet addresses. Summary of the invention

[0009] The existing solution, L3VPN, requires users to view network card information and use network packet capture tools during use, so this solution is not universal. Solution 2 uses a self-developed Windows kernel driver to replace the virtual network card, which makes significant changes to the original system, is too invasive, and inevitably has performance and stability issues.

[0010] In order to better solve the above problems, the present invention provides a method for implementing an L3VPN anonymous network in a Windows system, wherein an L3VPN application communicates with a target server, obtains a real routing address list that needs to be diverted, and stores the real routing address list in a WFP kernel driver protection module, wherein the real routing address list includes multiple real IP addresses, and the method is implemented by the following steps:

[0011] Step S1: the L3VPN application creates a virtual network card in the Windows operating system, and configures a virtual address list for the virtual network card, the virtual address list includes multiple virtual IP addresses, establishes a correspondence between the real IP address and the virtual IP address, and saves the correspondence in a NAT table and a reverse NAT table;

[0012] Step S2: the application layer initiates a Socket request, redirects the Socket request matching the real IP address to the obfuscated IP address through the WFP kernel driver protection module, and sends a first data packet to the L3VPN application layer through the virtual network card where the obfuscated IP address is located, where the first data packet is an encapsulation of the Socket request;

[0013] Step S3: the sending data restoration module in the L3VPN application layer receives the first data packet, replaces the five-tuple information in the first data packet, restores the first data packet, and transmits the restored first data packet to the L3VPN application layer, which then forwards it to the L3VPN server.

[0014] Step S4: The L3VPN application layer obtains the second data packet received by the L3VPN server, and forwards it to the receiving data obfuscation module in the L3VPN application layer, the receiving data obfuscation module replaces the five-tuple information in the second data packet, generates a second data packet after the IP address is obfuscated, and passes the second data packet to the virtual network card where the obfuscated IP address is located, and then is received by the virtual network card driver constructed by the L3VPN application, redirected to the restored IP address through the WFP kernel driver protection module, and the second data packet is returned to the application layer, wherein the second data packet is the response information of the first data packet.

[0015] As a preferred technical solution of the present invention, in step S2, redirecting the Socket request matching the real IP address to the obfuscated IP address through the WFP kernel driver protection module includes:

[0016] The WFP kernel driver protection module monitors the Socket request sent by the application layer in the operating system through the driver layer hooking the FWPM_LAYER_ALE_CONNECT_REDIRECT_V4 / V6 layer, obtains the five-tuple information, and determines whether the destination IP address in the five-tuple information matches the IP address in the real routing address list. If it does not match, it passes normally; if it matches, it is passed to the network redirection module for obfuscated IP processing, and redirects the Socket request to the obfuscated IP address.

[0017] As a preferred technical solution of the present invention, performing IP obfuscation processing in the network redirection module and redirecting the Socket request to the obfuscated IP address includes:

[0018] Based on the destination IP address in the quintuple information, the first virtual IP address corresponding to the destination IP address is obtained through the NAT table query module, the destination IP address of the Socket request is modified to the first virtual IP address, the source IP address of the Socket request is the virtual network card address where the first virtual IP address is located, and the Socket request is redirected to the first virtual IP address.

[0019] As a preferred technical solution of the present invention, obtaining the first virtual IP address corresponding to the destination IP address through a NAT table query module includes:

[0020] Based on the destination IP address, the corresponding first virtual IP address is queried through the NAT table query module. If the query is successful, the first virtual IP address corresponding to the destination IP address is returned. If the query fails, the allocated first virtual IP address is obtained from the NAT pool, and the first virtual IP address is inserted into the NAT table, and then the first virtual IP address is returned.

[0021] As a preferred technical solution of the present invention, in step S1, the corresponding relationship is saved in the NAT table and the reverse NAT table:

[0022] The NAT table and the reverse NAT table are both stored in a user-mode program. The NAT table indicates that the real IP address is obtained from the virtual IP address, and the reverse NAT table indicates that the virtual IP address is obtained from the real IP address.

[0023] As a preferred technical solution of the present invention, in step S3, the sending data restoration module receives the first data packet, replaces the five-tuple information in the first data packet, and restores the first data packet, including:

[0024] The sending data restoration module is located in the user state program, monitors the first data packet transmitted by the virtual network card, and obtains the five-tuple information from the first data packet. Based on the destination IP address in the five-tuple information, the real IP address corresponding to the destination IP address is obtained through the NAT table record module. If the acquisition is successful, the real IP address is used to replace the destination IP address in the five-tuple information and restore the first data packet. If the acquisition fails, the first data packet is discarded.

[0025] As a preferred technical solution of the present invention, in step S4, the received data obfuscation module replaces the five-tuple information in the second data packet to generate a second data packet with an obfuscated IP address, including:

[0026] The received data obfuscation module is located in a user-state program, monitors a second data packet transmitted by the L3VPN application layer, and obtains five-tuple information from the second data packet. Based on the destination IP address in the five-tuple information, the virtual IP address corresponding to the destination IP address is obtained through a NAT table record module. If the acquisition is successful, the destination IP address in the five-tuple information is replaced with the virtual IP address, and the second data packet after the obfuscated IP address is obtained. If the acquisition fails, the second data packet is discarded.

[0027] As a preferred technical solution of the present invention, the five-tuple information includes a source port, a source IP address, a destination port, a destination IP address and a protocol.

[0028] As a preferred technical solution of the present invention, in step S3, the first data packet is transmitted to the L3VPN application layer, further comprising:

[0029] The L3VPN application layer also constructs a private encryption protocol to encrypt and encapsulate the first data packet, and forwards the encrypted first data packet to the L3VPN server.

[0030] As a preferred technical solution of the present invention, in step S4, the L3VPN application layer obtains the second data packet received by the L3VPN server, further comprising:

[0031] The L3VPN application obtains the second data packet received by the L3VPN server through the private encryption protocol, decrypts the second data packet, obtains the decrypted second data packet, and then forwards the second data packet to the received data obfuscation module.

[0032] Compared with the prior art, the beneficial effects of the present invention are at least as follows:

[0033] The technical solution of the present invention realizes low-intrusive transformation of existing L3VPN products by reusing the L3VPN virtual network diversion mechanism and protocol layer logic, that is, it can quickly upgrade and enhance system security without affecting the stability of the existing system, reducing development and deployment costs. It supports common network protocols such as TCP, UDP, ICMP, and supports both IPv4 and IPv6 IP protocol versions. With the continuous development of network technology, the popularization of IPv6 has become a trend. This feature of the method ensures its sustainability and competitiveness in the future network environment.

[0034] By hiding the real drainage address of the virtual network card, the leakage of the intranet topology is effectively avoided. The attacker cannot view the real drainage route of the SDP network card through commands such as route print, nor can he obtain the real route access address through packet capture tools such as Wireshark. The high anonymity and security greatly enhance the network defense capability and protect the security of key information such as enterprises and governments. At the same time, the method disclosed in the present invention has shown significant advantages in reusability, protocol support, IP version compatibility, anonymity and security, and product integration, providing a new solution for the implementation of L3VPN anonymous network in Windows system. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present invention 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 invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0036] Figure 1 The present invention is a flowchart of the steps of implementing the method of L3VPN anonymous network in Windows system. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0038] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.

[0039] The Layer 3 Virtual Private Network (L3VPN) based on the three-layer network is currently widely used in remote office and access fields such as enterprises, governments, and operators. L3VPN mainly uses tunnel technology, encryption technology, key management technology, and user and device authentication technology. Using L3VPN can greatly improve the security of Internet access.

[0040] The existing solution, L3VPN, requires users to view network card information and use network packet capture tools during use, so this solution is not universal. Solution 2 uses a self-developed Windows kernel driver to replace the virtual network card, which makes significant changes to the original system, is too invasive, and inevitably has performance and stability issues.

[0041] In view of the above technical problems, the present invention proposes Figure 1 The method for implementing L3VPN anonymous network in Windows system shown in the figure, L3VPN application communicates with the target server, obtains the real routing address list that needs to be diverted, and stores the real routing address list in the WFP kernel driver protection module. The real routing address list includes multiple real IP addresses. The method is implemented by the following steps:

[0042] Step S1: The L3VPN application creates a virtual network card in the Windows operating system and configures a virtual address list for the virtual network card. The virtual address list includes multiple virtual IP addresses, establishes a correspondence between the real IP address and the virtual IP address, and saves the correspondence in the NAT table and the reverse NAT table.

[0043] Specifically, the L3VPN application creates a virtual network card in the Windows system to process network traffic passing through L3VPN, which serves as a virtual interface for network data packet transmission. A virtual address list is also configured for each created virtual network card, which contains multiple virtual IP addresses. The virtual IP address is not a real network address, but is used to hide and protect the real intranet topology information. The L3VPN application is also responsible for establishing the correspondence between the real IP address and the virtual IP address, which is the basis for implementing the address obfuscation and restoration functions, ensuring that the network data packets can maintain anonymity and be correctly identified and restored during transmission. The correspondence between the real IP and the virtual IP is saved in the NAT table and the reverse NAT table. The NAT table is used to quickly obtain the real IP from the virtual IP, while the reverse NAT table is used to quickly obtain the virtual IP from the real IP. These two tables are the core components of the address translation and restoration mechanism. Through the above steps, the anonymity and security of L3VPN are effectively enhanced, and the leakage of the intranet topology and network sniffing attacks are prevented.

[0044] Step S2: The application layer initiates a Socket request, redirects the Socket request matching the real IP address to the obfuscated IP address through the WFP kernel driver protection module, and sends the first data packet to the L3VPN application layer through the virtual network card where the obfuscated IP address is located. The first data packet is an encapsulation of the Socket request.

[0045] Specifically, at the initial stage of data transmission, the WFP (Windows Filtering Platform) kernel driver protection module processes the Socket request initiated by the application layer in real time. When the destination IP address of the Socket request matches the preset real IP address list, the module redirects the destination address of the Socket request to an obfuscated IP address, which is one of the virtual IP address lists set in the previous step S1. Through redirection, the original real IP address is hidden at the initial stage of data transmission, thereby enhancing the security of data transmission. Since the real IP address is replaced by the obfuscated virtual IP address, the attacker cannot directly obtain the real intranet topology information through commands such as route print or network packet capture tools. Furthermore, even if the sniffing tool can capture the network data packet, they can only see the obfuscated IP address and cannot directly parse the real network structure and communication content. Although the IP address is obfuscated, the rest of the data packet (such as port number, protocol type, etc.) remains unchanged, ensuring the transparency and correctness of data transmission.

[0046] Step S3: The sending data restoration module in the L3VPN application layer receives the first data packet, replaces the five-tuple information in the first data packet, restores the first data packet, and passes the restored first data packet to the L3VPN application layer, which then forwards it to the L3VPN server.

[0047] Specifically, the first data packet received from the virtual network card is processed by sending a data restoration module. The first data packet received is the data packet after obfuscation. The sending data restoration module will replace the five-tuple information (source port, source IP, destination port, destination IP, protocol type) in the data packet, especially restore the obfuscated destination IP address to the real IP address, thereby restoring the original state of the data packet and ensuring that the data packet can be correctly identified and processed when it is transmitted to the L3VPN server. Since the first data packet is restored to its original state at the L3VPN application layer, it will not have any impact on the upper layer application, maintaining the compatibility and stability of the application layer. In addition, although the step of data restoration is added, since this step is completed within the L3VPN application layer and the processing speed of the data packet is very fast, it will not affect the overall data transmission efficiency.

[0048] Step S4: The L3VPN application layer obtains the second data packet received by the L3VPN server and forwards it to the receiving data obfuscation module in the L3VPN application layer. The receiving data obfuscation module replaces the five-tuple information in the second data packet, generates a second data packet with an obfuscated IP address, and passes the second data packet to the virtual network card where the obfuscated IP address is located. The second data packet is then received by the virtual network card driver constructed by the L3VPN application, redirected to the restored IP address via the WFP kernel driver protection module, and returned to the application layer, wherein the second data packet is the response information of the first data packet.

[0049] Specifically, the L3VPN application layer first obtains the second data packet received from the L3VPN server. The second data packet is the response information of the first data packet. This step ensures that the response data packet can be correctly and securely delivered back to the client. The receiving data obfuscation module is responsible for replacing the five-tuple information in the second data packet and generating an obfuscated IP address. By obfuscating the IP address in the data packet, sniffing tools such as Wireshark are prevented from capturing real network interaction data, thereby avoiding the leakage of intranet addresses and potential security threats. At the same time, since the real drainage address is hidden, attackers cannot obtain the topology of the intranet through common network commands (such as route print), which enhances the security of the intranet. The obfuscated second data packet is passed to the virtual network card. Through the WFP kernel driver protection module, the obfuscated second data packet is redirected to the restored real IP address. Because the second data packet processed in the virtual network card eventually needs to be restored to the original real IP address to ensure that the upper-layer application can correctly receive and process these data. After the above processing, the data packet is finally returned to the application layer to ensure the normal communication and data transmission of the application. This method supports common TCP, UDP, ICMP protocols and IPv4 / IPv6, and can be easily integrated with the existing L3VPN system, reducing the difficulty and cost of transformation. At the same time, it increases the security and stability of the network without affecting the normal network use of users.

[0050] Through the coordination of the above steps, network security is improved and the leakage of intranet addresses is prevented.

[0051] Furthermore, in the above step S2, the Socket request matching the real IP address is redirected to the obfuscated IP address through the WFP kernel driver protection module, including:

[0052] The WFP kernel driver protection module hooks the FWPM_LAYER_ALE_CONNECT_REDIRECT_V4 / V6 layer through the driver layer to listen to the Socket request sent by the application layer in the operating system, obtains the five-tuple information, and determines whether the destination IP address in the five-tuple information matches the IP address in the real routing address list. If it does not match, it passes normally. If it matches, it is passed to the network redirection module for obfuscated IP processing, and the Socket request is redirected to the obfuscated IP address.

[0053] Specifically, by monitoring the Socket requests sent by the upper-layer applications in the operating system, the five-tuple information including the source IP, source port, destination IP, destination port and communication protocol is obtained. When the destination IP address is found to match the IP address in the real routing address list, it indicates that the request needs to be protected to avoid leakage of the real intranet address. The destination IP address of the Socket request that matches the real drainage address segment is changed from the real address to the virtual address (obfuscated address). Since the real drainage address is replaced by the virtual address, the real intranet topology information cannot be obtained through the commonly used network viewing commands (such as route print) and packet capture tools (such as Wireshark), thereby effectively preventing the leakage of the intranet address. The modified Socket request is redirected to the virtual network card, which effectively protects the real address information of the intranet and improves the security of the network.

[0054] Furthermore, the network redirection module performs IP obfuscation processing and redirects the socket request to the obfuscated IP address including:

[0055] Based on the destination IP address in the quintuple information, the first virtual IP address corresponding to the destination IP address is obtained through the NAT table query module, the destination IP address of the Socket request is modified to the first virtual IP address, the source IP address of the Socket request is the virtual network card address where the first virtual IP address is located, and the Socket request is redirected to the first virtual IP address.

[0056] Specifically, by changing the destination IP address of the Socket request from the original real IP address to the first virtual IP address obtained by querying the NAT table, the real IP address of the client or server can be effectively hidden, thereby increasing the security of network communications because it is difficult for attackers to directly locate the real communicating parties, thereby reducing the risk of attacks directly targeting the real IP address.

[0057] Further, obtaining the first virtual IP address corresponding to the destination IP address through the NAT table query module includes:

[0058] Based on the destination IP address, the corresponding first virtual IP address is queried through the NAT table query module. If the query is successful, the first virtual IP address corresponding to the destination IP address is returned. If the query fails, the allocated first virtual IP address is obtained from the NAT pool, and the first virtual IP address is inserted into the NAT table, and then the first virtual IP address is returned.

[0059] Specifically, when a Socket request needs to be redirected, its destination IP address is first searched through the NAT table query module. If the query is successful, that is, the mapping of the destination IP address to the virtual IP address already exists in the NAT table, the corresponding virtual IP address is directly returned to ensure that the established mapping relationship can be applied quickly and accurately. If the virtual IP address mapping of the corresponding destination IP address is not found in the NAT table (that is, the query fails), the L3VPN application will dynamically allocate a new virtual IP address from the NAT pool and insert it into the NAT table. After that, the newly allocated virtual IP address is returned to the Socket request. The dynamic address allocation and real-time update of the NAT table are realized, ensuring that each request can be redirected effectively and securely. By mapping the real IP address to the virtual IP address, even if the network sniffing tool captures the data packet, it can only obtain the virtual IP address, but cannot directly obtain the real intranet address information, which greatly enhances the security of the system and prevents the leakage of the intranet topology and potential network attacks.

[0060] Furthermore, in the above step S1, the corresponding relationship is saved in the NAT table and the reverse NAT table:

[0061] Both the NAT table and the reverse NAT table are stored in the user-mode program. The NAT table indicates obtaining a real IP address from a virtual IP address, and the reverse NAT table indicates obtaining a virtual IP address from a real IP address.

[0062] Specifically, the NAT table and the reverse NAT table are stored to realize the mutual conversion between the virtual IP address and the real IP address. These two tables are the core components of the address conversion and restoration mechanism. When the virtual IP address of the sending data restoration module is received, the NAT table is queried first. If it is not found, the NAT table query module provided by the driver is called to obtain the real IP address, and then saved to the NAT table / reverse NAT table. If it is found, the real IP address is directly obtained, and then the query result is returned to the sending data restoration module; when the real IP address of the receiving data obfuscation module is received, the reverse NAT table is queried. If it is not found, it returns empty. If it is found, the real IP is directly obtained, and then the query result is returned to the receiving data obfuscation module.

[0063] Furthermore, in the above step S3, the sending data restoration module receives the first data packet, replaces the five-tuple information in the first data packet, and restores the first data packet, including:

[0064] The sending data restoration module is located in the user-state program, monitors the first data packet transmitted by the virtual network card, and obtains the five-tuple information from the first data packet. Based on the destination IP address in the five-tuple information, the real IP address corresponding to the destination IP address is obtained through the NAT table record module. If the acquisition is successful, the real IP address is used to replace the destination IP address in the five-tuple information and restore the first data packet. If the acquisition fails, the first data packet is discarded.

[0065] Specifically, the sending data restoration module is located in the user state program, responsible for monitoring the first data packet transmitted by the virtual network card, ensuring that the data can be processed in time. From the received first data packet, the module will extract the key five-tuple information, use the destination IP address in the five-tuple information, and query the corresponding real IP address through the NAT table record module. The mapping relationship between the virtual IP address and the real IP address is stored in the NAT table record module. If the query is successful, that is, the corresponding real IP address is found, the module will use the real IP address to replace the destination IP address in the five-tuple information, ensuring that the destination address of the data packet has been restored to the real network address before it is sent. After completing the address replacement, the first data packet will be further restored to ensure that its content is consistent with the original data packet, but the destination address has been changed to the real address. If the corresponding destination IP address is not found in the NAT table record module, it means that the data packet may have been tampered with or invalid, and the module will choose to discard the data packet to avoid invalid or erroneous data from spreading in the network. Through the processing of the sending data restoration module, it is ensured that the data packet redirected by the network can restore its correct destination address before sending, thereby ensuring the correctness of data transmission.

[0066] Furthermore, in the above step S4, the receiving data obfuscation module replaces the five-tuple information in the second data packet to generate a second data packet after the IP address is obfuscated, including:

[0067] The receiving data obfuscation module is located in the user state program, monitors the second data packet transmitted by the L3VPN application layer, and obtains the five-tuple information from the second data packet. Based on the destination IP address in the five-tuple information, the virtual IP address corresponding to the destination IP address is obtained through the NAT table record module. If the acquisition is successful, the virtual IP address is used to replace the destination IP address in the five-tuple information, and the second data packet after the obfuscated IP address is obtained. If the acquisition fails, the second data packet is discarded.

[0068] Specifically, the receiving data obfuscation module is located in the user-mode program and is responsible for monitoring the second data packet transmitted by the L3VPN application layer. It is processed by the VPN server and forwarded back to the L3VPN client. From the monitored second data packet, the module will extract the key five-tuple information, and query through the NAT table recording module based on the destination IP address in the five-tuple information to obtain the virtual IP address corresponding to the real destination IP address. If the NAT table recording module successfully finds the corresponding virtual IP address, the receiving data obfuscation module will use this virtual IP address to replace the destination IP address in the original five-tuple information, thereby generating a second data packet with an obfuscated IP address. In this process, the real IP address of the data is concealed, effectively preventing potential network sniffing attacks. For data packets that have successfully performed IP address obfuscation, the module will send it to the virtual network card of the L3VPN client; if the query to the NAT table fails, it means that the data packet may belong to unauthorized communication, and the data packet will be discarded at this time to enhance network security. Through IP address obfuscation, it is ensured that the real topology of the intranet will not be easily obtained by attackers through packet capture and other methods, thereby improving network security. Moreover, the obfuscated data packets only contain virtual IP addresses, so even if you use network packet capture tools such as Wireshark to sniff, you cannot directly obtain the real intranet address information.

[0069] Furthermore, the five-tuple information includes a source port, a source IP address, a destination port, a destination IP address, and a protocol.

[0070] Furthermore, in the above step S3, the first data packet is transmitted to the L3VPN application layer, further comprising:

[0071] The L3VPN application layer also constructs a private encryption protocol to encrypt and encapsulate the first data packet, and forwards the encrypted first data packet to the L3VPN server.

[0072] Specifically, the private encryption protocol is used to encrypt and encapsulate the first data packet sent through the virtual network card to ensure the confidentiality of the data packet during transmission. Even if the data packet is intercepted, its content cannot be parsed without the corresponding decryption key.

[0073] Furthermore, in the above step S4, the L3VPN application layer obtains the second data packet received by the L3VPN server, further comprising:

[0074] The L3VPN application obtains the second data packet received by the L3VPN server through a private encryption protocol, decrypts the second data packet, obtains the decrypted second data packet, and then forwards the second data packet to the received data obfuscation module.

[0075] Specifically, the private encryption protocol constructed through the above steps securely receives the second data packet from the L3VPN server, ensuring the integrity and authenticity of the data packet and preventing the data from being tampered with or forged during transmission. The received second data packet is decrypted through the private encryption protocol to restore the original data content, which is the reverse process of the encryption process, ensuring that the data can be correctly parsed and used at the receiving end.

[0076] By introducing the private encryption protocol of the L3VPN application layer, the above steps S3 and S4 enhance the security of the data transmission process, effectively prevent data leakage and tampering, and improve the security and reliability of the entire L3VPN system. At the same time, combined with the processing of the receiving data obfuscation module, the system's anti-sniffing capability is further enhanced, protecting the privacy of the intranet topology.

[0077] In summary, the present invention realizes low-intrusive transformation of existing L3VPN products by reusing the L3VPN virtual network drainage mechanism and protocol layer logic, that is, without affecting the stability of the existing system, the system security can be quickly upgraded and enhanced, reducing the development and deployment costs. Supports common network protocols such as TCP, UDP, ICMP, and supports two IP protocol versions, IPv4 and IPv6. With the continuous development of network technology, the popularization of IPv6 has become a trend. This feature of the present method ensures its sustainability and competitiveness in the future network environment. Also, by hiding the real drainage address of the virtual network card, the leakage of the intranet topology is effectively avoided. The attacker cannot view the real drainage route of the SDP network card through commands such as route print, nor can he obtain the real route access address through packet capture tools such as Wireshark. The high anonymity and security greatly enhance the network defense capability and protect the security of key information such as enterprises and governments. At the same time, the method disclosed by the present invention has shown significant advantages in reusability, protocol support, IP version compatibility, anonymity and security, and product integration, and provides a new solution for the implementation of L3VPN anonymous network in Windows system.

[0078] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0079] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the above-mentioned program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0080] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0081] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

[0082] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for implementing an L3VPN anonymous network in a Windows system, wherein an L3VPN application communicates with a target server, obtains a real routing address list that needs to be diverted, and stores the real routing address list in a WFP kernel driver protection module, wherein the real routing address list includes multiple real IP addresses, and is characterized in that: The method comprises the following steps: Step S1: the L3VPN application creates a virtual network card in the Windows operating system, and configures a virtual address list for the virtual network card, the virtual address list includes multiple virtual IP addresses, establishes a correspondence between the real IP address and the virtual IP address, and saves the correspondence in a NAT table and a reverse NAT table; Step S2: the application layer initiates a Socket request, redirects the Socket request matching the real IP address to the obfuscated IP address through the WFP kernel driver protection module, and sends a first data packet to the L3VPN application layer through the virtual network card where the obfuscated IP address is located, where the first data packet is an encapsulation of the Socket request; Step S3: the sending data restoration module in the L3VPN application layer receives the first data packet, replaces the five-tuple information in the first data packet, restores the first data packet, and transmits the restored first data packet to the L3VPN application layer, which then forwards it to the L3VPN server. Step S4: the L3VPN application layer obtains the second data packet received by the L3VPN server, and forwards it to the receiving data obfuscation module in the L3VPN application layer, the receiving data obfuscation module replaces the five-tuple information in the second data packet, generates a second data packet after the IP address is obfuscated, and transmits the second data packet to the virtual network card where the obfuscated IP address is located, and then is received by the virtual network card driver constructed by the L3VPN application, redirected to the restored IP address through the WFP kernel driver protection module, and returns the second data packet to the application layer, wherein the second data packet is the response information of the first data packet; In step S2, redirecting the Socket request matching the real IP address to the obfuscated IP address through the WFP kernel driver protection module includes: The WFP kernel driver protection module monitors the Socket request sent by the application layer in the operating system through the driver layer hooking the FWPM_LAYER_ALE_CONNECT_REDIRECT_V4 / V6 layer, obtains the five-tuple information, and determines whether the destination IP address in the five-tuple information matches the IP address in the real routing address list. If not, it passes normally; if it matches, it is passed to the network redirection module for obfuscated IP processing, and redirects the Socket request to the obfuscated IP address; In the step S3, the sending data restoration module receives the first data packet, replaces the five-tuple information in the first data packet, and restores the first data packet, including: The sending data restoration module is located in the user state program, monitors the first data packet transmitted by the virtual network card, obtains the five-tuple information from the first data packet, and obtains the real IP address corresponding to the destination IP address through the NAT table recording module based on the destination IP address in the five-tuple information. If the acquisition is successful, the destination IP address in the five-tuple information is replaced with the real IP address, and the first data packet is restored. If the acquisition fails, the first data packet is discarded; In step S4, the received data obfuscation module replaces the five-tuple information in the second data packet to generate a second data packet after the IP address is obfuscated, including: The received data obfuscation module is located in a user-state program, monitors a second data packet transmitted by the L3VPN application layer, and obtains five-tuple information from the second data packet. Based on the destination IP address in the five-tuple information, the virtual IP address corresponding to the destination IP address is obtained through a NAT table record module. If the acquisition is successful, the destination IP address in the five-tuple information is replaced with the virtual IP address, and the second data packet after the obfuscated IP address is obtained. If the acquisition fails, the second data packet is discarded.

2. The method according to claim 1, characterized in that Performing IP obfuscation processing in the network redirection module and redirecting the Socket request to the obfuscated IP address includes: Based on the destination IP address in the quintuple information, the first virtual IP address corresponding to the destination IP address is obtained through the NAT table query module, the destination IP address of the Socket request is modified to the first virtual IP address, the source IP address of the Socket request is the virtual network card address where the first virtual IP address is located, and the Socket request is redirected to the first virtual IP address.

3. The method according to claim 2, characterized in that Obtaining the first virtual IP address corresponding to the destination IP address through a NAT table query module includes: Based on the destination IP address, the corresponding first virtual IP address is queried through the NAT table query module. If the query is successful, the first virtual IP address corresponding to the destination IP address is returned. If the query fails, the allocated first virtual IP address is obtained from the NAT pool, and the first virtual IP address is inserted into the NAT table, and then the first virtual IP address is returned.

4. The method according to claim 1, characterized in that: In the step S1, the corresponding relationship is saved in the NAT table and the reverse NAT table: The NAT table and the reverse NAT table are both stored in a user-mode program. The NAT table indicates that the real IP address is obtained from the virtual IP address, and the reverse NAT table indicates that the virtual IP address is obtained from the real IP address.

5. The method according to claim 1, characterized in that The five-tuple information includes source port, source IP address, destination port, destination IP address and protocol.

6. The method according to claim 1, characterized in that In the step S3, the first data packet is transmitted to the L3VPN application layer, further comprising: The L3VPN application layer also constructs a private encryption protocol to encrypt and encapsulate the first data packet, and forwards the encrypted first data packet to the L3VPN server.

7. The method according to claim 6, characterized in that In step S4, the L3VPN application layer obtains the second data packet received by the L3VPN server, further comprising: The L3VPN application obtains the second data packet received by the L3VPN server through the private encryption protocol, decrypts the second data packet, obtains the decrypted second data packet, and then forwards the second data packet to the received data obfuscation module.