IP Library › Granted Patent US 10,834,125
Granted Patent B2
US 10,834,125 · App. 16/351,199 · Granted Nov 10, 2020

Method for defending against attack, defense device, and computer readable storage medium

Inventors: Haohao Zhang (Shenzhen, CN); Shuai Jin (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
H04L63/1458H04L63/0236H04L63/1416H04L63/30H04L69/164H04L2463/141H04L2463/142
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,834,125
App. No.
16/351,199
Granted
Nov 10, 2020
Kind
B2
Abstract

Embodiments of the present disclosure disclose a method for defending against a User Datagram Protocol (UDP) attack and a defense device. The method is implemented by a defense device, the defense device comprising a memory, a processor, and a bus system. The method comprising: detecting, by the defense device, whether a target host is attacked by a UDP attack from an attack device; obtaining, by the defense device, an Internet Control Message Protocol (ICMP) data packet sent back by the target host to the attack device, in response to the target host being attacked by the attack device; extracting, by the defense device, information about target ports in the ICMP data packet; and performing, by the defense device according to the information about the target ports, interception processing on UDP data packets sent by the attack device to the target ports.

Claims (40)

1. A method for defending against a User Datagram Protocol (UDP) attack, the method being implemented by a defense device, the defense device comprising a memory, a processor, and a bus system, the memory being configured to store a computer program, the processor being configured to execute the computer program, the bus system being configured to connect the memory and the processor, to cause the memory to communicate with the processor, and the method comprising:

detecting, by the defense device, whether a target host is attacked by a UDP attack from an attack device;

obtaining, by the defense device, an Internet Control Message Protocol (ICMP) data packet sent back by the target host to the attack device, in response to detecting that the target host being attacked by the attack device;

extracting, by the defense device, information about target ports in the ICMP data packet;

determining, by the defense device, whether distribution of attacks on the target ports is a centralized distribution or a dispersed distribution according to a quantity of the target ports being attacked; and

performing, by the defense device according to the information about the target ports, interception processing on UDP data packets sent by the attack device to the target ports, comprising:

in response to determining that the distribution of the attacks on the target ports is the dispersed distribution: limiting, by the defense device, traffic of the UDP data packets allowed to pass through the target ports within a first threshold, or randomly discarding, by the defense device, at least one of the UDP data packets sent to the target ports; and

in response to determining that the distribution of the attacks on the target ports is the centralized distribution, discarding, by the defense device, the UDP data packets sent to the target ports.

2. The method according to claim 1 , wherein the detecting, by the defense device, whether a target host is attacked by a UDP attack from an attack device comprises:

monitoring, by the defense device, the number of UDP data packets received by the target host per unit time; and

determining, by the defense device, that the target host is attacked by the UDP attack from the attack device, if the number of UDP data packets is greater than a second threshold.

3. A defense device, comprising a memory and a processor;

the memory being configured to store a computer program; and the processor being configured to execute the computer program in the memory, to specifically perform:

detecting whether a target host is attacked by a User Datagram Protocol (UDP) attack from an attack device;

obtaining an Internet Control Message Protocol (ICMP) data packet sent back by the target host to the attack device, when detecting that the target host is attacked by the UDP attack from the attack device;

extracting information about target ports in the ICMP data packet;

determining whether distribution of attacks on the target ports is a centralized distribution or a dispersed distribution according to a quantity of the target ports being attacked; and

performing, according to the information about the target ports, interception processing on UDP data packets sent by the attack device to the target ports, comprising:

in response to determining that the distribution of the attacks on the target ports is the dispersed distribution: limiting, by the defense device, traffic of the UDP data packets allowed to pass through the target ports within a first threshold, or randomly discarding, by the defense device, at least one of the UDP data packets sent to the target ports; and

in response to determining that the distribution of the attacks on the target ports is the centralized distribution, discarding, by the defense device, the UDP data packets sent to the target ports.

4. The defense device according to claim 3 , wherein the detecting whether a target host is attacked by a UDP attack from an attack device comprises:

monitoring, by the defense device, the number of UDP data packets received by the target host per unit time; and

determining, by the defense device, that the target host is attacked by the UDP attack from the attack device, if the number of UDP data packets is greater than a second threshold.

5. A non-transitory computer readable storage medium, storing a program instruction which, when being executed by a processor, causes the processor to perform:

detecting whether a target host is attacked by a User Datagram Protocol (UDP) attack from an attack device;

obtaining an Internet Control Message Protocol (ICMP) data packet sent back by the target host to the attack device, when detecting that the target host is attacked by the UDP attack from the attack device;

extracting information about target ports in the ICMP data packet;

determining whether distribution of attacks on the target ports is a centralized distribution or a dispersed distribution according to a quantity of the target ports being attacked; and

performing, according to the information about the target ports, interception processing on UDP data packets sent by the attack device to the target ports, comprising:

in response to determining that the distribution of the attacks on the target ports is the dispersed distribution: limiting, by the defense device, traffic of the UDP data packets allowed to pass through the target ports within a first threshold, or randomly discarding, by the defense device, at least one of the UDP data packets sent to the target ports; and

in response to determining that the distribution of the attacks on the target ports is the centralized distribution, discarding, by the defense device, the UDP data packets sent to the target ports.

6. The storage medium according to claim 5 , wherein the detecting whether a target host is attacked by a UDP attack from an attack device comprises:

monitoring, by the defense device, the number of UDP data packets received by the target host per unit time; and

determining, by the defense device, that the target host is attacked by the UDP attack from the attack device, if the number of UDP data packets is greater than a second threshold.

7. The method according to claim 1 , wherein:

obtaining the ICMP data packet comprises: when a UDP port disabled by the target host receives a UDP data packet from the attack device, obtaining, by the ICMP data packet sent from the target host to the attack device, wherein the ICMP data packet carries information about the UDP data packet sent from the attack device,

extracting information about the target ports in the ICMP data packet comprises:

obtaining a destination port from the information about the UDP data packet carried in the ICMP data packet and determining the destination port as one of the target ports.

8. The method according to claim 1 , wherein:

when the distribution of the attacks on the target ports is the dispersed distribution, one of the target ports is a service port enabled by the target host.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 12, 2019
From: ZHANG, HAOHAO; JIN, SHUAI
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 048578/0118 →
Priority Claims (1)
CN 2016 1 1136442 · Dec 9, 2016 · national
Continuity (2)
Continuation PCTCN2017096721 · Aug 10, 2017
Related Publication 20190215336A1 · Jul 11, 2019