WO2021151300A1 - 网络攻击的安全处理方法、装置、计算机设备及介质 - Google Patents

网络攻击的安全处理方法、装置、计算机设备及介质 Download PDF

Info

Publication number
WO2021151300A1
WO2021151300A1 PCT/CN2020/118931 CN2020118931W WO2021151300A1 WO 2021151300 A1 WO2021151300 A1 WO 2021151300A1 CN 2020118931 W CN2020118931 W CN 2020118931W WO 2021151300 A1 WO2021151300 A1 WO 2021151300A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
source
attack
message
suspect
Prior art date
Application number
PCT/CN2020/118931
Other languages
English (en)
French (fr)
Inventor
张旭明
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021151300A1 publication Critical patent/WO2021151300A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1416Event detection, e.g. attack signature detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/146Tracing the source of attacks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1425Traffic logging, e.g. anomaly detection

Definitions

  • This application relates to the field of information security technology, and in particular to a security processing method, device, computer equipment, and media for network attacks.
  • the current way to defend against network attacks is generally through hardware firewalls. This method requires website administrators to analyze which are the attack requests, trace the attack source IP address that initiates the attack request, write access control rules, and finally send it to the firewall to complete the attack defense. .
  • a security processing method for a network attack including:
  • If there is an attack message extract the source IP address that initiates the request to the application server from the attack message, and use it as the suspect source IP address;
  • a security processing device for a network attack including:
  • the acquisition module is used to acquire data packets of real-time data interaction on the application server;
  • the judging module is used to judge whether there is an attacking message in the data packet
  • the extraction module is configured to extract the source IP address that initiates the request to the application server from the attacking message if there is an attacking message, as the suspect source IP address;
  • the test module is used to test the task of requesting delayed execution according to the suspect source IP address
  • the generating module is configured to generate defense rule information related to the attack source IP address if the suspect source IP address is determined to be the attack source IP address according to the test result.
  • a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the following steps are implemented:
  • If there is an attack message extract the source IP address that initiates the request to the application server from the attack message, and use it as the suspect source IP address;
  • a computer device including a storage medium, a processor, and a computer program stored on the storage medium and running on the processor.
  • the processor executes the following steps when the program is executed :
  • If there is an attack message extract the source IP address that initiates the request to the application server from the attack message, and use it as the suspect source IP address;
  • FIG. 1 shows a schematic flowchart of a security processing method for a network attack provided by an embodiment of the present application
  • FIG. 2 shows a schematic flowchart of another method for security processing of a network attack provided by an embodiment of the present application
  • FIG. 3 shows a schematic structural diagram of a security processing device for a network attack provided by an embodiment of the present application.
  • this embodiment provides a security processing method for network attacks, which can save the network.
  • the cost of security defense against attacks can improve the efficiency and accuracy of security defense against network attacks.
  • the method includes:
  • the obtained data packet may be a data packet for data interaction between the requester (such as the client) and the application server.
  • an agent that can capture data packets in real time can be deployed on the application server in advance.
  • the packet capture agent can be a resident process developed by python that will capture the data packets on the network card corresponding to the application server in real time.
  • the network card is used to receive the application request sent by the client, and then forward it to the application server.
  • the application server returns the request result to the client through the network card, thereby forming a complete functional realization link.
  • the captured data packet is the interaction data between the client and the application server.
  • the execution subject of this embodiment may be a device or device for network attack security processing, which may be configured on the server side for intelligent network attack detection and defense.
  • the packet capture agent After the packet capture agent captures the data packet on the network card, it sends the data packet to the back-end server for analysis.
  • the back-end server can be used to identify attack behaviors based on the captured data packets, and then automatically generate defense rules.
  • the back-end server can communicate with the agents deployed by each application server.
  • the packet capture agent uploaded to the back-end server at the same time also includes the IP address of the application server where it is located, that is, the IP address of the server where the packet capture agent is installed. Its purpose is to send the corresponding defense strategy to the host corresponding to the IP after the attack is detected, so as to ensure the corresponding security.
  • the back-end server When the back-end server specifically analyzes the data packets, it can first analyze whether there are attack messages in these data packets. Specifically, specific detection rules can be determined in advance according to different attack types (such as scanning attack packets, flooding attack packets, malformed packet attacks, etc.), and then use these detection rules to determine whether the obtained data packet is Packets with offensive behavior.
  • specific detection rules can be determined in advance according to different attack types (such as scanning attack packets, flooding attack packets, malformed packet attacks, etc.), and then use these detection rules to determine whether the obtained data packet is Packets with offensive behavior.
  • the source IP address may refer to the IP address that initiates the request to the application server, and may be considered the IP address of the requester.
  • the source IP address extracted from the attacking message may not be the IP address of the attacker in practice, and further analysis is needed to determine it. Therefore, the extracted source IP address can be temporarily used as the suspect source IP address and saved in the attack suspect source IP list for subsequent in-depth analysis.
  • a delayed execution request task is sent. After the task is added to the task queue, it will be overwhelmed by backward attack requests due to the delayed execution (For example, the first-in-last-out in the stacking principle), which will result in the failure to be executed in time. If specific request information is received within the delayed execution time, the suspect source IP address can be determined to be the attacker's IP address. For example, extract the suspect source IP address (or randomly extract the suspect source IP address, etc.) from the attack suspect source IP list according to the time sequence that was stored in the list to perform a task test requesting delayed execution.
  • the suspect source IP address is the attack source IP address, generate defense rule information related to the attack source IP address.
  • the defense rule information includes defense strategies related to the attack source IP address, such as blocking requests sent from the attack source IP address.
  • Data packets of real-time data interaction can be obtained on the application server side for analysis. If it is determined that there is an attack message, the source IP address that initiates the request to the application server is extracted from the attack message as the suspect source IP address. Then, perform a task test requesting delayed execution according to the suspect source IP address. If the suspect source IP address is determined to be the attack source IP address based on the test results, then defense rule information related to the attack source IP address is generated.
  • this embodiment is equivalent to proposing an intelligent network attack detection and defense solution. The entire process is completed automatically without manual intervention.
  • the method includes:
  • the intelligent network attack detection and defense in this embodiment in order to be able to capture and analyze the requests sent to the application server in real time 7*24 hours, and to monitor and analyze the data packets of real-time data interaction on the application server in real time. According to the captured request, the attack behavior is identified, and the defense strategy can be automatically generated and issued to complete the attack defense. Specifically, the process shown in the following steps 202 to 206 can be performed.
  • step 202 may specifically include: detecting whether the message of the obtained data packet contains preset abnormality feedback information; and/or, by analyzing the message of the data packet, detecting whether the number of requests currently waiting to be processed by the application server is Greater than a preset threshold; and/or, detect whether the packet of the data packet contains an ICMP packet; and/or, if the packet of the data packet contains a fragmented packet, detect the specific corresponding to the fragmented packet Whether the offset field is set to an incorrect value; and/or detect whether a specific flag in the packet of the data packet is set to a preset abnormal value; finally, based on these detection results, it can be comprehensively determined whether there is a data packet Attack packets. Through this comprehensive determination method, multiple attack types are considered at the same time, and it can be accurately determined whether there is an attack message in the obtained data packet, and the accuracy of the security processing of the network attack can be improved.
  • the corresponding specific detection rules can be determined respectively according to different attack types.
  • the following three types of attacks are used for detection and analysis:
  • the analysis principle is that for generally normal requests, the application server will return normal results and return an error code of 20x, but if it is a request initiated by an attacker, it is generally a scan Because the application server cannot handle these scanning requests, it will return Bad Request or Not Found errors, and the corresponding error code is in the form of 40x, so the back-end server will analyze whether the message will contain Whether the error or feedback code such as Bad Request, Not Found, etc. is in the form of 40x (that is, the preset abnormal feedback information), so as to determine whether a message is an attacking message.
  • the message of the data packet contains specific error information such as Bad Request and Not Found; and, whether the message of the data packet contains a specific form of feedback code such as 40x; if a message contains Bad Request , Or specific error information such as Not Found, and/or a specific form of feedback code containing 40x, the message can be considered as an attack message.
  • specific error information such as Bad Request and Not Found
  • a specific form of feedback code such as 40x
  • TCP Transmission Control Protocol
  • the protocol software When the application server receives a request, the protocol software must use a listening queue to save the connection for a certain period of time. Send requests to the application server continuously, but do not require a response, that is, send a large number of network data packets to establish a connection, but the connection is not actually established. In this way, the resources of the application server are consumed, and then the application server will not respond to the requests of normal users, thus achieving a denial of service attack.
  • the number of requests that the application server is waiting to be processed can be obtained by analyzing the packets in the data packet. If the number of requests is greater than a certain threshold, it is considered to be an attacking packet. It has the characteristic of accumulating the number of requests.
  • the detection methods of the above three types of attacks can be combined according to actual detection requirements to comprehensively and accurately detect whether there is an attack message in the data packet. Further, in order to make a more accurate judgment, optionally, according to these detection results, determine whether there is an attack message in the obtained data packet, which may specifically include: calculating the abnormality score corresponding to the data packet according to these detection results; if the abnormality score is If it is greater than the preset score threshold, it is determined that there is an attacking packet in the data packet. For example, an attacker may use the above-mentioned multiple attack methods to attack.
  • the corresponding abnormal score value (such as available weighted summation, weight multiplication, etc.) Large, and matched abnormal conditions can be recorded accordingly.
  • the weight of A is 1.5
  • the weight of B is 1.1
  • the weight of C is 1.8
  • the abnormal score of the data packet can be It is in the form of 1.5+1.1+1.8 or 1.5*1.1*1.8.
  • the preset score threshold can be determined according to the security level set by the user.
  • the higher the security level, the stricter the detection, and the lower the corresponding preset score threshold (when the threshold value is 0, that is, as long as one abnormal condition is matched successfully , It can be considered that there is an attack message in the data packet, and then perform the following further analysis and processing).
  • the suspect source IP address can be deleted from the attack suspect source IP list to avoid repeated analysis, save certain system resources, and improve the detection efficiency of network attacks.
  • some expired suspect source IP address data can be regularly cleaned up according to the timestamp to save a certain amount of storage space.
  • step 204a and/or step 204b are executed.
  • step 204a may specifically include: according to the suspect source IP address, sending a request for delayed execution of the task, so that subsequent requests corresponding to the suspect source IP address will be executed later, and the suspect source IP address will be sent after the corresponding The request will overwrite the previous request to be executed; during the delayed execution of the first request, if the similarity between the requested content sent after the suspect source IP address corresponds to the previous request is greater than the preset similarity threshold, and then sent If the number of requests is greater than the preset number threshold within a predetermined time interval, the suspect source IP address is determined to be the attack source IP address.
  • the suspect source IP address sending a request for delayed execution of the task, subsequent requests sent by the IP address first will be delayed for execution, and then sent requests will override the previous request and be executed by the application server. If during this delayed execution period, the content of the request sent later is consistent with the content of the previous request, and the number of requests sent later is greater than a certain threshold within a predetermined time interval (in accordance with the characteristics of continuous attacks), the suspect source IP address can be determined Is the attack source IP.
  • Step 204b parallel to step 204a, calculates the access success rate of the suspect source IP address.
  • step 204b may specifically include: first obtaining the target data packet whose source IP address is the application server IP address and the target IP address is the suspect source IP address; and then obtaining the data containing the HTTP keyword from the target data packet The first quantity of the packet; and, from the HTTP keyword data packet, the second quantity of the data packet containing the preset successful response information is obtained; then the ratio of the second quantity to the first quantity is used to calculate the suspect source IP address Access success rate; if the access success rate of the suspect source IP address is less than the preset success rate threshold, the suspect source IP address is determined to be the attack source IP address.
  • the data packets corresponding to the service requests sent to each application server with the suspect source IP address as the requester are obtained. These data packets are equivalent to the application server's response to the attack on the suspect source IP Packets. Because the packet capture agent captures packets for the network card, in addition to normal service requests, these packets also include data packets that do not need attention, such as multicast packets in the network. However, by filtering the data packets whose source IP is the server and the target IP is the suspected IP of the attack, the data packets that the server responds to the suspected source IP of the attack can be obtained, and the key information for the subsequent statistics of the success rate will also be included in this type of data packet.
  • the access success rate of the suspect source IP address is less than 10%, it proves that most of the requests sent by the suspect source IP address are offensive requests, and the suspect source IP address is determined to be the attack source IP.
  • the access success rate it can be accurately determined whether the suspect source IP address is the attack source IP address, which improves the accuracy of network attack security defense.
  • the two methods can also be analyzed comprehensively, such as the task test requesting delayed execution at the same time and the statistical access success rate detection. These two detection methods are analyzed. If 204a and 204b are passed, there are One way is to determine that the suspect source IP address is the attack source IP address, then the suspect source IP address can actually be confirmed as the attack source IP address. Through this comprehensive determination method, the respective advantages of this method can be considered at the same time, so as to realize as soon as possible and accurately determine whether the suspect source IP address is the attack source IP address.
  • the suspect source IP address is the attack source IP address according to the access success rate and/or the test result, generate defense rule information related to the attack source IP address.
  • the matching rule corresponding to the attack source IP address that is, the detection rule in step 202: if the matching rule corresponding to A is met, it corresponds to the generated relevant defense rule (for example, the rule form is generally: iptables -A input- s Attack source ip -j drop) can be used to block the request of the attack source IP address; if the matching rule corresponding to B is met, the corresponding defense rule generated by it is used to limit the number of requests for the attack source IP address, making a large number of requests directly Ignored and not processed by the application server; if it meets the matching rules corresponding to C, it corresponds to the generated defense rules.
  • the generated relevant defense rule for example, the rule form is generally: iptables -A input- s Attack source ip -j drop
  • C Since C has multiple situations, it is necessary to generate corresponding defense rules for each situation, for example, prohibit receiving ICMP packets sent from the attack source IP address; and/or, the fragmented packets sent from the attack source IP are put into the cache first, and the packets are grouped according to the source IP address and the destination IP address, and the source IP address Packets with the same destination IP address are grouped into the same group, and then the relevant fragmentation information of each group of IP packets is checked, and packets with incorrect fragmentation information are discarded. In order to prevent the benefit of caching, when the cache is almost full At this time, the subsequent fragmented packets are directly discarded; and/or, the packets whose flag bit sent by the attack source IP is a specific value are prohibited from receiving, etc.
  • the IP address of the application server that can be uploaded to the back-end server at the same time through the packet capture agent.
  • the IP address of the application server it is determined that the data packet containing the attack source IP data packet (that is related to the attack source IP address) All application servers. Then generate defense rules to these application servers. After the subsequent packet capture agent receives the defense rule, it will call iptable to add the firewall rule to the netfilter in order to block the attack request initiated by the attacker's IP (that is, the corresponding attack source IP address).
  • An intelligent network attack detection and defense solution proposed by this embodiment Deploy real-time packet-grabbing agent agents on all application servers, and then grab packets to detect network aggressive behaviors, and then find the attack source IP address, so as to automatically generate relevant defense rules based on the attack source IP and issue it Give the agent agent of each application server to add the defense rule to the netfilter corresponding to each application server to block the attack request initiated by the attack source IP. And intelligent network attack detection and defense can continuously capture and analyze the requests sent to the application server in real time 7*24 hours, and if the attack behavior is identified according to the captured request, it can automatically generate and issue defense strategies. To complete the attack defense. The entire process is completed automatically without manual intervention.
  • this embodiment provides a network attack security processing device.
  • the device includes: an acquisition module 31, a judgment module 32, and an extraction module 33. Testing module 34, generating module 35.
  • the obtaining module 31 is used to obtain data packets of real-time data interaction on the application server;
  • the judging module 32 is used to judge whether there is an attacking message in the data packet
  • the extraction module 33 is configured to extract the source IP address that initiates the request to the application server from the attacking message if there is an attacking message, as the suspect source IP address;
  • the test module 34 is configured to perform a task test requesting delayed execution according to the suspect source IP address
  • the generating module 35 is configured to generate defense rule information related to the attack source IP address if it is determined according to the test result that the suspect source IP address is the attack source IP address.
  • the test module 34 is specifically configured to send a task requested to be executed with a delay according to the suspect source IP address, so that the subsequent request corresponding to the suspect source IP address will be executed with a delay. And the request sent after the suspect source IP address corresponds will overwrite the previous request to be executed; during the delay execution period of the first request, if the suspect source IP address corresponds to the request content sent between the previous request content If the similarity is greater than the preset similarity threshold, and the number of requests sent later is greater than the preset number threshold within a predetermined time interval, it is determined that the suspect source IP address is the attack source IP address.
  • the device also includes: a statistics module;
  • the statistics module is used to count the access success rate of the suspect source IP address
  • the generating module 35 is specifically configured to generate defense rule information related to the attack source IP address if it is determined that the suspect source IP address is the attack source IP address according to the access success rate and/or the test result.
  • the statistics module is specifically configured to obtain a target data packet whose source IP address is the application server IP address and the target IP address is the suspect source IP address; from the target data packet, The first number of data packets containing the HTTP keyword; and, obtaining the second number of data packets containing the preset success response information from the data packets of the HTTP keyword; using the second number and the first number A ratio of a number to calculate the access success rate; if the access success rate is less than a preset success rate threshold, it is determined that the suspect source IP address is the attack source IP address.
  • the judgment module 32 is specifically configured to detect whether the message of the data packet contains preset abnormal feedback information; and/or, by analyzing the message of the data packet, detect that the application server is currently waiting Whether the number of processed requests is greater than a preset threshold; and/or detect whether the packet of the data packet contains an ICMP packet; and/or, if the packet of the data packet contains a fragmented packet, then detect Whether the specific offset field corresponding to the fragmented message is set to an incorrect value; and/or detect whether the specific flag bit in the message of the data packet is set to a preset abnormal value; determine the data according to the detection result Whether there is an attack message in the packet.
  • the judging module 32 is also specifically configured to calculate the abnormality score corresponding to the data packet according to the detection result; if the abnormality score is greater than the preset score threshold, it is determined that there is an attack in the data packet. Message.
  • the device also includes: a sending module
  • the sending module is further configured to send the defense rule information to the application server according to the IP address of the application server after generating the defense rule information related to the attack source IP address.
  • this embodiment also provides a computer-readable storage medium.
  • the computer-readable storage medium may include non-volatile and/or volatile memory on which A computer program is stored, and when the program is executed by the processor, the security processing method of the network attack shown in FIG. 1 and FIG. 2 is realized.
  • the technical solution of this application can be embodied in the form of a software product.
  • the software product can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.), including several
  • the instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute the methods in each implementation scenario of the present application.
  • this embodiment also provides a computer device, which may be a personal computer, a notebook computer, or a server.
  • a computer device which may be a personal computer, a notebook computer, or a server.
  • the physical equipment includes a storage medium and a processor; the storage medium is used to store a computer program, and may include non-volatile and/or volatile memory; the processor is used to execute the computer program to achieve the above Figure 1 and Figure 2 show the security handling method for network attacks.
  • the computer device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, and so on.
  • the user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, and the like.
  • the optional network interface can include standard wired interface, wireless interface (such as Bluetooth interface, WI-FI interface), etc.
  • the computer device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or arrange different components.
  • the storage medium may also include an operating system and a network communication module.
  • the operating system is a program that manages the hardware and software resources of the aforementioned physical devices, and supports the operation of information processing programs and other software and/or programs.
  • the network communication module is used to realize the communication between the various components in the storage medium and the communication with other hardware and software in the physical device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

本申请公开了一种网络攻击的安全处理方法、装置及计算机设备,涉及信息安全技术领域。其中方法包括:首先获取应用服务器上实时数据交互的数据包;再判断所述数据包中是否存在攻击行为的报文;若存在攻击行为的报文,则从所述攻击行为的报文中提取向所述应用服务器发起请求的源IP地址,作为嫌疑源IP地址;然后根据所述嫌疑源IP地址进行请求延时执行的任务测试;若根据测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息。本申请相当于提出一种智能网络攻击检测与防御的方案,整个过程都是自动化完成的,可节省网络攻击的安全防御成本,可提高网络攻击安全防御的效率与精确性。

Description

网络攻击的安全处理方法、装置、计算机设备及介质
本申请要求于2020年05月15日提交中国专利局、申请号为CN202010411200.1、名称为“网络攻击的安全处理方法、装置及计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及信息安全技术领域,尤其是涉及到一种网络攻击的安全处理方法、装置、计算机设备及介质。
背景技术
随着互联网的普及,我们生活的方方面面越来越离不开互联网,但是互联网给我们带来便利的同时,也带来了挑战。在使用互联网的过程中,大量的用户信息会保存在服务器上,这些信息如果被不法分子通过网络攻击获取到,会导致信息泄露,将会给个人或企业带来巨大的损失,所以网络安全变得尤为重要。
目前防御网络攻击的方式一般是通过硬件防火墙,这种方式需要网站管理员去分析哪些是攻击请求,追踪发起攻击请求的攻击来源IP地址,编写访问控制规则,最后下发到防火墙来完成攻击防御。
技术问题
发明人意识到,这种人工的方式不仅需要购买昂贵的硬件设备,而且还需要大量的人力实时分析、追踪攻击请求并下发防御规则,造成安全防御成本较高。并且由于全过程需要手工完成,可能会导致防御不及时、耗时过长和出现漏网之鱼的情况,影响了网络攻击安全防御的效率与精确性。
技术解决方案
根据本申请的一个方面,提供了一种网络攻击的安全处理方法,该方法包括:
获取应用服务器上实时数据交互的数据包;
判断所述数据包中是否存在攻击行为的报文;
若存在攻击行为的报文,则从所述攻击行为的报文中提取向所述应用服务器发起请求的源IP地址,作为嫌疑源IP地址;
根据所述嫌疑源IP地址进行请求延时执行的任务测试;
若根据测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息。
根据本申请的另一个方面,提供了一种网络攻击的安全处理装置,该装置包括:
获取模块,用于获取应用服务器上实时数据交互的数据包;
判断模块,用于判断所述数据包中是否存在攻击行为的报文;
提取模块,用于若存在攻击行为的报文,则从所述攻击行为的报文中提取向所述应用服务器发起请求的源IP地址,作为嫌疑源IP地址;
测试模块,用于根据所述嫌疑源IP地址进行请求延时执行的任务测试;
生成模块,用于若根据测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息。
根据本申请的又一个方面,提供了一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现以下步骤:
获取应用服务器上实时数据交互的数据包;
判断所述数据包中是否存在攻击行为的报文;
若存在攻击行为的报文,则从所述攻击行为的报文中提取向所述应用服务器发起请求的源IP地址,作为嫌疑源IP地址;
根据所述嫌疑源IP地址进行请求延时执行的任务测试;
若根据测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息。
根据本申请的再一个方面,提供了一种计算机设备,包括存储介质、处理器及存储在存储介质上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现以下步骤:
获取应用服务器上实时数据交互的数据包;
判断所述数据包中是否存在攻击行为的报文;
若存在攻击行为的报文,则从所述攻击行为的报文中提取向所述应用服务器发起请求的源IP地址,作为嫌疑源IP地址;
根据所述嫌疑源IP地址进行请求延时执行的任务测试;
若根据测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息。
附图说明
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本地申请的不当限定。在附图中:
图1示出了本申请实施例提供的一种网络攻击的安全处理方法的流程示意图;
图2示出了本申请实施例提供的另一种网络攻击的安全处理方法的流程示意图;
图3示出了本申请实施例提供的一种网络攻击的安全处理装置的结构示意图。
本发明的实施方式
下文中将参考附图并结合实施例来详细说明本申请。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互结合。
针对目前现有技术中会造成网络攻击的安全防御成本较高,且会影响网络攻击安全防御的效率与精确性的技术问题,本实施例提供了一种网络攻击的安全处理方法,可节省网络攻击的安全防御成本,可提高网络攻击安全防御的效率与精确性,如图1所示,该方法包括:
101、获取应用服务器上实时数据交互的数据包。
获取到的数据包可为请求方(如客户端)与应用服务器之间数据交互的数据包。例如,可在应用服务器上提前部署能够实时抓取数据包的代理(agent),其中,该抓包agent可为python开发的常驻进程,会实时抓取应用服务器对应网卡上的数据包,该网卡用于接收客户端发送的应用请求,然后转发给应用服务器,应用服务器将请求结果通过网卡返回给客户端,从而形成一个完整的功能实现链路。在本实施例中,抓取的数据包即为客户端与应用服务器之间的交互数据。
对于本实施例的执行主体可为网络攻击安全处理的装置或设备,可配置在服务器侧,用于智能网络攻击检测与防御。
102、判断获得的数据包中是否存在攻击行为的报文。
例如,抓包agent抓取网卡上的数据包之后,将数据包发送给后端服务器进行分析。在本实施例中,后端服务器可用于根据抓取的数据包,识别出攻击行为,进而自动生成防御规则。后端服务器可与各个应用服务器部署的代理agent进行数据通信。同时,抓包agent同时上传到后端服务器的还包括所在应用服务器的IP地址,即安装了抓包agent的服务器的IP地址。其目的是为了检测到攻击行为后,将对应的防御策略下发到该IP对应的主机上,以保证相应的安全性。
在后端服务器具体分析数据包时,首先可分析这些数据包中是否存在攻击行为的报文。具体可预先根据不同的攻击类型(如扫描性攻击的报文、泛洪攻击的报文、畸形报文攻击等),确定具体的检测规则,然后利用这些检测规则,判断获得的数据包中是否存在攻击行为的报文。
103、若存在攻击行为的报文,则从攻击行为的报文中提取向应用服务器发起请求的源IP地址,作为嫌疑源IP地址。
其中,源IP地址可以指的是向应用服务器发起请求的IP地址,可认为是请求方的IP地址。而从攻击行为的报文中提取的源IP地址,在实际当中有可能并非是攻击者的IP地址,需要进一步分析确定。因此可将提取的源IP地址暂时作为嫌疑源IP地址,并保存在攻击嫌疑源IP列表中,便于后续深度分析。
104、根据嫌疑源IP地址进行请求延时执行的任务测试。
对于本实施例,在识别出嫌疑源IP地址后,针对于攻击IP连续发送的特点,发送一个延时执行的请求任务,该任务被加入任务队列后,由于延时执行会被后进攻击请求淹没(如堆栈原理中的先进后出),进而会导致无法被及时执行,如果在延时执行的时间内,有接收到特定的请求信息时,则可以认定该嫌疑源IP地址为攻击者的IP地址。例如,从攻击嫌疑源IP列表中按照存入列表的时间顺序提取嫌疑源IP地址(又或者随机提取嫌疑源IP地址等)进行请求延时执行的任务测试。
105、若根据测试结果确定嫌疑源IP地址为攻击来源IP地址,则生成与攻击来源IP地址相关的防御规则信息。
其中,防御规则信息中包含对于攻击来源IP地址相关的防御策略,如阻断攻击来源IP地址发送的请求等。
通过本实施例中的网络攻击的安全处理方法。可在应用服务器侧获取实时数据交互的数据包进行分析,若判定存在攻击行为的报文,则从攻击行为的报文中提取向应用服务器发起请求的源IP地址,作为嫌疑源IP地址。然后根据嫌疑源IP地址进行请求延时执行的任务测试,若根据测试结果确定嫌疑源IP地址为攻击来源IP地址,则生成与攻击来源IP地址相关的防御规则信息。与目前现有技术相比,本实施例相当于提出一种智能网络攻击检测与防御的方案,整个过程都是自动化完成的,无需人工干预,这样不仅可以解决传统方式下需要购买昂贵防火墙设备、耗费大量人力成本的问题,可节省网络攻击的安全防御成本。而且还可以避免由于人为疏忽导致的策略缺失以及分析过程耗时过长等问题,可提高网络攻击安全防御的效率与精确性,从而实现部署快速而无纰漏的防御,为生产服务保驾护航。
进一步的,作为上述实施例具体实施方式的细化和扩展,为了完整说明本实施例中的具体实施过程,提供了另一种网络攻击的安全处理方法,如图2所示,该方法包括:
201、获取应用服务器上实时数据交互的数据包。
本实施例中的智能网络攻击检测与防御,为了可以7*24小时不间断地对发往应用服务器的请求进行实时捕捉和分析,可实时监控应用服务器上实时数据交互的数据包进行分析,若根据捕捉到的请求识别出攻击的行为,可以自动化地生成和下发防御策略以完成攻击防御,具体可执行以下步骤202至206所示的过程。
202、判断获得的数据包中是否存在攻击行为的报文。
可选的,步骤202具体可包括:检测获得的数据包的报文中是否包含预设异常反馈信息;和/或,通过分析该数据包的报文,检测应用服务器当前等待处理的请求数是否大于预设阈值;和/或,检测该数据包的报文中是否包含ICMP报文;和/或,若该数据包的报文中包含分片报文,则检测分片报文对应的特定偏移字段是否设置成错误的值;和/或,检测该数据包的报文中的特定标志位是否设置为预设异常数值;最后可根据这些检测结果,综合确定获得的数据包中是否存在攻击行为的报文。通过这种综合确定方式,同时考虑了多种攻击类型,可准确确定获得的数据包中是否存在攻击行为的报文,进而可提高网络攻击安全处理的精确性。
在本实施例中,可根据不同的攻击类型,分别确定各自对应具体的检测规则。示例性的,以如下三种攻击类型分别进行检测分析:
A、对于扫描性攻击的报文,其分析的原理是对于一般正常的请求,应用服务器会返回正常的结果并返回20x这种形式的错误码,但是如果是攻击者发起的请求,一般为扫描性的请求,此时应用服务器因为无法处理这些扫描性的请求会返回Bad Request或Not Found等错误,并且对应的错误码是40x这种形式的,所以后端服务器会分析报文里是否会包含Bad Request、Not Found等错误或者反馈码是否为40x这种形式(即预设异常反馈信息),从而判断某个报文是否为攻击行为的报文。
例如,分析数据包的报文中是否包含Bad Request、Not Found等特定的错误信息;及,分析数据包的报文中是否包含40x这种特定形式的反馈码;如果某报文里包含Bad Request、或Not Found等特定的错误信息、和/或包含40x这种特定形式的反馈码,即可认为该报文为攻击行为的报文。
B、对于泛洪攻击的报文,其利用了传输控制协议(TransmissionControl Protocol,TCP)的三次握手机制,当应用服务器接收到一个请求时,协议软件必须利用一个监听队列将该连接保存一定时间。向应用服务器不停地发送请求,但是不要求给出响应,即发送大量的建立连接的网络数据包,但实际不建立连接。这样消耗应用服务器的资源,然后应用服务器就不会响应正常用户的请求,从而达到拒绝服务攻击。为了防范此种攻击形式,可通过分析数据包中的报文,获取到应用服务器正在等待处理的请求数,如果请求数大于一定阈值,则被认为是存在攻击行为的报文,这种报文具有请求数量堆积的特点。
C、对于畸形报文攻击,畸形报文攻击是通过向应用服务器的系统发送有缺陷的IP报文,使得应用服务器的系统在处理这样的数据包时会出现崩溃,给目标系统带来损失。因此本实施例中为了检测出畸形报文,可判断数据包的报文中是否包含ICMP报文;和/或,判断报文中是否包含分片报文以及将分片特定偏移字段设置成错误的值(既可与上一分片数据重叠,也可错开),这样接收方在组合这种含有重叠偏移的伪造分片报文时,会导致系统崩溃;和/或,判断报文中的各个标志位(URG 、ACK 、PSH 、RST 、SYN 、FIN)是否设置为特定数值(如会引发攻击行为的特定数值)。
上述三种攻击类型的检测方式,可根据实际检测需求进行相互组合,来综合精准地检测出数据包中是否存在攻击行为的报文。进一步的,为了更加精确判别,可选的,根据这些检测结果,确定获得的数据包中是否存在攻击行为的报文,具体可包括:根据这些检测结果计算数据包对应的异常评分;若异常评分大于预设评分阈值,则确定数据包中存在攻击行为的报文。例如,攻击者可能采用上述多种攻击方式来进行攻击,基于上述多种检测方式,如果满足匹配的异常条件越多,其相应的异常评分数值(如可用加权求和、权重相乘等)越大,并且可相应记录匹配的异常条件。如对于A的权重为1.5,B的权重为1.1,C的权重为1.8;如果数据包中的报文同时满足上述A、B、C三个的异常匹配条件,则该数据包的异常评分可为1.5+1.1+1.8或者1.5*1.1*1.8等形式。而预设评分阈值可根据用户设置的安全度对应确定,如安全度设置的越高,越严格检测,相应的预设评分阈值越低(当阈值为0时,即只要有一个异常条件匹配成功,则可认为数据包中存在攻击行为的报文,随即执行如下进一步分析处理)。
203、若存在攻击行为的报文,则从攻击行为的报文中提取向应用服务器发起请求的源IP地址,作为嫌疑源IP地址。
例如,可将嫌疑源IP地址保存在攻击嫌疑源IP列表中,并记录存入列表中的时间戳,后续根据记录的时间戳,提取相应的攻击嫌疑源IP地址进行分析,在提取某嫌疑源IP地址后,可将该嫌疑源IP地址从攻击嫌疑源IP列表中删除,以便避免重复分析,可节省一定的系统资源,并且提高了网络攻击的检测效率。除此之外,还可根据时间戳,定时清理一些过期的嫌疑源IP地址数据,以节省一定的存储空间。
在具体的分析时,可使用以下至少一种的分析手段,即执行步骤204a和/或执行步骤204b。
204a、根据嫌疑源IP地址进行请求延时执行的任务测试。
可选的,步骤204a具体可包括:根据嫌疑源IP地址,发送请求延时执行的任务,以使得后续嫌疑源IP地址对应先发送的请求会被延时执行,且嫌疑源IP地址对应后发送的请求会覆盖在先请求被执行;在先请求延时执行的期间内,若嫌疑源IP地址对应后发送的请求内容与在先请求内容之间相似度大于预设相似度阈值,且后发送的请求数量在预定时间间隔内大于预置数量阈值,则确定嫌疑源IP地址为攻击来源IP地址。
例如,根据嫌疑源IP地址,发送请求延时执行的任务,后续该IP地址先发送的请求会被延时执行,而后发送的请求会覆盖该在先请求被应用服务器执行。如果在此延时执行的期间,后发送的请求内容与在先请求内容一致,且后发送的请求数量在预定时间间隔内大于一定阈值(符合连续攻击特点),则可认定该嫌疑源IP地址为攻击来源IP。
通过上述请求延时执行的任务测试方式,可准确确定嫌疑源IP地址是否为攻击来源IP地址,提高了网络攻击安全防御的精确性。
与步骤204a并列的步骤204b、统计嫌疑源IP地址的访问成功率。
可选的,步骤204b具体可包括:首先获取源IP地址为应用服务器IP地址、且目标IP地址为嫌疑源IP地址的目标数据包;再从该目标数据包中,获取包含HTTP关键字的数据包的第一数量;及,从HTTP关键字的数据包中,获取包含预设成功响应信息的数据包的第二数量;然后利用第二数量与第一数量的比值,计算嫌疑源IP地址的访问成功率;若嫌疑源IP地址的访问成功率小于预设成功率阈值,则确定嫌疑源IP地址为攻击来源IP地址。
例如,从抓包agent发送的数据包中,获取以嫌疑源IP地址为请求方,向各个应用服务器发出的业务请求所相应反馈的数据包,这些数据包相当于应用服务器响应于攻击嫌疑源IP的数据包。因为抓包agent是针对网卡进行抓包的,这些数据包除了正常的业务请求以外,还有网络中的组播包等无需关注的数据包。但是通过筛选源IP为服务器,目标IP为有攻击嫌疑IP的数据包可以获取到服务器响应给有攻击嫌疑源IP的数据包,后面统计成功率的关键信息也会在这一类数据包中。
然后从获取到的这些数据包里再提取出包含HTTP关键字的数据包,这些数据包就是所有的响应报文,统计对应的数量为a,接着从响应报文里提取包含“200  OK”的数据包,这些数据包就是成功的响应报文,统计对应的数量为s,所以该嫌疑源IP地址的访问成功率就是s/a*100%。最后判断嫌疑源IP地址的访问成功率是否小于预设阈值(可根据实际需求而设定),并根据判断结果确定该嫌疑源IP地址是否为攻击来源IP。例如,如果嫌疑源IP地址的访问成功率低于10%,则证明该嫌疑源IP地址发送的大部分请求都是失败的,为攻击性请求,判定该嫌疑源IP地址为攻击来源IP。通过这种访问成功率进行判断的方式,可准确确定嫌疑源IP地址是否为攻击来源IP地址,提高了网络攻击安全防御的精确性。
进一步的,两种方式(204a和204b)还可综合进行分析,如同时启动请求延时执行的任务测试和统计访问成功率检测,这两种检测方式进行分析,若通过204a和204b,有其中一种方式判定出嫌疑源IP地址为攻击来源IP地址,那么就可将该嫌疑源IP地址实际确认为攻击来源IP地址。通过这种综合判定方式,可同时考虑这种方式各自对应的优势,实现尽可能的及时并精准地的判别出嫌疑源IP地址是否为攻击来源IP地址。
205、若根据访问成功率和/或测试结果确定嫌疑源IP地址为攻击来源IP地址,则生成与攻击来源IP地址相关的防御规则信息。
例如,获取攻击来源IP地址对应符合的匹配规则,即步骤202中的检测规则:如果符合A对应的匹配规则,则其对应生成的相关防御规则(例如,规则形式一般为:iptables –A input –s 攻击来源ip –j drop)可用于阻断攻击来源IP地址的请求;如果符合B对应的匹配规则,则其对应生成的相关防御规则用于限制攻击来源IP地址的请求数量,使得大量请求直接被忽略掉,不被应用服务器所处理;如果符合C对应的匹配规则,则其对应生成的相关防御规则,由于C存在多种情况,所以需要分情况生成各自对应的防御规则,例如,禁止接收攻击来源IP地址发送的带有ICMP报文;和/或,将攻击来源IP发送的分片报文先放入缓存中,并根据源IP地址和目的IP地址对报文进行分组,源IP地址和目的IP地址均相同的报文归入同一组,然后对每组IP报文的相关分片信息进行检查,丢弃分片信息存在错误的报文,且为了防止缓存益处,当缓存快要存满时,直接丢弃后续分片报文;和/或,禁止接收攻击来源IP发送的标志位为特定数值的报文等。
206、根据应用服务器的IP地址,将生成的防御规则信息发送给应用服务器。
例如,具体可通过抓包agent同时上传到后端服务器的还包括所在应用服务器的IP地址,根据该应用服务器IP地址,判别包含攻击来源IP数据包(即与该攻击来源IP地址相关的)的所有应用服务器。然后向这些应用服务器下发生成的防御规则。后续抓包agent收到该防御规则后会调用iptable把防火墙规则添加到netfilter上,以便完成阻断攻击者IP(即对应攻击来源IP地址)发起的攻击请求。
通过本实施例提出的一种智能网络攻击检测与防御的方案。在所有的应用服务器上部署可实时抓取数据包代理agent,然后抓取数据包进行网络攻击性行为的检测,进而找到攻击来源IP地址,从而根据攻击来源IP自动生成相关的防御规则,下发给各个应用服务器的代理agent,以便在各个应用服务器对应的netfilter上添加该防御规则,来实现阻断攻击来源IP发起的攻击请求。并且智能网络攻击检测与防御可以7*24小时不间断的对发往应用服务器的请求进行实时捕捉和分析,并根据捕捉到的请求如果识别出攻击的行为,可以自动化的生成和下发防御策略以完成攻击防御。整个过程都是自动化完成的,无需人工干预,这样不仅可以解决传统方式下需要购买昂贵防火墙设备、耗费大量人力的问题,而且可以避免由于人为疏忽导致的策略缺失以及分析过程耗时过长等问题,从而实现部署快速而无纰漏的防御,为生产服务保驾护航。
进一步的,作为图1至图2所示方法的具体实现,本实施例提供了一种网络攻击的安全处理装置,如图3所示,该装置包括:获取模块31、判断模块32、提取模块33、测试模块34、生成模块35。
获取模块31,用于获取应用服务器上实时数据交互的数据包;
判断模块32,用于判断所述数据包中是否存在攻击行为的报文;
提取模块33,用于若存在攻击行为的报文,则从所述攻击行为的报文中提取向所述应用服务器发起请求的源IP地址,作为嫌疑源IP地址;
测试模块34,用于根据所述嫌疑源IP地址进行请求延时执行的任务测试;
生成模块35,用于若根据测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息。
在具体的应用场景中,测试模块34,具体用于根据所述嫌疑源IP地址,发送请求延时执行的任务,以使得后续所述嫌疑源IP地址对应先发送的请求会被延时执行,且所述嫌疑源IP地址对应后发送的请求会覆盖在先请求被执行;在先请求延时执行的期间内,若所述嫌疑源IP地址对应后发送的请求内容与在先请求内容之间相似度大于预设相似度阈值,且后发送的请求数量在预定时间间隔内大于预置数量阈值,则确定所述嫌疑源IP地址为攻击来源IP地址。
在具体的应用场景中,本装置还包括:统计模块;
所述统计模块,用于统计所述嫌疑源IP地址的访问成功率;
相应的,生成模块35,具体用于若根据所述访问成功率和/或测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息。
在具体的应用场景中,所述统计模块,具体用于获取源IP地址为应用服务器IP地址、且目标IP地址为所述嫌疑源IP地址的目标数据包;从所述目标数据包中,获取包含HTTP关键字的数据包的第一数量;及,从所述HTTP关键字的数据包中,获取包含预设成功响应信息的数据包的第二数量;利用所述第二数量与所述第一数量的比值,计算所述访问成功率;若所述访问成功率小于预设成功率阈值,则确定所述嫌疑源IP地址为攻击来源IP地址。
在具体的应用场景中,判断模块32,具体用于检测所述数据包的报文中是否包含预设异常反馈信息;和/或,通过分析所述数据包的报文,检测应用服务器当前等待处理的请求数是否大于预设阈值;和/或,检测所述数据包的报文中是否包含ICMP报文;和/或,若所述数据包的报文中包含分片报文,则检测分片报文对应的特定偏移字段是否设置成错误的值;和/或,检测所述数据包的报文中的特定标志位是否设置为预设异常数值;根据检测结果,确定所述数据包中是否存在攻击行为的报文。
在具体的应用场景中,判断模块32,具体还用于根据检测结果计算所述数据包对应的异常评分;若所述异常评分大于预设评分阈值,则确定所述数据包中存在攻击行为的报文。
在具体的应用场景中,本装置还包括:发送模块;
所述发送模块,还用于在生成与所述攻击来源IP地址相关的防御规则信息之后,根据应用服务器的IP地址,将所述防御规则信息发送给应用服务器。
需要说明的是,本实施例提供的一种网络攻击的安全处理装置所涉及各功能单元的其它相应描述,可以参考图1至图2中的对应描述,在此不再赘述。
基于上述如图1和图2所示方法,相应的,本实施例还提供了一种计算机可读存储介质,计算机可读存储介质可包括非易失性和/或易失性存储器,其上存储有计算机程序,该程序被处理器执行时实现上述如图1和图2所示的网络攻击的安全处理方法。
基于这样的理解,本申请的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施场景的方法。
基于上述如图1、图2所示的方法,以及图3所示的虚拟装置实施例,为了实现上述目的,本实施例还提供了一种计算机设备,具体可以为个人计算机、笔记本电脑、服务器、网络设备等,该实体设备包括存储介质和处理器;存储介质,用于存储计算机程序,可包括非易失性和/或易失性存储器;处理器,用于执行计算机程序以实现上述如图1和图2所示的网络攻击的安全处理方法。
可选的,该计算机设备还可以包括用户接口、网络接口、摄像头、射频(Radio Frequency,RF)电路,传感器、音频电路、WI-FI模块等等。用户接口可以包括显示屏(Display)、输入单元比如键盘(Keyboard)等,可选用户接口还可以包括USB接口、读卡器接口等。网络接口可选的可以包括标准的有线接口、无线接口(如蓝牙接口、WI-FI接口)等。
本领域技术人员可以理解,本实施例提供的计算机设备结构并不构成对该实体设备的限定,可以包括更多或更少的部件,或者组合某些部件,或者不同的部件布置。
存储介质中还可以包括操作系统、网络通信模块。操作系统是管理上述实体设备硬件和软件资源的程序,支持信息处理程序以及其它软件和/或程序的运行。网络通信模块用于实现存储介质内部各组件之间的通信,以及与该实体设备中其它硬件和软件之间通信。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本申请可以借助软件加必要的通用硬件平台的方式来实现,也可以通过硬件实现。通过应用本实施例的技术方案,与目前现有技术相比,本实施例整个过程都是自动化完成的,无需人工干预,这样不仅可以解决传统方式下需要购买昂贵防火墙设备、耗费大量人力成本的问题,可节省网络攻击的安全防御成本。而且还可以避免由于人为疏忽导致的策略缺失以及分析过程耗时过长等问题,可提高网络攻击安全防御的效率与精确性,从而实现部署快速而无纰漏的防御,为生产服务保驾护航。
本领域技术人员可以理解附图只是一个优选实施场景的示意图,附图中的模块或流程并不一定是实施本申请所必须的。本领域技术人员可以理解实施场景中的装置中的模块可以按照实施场景描述进行分布于实施场景的装置中,也可以进行相应变化位于不同于本实施场景的一个或多个装置中。上述实施场景的模块可以合并为一个模块,也可以进一步拆分成多个子模块。
上述本申请序号仅仅为了描述,不代表实施场景的优劣。以上公开的仅为本申请的几个具体实施场景,但是,本申请并非局限于此,任何本领域的技术人员能思之的变化都应落入本申请的保护范围。

Claims (20)

  1. 一种网络攻击的安全处理方法,其中,包括:
    获取应用服务器上实时数据交互的数据包;
    判断所述数据包中是否存在攻击行为的报文;
    若存在攻击行为的报文,则从所述攻击行为的报文中提取向所述应用服务器发起请求的源IP地址,作为嫌疑源IP地址;
    根据所述嫌疑源IP地址进行请求延时执行的任务测试;
    若根据测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息。
  2. 根据权利要求1所述的方法,其中,根据所述嫌疑源IP地址进行请求延时执行的任务测试,具体包括:
    根据所述嫌疑源IP地址,发送请求延时执行的任务,以使得后续所述嫌疑源IP地址对应先发送的请求会被延时执行,且所述嫌疑源IP地址对应后发送的请求会覆盖在先请求被执行;
    在先请求延时执行的期间内,若所述嫌疑源IP地址对应后发送的请求内容与在先请求内容之间相似度大于预设相似度阈值,且后发送的请求数量在预定时间间隔内大于预置数量阈值,则确定所述嫌疑源IP地址为攻击来源IP地址。
  3. 根据权利要求1所述的方法,其中,在若根据测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息之前,所述方法还包括:
    统计所述嫌疑源IP地址的访问成功率;
    所述若根据测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息,具体包括:
    若根据所述访问成功率和/或测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息。
  4. 根据权利要求3所述的方法,其中,统计所述嫌疑源IP地址的访问成功率,具体包括:
    获取源IP地址为应用服务器IP地址、且目标IP地址为所述嫌疑源IP地址的目标数据包;
    从所述目标数据包中,获取包含HTTP关键字的数据包的第一数量;及,
    从所述HTTP关键字的数据包中,获取包含预设成功响应信息的数据包的第二数量;
    利用所述第二数量与所述第一数量的比值,计算所述访问成功率;
    若所述访问成功率小于预设成功率阈值,则确定所述嫌疑源IP地址为攻击来源IP地址。
  5. 根据权利要求1所述的方法,其中,所述判断所述数据包中是否存在攻击行为的报文,具体包括:
    检测所述数据包的报文中是否包含预设异常反馈信息;和/或,
    通过分析所述数据包的报文,检测应用服务器当前等待处理的请求数是否大于预设阈值;和/或,
    检测所述数据包的报文中是否包含ICMP报文;和/或,
    若所述数据包的报文中包含分片报文,则检测分片报文对应的特定偏移字段是否设置成错误的值;和/或,
    检测所述数据包的报文中的特定标志位是否设置为预设异常数值;
    根据检测结果,确定所述数据包中是否存在攻击行为的报文。
  6. 根据权利要求5所述的方法,其中,所述根据检测结果,确定所述数据包中是否存在攻击行为的报文,具体包括:
    根据检测结果计算所述数据包对应的异常评分;
    若所述异常评分大于预设评分阈值,则确定所述数据包中存在攻击行为的报文。
  7. 根据权利要求1所述的方法,其中,在生成与所述攻击来源IP地址相关的防御规则信息之后,所述方法还包括:
    根据应用服务器的IP地址,将所述防御规则信息发送给应用服务器。
  8. 一种网络攻击的安全处理装置,其中,包括:
    获取模块,用于获取应用服务器上实时数据交互的数据包;
    判断模块,用于判断所述数据包中是否存在攻击行为的报文;
    提取模块,用于若存在攻击行为的报文,则从所述攻击行为的报文中提取向所述应用服务器发起请求的源IP地址,作为嫌疑源IP地址;
    测试模块,用于根据所述嫌疑源IP地址进行请求延时执行的任务测试;
    生成模块,用于若根据测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息。
  9. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述程序被处理器执行时实现以下步骤:
    获取应用服务器上实时数据交互的数据包;
    判断所述数据包中是否存在攻击行为的报文;
    若存在攻击行为的报文,则从所述攻击行为的报文中提取向所述应用服务器发起请求的源IP地址,作为嫌疑源IP地址;
    根据所述嫌疑源IP地址进行请求延时执行的任务测试;
    若根据测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息。
  10. 根据权利要求9所述的计算机可读存储介质,其中,根据所述嫌疑源IP地址进行请求延时执行的任务测试,具体包括:
    根据所述嫌疑源IP地址,发送请求延时执行的任务,以使得后续所述嫌疑源IP地址对应先发送的请求会被延时执行,且所述嫌疑源IP地址对应后发送的请求会覆盖在先请求被执行;
    在先请求延时执行的期间内,若所述嫌疑源IP地址对应后发送的请求内容与在先请求内容之间相似度大于预设相似度阈值,且后发送的请求数量在预定时间间隔内大于预置数量阈值,则确定所述嫌疑源IP地址为攻击来源IP地址。
  11. 根据权利要求9所述的计算机可读存储介质,其中,在若根据测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息之前,还实现以下步骤:
    统计所述嫌疑源IP地址的访问成功率;
    所述若根据测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息,具体包括:
    若根据所述访问成功率和/或测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息。
  12. 根据权利要求11所述的计算机可读存储介质,其中,统计所述嫌疑源IP地址的访问成功率,具体包括:
    获取源IP地址为应用服务器IP地址、且目标IP地址为所述嫌疑源IP地址的目标数据包;
    从所述目标数据包中,获取包含HTTP关键字的数据包的第一数量;及,
    从所述HTTP关键字的数据包中,获取包含预设成功响应信息的数据包的第二数量;
    利用所述第二数量与所述第一数量的比值,计算所述访问成功率;
    若所述访问成功率小于预设成功率阈值,则确定所述嫌疑源IP地址为攻击来源IP地址。
  13. 根据权利要求9所述的计算机可读存储介质,其中,所述判断所述数据包中是否存在攻击行为的报文,具体包括:
    检测所述数据包的报文中是否包含预设异常反馈信息;和/或,
    通过分析所述数据包的报文,检测应用服务器当前等待处理的请求数是否大于预设阈值;和/或,
    检测所述数据包的报文中是否包含ICMP报文;和/或,
    若所述数据包的报文中包含分片报文,则检测分片报文对应的特定偏移字段是否设置成错误的值;和/或,
    检测所述数据包的报文中的特定标志位是否设置为预设异常数值;
    根据检测结果,确定所述数据包中是否存在攻击行为的报文。
  14. 一种计算机设备,包括存储介质、处理器及存储在存储介质上并可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现以下步骤:
    获取应用服务器上实时数据交互的数据包;
    判断所述数据包中是否存在攻击行为的报文;
    若存在攻击行为的报文,则从所述攻击行为的报文中提取向所述应用服务器发起请求的源IP地址,作为嫌疑源IP地址;
    根据所述嫌疑源IP地址进行请求延时执行的任务测试;
    若根据测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息。
  15. 根据权利要求14所述的计算机设备,其中,根据所述嫌疑源IP地址进行请求延时执行的任务测试,具体包括:
    根据所述嫌疑源IP地址,发送请求延时执行的任务,以使得后续所述嫌疑源IP地址对应先发送的请求会被延时执行,且所述嫌疑源IP地址对应后发送的请求会覆盖在先请求被执行;
    在先请求延时执行的期间内,若所述嫌疑源IP地址对应后发送的请求内容与在先请求内容之间相似度大于预设相似度阈值,且后发送的请求数量在预定时间间隔内大于预置数量阈值,则确定所述嫌疑源IP地址为攻击来源IP地址。
  16. 根据权利要求14所述的计算机设备,其中,在若根据测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息之前,还实现以下步骤:
    统计所述嫌疑源IP地址的访问成功率;
    所述若根据测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息,具体包括:
    若根据所述访问成功率和/或测试结果确定所述嫌疑源IP地址为攻击来源IP地址,则生成与所述攻击来源IP地址相关的防御规则信息。
  17. 根据权利要求16所述的计算机设备,其中,统计所述嫌疑源IP地址的访问成功率,具体包括:
    获取源IP地址为应用服务器IP地址、且目标IP地址为所述嫌疑源IP地址的目标数据包;
    从所述目标数据包中,获取包含HTTP关键字的数据包的第一数量;及,
    从所述HTTP关键字的数据包中,获取包含预设成功响应信息的数据包的第二数量;
    利用所述第二数量与所述第一数量的比值,计算所述访问成功率;
    若所述访问成功率小于预设成功率阈值,则确定所述嫌疑源IP地址为攻击来源IP地址。
  18. 根据权利要求14所述的计算机设备,其中,所述判断所述数据包中是否存在攻击行为的报文,具体包括:
    检测所述数据包的报文中是否包含预设异常反馈信息;和/或,
    通过分析所述数据包的报文,检测应用服务器当前等待处理的请求数是否大于预设阈值;和/或,
    检测所述数据包的报文中是否包含ICMP报文;和/或,
    若所述数据包的报文中包含分片报文,则检测分片报文对应的特定偏移字段是否设置成错误的值;和/或,
    检测所述数据包的报文中的特定标志位是否设置为预设异常数值;
    根据检测结果,确定所述数据包中是否存在攻击行为的报文。
  19. 根据权利要求18所述的计算机设备,其中,所述根据检测结果,确定所述数据包中是否存在攻击行为的报文,具体包括:
    根据检测结果计算所述数据包对应的异常评分;
    若所述异常评分大于预设评分阈值,则确定所述数据包中存在攻击行为的报文。
  20. 根据权利要求14所述的计算机设备,其中,在生成与所述攻击来源IP地址相关的防御规则信息之后,还实现以下步骤:
    根据应用服务器的IP地址,将所述防御规则信息发送给应用服务器。
PCT/CN2020/118931 2020-05-15 2020-09-29 网络攻击的安全处理方法、装置、计算机设备及介质 WO2021151300A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010411200.1A CN111698214A (zh) 2020-05-15 2020-05-15 网络攻击的安全处理方法、装置及计算机设备
CN202010411200.1 2020-05-15

Publications (1)

Publication Number Publication Date
WO2021151300A1 true WO2021151300A1 (zh) 2021-08-05

Family

ID=72477782

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/118931 WO2021151300A1 (zh) 2020-05-15 2020-09-29 网络攻击的安全处理方法、装置、计算机设备及介质

Country Status (2)

Country Link
CN (1) CN111698214A (zh)
WO (1) WO2021151300A1 (zh)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111698214A (zh) * 2020-05-15 2020-09-22 平安科技(深圳)有限公司 网络攻击的安全处理方法、装置及计算机设备
CN112491883A (zh) * 2020-11-27 2021-03-12 杭州安恒信息安全技术有限公司 一种检测web攻击的方法、装置、电子装置和存储介质
CN112685734A (zh) * 2020-12-25 2021-04-20 深圳供电局有限公司 安全防护方法、装置、计算机设备和存储介质
CN112953895B (zh) * 2021-01-26 2022-11-22 深信服科技股份有限公司 一种攻击行为检测方法、装置、设备及可读存储介质
CN112910895B (zh) * 2021-02-02 2022-11-15 杭州安恒信息技术股份有限公司 网络攻击行为检测方法、装置、计算机设备和系统
CN115208596B (zh) * 2021-04-09 2023-09-19 中国移动通信集团江苏有限公司 网络入侵防御方法、装置及存储介质
CN113225340A (zh) * 2021-05-07 2021-08-06 北京华云安信息技术有限公司 攻击ip地址判断方法、装置、设备和计算机可读存储介质
CN113233269B (zh) * 2021-05-12 2023-06-16 广州广日电梯工业有限公司 电梯网络受攻击的诊断方法以及诊断装置
CN113783848B (zh) * 2021-08-25 2023-04-07 湖南省金盾信息安全等级保护评估中心有限公司 基于欺骗性人工智能的网络主动防御方法及装置
CN113949579B (zh) * 2021-10-20 2024-04-30 安天科技集团股份有限公司 网站攻击防御方法、装置、计算机设备及存储介质
CN114039796B (zh) * 2021-11-26 2023-08-22 安天科技集团股份有限公司 网络攻击的确定方法、装置、计算机设备及存储介质
CN114095274B (zh) * 2021-12-10 2023-11-10 北京天融信网络安全技术有限公司 一种攻击研判方法及装置
CN114338593B (zh) * 2021-12-23 2023-07-04 上海观安信息技术股份有限公司 利用地址解析协议进行网络扫描的行为检测方法及装置
CN114697389A (zh) * 2022-03-16 2022-07-01 奇安信科技集团股份有限公司 数据传输方法、装置以及扫描引擎
CN114697241B (zh) * 2022-04-07 2023-09-12 机械工业仪器仪表综合技术经济研究所 一种端到端的时延测试系统及方法
CN115484232A (zh) * 2022-07-29 2022-12-16 天翼云科技有限公司 Dhcp服务器的部署方法、装置、设备及存储介质
CN115694950B (zh) * 2022-10-26 2023-05-23 北京哈工信息产业股份有限公司 一种快速准确识别异常攻击ip地址的方法
CN116132194B (zh) * 2023-03-24 2023-06-27 杭州海康威视数字技术股份有限公司 嵌入式设备未知攻击入侵检测防御方法、系统及装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105592055A (zh) * 2015-09-18 2016-05-18 杭州华三通信技术有限公司 一种用于tcp syn flood的防攻击方法和装置
CN109005157A (zh) * 2018-07-09 2018-12-14 华中科技大学 一种软件定义网络中DDoS攻击检测与防御方法与系统
US20190068626A1 (en) * 2017-08-31 2019-02-28 Charter Communications Operating, Llc Distributed denial-of-service attack detection and mitigation based on autonomous system number
CN109995727A (zh) * 2017-12-30 2019-07-09 中国移动通信集团河北有限公司 渗透攻击行为主动防护方法、装置、设备及介质
WO2019222927A1 (en) * 2018-05-22 2019-11-28 Nokia Shanghai Bell Co., Ltd. Attack source tracing in sfc overlay network
CN111698214A (zh) * 2020-05-15 2020-09-22 平安科技(深圳)有限公司 网络攻击的安全处理方法、装置及计算机设备

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101478540B (zh) * 2008-12-31 2012-04-25 成都市华为赛门铁克科技有限公司 一种防御挑战黑洞攻击的方法及装置
CN103856470B (zh) * 2012-12-06 2018-06-19 腾讯科技(深圳)有限公司 分布式拒绝服务攻击检测方法及检测装置
US10511615B2 (en) * 2017-05-05 2019-12-17 Microsoft Technology Licensing, Llc Non-protocol specific system and method for classifying suspect IP addresses as sources of non-targeted attacks on cloud based machines
CN109327426A (zh) * 2018-01-11 2019-02-12 白令海 一种防火墙攻击防御方法
CN110061998B (zh) * 2019-04-25 2022-03-22 新华三信息安全技术有限公司 一种攻击防御方法及装置
CN110519265B (zh) * 2019-08-27 2022-02-25 新华三信息安全技术有限公司 一种防御攻击的方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105592055A (zh) * 2015-09-18 2016-05-18 杭州华三通信技术有限公司 一种用于tcp syn flood的防攻击方法和装置
US20190068626A1 (en) * 2017-08-31 2019-02-28 Charter Communications Operating, Llc Distributed denial-of-service attack detection and mitigation based on autonomous system number
CN109995727A (zh) * 2017-12-30 2019-07-09 中国移动通信集团河北有限公司 渗透攻击行为主动防护方法、装置、设备及介质
WO2019222927A1 (en) * 2018-05-22 2019-11-28 Nokia Shanghai Bell Co., Ltd. Attack source tracing in sfc overlay network
CN109005157A (zh) * 2018-07-09 2018-12-14 华中科技大学 一种软件定义网络中DDoS攻击检测与防御方法与系统
CN111698214A (zh) * 2020-05-15 2020-09-22 平安科技(深圳)有限公司 网络攻击的安全处理方法、装置及计算机设备

Also Published As

Publication number Publication date
CN111698214A (zh) 2020-09-22

Similar Documents

Publication Publication Date Title
WO2021151300A1 (zh) 网络攻击的安全处理方法、装置、计算机设备及介质
US8806189B2 (en) Apparatus for analyzing traffic
US8966627B2 (en) Method and apparatus for defending distributed denial-of-service (DDoS) attack through abnormally terminated session
CN109194680B (zh) 一种网络攻击识别方法、装置及设备
US8347385B2 (en) Systems and methods for detecting and preventing flooding attacks in a network environment
CA2821126C (en) Detection of infected network devices via analysis of responseless outgoing network traffic
US8634717B2 (en) DDoS attack detection and defense apparatus and method using packet data
US9350758B1 (en) Distributed denial of service (DDoS) honeypots
CN107124434B (zh) 一种dns恶意攻击流量的发现方法及系统
US10505952B2 (en) Attack detection device, attack detection method, and attack detection program
EP3334117B1 (en) Method, apparatus and system for quantizing defence result
KR20130017333A (ko) 응용 계층 기반의 슬로우 분산서비스거부 공격판단 시스템 및 방법
WO2015078388A1 (zh) 针对拒绝服务攻击的处理方法及装置
CN113422774B (zh) 一种基于网络协议的自动化渗透测试方法、装置及存储介质
CN107204965B (zh) 一种密码破解行为的拦截方法及系统
CN110839017A (zh) 代理ip地址识别方法、装置、电子设备及存储介质
CN112600852B (zh) 漏洞攻击处理方法、装置、设备及存储介质
Aizuddin et al. DNS amplification attack detection and mitigation via sFlow with security-centric SDN
CN110113290B (zh) 网络攻击的检测方法、装置、主机及存储介质
CN111028085A (zh) 一种基于主被动结合的网络靶场资产信息采集方法及装置
CN111049781A (zh) 一种反弹式网络攻击的检测方法、装置、设备及存储介质
US10320881B2 (en) Operating system fingerprint detection
Luckie et al. Resilience of deployed TCP to blind attacks
CN114338120A (zh) 一种扫段攻击检测方法、装置、介质和电子设备
CN112217777A (zh) 攻击回溯方法及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20916435

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20916435

Country of ref document: EP

Kind code of ref document: A1