[go: up one dir, main page]

CN116232690A - DDOS attack resistance method, device, smart network card, medium and product - Google Patents

DDOS attack resistance method, device, smart network card, medium and product Download PDF

Info

Publication number
CN116232690A
CN116232690A CN202310037310.XA CN202310037310A CN116232690A CN 116232690 A CN116232690 A CN 116232690A CN 202310037310 A CN202310037310 A CN 202310037310A CN 116232690 A CN116232690 A CN 116232690A
Authority
CN
China
Prior art keywords
access request
request packet
syn
message
syn message
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202310037310.XA
Other languages
Chinese (zh)
Inventor
朱敏
李桧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuxi Muchuang Integrated Circuit Design Co ltd
Original Assignee
Wuxi Muchuang Integrated Circuit Design Co ltd
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 Wuxi Muchuang Integrated Circuit Design Co ltd filed Critical Wuxi Muchuang Integrated Circuit Design Co ltd
Priority to CN202310037310.XA priority Critical patent/CN116232690A/en
Publication of CN116232690A publication Critical patent/CN116232690A/en
Pending legal-status Critical Current

Links

Images

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/1441Countermeasures against malicious traffic
    • H04L63/1458Denial of Service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

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

Abstract

The disclosure provides a method, a device, an intelligent network card, a medium and a product for resisting DDOS attack, which can be applied to the technical field of network transmission. The method comprises the following steps: and receiving an access request packet sent to the server by the client, judging whether the access request packet is attacked by the DDOS, and responding to the access request packet under the condition that the access request packet is attacked by the DDOS. On one hand, the response is realized by using hardware through the intelligent network card, compared with the firewall server, the performance is higher, on the other hand, the response operation is integrated into the intelligent network card, a server does not need to be independently configured to serve as a firewall mechanism, the intelligent network card directly replies the access request packet, the access request packet does not need to be uploaded to the server, the server resource is not occupied, and the DDOS attack is effectively resisted.

Description

DDOS攻击的抵抗方法、装置、智能网卡、介质及产品DDOS attack resistance method, device, smart network card, medium and product

技术领域technical field

本公开涉及网络传输领域,尤其涉及一种DDOS攻击的抵抗方法、装置、智能网卡、介质及产品。The present disclosure relates to the field of network transmission, in particular to a DDOS attack resistance method, device, smart network card, medium and product.

背景技术Background technique

分布式拒绝服务攻击(DDOS,Distributed Denial of Service)是指处于不同位置的多个攻击者同时向一个或数个目标发动攻击,或者一个攻击者控制了位于不同位置的多台机器并利用这些机器对受害者同时实施攻击。由于攻击的发出点是分布在不同地方的,这类攻击称为分布式拒绝服务攻击,其中的攻击者可以有多个。Distributed denial of service attack (DDOS, Distributed Denial of Service) means that multiple attackers in different locations launch attacks on one or several targets at the same time, or an attacker controls multiple machines in different locations and uses these machines to Simultaneous attacks on victims. Since the origin of the attack is distributed in different places, this type of attack is called a distributed denial-of-service attack, and there can be multiple attackers.

现有抵抗DDOS攻击最常见的一种方式是建立防火墙,但是这种方式仍然是采用软件的方式解决DDOS攻击,其对充当防火墙的服务器的性能要求特别高。The most common way to resist DDOS attacks is to build a firewall, but this method still uses software to solve DDOS attacks, which has particularly high performance requirements for servers acting as firewalls.

发明内容Contents of the invention

鉴于上述问题,本公开提供了DDOS攻击的抵抗方法、装置、智能网卡、介质及产品。In view of the above problems, the present disclosure provides a DDOS attack resistance method, device, smart network card, medium and product.

根据本公开的第一个方面,提供了一种DDOS攻击的抵抗方法,应用于智能网卡,所述智能网卡设置于服务器,所述方法包括:According to a first aspect of the present disclosure, a method for resisting DDOS attacks is provided, which is applied to a smart network card, the smart network card is set on a server, and the method includes:

接收客户端发送给所述服务器的访问请求包;receiving the access request packet sent by the client to the server;

判断所述访问请求包是否受到DDOS攻击;Judging whether the access request packet is attacked by DDOS;

在所述访问请求包受到DDOS攻击的情况下,对所述访问请求包做出响应。When the access request packet is attacked by DDOS, respond to the access request packet.

在本公开一实施例中,所述对所述访问请求包做出响应包括:In an embodiment of the present disclosure, the responding to the access request packet includes:

解析所述访问请求包的协议类型,所述协议类型包括ICMP类型和TCP类型;Analyzing the protocol type of the access request packet, the protocol type includes ICMP type and TCP type;

在所述协议类型为所述ICMP类型的情况下,回复所述访问请求包给所述客户端;When the protocol type is the ICMP type, reply the access request packet to the client;

在所述协议类型为所述TCP类型的情况下,确定所述访问请求包的连接阶段,根据所述访问请求包的连接阶段,对所述访问请求包做出响应。If the protocol type is the TCP type, determine the connection phase of the access request packet, and respond to the access request packet according to the connection phase of the access request packet.

在本公开一实施例中,在所述访问请求包的连接阶段为第一次握手的情况下,所述根据所述访问请求包的连接阶段,对所述访问请求包做出响应包括:In an embodiment of the present disclosure, when the connection phase of the access request packet is the first handshake, responding to the access request packet according to the connection phase of the access request packet includes:

对于同一访问请求包,获取当前接收到的SYN报文及携带的Seq值、历史接收到的SYN报文及携带的Seq值;For the same access request packet, obtain the currently received SYN message and the carried Seq value, the historically received SYN message and the carried Seq value;

判断是否存在一历史接收到的SYN报文及携带的Seq值与所述当前接收到的SYN报文及携带的Seq值相同;Judging whether there is a SYN message received in history and the Seq value carried is the same as the currently received SYN message and the Seq value carried;

在存在一历史接收到的SYN报文及携带的Seq值与所述当前接收到的SYN报文及携带的Seq值相同的情况下,丢弃所述收到的SYN报文;In the case that there is a historically received SYN message and the carried Seq value is the same as the currently received SYN message and the carried Seq value, discarding the received SYN message;

在不存在一历史接收到的SYN报文及携带的Seq值与所述当前接收到的SYN报文及携带的Seq值相同的情况下,回复SYN报文和ACK报文给所述客户端。Replying the SYN message and the ACK message to the client if there is no historically received SYN message and the carried Seq value are the same as the currently received SYN message and the carried Seq value.

在本公开一实施例中,在所述访问请求包的连接阶段为第二次握手的情况下,所述根据所述访问请求包的连接阶段,对所述访问请求包做出响应包括:In an embodiment of the present disclosure, when the connection phase of the access request packet is the second handshake, responding to the access request packet according to the connection phase of the access request packet includes:

构建半连接等待列表,所述半连接等待列表用于存储预设阈值数量的SYN报文;Construct a semi-join waiting list, and the semi-join waiting list is used to store SYN messages of a preset threshold quantity;

将接收到的SYN报文加入预设的半连接等待列表;Add the received SYN message to the preset semi-connection waiting list;

判断当前所述半连接等待列表中的SYN报文的数量是否大于所述阈值;Judging whether the number of SYN messages in the current semi-join waiting list is greater than the threshold;

在所述半连接等待列表中的SYN报文的数量大于所述阈值的情况下,将删除所述半连接等待列表中的目标SYN报文。If the number of SYN packets in the semi-join waiting list is greater than the threshold, the target SYN packets in the semi-join waiting list will be deleted.

在本公开一实施例中,在所述访问请求包的连接阶段为第二次握手的情况下,所述方法还包括:In an embodiment of the present disclosure, when the connection phase of the access request packet is the second handshake, the method further includes:

在收到同一IP地址发送的SYN报文的情况下,丢弃所述SYN报文。In the case of receiving a SYN message sent by the same IP address, the SYN message is discarded.

在本公开一实施例中,在所述访问请求包的连接阶段为第三次握手的情况下,所述根据所述访问请求包的连接阶段,对所述访问请求包做出响应包括:In an embodiment of the present disclosure, when the connection phase of the access request packet is the third handshake, the responding to the access request packet according to the connection phase of the access request packet includes:

获取当前接收到的ACK报文;Obtain the currently received ACK message;

从所述半连接等待列表中查找与所述ACK报文的五元组对应的SYN报文;Find the SYN message corresponding to the 5-tuple of the ACK message from the semi-join waiting list;

在查找到与所述ACK报文的五元组对应的SYN报文的情况下,从所述半连接等待列表中移除所述AK报文对应的SYN报文,完成所述访问请求包的连接,并将所述访问请求包的相关信息发送给所述服务器。When the SYN message corresponding to the 5-tuple of the ACK message is found, remove the SYN message corresponding to the AK message from the semi-join waiting list, and complete the processing of the access request packet Connect, and send the relevant information of the access request packet to the server.

在本公开一实施例中,所述方法还包括:In an embodiment of the present disclosure, the method further includes:

在所述协议类型为所述TCP类型的情况下,判断所述访问请求包是否具有RST位;When the protocol type is the TCP type, determine whether the access request packet has an RST bit;

在所述访问请求包具有RST位的情况下,丢弃所述访问请求包。In case the access request packet has the RST bit, the access request packet is discarded.

在本公开一实施例中,所述方法还包括:In an embodiment of the present disclosure, the method further includes:

在所述访问请求包没有受到DDOS攻击的情况下,将所述访问请求包上传给所述服务器。When the access request packet is not attacked by DDOS, upload the access request packet to the server.

本公开的第二方面提供了一种DDOS攻击的抵抗装置,应用于智能网卡,所述智能网卡设置于服务器,包括:The second aspect of the present disclosure provides a DDOS attack resistance device, which is applied to a smart network card, and the smart network card is set on a server, including:

接收模块,用于接收客户端发送给所述服务器的访问请求包;A receiving module, configured to receive an access request packet sent by the client to the server;

判断模块,用于判断所述访问请求包是否受到DDOS攻击;A judging module, configured to judge whether the access request packet is attacked by a DDOS;

响应模块,用于在所述访问请求包受到DDOS攻击的情况下,对所述访问请求包做出响应。A response module, configured to respond to the access request packet when the access request packet is attacked by DDOS.

在本公开一实施例中,所述响应模块包括:In an embodiment of the present disclosure, the response module includes:

解析模块,用于解析所述访问请求包的协议类型,所述协议类型包括ICMP类型和TCP类型;A parsing module, configured to parse the protocol type of the access request packet, where the protocol type includes ICMP type and TCP type;

第一回复模块,用于在所述协议类型为所述ICMP类型的情况下,回复所述访问请求包给所述客户端;A first reply module, configured to reply the access request packet to the client when the protocol type is the ICMP type;

第二回复模块,用于在所述协议类型为所述TCP类型的情况下,确定所述访问请求包的连接阶段,根据所述访问请求包的连接阶段,对所述访问请求包做出响应。A second reply module, configured to determine the connection phase of the access request packet when the protocol type is the TCP type, and respond to the access request packet according to the connection phase of the access request packet .

在本公开一实施例中,在所述访问请求包的连接阶段为第一次握手的情况下,所述根据所述访问请求包的连接阶段,对所述访问请求包做出响应包括:In an embodiment of the present disclosure, when the connection phase of the access request packet is the first handshake, responding to the access request packet according to the connection phase of the access request packet includes:

对于同一访问请求包,获取当前接收到的SYN报文及携带的Seq值、历史接收到的SYN报文及携带的Seq值;For the same access request packet, obtain the currently received SYN message and the carried Seq value, the historically received SYN message and the carried Seq value;

判断是否存在一历史接收到的SYN报文及携带的Seq值与所述当前接收到的SYN报文及携带的Seq值相同;Judging whether there is a SYN message received in history and the Seq value carried is the same as the currently received SYN message and the Seq value carried;

在存在一历史接收到的SYN报文及携带的Seq值与所述当前接收到的SYN报文及携带的Seq值相同的情况下,丢弃所述收到的SYN报文;In the case that there is a historically received SYN message and the carried Seq value is the same as the currently received SYN message and the carried Seq value, discarding the received SYN message;

在不存在一历史接收到的SYN报文及携带的Seq值与所述当前接收到的SYN报文及携带的Seq值相同的情况下,回复SYN报文和ACK报文给所述客户端。Replying the SYN message and the ACK message to the client if there is no historically received SYN message and the carried Seq value are the same as the currently received SYN message and the carried Seq value.

在本公开一实施例中,在所述访问请求包的连接阶段为第二次握手的情况下,所述根据所述访问请求包的连接阶段,对所述访问请求包做出响应包括:In an embodiment of the present disclosure, when the connection phase of the access request packet is the second handshake, responding to the access request packet according to the connection phase of the access request packet includes:

构建半连接等待列表,所述半连接等待列表用于存储预设阈值数量的SYN报文;Construct a semi-join waiting list, and the semi-join waiting list is used to store SYN messages of a preset threshold quantity;

将接收到的SYN报文加入预设的半连接等待列表;Add the received SYN message to the preset semi-connection waiting list;

判断当前所述半连接等待列表中的SYN报文的数量是否大于所述阈值;Judging whether the number of SYN messages in the current semi-join waiting list is greater than the threshold;

在所述半连接等待列表中的SYN报文的数量大于所述阈值的情况下,将删除所述半连接等待列表中的目标SYN报文。If the number of SYN packets in the semi-join waiting list is greater than the threshold, the target SYN packets in the semi-join waiting list will be deleted.

在本公开一实施例中,在所述访问请求包的连接阶段为第二次握手的情况下,所述装置还包括:In an embodiment of the present disclosure, when the connection phase of the access request packet is the second handshake, the device further includes:

丢弃模块,用于在收到同一IP地址发送的SYN报文的情况下,丢弃所述SYN报文。The discarding module is configured to discard the SYN message when receiving the SYN message sent by the same IP address.

在本公开一实施例中,在所述访问请求包的连接阶段为第三次握手的情况下,所述根据所述访问请求包的连接阶段,对所述访问请求包做出响应包括:In an embodiment of the present disclosure, when the connection phase of the access request packet is the third handshake, the responding to the access request packet according to the connection phase of the access request packet includes:

获取当前接收到的ACK报文;Obtain the currently received ACK message;

从所述半连接等待列表中查找与所述ACK报文的五元组对应的SYN报文;Find the SYN message corresponding to the 5-tuple of the ACK message from the semi-join waiting list;

在查找到与所述ACK报文的五元组对应的SYN报文的情况下,从所述半连接等待列表中移除所述AK报文对应的SYN报文,完成所述访问请求包的连接,并将所述访问请求包的相关信息发送给所述服务器。When the SYN message corresponding to the 5-tuple of the ACK message is found, remove the SYN message corresponding to the AK message from the semi-join waiting list, and complete the processing of the access request packet Connect, and send the relevant information of the access request packet to the server.

在本公开一实施例中,所述装置还包括:In an embodiment of the present disclosure, the device further includes:

在所述协议类型为所述TCP类型的情况下,判断所述访问请求包是否具有RST位;When the protocol type is the TCP type, determine whether the access request packet has an RST bit;

在所述访问请求包具有RST位的情况下,丢弃所述访问请求包。In case the access request packet has the RST bit, the access request packet is discarded.

在本公开一实施例中,所述装置还包括:In an embodiment of the present disclosure, the device further includes:

上传模块,用于在所述访问请求包没有受到DDOS攻击的情况下,将所述访问请求包上传给所述服务器。An uploading module, configured to upload the access request packet to the server when the access request packet is not attacked by DDOS.

本公开的第三方面提供了一种电子设备,包括:一个或多个处理器;存储器,用于存储一个或多个程序,其中,当所述一个或多个程序被所述一个或多个处理器执行时,使得一个或多个处理器执行上述方法。A third aspect of the present disclosure provides an electronic device, including: one or more processors; a memory for storing one or more programs, wherein, when the one or more programs are executed by the one or more When the processor executes, one or more processors are made to execute the above method.

本公开的第四方面还提供了一种计算机可读存储介质,其上存储有可执行指令,该指令被处理器执行时使处理器执行上述方法。The fourth aspect of the present disclosure also provides a computer-readable storage medium, on which executable instructions are stored, and when executed by a processor, the processor causes the processor to perform the above method.

本公开的第五方面还提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述方法。A fifth aspect of the present disclosure further provides a computer program product, including a computer program, which implements the above method when executed by a processor.

根据本公开提供的DDOS攻击的抵抗方法、装置、智能网卡、介质及产品,接收客户端发送给该服务器的访问请求包,判断该访问请求包是否受到DDOS攻击,在该访问请求包受到DDOS攻击的情况下,对该访问请求包做出响应。一方面,通过智能网卡使用硬件实现回复,相比于防火墙服务器性能会更高,另一方面,将响应操作集成到智能网卡中,不再需要单独配置一台服务器充当防火墙机制,智能网卡直接回复访问请求包,不需要将访问请求包上传服务器,不占用服务器资源,有效抵抗DDOS攻击。According to the DDOS attack resistance method, device, smart network card, medium and product provided by the present disclosure, the access request packet sent by the client to the server is received, and it is judged whether the access request packet is attacked by DDOS. In the case of , respond to the access request packet. On the one hand, the smart network card uses hardware to implement the reply, which will have higher performance than the firewall server. On the other hand, the response operation is integrated into the smart network card, no longer need to configure a separate server to act as a firewall mechanism, and the smart network card can directly reply The access request package does not need to upload the access request package to the server, does not occupy server resources, and effectively resists DDOS attacks.

附图说明Description of drawings

通过以下参照附图对本公开实施例的描述,本公开的上述内容以及其他目的、特征和优点将更为清楚,在附图中:Through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, the above content and other objects, features and advantages of the present disclosure will be more clear, in the accompanying drawings:

图1示意性示出了根据本公开实施例的DDOS攻击的抵抗方法、装置、智能网卡、介质和程序产品的应用场景图;FIG. 1 schematically shows an application scenario diagram of a DDOS attack resistance method, device, smart network card, medium, and program product according to an embodiment of the present disclosure;

图2示意性示出了根据本公开实施例的DDOS攻击的抵抗方法的流程图;Fig. 2 schematically shows a flow chart of a method for resisting DDOS attacks according to an embodiment of the present disclosure;

图3示意性示出了根据本公开实施例的基于TCP协议的三次握手的示意图;FIG. 3 schematically shows a schematic diagram of a three-way handshake based on the TCP protocol according to an embodiment of the present disclosure;

图4示意性示出了根据本公开实施例的基于TCP类型第一次握手情况下的DDOS攻击的抵抗方法的流程图;FIG. 4 schematically shows a flow chart of a method for resisting DDOS attacks based on the first handshake of the TCP type according to an embodiment of the present disclosure;

图5示意性示出了根据本公开实施例的基于TCP类型第二次握手情况下的DDOS攻击的抵抗方法的流程图;FIG. 5 schematically shows a flow chart of a method for resisting DDOS attacks based on the second handshake of the TCP type according to an embodiment of the present disclosure;

图6示意性示出了根据本公开实施例的基于TCP类型第三次握手情况下的DDOS攻击的抵抗方法的流程图;FIG. 6 schematically shows a flowchart of a method for resisting DDOS attacks based on the TCP type third handshake according to an embodiment of the present disclosure;

图7示意性示出了根据本公开实施例的基于TCP类型情况下的DDOS攻击的抵抗方法的流程图。Fig. 7 schematically shows a flow chart of a method for resisting a DDOS attack based on a TCP type according to an embodiment of the present disclosure.

图8示意性示出了根据本公开实施例的DDOS攻击的抵抗装置的结构框图;以及FIG. 8 schematically shows a block diagram of a device for resisting DDOS attacks according to an embodiment of the present disclosure; and

图9示意性示出了根据本公开实施例的适于实现DDOS攻击的抵抗方法的智能网卡的方框图。Fig. 9 schematically shows a block diagram of an intelligent network card suitable for implementing a DDOS attack resistance method according to an embodiment of the present disclosure.

具体实施方式Detailed ways

以下,将参照附图来描述本公开的实施例。但是应该理解,这些描述只是示例性的,而并非要限制本公开的范围。在下面的详细描述中,为便于解释,阐述了许多具体的细节以提供对本公开实施例的全面理解。然而,明显地,一个或多个实施例在没有这些具体细节的情况下也可以被实施。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本公开的概念。Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. It should be understood, however, that these descriptions are exemplary only, and are not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Also, in the following description, descriptions of well-known structures and techniques are omitted to avoid unnecessarily obscuring the concept of the present disclosure.

在此使用的术语仅仅是为了描述具体实施例,而并非意在限制本公开。在此使用的术语“包括”、“包含”等表明了该特征、步骤、操作和/或部件的存在,但是并不排除存在或添加一个或多个其他特征、步骤、操作或部件。The terminology used herein is for the purpose of describing particular embodiments only, and is not intended to be limiting of the present disclosure. The terms "comprising", "comprising" and the like used herein indicate the presence of such features, steps, operations and/or components, but do not exclude the presence or addition of one or more other features, steps, operations or components.

在此使用的所有术语(包括技术和科学术语)具有本领域技术人员通常所理解的含义,除非另外定义。应注意,这里使用的术语应解释为具有与本说明书的上下文相一致的含义,而不应以理想化或过于刻板的方式来解释。All terms (including technical and scientific terms) used herein have the meaning commonly understood by one of ordinary skill in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted to have a meaning consistent with the context of this specification, and not be interpreted in an idealized or overly rigid manner.

在使用类似于“A、B和C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B和C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。Where expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted as those skilled in the art would normally understand the expression (for example, "having A, B, and C A system of at least one of "shall include, but not be limited to, systems with A alone, B alone, C alone, A and B, A and C, B and C, and/or A, B, C, etc. ).

在本公开的技术方案中,所涉及的用户个人信息的收集、存储、使用、加工、传输、提供、公开和应用等处理,均符合相关法律法规的规定,采取了必要保密措施,且不违背公序良俗。In the technical solution of this disclosure, the collection, storage, use, processing, transmission, provision, disclosure, and application of the user's personal information involved are all in compliance with relevant laws and regulations, necessary confidentiality measures have been taken, and they do not violate the Public order and good customs.

在本公开的技术方案中,对数据的获取、收集、存储、使用、加工、传输、提供、公开和应用等处理,均符合相关法律法规的规定,采取了必要保密措施,且不违背公序良俗。In the technical solution of this disclosure, the acquisition, collection, storage, use, processing, transmission, provision, disclosure, and application of data are all in compliance with relevant laws and regulations, necessary confidentiality measures have been taken, and they do not violate public order and good customs.

智能网卡已成为云计算领域至关重要的基础设备。智能网卡可以完成网络虚拟化的转换工作,以使裸金属服务器或虚拟机的用户可以像使用普通网卡一样使用智能网卡。Smart NICs have become crucial infrastructure equipment in the field of cloud computing. Smart NICs can complete the transformation of network virtualization, so that users of bare metal servers or virtual machines can use smart NICs like ordinary NICs.

图1示意性示出了根据本公开实施例的DDOS攻击的抵抗方法、装置、智能网卡、介质及产品的应用场景图。Fig. 1 schematically shows an application scene diagram of a DDOS attack resistance method, device, smart network card, medium and product according to an embodiment of the present disclosure.

如图1所示,本公开实施例的智能网卡在抵抗DDOS攻击的过程中,接收客户端发送给该服务器的访问请求包,判断该访问请求包是否受到DDOS攻击,在该访问请求包受到DDOS攻击的情况下,对该访问请求包做出响应。一方面,通过智能网卡使用硬件实现回复,相比于防火墙服务器性能会更高,另一方面,将响应操作集成到智能网卡中,不再需要单独配置一台服务器充当防火墙机制,智能网卡直接回复访问请求包,不需要将访问请求包上传服务器,不占用服务器资源,有效抵抗DDOS攻击。As shown in Figure 1, in the process of resisting DDOS attacks, the smart network card of the embodiment of the present disclosure receives the access request packet sent by the client to the server, and judges whether the access request packet is attacked by DDOS. In the case of an attack, respond to the access-request packet. On the one hand, the smart network card uses hardware to implement the reply, which will have higher performance than the firewall server. On the other hand, the response operation is integrated into the smart network card, no longer need to configure a separate server to act as a firewall mechanism, and the smart network card can directly reply The access request package does not need to upload the access request package to the server, does not occupy server resources, and effectively resists DDOS attacks.

以下将基于图1描述的场景,通过图2~图6对公开实施例的DDOS攻击的抵抗方法进行详细描述。Based on the scenario described in FIG. 1 , the DDOS attack resistance method of the disclosed embodiment will be described in detail below through FIGS. 2 to 6 .

图2示意性示出了根据本公开实施例的DDOS攻击的抵抗方法的流程图。Fig. 2 schematically shows a flowchart of a method for resisting DDOS attacks according to an embodiment of the present disclosure.

如图2所示,该实施例的DDOS攻击的抵抗方法应用于智能网卡,该智能网卡设置于服务器,该实施例的DDOS攻击的抵抗方法包括操作S210~操作S230。As shown in FIG. 2 , the method for resisting DDOS attacks in this embodiment is applied to the smart network card, and the smart network card is set on a server. The method for resisting DDOS attacks in this embodiment includes operation S210 to operation S230 .

在操作S210,接收客户端发送给该服务器的访问请求包。In operation S210, an access request packet sent by the client to the server is received.

在操作S220,判断该访问请求包是否受到DDOS攻击;In operation S220, it is judged whether the access request packet is attacked by DDOS;

在操作S230,在该访问请求包受到DDOS攻击的情况下,对该访问请求包做出响应。In operation S230, respond to the access request packet in case the access request packet is under DDOS attack.

在本公开一实施例中,在该访问请求包没有受到DDOS攻击的情况下,将该访问请求包上传给该服务器。In an embodiment of the present disclosure, when the access request packet is not attacked by DDOS, the access request packet is uploaded to the server.

最常见的DDOS攻击方式为Flood攻击,又称洪流攻击、泛洪攻击。Flood攻击的类型包括Internet控制报文协议(ICMP,Internet Control Message Protocol)类型和传输控制协议(TCP,Transmission Control Protocol)类型。该两种类型都是通过发送海量的相关报文,占用服务器资源,致使服务不可用。具体的,ICMP类型的Flood攻击是指攻击者不停发送ICMP_ECHO REQEST报文。TCP类型的Flood攻击是指攻击者不停发送syn,syn_ack,ack等报文。The most common DDOS attack method is Flood attack, also known as flood attack and flood attack. Flood attack types include Internet Control Message Protocol (ICMP, Internet Control Message Protocol) type and Transmission Control Protocol (TCP, Transmission Control Protocol) type. These two types occupy server resources by sending a large number of related messages, making the service unavailable. Specifically, an ICMP-type Flood attack means that the attacker keeps sending ICMP_ECHO REQEST packets. The TCP type of Flood attack means that the attacker keeps sending syn, syn_ack, ack and other packets.

在本公开一实施例中,操作S230中对该访问请求包做出响应包括:解析该访问请求包的协议类型,该协议类型包括ICMP类型和TCP类型,在该协议类型为该ICMP类型的情况下,回复该访问请求包给该客户端,在该协议类型为该TCP类型的情况下,确定该访问请求包的连接阶段,根据该访问请求包的连接阶段,对该访问请求包做出响应。In an embodiment of the present disclosure, responding to the access request packet in operation S230 includes: analyzing the protocol type of the access request packet, the protocol type includes ICMP type and TCP type, and in the case where the protocol type is the ICMP type Next, reply the access request packet to the client, if the protocol type is the TCP type, determine the connection phase of the access request packet, and respond to the access request packet according to the connection phase of the access request packet .

ICMP是TCP/IP协议簇的一个子协议,用于在IP主机、路由器之间传递控制消息。控制消息是指网络通不通、主机是否可达、路由是否可用等网络本身的消息。ICMP传递差错报文及其它网络管理消息,被用于定位网络设备,确定源到端的跳数或往返时间等。ICMP is a sub-protocol of the TCP/IP protocol cluster, which is used to transfer control messages between IP hosts and routers. The control message refers to the message of the network itself such as whether the network is unreachable, whether the host is reachable, and whether the route is available. ICMP transmits error messages and other network management messages, which are used to locate network devices, determine the number of hops or round-trip time from source to end, etc.

攻击者实行ICMP类型的Flood攻击时,大量的ICMP类型的访问请求包发往服务器,几乎完全占据了服务器的连接资源,导致正常的TCP连接无法建立。本公开智能网卡接收客户端发送给该服务器的访问请求包,在该访问请求包受到DDOS攻击的情况下,且在智能网卡确定访问请求包的协议类型为ICMP类型的情况下,不将访问请求包上传给服务器,而是直接由智能网卡回复该访问请求包给客户端,不占用主机资源,有效抵抗了Flood攻击。When an attacker implements an ICMP flood attack, a large number of ICMP access request packets are sent to the server, which almost completely occupies the server's connection resources, resulting in the failure to establish a normal TCP connection. The smart network card of the present disclosure receives the access request packet sent by the client to the server. When the access request packet is attacked by DDOS and the smart network card determines that the protocol type of the access request packet is the ICMP type, the access request The packet is uploaded to the server, but the smart network card directly replies the access request packet to the client, which does not occupy host resources and effectively resists Flood attacks.

TCP是一种面向连接的、可靠的、基于字节流的运输层信协议。在TCP协议中,TCP协议提供可靠的连接服务,连接通过三次握手进行初始化。三次握手的目的是同步连接双方的序列号和确认号并交换TCP窗口大小信息。TCP is a connection-oriented, reliable, byte stream-based transport layer communication protocol. In the TCP protocol, the TCP protocol provides a reliable connection service, and the connection is initialized through a three-way handshake. The purpose of the three-way handshake is to synchronize the sequence numbers and confirmation numbers of both parties and exchange TCP window size information.

相关技术中,图3示意出了TCP三次握手建立连接的过程如下:首先,客户端发送一个SYN报文给服务器,该SYN报文中包含了本端的初始化序列号,同时设置本端的连接状态为SYN-SENT。然后,服务器收到同步报文后,给客户端回应SYN+ACK报文,该报文中包含本端的初始化序列号。同时设置本端连接状态为SYN-RCVD。最后,客户端收到服务器的SYN+ACK后,向服务器发送ACK报文进行确认,同时设置本端连接状态为ESTABLISHED状态。服务器收到ACK报文后设置本端连接状态为ESTABLISHED。三次握手的完成标志着一个TCP连接的成功建立。本公开智能网卡接收客户端发送给该服务器的访问请求包,在该访问请求包受到DDOS攻击的情况下,且在智能网卡确定访问请求包的协议类型为TCP类型的情况下,不将访问请求包上传给服务器,而是确定该访问请求包的连接阶段,根据该访问请求包的连接阶段,对该访问请求包做出响应,不占用主机资源,有效抵抗了Flood攻击。In related technologies, Fig. 3 illustrates the process of TCP three-way handshake to establish a connection as follows: first, the client sends a SYN message to the server, which contains the initialization sequence number of the local end, and sets the connection status of the local end to SYN-SENT. Then, after receiving the synchronization message, the server responds to the client with a SYN+ACK message, which contains the initialization sequence number of the local end. At the same time, set the connection status of the local end to SYN-RCVD. Finally, after receiving the SYN+ACK from the server, the client sends an ACK message to the server for confirmation, and at the same time sets the connection status of the local end to ESTABLISHED. After receiving the ACK message, the server sets the local connection status to ESTABLISHED. The completion of the three-way handshake marks the successful establishment of a TCP connection. The smart network card of the present disclosure receives the access request packet sent by the client to the server. When the access request packet is attacked by DDOS and the smart network card determines that the protocol type of the access request packet is the TCP type, it does not send the access request The packet is uploaded to the server, but the connection stage of the access request packet is determined, and the access request packet is responded to according to the connection stage of the access request packet, which does not occupy host resources and effectively resists Flood attacks.

图4示意性示出了根据本公开实施例的基于TCP类型第一次握手情况下的DDOS攻击的抵抗方法的流程图。Fig. 4 schematically shows a flow chart of a method for resisting DDOS attacks based on the first handshake of TCP type according to an embodiment of the present disclosure.

如图4所示,该实施例的DDOS攻击的抵抗方法应用于智能网卡,该智能网卡设置于服务器,该实施例的DDOS攻击的抵抗方法除了图2所示的操作S210~操作S230之外,还包括操作S410~操作S430。As shown in Figure 4, the DDOS attack resistance method of this embodiment is applied to the smart network card, and the smart network card is set on the server, and the DDOS attack resistance method of this embodiment is except operation S210~operation S230 shown in Figure 2, It also includes operation S410 to operation S430.

在操作S410,对于同一访问请求包,获取当前接收到的SYN报文及携带的Seq值、历史接收到的SYN报文及携带的Seq值。In operation S410, for the same access request packet, the currently received SYN message and the carried Seq value, the historically received SYN message and the carried Seq value are acquired.

在操作S420,判断是否存在一历史接收到的SYN报文及携带的Seq值与该当前接收到的SYN报文及携带的Seq值相同。In operation S420, it is determined whether there is a historically received SYN message and the carried Seq value is the same as the currently received SYN message and carried the Seq value.

在操作S430,在存在一历史接收到的SYN报文及携带的Seq值与该当前接收到的SYN报文及携带的Seq值相同的情况下,丢弃该收到的SYN报文。In operation S430, if there is a historically received SYN message and the carried Seq value are the same as the currently received SYN message and the carried Seq value, the received SYN message is discarded.

在操作S440,在不存在一历史接收到的SYN报文及携带的Seq值与该当前接收到的SYN报文及携带的Seq值相同的情况下,回复SYN报文和ACK报文给该客户端。In operation S440, if there is no SYN message received in history and the Seq value carried is the same as the currently received SYN message and the Seq value carried, reply the SYN message and the ACK message to the client end.

在TCP传输的数据中每一个字节都是按顺序编号的,序号(Sequence Number,SN/Seq)就是此次发送数据的第一个字节的序号。在一个TCP连接中传送的字节流中的每一个字节都按顺序编号。整个要传送的字节流的起始序号必须在连接建立时设置。首部中的序号字段值则是指的是本报文段所发送的数据的第一个字节的序号。例如,一报文段的序号是301,而接待的数据共有100字节。这就表明:本报文段的数据的第一个字节的序号是301,最后一个字节的序号是400。显然,下一个报文段(如果还有的话)的数据序号应当从401开始,即下一个报文段的序号字段值应为401。这个字段的序号也叫“报文段序号”。Each byte in the data transmitted by TCP is numbered in sequence, and the sequence number (Sequence Number, SN/Seq) is the sequence number of the first byte of the data sent this time. Each byte in the byte stream transmitted in a TCP connection is numbered sequentially. The starting sequence number of the entire byte stream to be transmitted must be set when the connection is established. The sequence number field value in the header refers to the sequence number of the first byte of the data sent in this message segment. For example, the sequence number of a message segment is 301, and the received data has a total of 100 bytes. This shows that: the serial number of the first byte of the data in this message segment is 301, and the serial number of the last byte is 400. Obviously, the data sequence number of the next message segment (if any) should start from 401, that is, the value of the sequence number field of the next message segment should be 401. The sequence number of this field is also called "segment sequence number".

根据本公开实施例,如果同一个TCP连接,收到了同样的SYN报文和重复的Seq值,则表示其为非法的报文,智能网卡会直接将其丢弃。如果同一个TCP连接,没有收到同样的SYN报文,则由智能网卡回复SYN报文和ACK报文给该客户端。According to the embodiment of the present disclosure, if the same SYN message and repeated Seq value are received for the same TCP connection, it indicates that it is an illegal message, and the intelligent network card will directly discard it. If the same TCP connection does not receive the same SYN message, the smart network card will reply the SYN message and ACK message to the client.

图5示意性示出了根据本公开实施例的基于TCP类型第二次握手情况下的DDOS攻击的抵抗方法的流程图。Fig. 5 schematically shows a flow chart of a method for resisting DDOS attacks based on a second handshake of TCP type according to an embodiment of the present disclosure.

如图5所示,该实施例的DDOS攻击的抵抗方法应用于智能网卡,该智能网卡设置于服务器,该实施例的DDOS攻击的抵抗方法除了图2所示的操作S210~操作S230之外,还包括操作S510~操作S540。As shown in Figure 5, the DDOS attack resistance method of this embodiment is applied to the smart network card, and the smart network card is set on the server, and the DDOS attack resistance method of this embodiment is except operation S210~operation S230 shown in Figure 2, It also includes operation S510 to operation S540.

在操作S510,构建半连接等待列表,该半连接等待列表用于存储预设阈值数量的SYN报文。In operation S510, a semi-join waiting list is constructed, and the semi-join waiting list is used to store a preset threshold number of SYN packets.

在操作S520,将接收到的SYN报文加入预设的半连接等待列表。In operation S520, the received SYN message is added to a preset semi-connect waiting list.

在操作S530,判断当前该半连接等待列表中的SYN报文的数量是否大于该阈值。In operation S530, it is determined whether the number of SYN packets currently in the semi-join waiting list is greater than the threshold.

在操作S540,在该半连接等待列表中的SYN报文的数量大于该阈值的情况下,将删除该半连接等待列表中的目标SYN报文。In operation S540, if the number of SYN packets in the semi-join waiting list is greater than the threshold, the target SYN packets in the semi-join waiting list will be deleted.

在本公开中,目标SYN报文可以是最先进入半连接等待列表的SYN报文,也可以是等待时间超过指定值的SYN报文,也可以是其它任意设定条件的报文,本公开对此不做限制,本实施例以目标SYN报文可以是最先进入半连接等待列表的SYN报文为例进行示意性说明。In this disclosure, the target SYN message may be the first SYN message that enters the semi-connection waiting list, or the SYN message whose waiting time exceeds a specified value, or any other message with any set conditions. There is no limitation on this, and the present embodiment takes the target SYN message as an example that the target SYN message enters the semi-join waiting list first as an example for schematic illustration.

在本公开中,服务器回复了SYN+ACK报文后。下一步,会分两种情况:第一种,合法连接,客户端返回了一个ACK报文,则整个TCP握手连接是一个合法连接,被上传到服务器进行后续连接和处理;第一种,半连接状态,客户端没有返回一个ACK报文。此时,客户端的此次发送的SYN报文并未被认定为合法请求,即半连接。In this disclosure, after the server replies with the SYN+ACK message. In the next step, there are two situations: the first one is a legal connection, and the client returns an ACK message, then the entire TCP handshake connection is a legal connection, which is uploaded to the server for subsequent connection and processing; the first one is a semi- In the connection state, the client does not return an ACK message. At this time, the SYN message sent by the client this time is not recognized as a legal request, that is, a semi-connection.

根据本公开实施例,智能网卡维护一半连接等待列表,用于存储和维护当前半连接的数目。对于半连状态的TCP连接,智能网卡会将其保存到智能网卡内部的半连接等待列表,等待后续处理。According to the embodiment of the present disclosure, the iNIC maintains a half-connection waiting list, which is used to store and maintain the current number of half-connections. For a TCP connection in the semi-connected state, the smart network card will save it to the semi-connection waiting list inside the smart network card, waiting for subsequent processing.

智能网卡将新加入半连接存储到半连接等待列表中,假定在一段时间内收到SYN报文的总个数记为SYN_COUNT,收到ACK报文的总个数记为ACK COUNT,则当前需要维护的半连接个数可以使用下面的公式得到:The smart network card stores the newly added semi-connection into the semi-connection waiting list. Assuming that the total number of SYN messages received within a period of time is recorded as SYN_COUNT, and the total number of received ACK messages is recorded as ACK COUNT, the current need The number of semi-joins maintained can be obtained using the following formula:

Nhalf=ACK_COUNT-SYN_COUNTN half = ACK_COUNT-SYN_COUNT

考虑时间窗口,使用公式Nhalf(Tw),可以得到当前一个时间窗口Tw内,存储的半连接的总个数。当一个时间窗口Tw,内的半连接个数如果超过事先设定的阈值Nth,即满足公式Nhalf(Tw)>Nth值,就会将半连接等待列表首部(最早进入等待列表)的半连接删除丢弃,然后再将新的半连接进入等待列表,保存在列表结尾。Considering the time window, using the formula N half (T w ), the total number of half-joins stored in the current time window T w can be obtained. When the number of half-joins in a time window T w exceeds the preset threshold N th , which satisfies the formula N half (T w ) > N th value, the head of the half-join waiting list (the earliest entry into the waiting list )’s semi-join is deleted and discarded, and then the new semi-join is entered into the waiting list and saved at the end of the list.

如果当前公式Nhalf(Tw)>Nth并不满足,即半连接等待列表未满,则无需将等待列表的首部元素删除。而是,直接将新的半连接进入等待列表,保存在等待列表的尾部即可。If the current formula N half (T w )>N th is not satisfied, that is, the half-join waiting list is not full, there is no need to delete the first element of the waiting list. Instead, directly enter the new semi-join into the waiting list and save it at the end of the waiting list.

在本公开一实施例中,在该访问请求包的连接阶段为第二次握手的情况下,在收到同一IP地址发送的SYN报文的情况下,丢弃该SYN报文。对于处于半连接状态的客户端会被记录在半连接等待列表。如果此时,收到该客户端同一个IP的SYN报文,智能网卡会直接丢弃,不作处理。防止一个IP同时建立多个半连接。In an embodiment of the present disclosure, when the connection phase of the access request packet is the second handshake, if the SYN message sent by the same IP address is received, the SYN message is discarded. For clients in the semi-connected state, they will be recorded in the semi-connected waiting list. If at this time, the SYN message from the same IP of the client is received, the smart network card will directly discard it without processing it. Prevent an IP from establishing multiple semi-connections at the same time.

由于还存在丢包的情况,可能到了一定时间SYN报文会累积很多,却全部都收不到ACK报文,实际上客户端已经回复SYN报文,只是在半路丢包了。在本公开一实施例中,可以采取定期或不定期的方式,将整个半连接等待列表清0。在一个示例中,定期以Treset为时间周期,将整个等待列表清0,同时将计数器SYN_COUNT、ACK_COUNT都清0,以保证不会陷入无限等待,死锁的状态。Due to packet loss, there may be a lot of SYN messages accumulated in a certain period of time, but none of the ACK messages are received. In fact, the client has already replied to the SYN message, but lost the packet halfway. In an embodiment of the present disclosure, the entire semi-join waiting list may be cleared to 0 in a regular or irregular manner. In one example, the entire waiting list is cleared to 0 periodically with T reset as the time period, and the counters SYN_COUNT and ACK_COUNT are cleared to 0 at the same time, so as to ensure that it will not fall into the state of infinite waiting and deadlock.

图6示意性示出了根据本公开实施例的基于TCP类型第三次握手情况下的DDOS攻击的抵抗方法的流程图。Fig. 6 schematically shows a flow chart of a method for resisting DDOS attacks based on the third handshake of TCP type according to an embodiment of the present disclosure.

如图6所示,该实施例的DDOS攻击的抵抗方法应用于智能网卡,该智能网卡设置于服务器,该实施例的DDOS攻击的抵抗方法除了图2所示的操作S210~操作S230之外,还包括操作S610~操作S630。As shown in Figure 6, the DDOS attack resistance method of this embodiment is applied to the smart network card, and the smart network card is set on the server, and the DDOS attack resistance method of this embodiment is except operation S210~operation S230 shown in Figure 2, It also includes operation S610 to operation S630.

在操作S610,获取当前接收到的ACK报文。In operation S610, the currently received ACK message is acquired.

在操作S620,从该半连接等待列表中查找与该ACK报文的五元组对应的SYN报文。In operation S620, the SYN message corresponding to the 5-tuple of the ACK message is searched from the semi-join waiting list.

在操作S630,在查找到与该ACK报文的五元组对应的SYN报文的情况下,从该半连接等待列表中移除该AK报文对应的SYN报文,完成该访问请求包的连接,并将该访问请求包的相关信息发送给该服务器。In operation S630, if the SYN message corresponding to the 5-tuple of the ACK message is found, the SYN message corresponding to the AK message is removed from the semi-join waiting list, and the access request packet is completed. Connect, and send the relevant information of the access request packet to the server.

服务器发送完SYN+ACK报文后,会建立一个半连接状态的socket套接口,同时会启动一个定时器,若在超时时间内未收到对方回应的ACK报文,服务器会进行超时重传SYN+ACK报文给客户端,因此,若客户端不停的发送SYN报文并对服务端回应的报文置之不理,会导致服务器不停的创建半连接状态的socket而耗尽资源,从而服务器无法处理正常的客户端的连接请求。After the server sends the SYN+ACK message, it will establish a semi-connected socket socket and start a timer at the same time. If the server does not receive an ACK message from the other party within the timeout period, the server will retransmit the SYN over time. +ACK message to the client, therefore, if the client keeps sending SYN messages and ignores the message that the server responds to, it will cause the server to create half-connected sockets and run out of resources, so that the server cannot Handle normal client connection requests.

当收到一个客户端的ACK包后,服务器端的网卡会从首部遍历一遍等待队列,如果找到对应五元组的TCP连接,则直接完成该TCP连接建立过程,并将其相关信息上传到服务器,由服务器进行后续的TCP连接处理和数据传输。After receiving an ACK packet from a client, the network card on the server will traverse the waiting queue from the header, and if it finds a TCP connection corresponding to the quintuple, it will directly complete the TCP connection establishment process, and upload its relevant information to the server. The server performs subsequent TCP connection processing and data transmission.

图7示意性示出了根据本公开实施例的基于TCP类型情况下的DDOS攻击的抵抗方法的流程图。Fig. 7 schematically shows a flow chart of a method for resisting a DDOS attack based on a TCP type according to an embodiment of the present disclosure.

如图7所示,该实施例的DDOS攻击的抵抗方法应用于智能网卡,该智能网卡设置于服务器,该实施例的DDOS攻击的抵抗方法除了图2所示的操作S210~操作S230之外,还包括操作S610~操作S620。As shown in Figure 7, the DDOS attack resistance method of this embodiment is applied to the smart network card, and the smart network card is set on the server, and the DDOS attack resistance method of this embodiment is in addition to operation S210~operation S230 shown in Figure 2, It also includes operation S610 to operation S620.

在操作S710,在该协议类型为该TCP类型的情况下,判断该访问请求包是否具有RST位。In operation S710, if the protocol type is the TCP type, it is determined whether the access request packet has an RST bit.

在操作S720,在该访问请求包具有RST位的情况下,丢弃该访问请求包。In operation S720, in case the access request packet has the RST bit, the access request packet is discarded.

RST表示复位,用来关闭异常的连接。在一示例中,A和B之间建立了TCP连接,如果此时C伪造了一个TCP类型的访问请求包发给B,使B异常的断开了与A之间的TCP连接,则其就是RST攻击。RST means reset, which is used to close abnormal connections. In an example, a TCP connection is established between A and B. If C forges a TCP-type access request packet and sends it to B, so that B abnormally disconnects the TCP connection with A, then it is RST attack.

本公开在该协议类型为该TCP类型的情况下,智能网卡判断该访问请求包是否具有RST位,在该访问请求包具有RST位的情况下,智能网卡丢弃该访问请求包,以此解决TCP类型的RST攻击的问题。In the present disclosure, when the protocol type is the TCP type, the smart network card judges whether the access request packet has an RST bit, and if the access request packet has an RST bit, the smart network card discards the access request packet, thereby solving the TCP type of RST attack in question.

基于上述DDOS攻击的抵抗方法,本公开还提供了一种DDOS攻击的抵抗装置。以下将结合图8对该装置进行详细描述。Based on the above DDOS attack resistance method, the present disclosure also provides a DDOS attack resistance device. The device will be described in detail below with reference to FIG. 8 .

图8示意性示出了根据本公开实施例的DDOS攻击的抵抗装置的结构框图。FIG. 8 schematically shows a structural block diagram of a device for resisting DDOS attacks according to an embodiment of the present disclosure.

如图8所示,该实施例的DDOS攻击的抵抗装置应用于智能网卡,该智能网卡设置于服务器,其包括接收模块810、判断模块820和响应模块830。As shown in FIG. 8 , the DDOS attack resistance device of this embodiment is applied to an intelligent network card, which is set on a server and includes a receiving module 810 , a judging module 820 and a responding module 830 .

接收模块810用于接收客户端发送给该服务器的访问请求包。在一实施例中,接收模块810可以用于执行前文描述的操作S210,在此不再赘述。The receiving module 810 is configured to receive the access request packet sent by the client to the server. In an embodiment, the receiving module 810 may be configured to perform operation S210 described above, which will not be repeated here.

判断模块820用于判断该访问请求包是否受到DDOS攻击。在一实施例中,判断模块820可以用于执行前文描述的操作S220,在此不再赘述。The judging module 820 is used for judging whether the access request packet is attacked by DDOS. In an embodiment, the judging module 820 may be configured to perform the operation S220 described above, which will not be repeated here.

响应模块830用于在该访问请求包受到DDOS攻击的情况下,对该访问请求包做出响应。在一实施例中,响应模块830可以用于执行前文描述的操作S230,在此不再赘述。The response module 830 is configured to respond to the access request packet when the access request packet is under DDOS attack. In an embodiment, the response module 830 may be configured to perform the operation S230 described above, which will not be repeated here.

在本公开一实施例中,该响应模块830包括:In an embodiment of the present disclosure, the response module 830 includes:

解析模块,用于解析该访问请求包的协议类型,该协议类型包括ICMP类型和TCP类型;A parsing module, configured to parse the protocol type of the access request packet, the protocol type including ICMP type and TCP type;

第一回复模块,用于在该协议类型为该ICMP类型的情况下,回复该访问请求包给该客户端;A first reply module, configured to reply the access request packet to the client when the protocol type is the ICMP type;

第二回复模块,用于在该协议类型为该TCP类型的情况下,确定该访问请求包的连接阶段,根据该访问请求包的连接阶段,对该访问请求包做出响应。The second reply module is configured to determine the connection phase of the access request packet when the protocol type is the TCP type, and respond to the access request packet according to the connection phase of the access request packet.

在本公开一实施例中,在该访问请求包的连接阶段为第一次握手的情况下,该根据该访问请求包的连接阶段,对该访问请求包做出响应包括:In an embodiment of the present disclosure, when the connection phase of the access request packet is the first handshake, the response to the access request packet according to the connection phase of the access request packet includes:

对于同一访问请求包,获取当前接收到的SYN报文及携带的Seq值、历史接收到的SYN报文及携带的Seq值;For the same access request packet, obtain the currently received SYN message and the carried Seq value, the historically received SYN message and the carried Seq value;

判断是否存在一历史接收到的SYN报文及携带的Seq值与该当前接收到的SYN报文及携带的Seq值相同;Judging whether there is a SYN message received in history and the Seq value carried is the same as the currently received SYN message and the Seq value carried;

在存在一历史接收到的SYN报文及携带的Seq值与该当前接收到的SYN报文及携带的Seq值相同的情况下,丢弃该收到的SYN报文;When there is a SYN message received in history and the Seq value carried is the same as the currently received SYN message and the Seq value carried, the received SYN message is discarded;

在不存在一历史接收到的SYN报文及携带的Seq值与该当前接收到的SYN报文及携带的Seq值相同的情况下,回复SYN报文和ACK报文给该客户端。If there is no historically received SYN message and the carried Seq value are the same as the currently received SYN message and the carried Seq value, reply the SYN message and the ACK message to the client.

在本公开一实施例中,在该访问请求包的连接阶段为第二次握手的情况下,该根据该访问请求包的连接阶段,对该访问请求包做出响应包括:In an embodiment of the present disclosure, when the connection phase of the access request packet is the second handshake, the response to the access request packet according to the connection phase of the access request packet includes:

构建半连接等待列表,该半连接等待列表用于存储预设阈值数量的SYN报文;Build a semi-join waiting list, which is used to store SYN messages with a preset threshold number;

将接收到的SYN报文加入预设的半连接等待列表;Add the received SYN message to the preset semi-connection waiting list;

判断当前该半连接等待列表中的SYN报文的数量是否大于该阈值;Judging whether the number of SYN messages in the current semi-join waiting list is greater than the threshold;

在该半连接等待列表中的SYN报文的数量大于该阈值的情况下,将删除该半连接等待列表中的目标SYN报文。If the number of SYN packets in the semi-join waiting list is greater than the threshold, the target SYN packets in the semi-join waiting list will be deleted.

在本公开一实施例中,在该访问请求包的连接阶段为第二次握手的情况下,该装置还包括:In an embodiment of the present disclosure, when the connection phase of the access request packet is the second handshake, the device further includes:

丢弃模块,用于在收到同一IP地址发送的SYN报文的情况下,丢弃该SYN报文。The discarding module is used for discarding the SYN message when receiving the SYN message sent by the same IP address.

在本公开一实施例中,在该访问请求包的连接阶段为第三次握手的情况下,该根据该访问请求包的连接阶段,对该访问请求包做出响应包括:In an embodiment of the present disclosure, when the connection phase of the access request packet is the third handshake, the response to the access request packet according to the connection phase of the access request packet includes:

获取当前接收到的ACK报文;Obtain the currently received ACK message;

从该半连接等待列表中查找与该ACK报文的五元组对应的SYN报文;Find the SYN message corresponding to the five-tuple of the ACK message from the semi-join waiting list;

在查找到与该ACK报文的五元组对应的SYN报文的情况下,从该半连接等待列表中移除该AK报文对应的SYN报文,完成该访问请求包的连接,并将该访问请求包的相关信息发送给该服务器。When the SYN message corresponding to the five-tuple of the ACK message is found, the SYN message corresponding to the AK message is removed from the semi-join waiting list, the connection of the access request packet is completed, and the The relevant information of the access request packet is sent to the server.

在本公开一实施例中,该装置还包括:In an embodiment of the present disclosure, the device further includes:

在该协议类型为该TCP类型的情况下,判断该访问请求包是否具有RST位;When the protocol type is the TCP type, determine whether the access request packet has an RST bit;

在该访问请求包具有RST位的情况下,丢弃该访问请求包。In the case where the access request packet has the RST bit, the access request packet is discarded.

在本公开一实施例中,该装置还包括:In an embodiment of the present disclosure, the device further includes:

上传模块,用于在该访问请求包没有受到DDOS攻击的情况下,将该访问请求包上传给该服务器。The upload module is used to upload the access request packet to the server when the access request packet is not attacked by DDOS.

根据本公开的实施例,接收模块810、判断模块820和响应模块830中的任意多个模块可以合并在一个模块中实现,或者其中的任意一个模块可以被拆分成多个模块。或者,这些模块中的一个或多个模块的至少部分功能可以与其他模块的至少部分功能相结合,并在一个模块中实现。根据本公开的实施例,接收模块810、判断模块820和响应模块830中的至少一个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式等硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,接收模块810、判断模块820和响应模块830中的至少一个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。According to the embodiment of the present disclosure, any multiple modules of the receiving module 810 , the judging module 820 and the responding module 830 may be implemented in one module, or any one of the modules may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the receiving module 810, the judging module 820, and the responding module 830 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), A system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuits, such as hardware or firmware, or in a combination of software, hardware, and firmware Any one of these implementations or an appropriate combination of any of them. Alternatively, at least one of the receiving module 810, the judging module 820 and the responding module 830 may be at least partially implemented as a computer program module, and when the computer program module is executed, corresponding functions may be performed.

图9示意性示出了根据本公开实施例的适于实现DDOS攻击的抵抗方法的智能网卡的方框图。Fig. 9 schematically shows a block diagram of an intelligent network card suitable for implementing a DDOS attack resistance method according to an embodiment of the present disclosure.

如图9所示,根据本公开实施例的智能网卡400包括处理器401,其可以根据存储在只读存储器(ROM)402中的程序或者从存储部分408加载到随机访问存储器(RAM)403中的程序而执行各种适当的动作和处理。处理器401例如可以包括通用微处理器(例如CPU)、指令集处理器和/或相关芯片组和/或专用微处理器(例如,专用集成电路(ASIC))等等。处理器401还可以包括用于缓存用途的板载存储器。处理器401可以包括用于执行根据本公开实施例的方法流程的不同动作的单一处理单元或者是多个处理单元。As shown in FIG. 9, an intelligent network card 400 according to an embodiment of the present disclosure includes a processor 401, which can be loaded into a random access memory (RAM) 403 according to a program stored in a read-only memory (ROM) 402 or from a storage part 408. Various appropriate actions and processing are performed by the program. The processor 401 may include, for example, a general-purpose microprocessor (eg, a CPU), an instruction set processor and/or a related chipset, and/or a special-purpose microprocessor (eg, an application-specific integrated circuit (ASIC)), and the like. Processor 401 may also include on-board memory for caching purposes. The processor 401 may include a single processing unit or a plurality of processing units for executing different actions of the method flow according to the embodiments of the present disclosure.

在RAM 403中,存储有智能网卡400操作所需的各种程序和数据。处理器401、ROM402以及RAM 403通过总线404彼此相连。处理器401通过执行ROM 402和/或RAM 403中的程序来执行根据本公开实施例的方法流程的各种操作。需要注意,所述程序也可以存储在除ROM 402和RAM 403以外的一个或多个存储器中。处理器401也可以通过执行存储在所述一个或多个存储器中的程序来执行根据本公开实施例的方法流程的各种操作。In the RAM 403, various programs and data necessary for the operation of the smart network card 400 are stored. The processor 401 , ROM 402 and RAM 403 are connected to each other through a bus 404 . The processor 401 executes various operations according to the method flow of the embodiment of the present disclosure by executing programs in the ROM 402 and/or RAM 403 . It should be noted that the program may also be stored in one or more memories other than ROM 402 and RAM 403 . The processor 401 may also perform various operations according to the method flow of the embodiments of the present disclosure by executing programs stored in the one or more memories.

根据本公开的实施例,智能网卡400还可以包括输入/输出(I/O)接口405,输入/输出(I/O)接口405也连接至总线404。电子设备400还可以包括连接至I/O接口405的以下部件中的一项或多项:包括键盘、鼠标等的输入部分406;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分407;包括硬盘等的存储部分408;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分409。通信部分409经由诸如因特网的网络执行通信处理。驱动器410也根据需要连接至I/O接口405。可拆卸介质411,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器410上,以便于从其上读出的计算机程序根据需要被安装入存储部分408。According to an embodiment of the present disclosure, the smart network card 400 may further include an input/output (I/O) interface 405 , and the input/output (I/O) interface 405 is also connected to the bus 404 . The electronic device 400 may also include one or more of the following components connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, etc.; including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. An output section 407 of a speaker or the like; a storage section 408 including a hard disk or the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 410 as necessary so that a computer program read therefrom is installed into the storage section 408 as necessary.

在本公开一实施例中,处理器401为神经网络处理器(NPU,Neural networkProcessing Unit)。In an embodiment of the present disclosure, the processor 401 is a Neural Network Processing Unit (NPU).

本公开还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例中描述的设备/装置/系统中所包含的;也可以是单独存在,而未装配入该设备/装置/系统中。上述计算机可读存储介质承载有一个或者多个程序,当上述一个或者多个程序被执行时,实现根据本公开实施例的方法。The present disclosure also provides a computer-readable storage medium. The computer-readable storage medium may be included in the device/apparatus/system described in the above embodiments; it may also exist independently without being assembled into the device/system device/system. The above-mentioned computer-readable storage medium carries one or more programs, and when the above-mentioned one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

根据本公开的实施例,计算机可读存储介质可以是非易失性的计算机可读存储介质,例如可以包括但不限于:便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。例如,根据本公开的实施例,计算机可读存储介质可以包括上文描述的ROM402和/或RAM403和/或ROM402和RAM403以外的一个或多个存储器。According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as may include but not limited to: portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM) , erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include ROM402 and/or RAM403 and/or one or more memories other than ROM402 and RAM403 described above.

本公开的实施例还包括一种计算机程序产品,其包括计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。当计算机程序产品在计算机系统中运行时,该程序代码用于使计算机系统实现本公开实施例所提供的方法。Embodiments of the present disclosure also include a computer program product, which includes a computer program including program codes for executing the methods shown in the flowcharts. When the computer program product runs in the computer system, the program code is used to make the computer system realize the method provided by the embodiments of the present disclosure.

在该计算机程序被处理器401执行时执行本公开实施例的系统/装置中限定的上述功能。根据本公开的实施例,上文描述的系统、装置、模块、单元等可以通过计算机程序模块来实现。When the computer program is executed by the processor 401, the above-mentioned functions defined in the system/apparatus of the embodiment of the present disclosure are performed. According to the embodiments of the present disclosure, the above-described systems, devices, modules, units, etc. may be implemented by computer program modules.

在一种实施例中,该计算机程序可以依托于光存储器件、磁存储器件等有形存储介质。在另一种实施例中,该计算机程序也可以在网络介质上以信号的形式进行传输、分发,并通过通信部分409被下载和安装,和/或从可拆卸介质411被安装。该计算机程序包含的程序代码可以用任何适当的网络介质传输,包括但不限于:无线、有线等等,或者上述的任意合适的组合。In one embodiment, the computer program may rely on tangible storage media such as optical storage devices and magnetic storage devices. In another embodiment, the computer program can also be transmitted and distributed in the form of a signal on a network medium, downloaded and installed through the communication part 409, and/or installed from the removable medium 411. The program code contained in the computer program can be transmitted by any appropriate network medium, including but not limited to: wireless, wired, etc., or any appropriate combination of the above.

在这样的实施例中,该计算机程序可以通过通信部分409从网络上被下载和安装,和/或从可拆卸介质411被安装。在该计算机程序被处理器401执行时,执行本公开实施例的系统中限定的上述功能。根据本公开的实施例,上文描述的系统、设备、装置、模块、单元等可以通过计算机程序模块来实现。In such an embodiment, the computer program may be downloaded and installed from a network via communication portion 409 and/or installed from removable media 411 . When the computer program is executed by the processor 401, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to the embodiments of the present disclosure, the above-described systems, devices, devices, modules, units, etc. may be implemented by computer program modules.

根据本公开的实施例,可以以一种或多种程序设计语言的任意组合来编写用于执行本公开实施例提供的计算机程序的程序代码,具体地,可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。程序设计语言包括但不限于诸如Java,C++,python,“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。According to the embodiments of the present disclosure, the program codes for executing the computer programs provided by the embodiments of the present disclosure can be written in any combination of one or more programming languages, specifically, high-level procedural and/or object-oriented programming language, and/or assembly/machine language to implement these computing programs. Programming languages include, but are not limited to, programming languages such as Java, C++, python, "C" or similar programming languages. The program code can execute entirely on the user computing device, partly on the user device, partly on the remote computing device, or entirely on the remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (for example, using an Internet service provider). business to connect via the Internet).

附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that includes one or more logical functions for implementing specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block in the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a A combination of dedicated hardware and computer instructions.

本领域技术人员可以理解,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合或/或结合,即使这样的组合或结合没有明确记载于本公开中。特别地,在不脱离本公开精神和教导的情况下,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合。所有这些组合和/或结合均落入本公开的范围。Those skilled in the art can understand that various combinations and/or combinations of the features described in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the various embodiments of the present disclosure and/or the features described in the claims can be combined and/or combined in various ways. All such combinations and/or combinations fall within the scope of the present disclosure.

以上对本公开的实施例进行了描述。但是,这些实施例仅仅是为了说明的目的,而并非为了限制本公开的范围。尽管在以上分别描述了各实施例,但是这并不意味着各个实施例中的措施不能有利地结合使用。本公开的范围由所附权利要求及其等同物限定。不脱离本公开的范围,本领域技术人员可以做出多种替代和修改,这些替代和修改都应落在本公开的范围之内。The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the various embodiments have been described separately above, this does not mean that the measures in the various embodiments cannot be advantageously used in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of the present disclosure, and these substitutions and modifications should all fall within the scope of the present disclosure.

Claims (12)

1. The DDOS attack resistance method is characterized by being applied to an intelligent network card, wherein the intelligent network card is arranged on a server, and the method comprises the following steps:
Receiving an access request packet sent to the server by a client;
judging whether the access request packet is attacked by DDOS or not;
in the event that the access request packet is under DDOS attack, responding to the access request packet.
2. The method of claim 1, wherein said responding to said access request packet comprises:
analyzing the protocol type of the access request packet, wherein the protocol type comprises an ICMP type and a TCP type;
replying the access request packet to the client under the condition that the protocol type is the ICMP type;
and under the condition that the protocol type is the TCP type, determining the connection stage of the access request packet, and responding to the access request packet according to the connection stage of the access request packet.
3. The method according to claim 2, wherein in the case where the connection phase of the access request packet is a first handshake, the responding to the access request packet according to the connection phase of the access request packet includes:
for the same access request packet, acquiring a currently received SYN message and a carried Seq value, and a historically received SYN message and a carried Seq value;
Judging whether a SYN message received in a history and a carried Seq value exist, wherein the SYN message received in the history and the carried Seq value are the same as the SYN message received in the current;
discarding the received SYN message under the condition that a historical received SYN message and a carried Seq value are the same as the current received SYN message and the carried Seq value exist;
and replying the SYN message and the ACK message to the client under the condition that a SYN message received in history and a carried Seq value are not present and are the same as the SYN message received currently and the carried Seq value.
4. The method of claim 2, wherein, in the case where the connection phase of the access request packet is a second handshake, the responding to the access request packet according to the connection phase of the access request packet comprises:
constructing a semi-connection waiting list, wherein the semi-connection waiting list is used for storing SYN messages with preset threshold quantity;
adding the received SYN message into a preset semi-connection waiting list;
judging whether the number of SYN messages in the current semi-connection waiting list is larger than the threshold value or not;
and deleting the target SYN message in the semi-connection waiting list under the condition that the number of SYN messages in the semi-connection waiting list is larger than the threshold value.
5. The method of claim 4, wherein in the case where the connection phase of the access request packet is a second handshake, the method further comprises:
and discarding the SYN message under the condition of receiving the SYN message sent by the same IP address.
6. The method according to claim 4, wherein in the case where the connection phase of the access request packet is a third handshake, the responding to the access request packet according to the connection phase of the access request packet comprises:
acquiring a currently received ACK message;
searching SYN messages corresponding to the five-tuple of the ACK message from the semi-connection waiting list;
and under the condition that the SYN message corresponding to the five-tuple of the ACK message is found, removing the SYN message corresponding to the AK message from the semi-connection waiting list, completing the connection of the access request packet, and sending the related information of the access request packet to the server.
7. A method of combating a DDOS attack according to claim 2, wherein said method further comprises:
judging whether the access request packet has a RST bit or not under the condition that the protocol type is the TCP type;
In the case where the access request packet has a RST bit, the access request packet is discarded.
8. The method of combatting a DDOS attack of claim 1, further comprising:
and uploading the access request packet to the server under the condition that the access request packet is not attacked by the DDOS.
9. The utility model provides a resistance device of DDOS attack, its characterized in that is applied to intelligent network card, intelligent network card sets up in the server, includes:
the receiving module is used for receiving an access request packet sent to the server by the client;
the judging module is used for judging whether the access request packet is attacked by the DDOS or not;
and the response module is used for responding to the access request packet under the condition that the access request packet is attacked by the DDOS.
10. An intelligent network card, comprising:
one or more processors;
storage means for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-8.
11. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1-8.
12. A computer program product comprising a computer program which, when executed by a processor, causes the processor to perform the method according to any one of claims 1 to 8.
CN202310037310.XA 2023-01-10 2023-01-10 DDOS attack resistance method, device, smart network card, medium and product Pending CN116232690A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310037310.XA CN116232690A (en) 2023-01-10 2023-01-10 DDOS attack resistance method, device, smart network card, medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310037310.XA CN116232690A (en) 2023-01-10 2023-01-10 DDOS attack resistance method, device, smart network card, medium and product

Publications (1)

Publication Number Publication Date
CN116232690A true CN116232690A (en) 2023-06-06

Family

ID=86585128

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310037310.XA Pending CN116232690A (en) 2023-01-10 2023-01-10 DDOS attack resistance method, device, smart network card, medium and product

Country Status (1)

Country Link
CN (1) CN116232690A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117596014A (en) * 2023-10-18 2024-02-23 北京火山引擎科技有限公司 Data processing methods, devices, equipment and storage media

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9350758B1 (en) * 2013-09-27 2016-05-24 Emc Corporation Distributed denial of service (DDoS) honeypots
CN106453419A (en) * 2016-12-07 2017-02-22 东软集团股份有限公司 Method and device for recognizing source IP address legality and for network attack defense
CN109245955A (en) * 2017-07-10 2019-01-18 阿里巴巴集团控股有限公司 A kind of data processing method, device and server
CN112887210A (en) * 2021-01-06 2021-06-01 新华三大数据技术有限公司 Flow table management method and device
CN114598677A (en) * 2020-11-20 2022-06-07 中国电信股份有限公司 CDN scheduling method and system, intelligent network card and electronic equipment
CN115412300A (en) * 2022-08-02 2022-11-29 浙江工业大学 A DDoS Attack Detection Method Based on Edge Firewall

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9350758B1 (en) * 2013-09-27 2016-05-24 Emc Corporation Distributed denial of service (DDoS) honeypots
CN106453419A (en) * 2016-12-07 2017-02-22 东软集团股份有限公司 Method and device for recognizing source IP address legality and for network attack defense
CN109245955A (en) * 2017-07-10 2019-01-18 阿里巴巴集团控股有限公司 A kind of data processing method, device and server
CN114598677A (en) * 2020-11-20 2022-06-07 中国电信股份有限公司 CDN scheduling method and system, intelligent network card and electronic equipment
CN112887210A (en) * 2021-01-06 2021-06-01 新华三大数据技术有限公司 Flow table management method and device
CN115412300A (en) * 2022-08-02 2022-11-29 浙江工业大学 A DDoS Attack Detection Method Based on Edge Firewall

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SEBASTIANO MIANO, ET.AL: "Introducing_SmartNICs_in_Server-Based_Data_Plane_P", IEEE, 19 August 2019 (2019-08-19) *
架构师技术联盟: "为什么需要智能网卡", 微信公众号, 28 June 2022 (2022-06-28), pages 1 - 5 *
赵静等: "云网融合背景下智能网卡的产业发展及趋势分析_赵静", 云网融合技术与产业研究, 31 December 2022 (2022-12-31) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117596014A (en) * 2023-10-18 2024-02-23 北京火山引擎科技有限公司 Data processing methods, devices, equipment and storage media
CN117596014B (en) * 2023-10-18 2024-12-13 北京火山引擎科技有限公司 Data processing method, device, equipment and storage medium
US12284196B1 (en) 2023-10-18 2025-04-22 Beijing Volcano Engine Technology Co., Ltd. Data processing method, device, and storage medium

Similar Documents

Publication Publication Date Title
US7738495B2 (en) Method of determining a maximum transmission unit value of a network path using transport layer feedback
US7571479B2 (en) Denial of service defense by proxy
US7266754B2 (en) Detecting network denial of service attacks
CN115499230B (en) Network attack detection method and device, equipment and storage medium
US7817560B2 (en) Acknowledging packet receipt based on expected size of sender's congestion window
CN110266678B (en) Security attack detection method and device, computer equipment and storage medium
US9516114B2 (en) Data packet transmission method and related device and system
CN108737447B (en) User datagram protocol flow filtering method, device, server and storage medium
CN108111509B (en) data transfer method
WO2016110273A1 (en) System and method for limiting access request
WO2017124985A1 (en) Data transmission method and related device
US10834126B2 (en) Method and system for processing forged TCP packet
WO2022100001A1 (en) Network security protection method and protection device
US20250274398A1 (en) Sequence Number Synchronization Method and Apparatus
CN109756475B (en) Data transmission method and device in unidirectional network
CN116232690A (en) DDOS attack resistance method, device, smart network card, medium and product
CN104780178B (en) A kind of connection management method for being used to prevent that TCP from attacking
CN112153001A (en) WAF-based network communication method, system, electronic device and storage medium
US20050198007A1 (en) Method, system and algorithm for dynamically managing a connection context database
KR20130022089A (en) Method for releasing tcp connections against distributed denial of service attacks and apparatus for the same
US20220030011A1 (en) Demand management of sender of network traffic flow
CN114697088A (en) Method and device for determining network attack and electronic equipment
CN116032807A (en) Detection method, detection device, electronic equipment and storage medium
CN114124489B (en) Method, cleaning device, equipment and medium for preventing flow attack
CN115801340B (en) HTTP2 protocol anomaly detection method, system, medium and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination