Network attack interception method, computer device, and computer readable storage medium

By obtaining and analyzing the initial information of network data packets, identifying and intercepting unknown attacks, and using black and white lists and protocol identification, it solves the problem of difficulty in identifying new attacks and high false alarm rate with traditional methods, and achieves efficient network attack identification and interception. Improved network security and availability.

CN118353722BActive Publication Date: 2024-08-23CHENXIN LINGCHUANG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410781187.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-08-23
Estimated Expiration
2044-06-18

AI Technical Summary

Technical Problem

Traditional network attack identification and interception methods are difficult to identify new unknown attacks, have a high false alarm rate, and are difficult to deal with advanced persistent threats. In addition, real-time monitoring and detection of large-scale networks has high performance overhead, affecting throughput and response speed.

Method used

By obtaining the initial information of the network data packet, determine whether it belongs to the IP protocol type. If so, determine whether the sending data end address is in the preset blacklist. If not, identify the upper layer protocol and protocol data information, parse the SMB protocol data packet, and analyze Data characteristics match the preset network attack behavior characteristics, intercept them, and update them according to the black and white lists to respond in real time.

Benefits of technology

Effectively filter known malicious IP addresses, reduce the possibility of network attacks, improve security and reliability, reduce false positive rates, ensure that legitimate traffic is not intercepted, intercept potential attacks in a timely manner, minimize the impact of attacks, and improve network security and availability. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118353722B
    Figure CN118353722B
Patent Text Reader

Abstract

The present application discloses a network attack interception method, a computer device, and a computer-readable storage medium. The method includes: obtaining the initial information of a network data packet, which includes the IP type, the upper layer protocol of the data packet, and the address of the end sending the data; judging whether the network type of the network data packet is the IP protocol network type based on the IP type, and if so, judging whether the address of the end sending the data belongs to the preset blacklist, and if so, intercepting the network data packet, and if not, judging whether it belongs to the preset whitelist, and if not, obtaining the protocol header information and the protocol data information based on the upper layer protocol of the data packet, and then judging whether it is an SMB protocol data packet, and if so, judging whether it is an SMB request connection behavior, and if so, obtaining data features; judging whether the data features match the preset network attack behavior features, and if so, intercepting the network data packet. The method can solve the problems of network attacks being difficult to identify and having a high false alarm rate in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of network security technology, and in particular to a network attack interception method, a computer device, and a computer-readable storage medium. Background Art

[0002] Traditional network attack identification and interception usually adopt the following methods: 1) Signature detection: compare signature libraries based on known attack patterns to identify and intercept known attacks. This method is often used in firewalls and intrusion detection systems (IDS); 2) Rule-based detection: check network traffic according to a specific set of rules to identify potential attack behaviors. These rules can be based on network protocols, traffic patterns, or abnormal behaviors; 3) Anomaly detection: monitor network traffic and system behavior to detect abnormal patterns, such as abnormally large amounts of data transmission, abnormal login activities, etc.

[0003] However, these methods have some problems. Traditional methods can usually only identify known attack patterns and cannot cope with new unknown attacks. Methods based on rules and anomaly detection are easily affected by normal network activities, resulting in high false alarm rates, which affects the availability and management efficiency of the system. It is difficult to deal with advanced persistent threats. Highly targeted and concealed attacks can often evade traditional detection methods, lurking in the network for a long time and difficult to be detected. Real-time monitoring and detection of large-scale networks will bring large performance overhead, which may affect the network's throughput and response speed. Summary of the invention

[0004] In view of this, the embodiments of the present disclosure provide a network attack interception method, a computer device, and a computer-readable storage medium, which can solve the problems in the prior art that network attacks are difficult to identify and have a high false alarm rate.

[0005] In a first aspect, an embodiment of the present disclosure provides a network attack interception method, which specifically includes the following scheme:

[0006] Obtaining initial information of a network data packet; the initial information includes IP type, upper layer protocol of the data packet and address of the end sending the data;

[0007] Based on the IP type, determine whether the network type of the network data packet is an IP protocol network type, and if so, determine whether the data sending end address belongs to a preset blacklist, and if so, intercept the network data packet;

[0008] If the data sending end address does not belong to the preset blacklist, determine whether the data sending end address belongs to the preset whitelist, and if not, obtain protocol header information and protocol data information based on the upper layer protocol of the data packet;

[0009] Based on the protocol header information and the protocol data information, determine whether the network data packet is an SMB protocol data packet; if so, determine whether the network interaction behavior of the network data packet is an SMB connection request behavior; if so, parse the network data packet to obtain data features;

[0010] Determine whether the data feature matches a preset network attack behavior feature, and if so, intercept the network data packet.

[0011] Optionally, determining whether the data feature matches a preset network attack behavior feature includes:

[0012] Determine whether the network data packet is inbound data, and if so, identify the network data packet as a remote connection request command data packet;

[0013] Acquire first SMB Command information based on the remote connection request command data packet;

[0014] Determine whether the first SMB Command information matches the first preset position information, and if so, obtain TreeID information based on the data feature;

[0015] Determine whether the Path corresponding to the TreeID information is the target address, and if so, obtain the additional information segment accumulation information;

[0016] It is determined whether the accumulated information of the additional information segment is not less than a preset threshold. If so, it is determined that a network attack exists, and the network data packet is intercepted.

[0017] Optionally, if the network data packet is not inbound data, marking the network data packet as a local response data packet;

[0018] Acquire second SMB Command information based on the local response data packet;

[0019] Determine whether the second SMB Command information matches the second preset position information, if so, determine whether the returned error code feature matches the preset error code information, if so, obtain the additional information segment accumulation information;

[0020] It is determined whether the accumulated information of the additional information segment is not less than a preset threshold value. If so, it is determined that the network attack corresponding to the network data packet is an EternalBlue attack, and the network data packet is intercepted.

[0021] Optionally, the method further comprises: obtaining an IP address of a source device of the intercepted network data packet and all data information in the network data packet;

[0022] Add and update the source device IP address to the preset blacklist, and use the updated preset blacklist as the preset blacklist for next determination;

[0023] Alternatively, based on the historical attack device storage information, determine whether the number of attacks on the source device IP address is greater than a preset number threshold. If so, add and update the source device IP address to the preset blacklist, and use the updated preset blacklist as the preset blacklist for the next judgment.

[0024] Optionally, the method further includes: sending the source device IP address and all data information in the network data packet to the user in the form of a pop-up window.

[0025] Optionally, the method further comprises: if the network data packet does not contain any network attack behavior, obtaining an IP address of a source device of the network data packet;

[0026] The source device IP address is added and updated to the preset whitelist, and the updated preset whitelist is used as the preset whitelist for the next determination.

[0027] Optionally, the data feature includes network data information;

[0028] The additional information segment accumulated information includes additional data size information of the network data packet.

[0029] In a second aspect, the present disclosure also provides a network attack interception system, including:

[0030] An acquisition module configured to acquire initial information of a network data packet; the initial information includes an IP type, an upper layer protocol of the data packet, and an address of a data sending end;

[0031] A first judgment module is configured to judge whether the network type of the network data packet is an IP protocol network type based on the IP type, and if so, judge whether the data sending end address belongs to a preset blacklist, and if so, intercept the network data packet;

[0032] A second judgment module is configured to, if the data sending end address does not belong to the preset blacklist, determine whether the data sending end address belongs to the preset whitelist, and if not, obtain protocol header information and protocol data information based on the upper layer protocol of the data packet;

[0033] A third judgment module is configured to judge whether the network data packet is an SMB protocol data packet based on the protocol header information and the protocol data information, and if so, judge whether the network interaction behavior of the network data packet is an SMB request connection behavior, and if so, parse the network data packet to obtain data features;

[0034] The fourth judgment module is configured to judge whether the data feature matches the preset network attack behavior feature, and if so, intercept the network data packet.

[0035] In a third aspect, the embodiments of the present disclosure further provide a computer device, which adopts the following technical solution:

[0036] The computer device comprises:

[0037] at least one processor; and,

[0038] a memory communicatively connected to the at least one processor; wherein,

[0039] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any of the network attack interception methods described above.

[0040] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute any of the network attack interception methods described above.

[0041] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which implements the steps of any of the above methods when executed by a processor.

[0042] The network attack interception method disclosed in the present application can effectively filter out known malicious IP addresses through the use of preset blacklists and preset whitelists, thereby reducing the possibility of network attacks. The blacklist is used to intercept known attack sources, while the whitelist can ensure that legitimate communications are not interfered with, thereby improving the security and reliability of the network. The method can identify the upper layer protocol of the network data packet and further refine the interception strategy. For example, when it is judged to be an SMB protocol data packet, the specific behavior of the SMB protocol can be analyzed and intercepted to effectively prevent attacks against the SMB protocol, such as ransomware attacks. By analyzing the interactive behavior and data characteristics of the network data packet, it can more accurately determine whether there is a network attack behavior. This refined analysis helps to reduce the false alarm rate, ensure that legitimate traffic is not intercepted, and effectively intercept potential network attacks. The method can intercept malicious network data packets in real time and promptly prevent the damage caused by the attack behavior to the system. This real-time response can minimize the impact of the attack and improve the security and availability of the network. The method is based on the preset black and white lists and network attack behavior characteristics, and has certain flexibility and configurability. The administrator can adjust the black and white lists according to the actual situation and update the interception strategy according to the new attack behavior characteristics to cope with the ever-changing network threats.

[0043] This network attack interception method effectively improves network security and reduces the risk of network attacks through black and white list filtering, protocol identification, network behavior analysis and real-time response.

[0044] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following preferred embodiments are specifically cited and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0046] Figure 1 A flowchart of a network attack interception method provided in an embodiment of the present disclosure.

[0047] Figure 2 for Figure 1 Flow chart of the method for matching and judging data features with preset network attack behavior features.

[0048] Figure 3 The figure is a flow chart of a method for determining the attack behavior of EternalBlue provided in an embodiment of the present disclosure.

[0049] Figure 4 The present invention is a flowchart of a method for processing a network data packet that has undergone a network attack provided in an embodiment of the present invention.

[0050] Figure 5 The present invention is a flowchart of another embodiment of a method for processing a network data packet that has undergone a network attack provided in an embodiment of the present disclosure.

[0051] Figure 6 A method for processing network data packets that do not contain network attacks is provided in an embodiment of the present disclosure.

[0052] Figure 7 A functional block diagram of a network attack interception system provided in an embodiment of the present disclosure.

[0053] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0054] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0055] It should be clear that the following embodiments of the present disclosure are described by specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0056] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0057] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0058] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.

[0059] Reference Figure 1 The first aspect of the present application discloses a network attack interception method, which specifically comprises the following steps:

[0060] Get the initial information of the network data packet; the initial information includes IP type, upper layer protocol of the data packet and the address of the data sending end;

[0061] Based on the IP type, determine whether the network type of the network data packet is the IP protocol network type. If not, send the network data packet to other network protocol drivers. If so, determine whether the data sending end address belongs to the preset blacklist. If so, intercept the network data packet.

[0062] If the data sending end address does not belong to the preset blacklist, determine whether the data sending end address belongs to the preset whitelist. If so, send the network data packet to other network protocol drivers. If not, obtain the protocol header information and protocol data information based on the upper layer protocol of the data packet.

[0063] Based on the protocol header information and protocol data information, determine whether the network data packet is an SMB protocol data packet. If not, send the network data packet to other network protocol drivers. If so, determine whether the network interaction behavior of the network data packet is an SMB request connection behavior. If not, send the network data packet to other network protocol drivers. If so, parse the network data packet to obtain data features.

[0064] Determine whether the data characteristics match the preset network attack behavior characteristics. If not, send the network data packet to other network protocol drivers. If so, intercept the network data packet.

[0065] The network attack interception method disclosed in the present application can effectively filter out known malicious IP addresses through the use of preset blacklists and preset whitelists, thereby reducing the possibility of network attacks. The blacklist is used to intercept known attack sources, while the whitelist can ensure that legitimate communications are not interfered with, thereby improving the security and reliability of the network. The method can identify the upper layer protocol of the network data packet and further refine the interception strategy. For example, when it is judged to be an SMB protocol data packet, the specific behavior of the SMB protocol can be analyzed and intercepted to effectively prevent attacks against the SMB protocol, such as ransomware attacks. By analyzing the interactive behavior and data characteristics of the network data packet, it can more accurately determine whether there is a network attack behavior. This refined analysis helps to reduce the false alarm rate, ensure that legitimate traffic is not intercepted, and effectively intercept potential network attacks. The method can intercept malicious network data packets in real time and promptly prevent the damage caused by the attack behavior to the system. This real-time response can minimize the impact of the attack and improve the security and availability of the network. The method is based on the preset black and white lists and network attack behavior characteristics, and has certain flexibility and configurability. The administrator can adjust the black and white lists according to the actual situation and update the interception strategy according to the new attack behavior characteristics to cope with the ever-changing network threats.

[0066] This network attack interception method effectively improves network security and reduces the risk of network attacks through black and white list filtering, protocol identification, network behavior analysis and real-time response.

[0067] Among them, the IP type is the IP type in the data packet header.

[0068] The protocol header information is TCP header information, and the protocol data information is TCP data information.

[0069] Reference Figure 2 , the matching judgment method between data features and preset network attack behavior features specifically includes the following contents:

[0070] Determine whether the network data packet is inbound data, and if so, identify the network data packet as a remote connection request command data packet;

[0071] Acquire first SMB Command information based on the remote connection request command data packet;

[0072] Determine whether the first SMB Command information matches the first preset position information, if not, release the network data packet, if yes, obtain TreeID information based on data characteristics;

[0073] Determine whether the Path corresponding to the TreeID information is the target address. If so, obtain the additional information segment cumulative information;

[0074] Determine whether the accumulated information of the additional information segment is not less than a preset threshold. If not, release the network data packet. If so, determine that there is a network attack and intercept the network data packet.

[0075] In this embodiment, if the network data packet is inbound data, it means that it is a network data packet sent from a remote end to a local end, that is, a data packet of a remote connection request command.

[0076] In this embodiment, by determining whether the network data packet is inbound data and identifying it as a remote connection request command data packet, potential intrusion behaviors can be effectively screened out. This strategy can help the system focus on possible attack behaviors and reduce unnecessary resource waste; obtaining the first SMB Command information can provide more details about the network request, which is helpful for further analysis and identification of whether there is potential attack behavior; by matching with the preset bit information, the nature of the network data packet can be more accurately determined, and this matching process can eliminate some false positives and improve the accuracy and credibility of the system; obtaining TreeID information can help further locate the target resource of the request, which is helpful for analyzing the legitimacy of the request and potential attack targets; determining whether the Path corresponding to the TreeID information is the target address can ensure the legitimacy and security of the request, which helps prevent some common attack methods, such as malicious access to specific resources; checking the accumulated information of the additional information segment can help determine the legitimacy of the request and whether there is an abnormal situation, and setting a preset threshold can further improve the system's ability to detect abnormal behaviors; once it is determined that there is a network attack, the system can immediately intercept the network data packet to avoid potential security threats from damaging the system. This rapid response capability can greatly reduce the impact of attack behaviors on the system.

[0077] In summary, this method improves the system's ability to identify and defend against network attacks through a multi-level detection and analysis process, which helps to protect the security and stable operation of the network system.

[0078] Further, it is determined whether the first SMB Command information matches the first preset position information, that is, whether the SMB-Command: segment of the read SMB header is a value of 0×33. If it is, it means that it is to be used to process subsequent operations related to the Trans2 subprotocol. At this time, it is necessary to pay attention to the additional data of the subprotocol Trans2 Secondary. The field Data Conunt in the additional information segment Trans2Secondary is the size of the additional data of this packet.

[0079] Reference Figure 3 , the specific method for judging the attack behavior of EternalBlue includes the following:

[0080] If the network data packet is not inbound data, mark the network data packet as a local response data packet;

[0081] Acquire second SMB Command information (i.e., local response SMB Command information) based on the local response data packet;

[0082] Determine whether the second SMB Command information matches the second preset position information, if not, release the network data packet, if yes, determine whether the returned error code feature matches the preset error code information, if not, release the network data packet, if yes, obtain the additional information segment accumulation information;

[0083] Determine whether the accumulated information of the additional information segment is not less than a preset threshold. If not, release the network data packet. If so, determine that the network attack corresponding to the network data packet is an Eternal Blue attack, and intercept the network data packet.

[0084] In this embodiment, if the network data packet is not inbound data, it means that it is a network data packet sent from the local to the remote end, that is, a data packet of the local response.

[0085] The EternalBlue attack is a network attack that exploits the SMB (Server Message Block) protocol vulnerability in the Windows operating system. It obtains privileged control of the target machine by sending specially crafted network packets, and can then execute arbitrary code. In order to prevent being attacked by the EternalBlue, many computer users, especially corporate users involved in network communication, often choose to actively shut down the SMB network protocol; set firewall router rules to limit network communication; shut down network sharing (which uses the SMB protocol to implement, mainly to disable the SMB protocol) services; isolate important data and resources from the network, etc. However, the method of shutting down the SMB network protocol (a protocol developed by Microsoft and Intel) is to prevent the EternalBlue by shutting down network ports 445, 135, 137, 138, and 139. However, this restriction also blocks the use of network functions related to the SMB protocol, such as network file sharing, network printing service functions, and device (scanners, cameras, etc.) sharing functions. These functions cannot be used. These prevention methods bring security to computer networks while also hindering or prohibiting the use of certain network functions, bringing a lot of inconvenience and trouble to computer network users.

[0086] Through the method disclosed in this embodiment, the Eternal Blue attack behavior can be quickly and accurately identified, and the use of related services is not hindered while intercepting and preventing the Eternal Blue attack; specifically, by intercepting the Eternal Blue attack, the possibility of the network being attacked by such attacks can be effectively reduced, and the security of the overall network can be improved; the Eternal Blue attack can lead to serious consequences such as remote control of the system and data leakage. By timely intercepting the attack, potential losses such as data leakage and system paralysis can be reduced; intercepting the attack can avoid the attacked system from performing a large number of responses and processing, thereby saving system resources and time and ensuring the normal operation of the system; reducing the transmission and processing of malicious attack traffic can improve the overall performance of the network, reduce network congestion and response delays; using such a detection and interception method can enhance the system's ability to resist Eternal Blue attacks, making it more capable of resisting such threats.

[0087] By implementing this solution, network security can be effectively protected, potential losses can be reduced, resources and time can be saved, and network performance and confrontation capabilities can be improved.

[0088] Specifically, the solution provided by this embodiment, through in-depth research on the SMB protocol, static analysis of the Eternal Blue virus code and dynamic follow-up of the Eternal Blue attack actions, especially the vulnerability exploitation part, summarizes the characteristics of the attack process, the characteristics of malicious network data packets, filters the network communication data and analyzes the network communication behavior. If the network communication is found to be consistent with the Eternal Blue attack behavior, or the network data characteristics that meet the Eternal Blue are found when filtering the network data packet, the network data packet of this communication is immediately discarded, and the communication link is cut off and the network link request of the attacking device is blocked, so that the Eternal Blue cannot continue the attack behavior. At the same time, an attack alarm will be given and the IP address of the attacking device will be recorded. This implementation method achieves the interception and prevention of the Eternal Blue attack by accurately locating the attack code and the attack behavior, while not hindering the use of its related services.

[0089] Further, in this embodiment, it is determined whether the second SMB Command information matches the second preset position information, specifically, it is determined whether the SMB-Command: segment of the read SMB header is a value of 0x32.

[0090] The EternalBlue attack uses the buffer overflow of big data to run the virus with root privileges in the kernel of the target device to invade the target machine; therefore, a large number of incoming data packets that meet the above inbound type will be sent to the terminal. We use the global variable g_Trans2 Secondary Data Threshold to accumulate and record the amount of additional data sent to the terminal.

[0091] When the terminal device is successfully infiltrated, EternalBlue will stop the attack. At this time, the terminal will return an SMB data packet with the SMB-Comma protocol being Ox32 and the NTStatus segment being OxcO00000d. Because the terminal will return OxcO00000d after a successful EternalBlue attack, some interception programs will directly determine whether the NTStatus segment of the SMB-Comma protocol is Oxc000000d and then intercept it.

[0092] However, some third-party programs that use the SMB protocol for network communication may also cause the terminal to return OxcO00000d due to some erroneous calls. In this way, if the EternalBlue attack is reported to the sender, it will cause a false alarm, so the previously accumulated g_Trans2 Secondary Data Threshold needs to be used.

[0093] If g_Trans2 Secondary Data Threshold is greater than or equal to a certain fixed value, it will definitely cause the kernel buffer of the target device to overflow. At this time, even if it is not an attack by the Eternal Blue virus, it may be an attack by other viruses that need to obtain special permissions. When the returned OxcO00000d feature meets the feature of Eternal Blue, it is judged to be an Eternal Blue attack and should be intercepted and reported as a virus.

[0094] Among them, the preset error code information is 0xc000000d.

[0095] In this application, in the data packet from the network, the type field is at an offset of 12 bytes. This field occupies 2 bytes, and the type field value is 0x0800, indicating that the protocol is the IP protocol; the data header of the IP protocol is offset at 9 bytes, occupying 1 byte, and the value of the TCP protocol is 6.

[0096] To determine whether it is the SMB protocol, check the TCP header and data part (payload part). The header offset is 2, occupies 2 bytes, and the value is Ox01BD. The payload part offsets 4 bytes, occupies four bytes, and the value is OxFF534D42, indicating that it is an SMB protocol data packet.

[0097] EternalBlue is an attack in which attackers exploit the vulnerability of the SMB network protocol to penetrate the target device. Our program is to filter network data during the attack process of EternalBlue to locate the network behavior of EternalBlue rather than the normal network behavior of other services (such as file sharing service, printer sharing service, directory service, authentication and authorization service, messaging service). When the remote device requests to connect to the terminal network through the SMB protocol, the network data is filtered to determine whether it is EternalBlue. Therefore, it is necessary to determine whether the network data packet is a data packet requesting a connection by SMB. If it is a data packet requesting a connection, then determine whether it meets the other characteristics of EternalBlue.

[0098] "Requesting a connection" is actually a group of (receiving and sending packets) network interaction behaviors, and we are only concerned with some of the data packets in this group (the SMB network data offset is 8 bytes, occupying one byte, and the value is 0x33 and 0x32).

[0099] Eternal Blue exploits the vulnerability of the SMB protocol to obtain the root privileges of the terminal device to control the terminal device. The method disclosed in this application can hit and close the connection when Eternal Blue establishes a connection, thereby achieving the purpose of blocking.

[0100] Reference Figure 4 The network attack interception method disclosed in the present application also includes: a method for processing a network data packet that has a network attack, and the processing method specifically includes:

[0101] Obtain the source device IP address of the intercepted network data packet and all data information in the network data packet;

[0102] The source device IP address is added to the default blacklist, and the updated default blacklist is used as the default blacklist for the next judgment.

[0103] In this embodiment, adding the IP address of the attacked device to the blacklist can effectively prevent further attacks from the device and improve the security of the overall network; by adding the IP address of the attack source device to the blacklist in real time, the attack event can be responded to and handled in a timely manner, and the updated blacklist can be used in the next judgment to improve the ability to identify and block potential attacks; after adding the attack source device to the blacklist, the impact of the device on the network can be effectively reduced to prevent it from further attacking or intruding other devices; using the blacklist as the preset blacklist for the next judgment can more quickly identify and intercept attacks from known attack sources in future attacks, thereby strengthening the network's defense strategy; by continuously updating the blacklist, the possibility of the attack source device launching an attack again can be reduced, thereby reducing the number of times the network suffers the same type of attack.

[0104] In summary, by implementing this processing method, network security can be effectively enhanced, defense strategies can be responded to and updated in real time, the impact range of attacks can be reduced, and the possibility of attacks occurring again can be reduced.

[0105] Reference Figure 5 In another embodiment, the method for processing a network data packet containing a network attack specifically includes:

[0106] Obtain the source device IP address of the intercepted network data packet and all data information in the network data packet;

[0107] Based on the historical attack device storage information, determine whether the number of attacks on the source device IP address is greater than the preset number threshold. If so, add the source device IP address to the preset blacklist and use the updated preset blacklist as the preset blacklist for the next judgment. If not, do not process it.

[0108] In this embodiment, compared with the previous method, this processing method mainly adds consideration of the number of historical attacks on the attacking device. It not only responds based on the data packet of the current attack, but also takes into account the historical attack situation of the device. In this way, it can be more accurately determined whether the device should be added to the blacklist, rather than just based on a single attack judgment; by considering the number of historical attacks, it can be avoided that the device is immediately added to the blacklist due to occasional attack behavior, which can reduce misjudgment and ensure that only devices that really frequently launch attacks are included in the blacklist; by recording and considering historical attack information, the system can learn and adapt to new attack patterns and behaviors more intelligently, thereby enhancing the ability to resist future attacks; the threshold based on the number of historical attacks can be dynamically adjusted according to the network situation and attack situation, making the defense strategy more flexible and adaptable; by considering historical attack situations, it is possible to better identify and respond to devices that have been launching attacks for a long time, reducing the impact of long-term threats on network security.

[0109] In summary, this processing method can further improve the effectiveness of network security defense, reduce misjudgments, enhance confrontation capabilities, and better deal with long-term and persistent attack threats.

[0110] Furthermore, the network attack interception method disclosed in the present application also includes: sending the source device IP address and all data information in the network data packet to the user in the form of a pop-up window.

[0111] By providing attack prompts and the attacker's IP address, relevant personnel responsible for network security can take corresponding measures in a timely manner, so that users can achieve network security while using network services smoothly.

[0112] Reference Figure 6The network attack interception method disclosed in the present application also includes a method for processing network data packets that do not contain network attacks, specifically including:

[0113] If the network data packet does not contain any network attack behavior, obtain the IP address of the source device of the network data packet;

[0114] The source device IP address is added to the default whitelist, and the updated default whitelist is used as the default whitelist for the next determination.

[0115] In this embodiment, for network data packets that do not contain attack behaviors, their corresponding device IP addresses are added to the whitelist, which can ensure that these normal data packets will not be subject to unnecessary interference and interception, thereby improving network transmission efficiency and data processing speed; by adding normal network data packet source devices to the whitelist, the occurrence of false alarms can be reduced, and normal data packets can be avoided from being intercepted by mistake as attack behaviors, thereby improving the accuracy of network security detection; ensuring that normal network communications are not affected helps to improve the user's network experience, avoid network delays or service unavailability caused by mistaken interception, and enhance users' trust in network services; after adding normal devices to the whitelist, administrators no longer need to perform additional monitoring and management of these devices, reducing management workload and making network management simpler and more efficient; by protecting the transmission and processing of normal data packets, the stability and reliability of the network system can be ensured, and system failures and service interruptions caused by mistaken interception or incorrect processing can be reduced.

[0116] In summary, this processing method helps improve network efficiency, reduce false alarms, optimize user experience, simplify management, and improve system stability. It is an important part of network security defense.

[0117] In the present application, the data feature preferably includes network data information; the additional information segment accumulated information preferably includes additional data size information of the network data packet.

[0118] In this embodiment, the network data packet is a data packet in the network that has not been transmitted to the target terminal.

[0119] Determining whether a network packet is IP protocol means determining whether the packet is transmitted using Internet Protocol (IP). Internet Protocol is one of the basic network protocols used on the Internet, which is responsible for transmitting packets in the network. By checking the header information of the packet, it can be determined whether it uses IP protocol. This inspection is usually part of network traffic analysis and security audit in computer networks, which helps to identify different types of data in network traffic and monitor whether there are anomalies or potential security threats in network traffic.

[0120] The protocols of network data packets are encapsulated layer by layer. First, determine whether the data packet is IP protocol data. If it is an IP protocol network data packet, then the data part of its data packet may contain SMB protocol data (and may also contain data from other protocols). Then determine whether it is an SMB protocol data packet. Eternal Blue is infiltrated through the SMB protocol. The infiltration behavior of Eternal Blue is determined during the interaction of SMB request connection.

[0121] The network attack interception method disclosed in the present application has real-time defense capability, because at the beginning of the Eternal Blue vulnerability exploitation, before the attack behavior occurs, its virus characteristics have been hit to block the continuation of the attack behavior, so it has real-time and timely defense characteristics; transparent use experience, through the network filtering driver to filter network data packets, users can use network protocol related services without restriction, the module transparently filters data from the network in the system; can effectively reduce security risks, due to the protection of intercepting Eternal Blue, attackers cannot obtain system permissions, cannot implant malware and perform malicious operations, and protect the integrity and confidentiality of system data; can enhance system stability, Eternal Blue attack may cause system crash, service interruption, data damage, by intercepting before the attack can ensure stability, avoid service interruption caused by the attack data loss.

[0122] Reference Figure 7 The embodiment of the present disclosure also provides a network attack interception system, including:

[0123] The acquisition module is configured to acquire the initial information of the network data packet; the initial information includes the IP type, the upper layer protocol of the data packet and the address of the data sending end;

[0124] The first judgment module is configured to judge whether the network type of the network data packet is an IP protocol network type based on the IP type, and if so, judge whether the address of the sending data terminal belongs to a preset blacklist, and if so, intercept the network data packet;

[0125] The second judgment module is configured to judge whether the address of the sending data end belongs to the preset white list if the address of the sending data end does not belong to the preset black list, and if not, obtain the protocol header information and protocol data information based on the upper layer protocol of the data packet;

[0126] A third judgment module is configured to judge whether the network data packet is an SMB protocol data packet based on the protocol header information and the protocol data information, and if so, judge whether the network interaction behavior of the network data packet is an SMB request connection behavior, and if so, parse the network data packet to obtain data features;

[0127] The fourth judgment module is configured to judge whether the data feature matches the preset network attack behavior feature, and if so, intercept the network data packet.

[0128] The computer device according to the embodiment of the present disclosure includes a memory and a processor. The memory is used to store non-temporary computer-readable instructions. Specifically, the memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc.

[0129] The processor may be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and may control other components in the computer device to perform desired functions. In one embodiment of the present disclosure, the processor is used to run the computer-readable instructions stored in the memory, so that the computer device executes all or part of the steps of the network attack interception method of each embodiment of the present disclosure.

[0130] Those skilled in the art should be able to understand that in order to solve the technical problem of how to obtain a good user experience, the present embodiment may also include well-known structures such as a communication bus and an interface, and these well-known structures should also be included in the protection scope of the present disclosure.

[0131] like Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure is shown, which is a schematic diagram of the structure of a computer device suitable for implementing the embodiment of the present disclosure. Figure 8 The computer 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 disclosure.

[0132] like Figure 8 As shown, the computer device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the computer device are also stored. The processor, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.

[0133] Typically, the following devices can be connected to the I / O interface: input devices such as sensors or visual information acquisition devices; output devices such as display screens; storage devices such as tapes, hard disks, etc.; and communication devices. The communication device can allow the computer device to communicate with other devices (such as edge computing devices) wirelessly or by wire to exchange data. Figure 8 A computer device having various devices is shown, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0134] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processor, all or part of the steps of the network attack interception method of the embodiment of the present disclosure are executed.

[0135] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.

[0136] According to the computer-readable storage medium of the embodiment of the present disclosure, non-transitory computer-readable instructions are stored thereon. When the non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the network attack interception method of each embodiment of the present disclosure are executed.

[0137] The above-mentioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or mobile hard disk), media with built-in rewritable non-volatile memory (e.g., memory card) and media with built-in ROM (e.g., ROM box).

[0138] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.

[0139] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0140] In the present disclosure, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The block diagrams of the devices, devices, equipment, and systems involved in the present disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0141] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.

[0142] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0143] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.

[0144] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0145] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A network attack interception method, characterized in that: include: Get the initial information of the network data packet; The initial information includes IP type, upper layer protocol of the data packet and the address of the end sending the data; Based on the IP type, determine whether the network type of the network data packet is an IP protocol network type, and if so, determine whether the data sending end address belongs to a preset blacklist, and if so, intercept the network data packet; If the data sending end address does not belong to the preset blacklist, determine whether the data sending end address belongs to the preset whitelist, and if not, obtain protocol header information and protocol data information based on the upper layer protocol of the data packet; Based on the protocol header information and the protocol data information, determine whether the network data packet is an SMB protocol data packet; if so, determine whether the network interaction behavior of the network data packet is an SMB connection request behavior; if so, parse the network data packet to obtain data features; Determine whether the data feature matches a preset network attack behavior feature, and if so, intercept the network data packet; The determining whether the data feature matches a preset network attack behavior feature includes: Determine whether the network data packet is inbound data, and if so, identify the network data packet as a remote connection request command data packet; Acquire first SMB Command information based on the remote connection request command data packet; Determine whether the first SMB Command information matches the first preset position information, and if so, obtain TreeID information based on the data feature; Determine whether the Path corresponding to the TreeID information is the target address, and if so, obtain the additional information segment accumulation information; Determine whether the accumulated information of the additional information segment is not less than a preset threshold value, and if so, determine that a network attack exists, and intercept the network data packet; If the network data packet is not inbound data, marking the network data packet as a local response data packet; Acquire second SMB Command information based on the local response data packet; Determine whether the second SMB Command information matches the second preset position information, if so, determine whether the returned error code feature matches the preset error code information, if so, obtain the additional information segment accumulation information; It is determined whether the accumulated information of the additional information segment is not less than a preset threshold value. If so, it is determined that the network attack corresponding to the network data packet is an EternalBlue attack, and the network data packet is intercepted.

2. The network attack interception method according to claim 1, characterized in that: The method further includes: obtaining the source device IP address of the intercepted network data packet and all data information in the network data packet; Add and update the source device IP address to the preset blacklist, and use the updated preset blacklist as the preset blacklist for next determination; Alternatively, based on the historical attack device storage information, determine whether the number of attacks on the source device IP address is greater than a preset number threshold. If so, add and update the source device IP address to the preset blacklist, and use the updated preset blacklist as the preset blacklist for the next judgment.

3. The network attack interception method according to claim 2, characterized in that: The method also includes: sending the source device IP address and all data information in the network data packet to the user in the form of a pop-up window.

4. The network attack interception method according to claim 1, characterized in that: The method further includes: if the network data packet does not contain any network attack behavior, obtaining an IP address of a source device of the network data packet; The source device IP address is added and updated to the preset whitelist, and the updated preset whitelist is used as the preset whitelist for the next determination.

5. The network attack interception method according to claim 1, characterized in that: The data characteristics include network data information; The additional information segment accumulated information includes additional data size information of the network data packet.

6. A computer device, characterized in that: The computer device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the network attack interception method described in any one of claims 1-5.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the network attack interception method described in any one of claims 1-5.

8. A computer program product comprising computer instructions, characterized in that: When the computer instruction is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.