A message processing method, device, electronic device and storage medium

By determining the number of attacks on the source address and recording attack information in the network security device, the false alarm rate is reduced, the problem of network packets being mistakenly discarded is solved, and the accuracy and fault tolerance of the network security device are improved.

CN115225368BActive Publication Date: 2024-10-29BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210836952.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-15
Publication Date
2024-10-29
Estimated Expiration
2042-07-15

AI Technical Summary

Technical Problem

Existing network security equipment has a high false positive rate when detecting network packets, causing normal packets to be mistakenly discarded and interrupting normal services.

Method used

After determining that the source address is not in the blacklist, it is determined whether it is a multiple attack behavior. If so, the network packet is discarded and added to the blacklist to reduce the false alarm rate; if it is the first attack, the source address and destination address are recorded in binary Group list, and add it to the blacklist when there are multiple attacks, reducing the probability of normal users' IP being mistakenly added to the blacklist.

Benefits of technology

It effectively reduces the risk of normal packets being mistakenly discarded, reduces the impact of false alarm rates on security equipment, and ensures the fault tolerance and accuracy of network security equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115225368B_ABST
    Figure CN115225368B_ABST
Patent Text Reader

Abstract

This application provides a message processing method, apparatus, electronic device, and storage medium. The method includes: acquiring a network message and parsing the source address from the network message; after determining that the source address is not found in a blacklist, determining whether the device corresponding to the source address is a multiple attacker; if so, discarding the network message and adding the source address to the blacklist. By discarding the network message only if the device corresponding to the source address is a multiple attacker after determining that the source address is not in the blacklist, and temporarily not processing (e.g., not adding to the blacklist) when the device corresponding to the network message occasionally makes a false alarm, but only adding the source address of the network message to the blacklist when the device corresponding to the network message is repeatedly detected to be an attacker, the probability of the source address added to the blacklist being the source address of a normal user is reduced, effectively avoiding the risk of normal service interruption due to the discarding of normal messages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computer networks and network security, and in particular to a message processing method, device, electronic device and storage medium. Background Art

[0002] At present, in order to ensure network security, security equipment (such as firewalls, security gateways and attack detection systems, etc.) is usually used to perform security processing on network messages. For example, attack detection is performed on network messages to determine whether the network message is an attack message. If the network message is an attack message, the network message is directly blocked, and the source address of the network message is directly added to the blacklist, so that the source address of the network message sent by the attacker in the future is directly discarded when it matches the blacklist, thereby preventing possible subsequent attacks. However, the detection method of the security device may have a certain false alarm rate. If the network message is mistakenly reported as an attack message, the source address added to the blacklist may be the source address of a normal user, thereby causing the risk of normal messages being discarded and interrupting normal business. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a message processing method, device, electronic device and storage medium, which are used to improve the risk of normal services being interrupted due to normal message discarding.

[0004] The embodiment of the present application provides a message processing method, including: obtaining a network message, parsing a source address from the network message; after determining that the source address is not found in the blacklist, judging whether the device corresponding to the source address is a multiple attack; if so, discarding the network message and adding the source address to the blacklist. In the implementation process of the above scheme, after determining that the source address is not in the blacklist, if the device corresponding to the source address is a multiple attack, the network message is discarded and the source address is added to the blacklist, thereby reducing the impact of the false alarm rate of the access network message that occasionally appears in the detection means of the security device. When the device corresponding to the network message occasionally appears a false alarm, it is temporarily not processed (for example, not added to the blacklist), but when the device corresponding to the network message is detected to be attacked multiple times, the source address of the network message is added to the blacklist, thereby reducing the probability that the source address added to the blacklist is the source address of a normal user, and effectively avoiding the risk of normal business interruption caused by the normal message being discarded.

[0005] Optionally, in an embodiment of the present application, after determining whether the device corresponding to the source address has been attacked multiple times, it also includes: if the device corresponding to the source address is attacking for the first time, the network message is discarded, the destination address of the target device is parsed from the network message, and the source address and the destination address are associated and stored in a two-tuple list. In the implementation process of the above scheme, by discarding the network message only when the device corresponding to the source address is attacking for the first time, parsing the destination address of the target device from the network message, and storing the source address and the destination address in a two-tuple list, it is possible to record the number of attacks on the device corresponding to the source address, thereby reducing the impact of the false alarm rate of the access network message that occasionally appears in the detection means of the security device.

[0006] Optionally, in an embodiment of the present application, judging whether the device corresponding to the source address is a multiple attack includes: after determining that the data record corresponding to the source address is queried from the binary list, judging whether the network message is an attack message; if so, determining that the device corresponding to the source address is a multiple attack, otherwise, determining that the device corresponding to the source address is not a multiple attack. In the implementation process of the above scheme, by determining that the data record corresponding to the source address is queried from the binary list, and determining that the network message is an attack message, it is finally determined that the device corresponding to the source address is a multiple attack, and the source address of the multiple attacks is added to the blacklist, thereby reducing the impact of the false alarm rate of the security device's detection means that occasionally appears in the access network message.

[0007] Optionally, in an embodiment of the present application, determining that the data record corresponding to the source address is queried from the binary list includes: finding data records with the same source address and the same destination address in the binary list; or finding data records with the same source address and different destination addresses in the binary list. In the implementation of the above scheme, by finding data records with the same source address and the same destination address in the binary list; or finding data records with the same source address and different destination addresses in the binary list, the problem of directly adding the source address to the blacklist when the detection means of the security device occasionally makes a false alarm is avoided, effectively reducing the impact of the false alarm rate of the access network message that the detection means of the security device occasionally makes a false alarm.

[0008] Optionally, in the embodiment of the present application, it also includes: if the data record in the binary list times out, the data record is deleted from the binary list. In the implementation process of the above scheme, by deleting the data record from the binary list when the data record in the binary list times out, the problem of directly adding the source address to the blacklist when the detection means of the security device occasionally makes a false alarm is avoided, and the impact of the false alarm rate of the access network message that occasionally appears in the detection means of the security device is effectively reduced.

[0009] Optionally, in an embodiment of the present application, it also includes: if it is determined that the source address is in the blacklist, discarding the network message.

[0010] Optionally, in an embodiment of the present application, it also includes: if no data record corresponding to the source address is found in the two-tuple list, and the network message is an attack message, it is determined that the device corresponding to the source address is the first attack.

[0011] The embodiment of the present application also provides a message processing device, including: a message acquisition and parsing module, used to obtain network messages and parse the source address from the network messages; a device attack judgment module, used to judge whether the device corresponding to the source address is attacked multiple times after determining that the source address is not found in the blacklist; an address list adding module, used to discard the network message and add the source address to the blacklist if the device corresponding to the source address is attacked multiple times.

[0012] Optionally, in an embodiment of the present application, the message processing device also includes: a first attack processing module, which is used to discard the network message if the device corresponding to the source address is the first attack, parse the destination address of the target device from the network message, and associate the source address and destination address and store them in a two-tuple list.

[0013] Optionally, in an embodiment of the present application, the device attack judgment module includes: a network message judgment submodule, which is used to determine whether a network message is an attack message after determining that the data record corresponding to the source address is queried from the two-tuple list; an attack message determination submodule, which is used to determine that if the network message is an attack message, the device corresponding to the source address is attacked multiple times; otherwise, determine that the device corresponding to the source address is not attacked multiple times.

[0014] Optionally, in an embodiment of the present application, the network message judgment submodule includes: a message address search unit, used to find data records with the same source address and the same destination address in the two-tuple list; or, to find data records with the same source address and different destination addresses in the two-tuple list.

[0015] Optionally, in an embodiment of the present application, the message processing device further includes: a data record deletion module, which is used to delete the data record from the two-tuple list if the data record in the two-tuple list times out.

[0016] Optionally, in an embodiment of the present application, the message processing device further includes: a network message discarding module, configured to discard the network message if it is determined that the source address is in the blacklist.

[0017] Optionally, in an embodiment of the present application, the message processing device also includes: a first attack determination module, which is used to determine that the device corresponding to the source address is the first attack if no data record corresponding to the source address is found in the two-tuple list and the network message is an attack message.

[0018] An embodiment of the present application further provides an electronic device, including: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the method described above is performed.

[0019] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described above is executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 A flow chart of a message processing method provided in an embodiment of the present application is shown;

[0022] Figure 2 A schematic diagram of the structure of a two-tuple list provided in an embodiment of the present application is shown;

[0023] Figure 3 A schematic diagram of the structure of a message processing device provided in an embodiment of the present application is shown;

[0024] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0025] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments in the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the embodiments of the present application claimed for protection, but merely represents the selected embodiments in the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the embodiments of the present application.

[0026] It is understandable that the "first" and "second" in the embodiments of the present application are used to distinguish similar objects. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not necessarily limit the difference.

[0027] Before introducing the message processing method provided in the embodiment of the present application, some concepts involved in the embodiment of the present application are first introduced:

[0028] Network Security Device (NSD) refers to a set of software and hardware devices deployed between the dispatching intranet and extranet, and between the private network and the public network, to form a protective barrier on the interface between the intranet and extranet, and between the private network and the public network.

[0029] It should be noted that the message processing method provided in the embodiment of the present application can be executed by an electronic device, where the electronic device refers to a device terminal or server with the function of executing a computer program, such as a smart phone, a personal computer, a tablet computer, a personal digital assistant or a mobile Internet device. A server refers to a device that provides computing services through a network, such as an x86 server and a non-x86 server, and a non-x86 server includes a mainframe, a minicomputer and a UNIX server.

[0030] The following describes the application scenarios applicable to the message processing method, and the application scenarios here include but are not limited to: using the message processing method to enhance the fault tolerance of network security protection devices (NSDs), discarding network messages only when the source address corresponding device is attacked multiple times, and adding the source address to the blacklist, because the electronic device temporarily does not process (for example, does not add to the blacklist) when the network message corresponding device occasionally has a false alarm, but adds the source address of the network message to the blacklist only when it detects attacks on the network message corresponding device multiple times, thereby reducing the impact of the false alarm rate of the access network message that occasionally appears in the detection means of the security device, and also reducing the probability of normal Internet Protocol (IP) addresses being added to the blacklist. Among them, the NSD here can include: firewalls, antivirus systems, horizontal isolation devices, vertical encryption authentication devices, website application protection systems (Web Application Firewall, WAF) or intrusion detection systems (Intrusion Detection System, IDS), etc.

[0031] See also Figure 1 The flowchart of the message processing method provided by the embodiment of the present application is shown; the embodiment of the present application provides a message processing method, including:

[0032] Step S110: Obtain a network message, and parse the source address from the network message.

[0033] The implementation method of the above step S110 is, for example: the electronic device uses an executable program compiled or interpreted by a preset programming language to obtain a network message, and parses the source address (Source Address) of the network message from the network message. The programming languages ​​that can be used are, for example: C, C++, Java, BASIC, JavaScript, LISP, Shell, Perl, Ruby, Python and PHP, etc. After parsing the source address from the network message, the above executable program can also be used to determine whether the source address is in the white list of the electronic device. If the source address is in the white list, it can be directly released. If the source address is not in the white list of the electronic device, then the above executable program can be used to determine whether the source address is in the black list of the electronic device. If the source address is in the black list, the network message can be directly discarded, and then the next network message is obtained and step S110 is executed. If the source address is not in the black list of the electronic device, that is, after determining that the source address is not queried in the black list, the following step S120 can be executed.

[0034] Step S120: after determining that the source address is not found in the blacklist, determine whether the device corresponding to the source address is attacked multiple times.

[0035] Blacklist refers to a list of IP source addresses of devices that have multiple attack behaviors. Of course, there are also maintenance personnel who analyze and judge network messages and determine that the device of the network message is a malicious attack device, and then directly add the IP source address of the network message to the blacklist.

[0036] It is understandable that there are many ways to implement the above-mentioned determination of whether the device corresponding to the source address has been attacked multiple times. For example, a file or a database can be used to record the number of attacks on the device corresponding to the source address, so as to determine whether the device corresponding to the source address has been attacked multiple times based on the recorded number of attacks. The file here can be a file in a distributed file system, and the database here can be a cache database, a relational database, and a non-relational database, etc. The cache database that can be used is, for example, Memcached and Redis, etc. Therefore, the process of determining whether the device corresponding to the source address has been attacked multiple times will be described in detail below.

[0037] Step S130: If the device corresponding to the source address is attacked multiple times, the network message is discarded and the source address is added to the blacklist.

[0038] An implementation example of the above-mentioned step S130 is as follows: if the device corresponding to the source address in the network message is attacked multiple times, the electronic device uses an executable program compiled or interpreted by a preset programming language to block and discard the network message, and adds the source address in the network message to a blacklist. Programming languages ​​that can be used include: C, C++, Java, BASIC, JavaScript, LISP, Shell, Perl, Ruby, Python, PHP, etc.

[0039] In the above implementation process, after determining that the source address is not in the blacklist, if the device corresponding to the source address has been attacked multiple times, the network message is discarded and the source address is added to the blacklist, thereby reducing the impact of the false alarm rate of the access network message that occasionally occurs in the detection means of the security device. When the device corresponding to the network message occasionally has a false alarm, it is temporarily not processed (for example, not added to the blacklist), but the source address of the network message is added to the blacklist only when it is detected that the device corresponding to the network message has been attacked multiple times, thereby reducing the probability that the source address added to the blacklist is the source address of a normal user, and effectively avoiding the risk of normal business being interrupted due to normal messages being discarded.

[0040] As an optional implementation of the above message processing method, after determining in step S120 whether the source address corresponding device is attacked multiple times, the first attack may also be processed. This implementation may include:

[0041] Step S140: If the device corresponding to the source address is attacking for the first time, the network message corresponding to the source address is discarded, the destination address of the target device is parsed from the network message, and the source address and the destination address are associated and stored in a two-tuple list.

[0042] A two-tuple list refers to a list stored with the source address and destination address of the network message as the main fields (similar to the primary key of a data table in a database).

[0043] See also Figure 2 A schematic diagram of the structure of a two-tuple list provided in an embodiment of the present application is shown; the above-mentioned source address and target address can be set according to the specific situation, for example, the source address is set to 10.1.1.5, and the target address is set to 10.1.1.6. Of course, the two-tuple list can also store other fields, such as: timeout duration (i.e., the data record is automatically deleted after exceeding the preset duration), number of attacks and / or attack flag (first attack or multiple attacks) and other fields; the unit of the timeout duration can also be set according to the specific situation, for example, the timeout duration is set to 3 hours, etc. In the specific implementation process, since there is an automatic deletion mechanism for the timeout duration that has been implemented in the cache database, the above-mentioned two-tuple list can be implemented using cache databases such as Memcached and Redis.

[0044] The implementation method of the above step S140 is, for example: using an executable program compiled or interpreted by a preset programming language to determine whether the source address is in the binary list implemented by a cache database such as Memcached and Redis. If no data record corresponding to the source address is found in the binary list, and the network message is an attack message, then it can be directly determined that the device corresponding to the source address is the first attack. If the device corresponding to the source address is the first attack, the executable program compiled or interpreted by the preset programming language discards the network message corresponding to the source address, parses the destination address of the target device from the network message, and associates the source address and the destination address and stores them in the binary list. Among them, the programming languages ​​that can be used are, for example: C, C++, Java, BASIC, JavaScript, LISP, Shell, Perl, Ruby, Python and PHP, etc.

[0045] As an optional implementation of the above step S120, the implementation of determining whether the device corresponding to the source address is attacked multiple times may include:

[0046] Step S121: after determining that the data record corresponding to the source address is found in the two-tuple list, determining whether the network message is an attack message.

[0047] It is understandable that after determining that the source address is not found in the blacklist, and determining that the data record corresponding to the source address is found in the binary list, it indicates that the device corresponding to the source address has had attacks, and then it is determined whether the network message is an attack message. Since there are many situations in which the data record corresponding to the source address is found in the binary list, such as the situation in which the source address is the same and the target address is the same, and the situation in which the source address is the same and the target address is different, these situations will be discussed separately after step S123.

[0048] The implementation method of determining whether a network message is an attack message in the above-mentioned step S121 is, for example: a network security protection device (NSD) such as a firewall, an anti-virus system, a horizontal isolation device, a vertical encryption authentication device, a website application protection system (WAF) or an intrusion detection system (IDS) can be used to determine whether a network message is an attack message. The network security protection device (NSD) can determine whether the network message is an attack message based on the data characteristics of the network message and the actual action performed by the network message.

[0049] Step S122: If the network message is an attack message, it is determined that the device corresponding to the source address is a multiple attack.

[0050] Step S123: If the network message is not an attack message, it is determined that the device corresponding to the source address is not a multiple attack.

[0051] For example, the implementation method of the above steps S122 to S123 is as follows: if it is determined that the data record corresponding to the source address is queried from the binary list, and the network message is an attack message, it means that at least one attack is recorded in the binary list, and with this attack, the device corresponding to the source address has at least two attacks, so it can be determined that the device corresponding to the source address has multiple attacks. If it is determined that there is only one data record corresponding to the source address queried from the binary list, and the network message is not an attack message, it means that there is only one attack recorded in the binary list, and this is not an attack, then it can be determined that the device corresponding to the source address has only one attack, that is, it can be determined that the device corresponding to the source address has not been attacked multiple times. Similarly, if it is determined that no data record corresponding to the source address is queried from the binary list, and the network message is not an attack message, it means that the number of attacks of the device with the source address is not recorded in the binary list, and this is not an attack, then it can be determined that the device corresponding to the source address has no number of attacks.

[0052] As an optional implementation of the above step S121, determining the data record corresponding to the source address queried from the two-tuple list includes but is not limited to the following three implementations:

[0053] In a first implementation, data records with the same source address and the same destination address are found, and this implementation may include:

[0054] Step S121a: Search the tuple list for data records with the same source address and the same destination address.

[0055] The implementation method of the above step S121a is, for example: if a data record with the same source address and the same destination address is found in the two-tuple list, and the network message is an attack message, it is determined that the device corresponding to the source address is a multiple attack. If a data record with the same source address and the same destination address is found in the two-tuple list, and the network message is not an attack message, it is determined that the device corresponding to the source address is not a multiple attack.

[0056] In a second implementation, data records with the same source address and different destination addresses are found, and this implementation may include:

[0057] Step S121b: Find data records with the same source address and different destination addresses in the two-tuple list.

[0058] The implementation method of the above step S121b is, for example: if a data record with the same source address and different destination addresses is found in the two-tuple list, and the network message is an attack message, it is determined that the device corresponding to the source address is a multiple attack. If a data record with the same source address and different destination addresses is found in the two-tuple list, and the network message is not an attack message, it is determined that the device corresponding to the source address is not a multiple attack.

[0059] A third implementation method is to find data records with the same source address and the same destination address, and to find data records with the same source address and different destination addresses. This implementation method may include:

[0060] Step S121c: Find data records with the same source address and the same destination address in the binary list, and find data records with the same source address and different destination addresses, and it can be determined that the source address corresponds to a device that has been attacked multiple times.

[0061] For example, the implementation method of the above step S121c is as follows: if data records with the same source address and the same destination address are found in the binary list, and data records with the same source address and different destination addresses are found, and the network message is an attack message, it means that two attacks have been recorded in the binary list, and there are three attacks in total including this attack, so it can be directly determined that the device corresponding to the source address is attacked multiple times (multiple attacks include three attacks). If data records with the same source address and the same destination address are found in the binary list, and data records with the same source address and different destination addresses are found, and the network message is not an attack message, it means that two attacks have been recorded in the binary list, even if this is not an attack, it can be directly determined that the device corresponding to the source address is attacked multiple times (multiple attacks include two attacks).

[0062] As an optional implementation of the above-mentioned message processing method, when the data record in the two-tuple list times out, the data record may be deleted. The implementation may include:

[0063] Step S124: If the data record in the two-tuple list times out, the data record is deleted from the two-tuple list.

[0064] The implementation method of the above step S124 is, for example: when the source address and the destination address are stored as data records in the binary list, the timeout duration of the data record can also be set (i.e., the data record is automatically deleted after exceeding the preset duration). Since there is an automatic deletion mechanism for the timeout duration that has been implemented in the cache database, the above binary list can be implemented using cache databases such as Memcached and Redis. The electronic device can first determine whether the data record in the binary list implemented by the cache databases such as Memcached and Redis exceeds the preset duration. If the data record in the binary list exceeds the preset duration, the data record is deleted from the binary list. Among them, the preset duration here can be set according to the specific situation, for example, the preset duration is set to 1 day, 5 days or 7 days, etc.

[0065] As an optional implementation of the above message processing method, the network message may be directly discarded when the source address of the network message is matched in the blacklist. The implementation may include:

[0066] Step S150: If it is determined that the source address is in the blacklist, the network message is discarded.

[0067] The implementation method of the above step S150 is, for example: if the electronic device determines that the source address is in the blacklist, the network message can be directly discarded, which is the embodiment of the main function of the blacklist. In the specific practice, a status flag field can be added to the blacklist to record the current status of the device corresponding to the source address. The status flag can be set to gray, indicating that the device corresponding to the source address is not a multiple attack, for example, it is the first attack recorded in the binary list. At this time, the status flag in the blacklist is set to gray; of course, the flag state can also be set to black, indicating that the device corresponding to the source address is a multiple attack. If the electronic device determines that the source address is in the blacklist and the status flag is black, the network message can be directly discarded.

[0068] As an optional implementation of the above message processing method, the first attack may also be determined, and the implementation may include:

[0069] Step S160: If no data record corresponding to the source address is found in the two-tuple list, and the network message is an attack message, it is determined that the device corresponding to the source address is attacking for the first time.

[0070] It is understandable that in the specific implementation process, after determining that the device corresponding to the source address is the first attack, the source address and network message corresponding to the first attack can be sent to the terminal of the operation and maintenance personnel. The operation and maintenance personnel will judge based on the source address and network message corresponding to the first attack, and determine whether the device corresponding to the source address is a false alarm detection. If the device corresponding to the source address is a false alarm detection, the source address can be added to the whitelist of the electronic device, so that the electronic device can be directly released after determining that the source address is in the whitelist, thereby avoiding the false alarm detection of the device corresponding to the source address again.

[0071] See also Figure 3 The schematic diagram of the structure of the message processing device provided in the embodiment of the present application is shown; the embodiment of the present application provides a message processing device 200, including:

[0072] The message acquisition and parsing module 210 is used to acquire network messages and parse the source address from the network messages.

[0073] The device attack determination module 220 is used to determine whether the device corresponding to the source address has been attacked multiple times after determining that the source address is not found in the blacklist.

[0074] The address list adding module 230 is used to discard the network message and add the source address to the blacklist if the device corresponding to the source address is attacked multiple times.

[0075] Optionally, in the embodiment of the present application, the message processing device further includes:

[0076] The first attack processing module is used to discard the network message if the device corresponding to the source address is the first attack, parse the destination address of the target device from the network message, and associate the source address and the destination address and store them in a two-tuple list.

[0077] Optionally, in an embodiment of the present application, the device attack determination module includes:

[0078] The network message judgment submodule is used to judge whether the network message is an attack message after determining that the data record corresponding to the source address is queried from the two-tuple list.

[0079] The attack message determination submodule is used to determine that if the network message is an attack message, the device corresponding to the source address is attacked multiple times, otherwise, determine that the device corresponding to the source address is not attacked multiple times.

[0080] Optionally, in an embodiment of the present application, the network message judgment submodule includes:

[0081] The message address search unit is used to search for data records with the same source address and the same destination address in the two-tuple list; or, to search for data records with the same source address and different destination addresses in the two-tuple list.

[0082] Optionally, in the embodiment of the present application, the message processing device further includes:

[0083] The data record deletion module is used to delete the data record from the two-tuple list if the data record in the two-tuple list times out.

[0084] Optionally, in the embodiment of the present application, the message processing device further includes:

[0085] The network message discarding module is used to discard the network message if it is determined that the source address is in the blacklist.

[0086] Optionally, in the embodiment of the present application, the message processing device further includes:

[0087] The first attack determination module is used to determine that the device corresponding to the source address is the first attack if no data record corresponding to the source address is found in the two-tuple list and the network message is an attack message.

[0088] It should be understood that the device corresponds to the above-mentioned message processing method embodiment and can execute the various steps involved in the above-mentioned method embodiment. The specific functions of the device can be referred to in the above description. To avoid repetition, the detailed description is appropriately omitted here. The device includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the operating system (OS) of the device.

[0089] See also Figure 4 The electronic device 300 provided in the embodiment of the present application includes: a processor 310 and a memory 320, wherein the memory 320 stores machine-readable instructions executable by the processor 310, and when the machine-readable instructions are executed by the processor 310, the above method is executed.

[0090] The embodiment of the present application further provides a computer-readable storage medium 330 , on which a computer program is stored. When the computer program is executed by the processor 310 , the above method is executed.

[0091] Among them, the computer-readable storage medium 330 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.

[0092] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0093] In several embodiments provided by the embodiments of the present application, it should be understood that the disclosed device and method can also be implemented in other ways. The device embodiments described above are only schematic, for example, the flowcharts and block diagrams in the accompanying drawings show the possible implementation architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a part of a module, a program segment or a code, and a part of a module, a program segment or a code includes one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also be different from the order of occurrence marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which is mainly determined by the functions involved.

[0094] In addition, each functional module of each embodiment in the embodiment of the present application can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part. In addition, in the description of this specification, the description of reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of the present application. In this specification, the schematic representation of the above terms does not necessarily have to be directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples without contradicting each other.

[0095] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0096] The above description is only an optional implementation manner of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the embodiments of the present application, which should be covered within the protection scope of the embodiments of the present application.

Claims

1. A message processing method, It is characterized in that include: Obtaining a network message, and parsing a source address from the network message; After determining that the source address is not found in the blacklist, determining whether the device corresponding to the source address is attacked multiple times; If yes, discard the network message, add the source address to the blacklist, and set the status flag of the source address in the blacklist to blackness, so as to reduce the influence of false alarm rate of the detection means of the security device; If the device corresponding to the source address is the first attack, the network message is discarded, the destination address of the target device is parsed from the network message, and the source address and the destination address are associated and stored in a two-tuple list, and then the state flag of the source address in the blacklist is set to grayscale, and the two-tuple list is used to store the IP address of the source address and the IP address of the destination address; Wherein, the determination of whether the device corresponding to the source address is a multiple attack includes: if a data record with the same source address and different destination address is found in the binary list, and the network message is determined to be an attack message through the security device, then it is determined that the device corresponding to the source address is a multiple attack; if a data record with the same source address and different destination address is found in the binary list, and the network message is determined to be not an attack message through the security device, then it is determined that the device corresponding to the source address is not a multiple attack, and the security device includes: a firewall, an antivirus system, a horizontal isolation device, a vertical encryption authentication device, a website application protection system or an intrusion detection system; After determining that the device corresponding to the source address is the first attack, the source address corresponding to the first attack and the network message are sent to the terminal of the operation and maintenance personnel, so that the terminal of the operation and maintenance personnel determines whether the device corresponding to the source address is a false alarm detection based on the source address corresponding to the first attack and the network message; if the device corresponding to the source address is a false alarm detection, the source address is added to the whitelist.

2. The method according to claim 1, It is characterized in that Also includes: If a data record in the two-tuple list times out, the data record is deleted from the two-tuple list.

3. The method according to claim 1, It is characterized in that Also includes: If it is determined that the source address is in the blacklist, the network message is discarded.

4. The method according to claim 1, It is characterized in that Also includes: If no data record corresponding to the source address is found in the two-tuple list, and the network message is an attack message, it is determined that the device corresponding to the source address is attacking for the first time.

5. A message processing device, It is characterized in that include: A message acquisition and parsing module, used to acquire network messages and parse the source address from the network messages; A device attack judgment module, used to judge whether the device corresponding to the source address is attacked multiple times after determining that the source address is not found in the blacklist; An address list adding module is used to discard the network message if the device corresponding to the source address is attacked multiple times, add the source address to the blacklist, and set the state flag of the source address in the blacklist to blackness, so as to reduce the impact of the false alarm rate of the detection means of the security device; if the device corresponding to the source address is attacked for the first time, discard the network message, parse the destination address of the target device from the network message, and associate the source address and the destination address and store them in a two-tuple list, then set the state flag of the source address in the blacklist to gray, and the two-tuple list is used to store the IP address of the source address and the IP address of the destination address; Wherein, the determination of whether the device corresponding to the source address is a multiple attack includes: if a data record with the same source address and different destination address is found in the binary list, and the network message is determined to be an attack message through the security device, then it is determined that the device corresponding to the source address is a multiple attack; if a data record with the same source address and different destination address is found in the binary list, and the network message is determined to be not an attack message through the security device, then it is determined that the device corresponding to the source address is not a multiple attack, and the security device includes: a firewall, an antivirus system, a horizontal isolation device, a vertical encryption authentication device, a website application protection system or an intrusion detection system; After determining that the device corresponding to the source address is the first attack, the source address corresponding to the first attack and the network message are sent to the terminal of the operation and maintenance personnel, so that the terminal of the operation and maintenance personnel determines whether the device corresponding to the source address is a false alarm detection based on the source address corresponding to the first attack and the network message; if the device corresponding to the source address is a false alarm detection, the source address is added to the whitelist.

6. An electronic device, It is characterized in that include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the method according to any one of claims 1 to 4 is performed.

7. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is executed.

Citation Information

Patent Citations

  • Method and device of defending port scanning invasion

    CN105681353A