This help contains the following topics:
As an important network security feature, attack defense detects attacks by inspecting arriving packets and takes prevention actions.
An attack defense policy contains a set of attack detection and prevention action configuration. Prevention actions include logging, packet dropping, blacklisting, and client verification. The device supports the following attack defense policies:
Scanning attack defense policy.
Flood attack defense policy.
Single-attack defense policy.
Apply an attack defense policy to a security zone to inspect packet received in the security zone.
Scanning is a preintrusion activity used to prepare for intrusion into a network. The scanning allows the attacker to find a way into the target network and to disguise the attacker's identity.
Attackers use scanning tools to probe a network, find vulnerable hosts, and discover services that are running on the hosts. Attackers can use the information to launch attacks.
The device can detect and prevent the IP sweep (address scanning) and port scanning attacks. If an attacker performs port scanning from multiple hosts to the target host, distributed port scan attacks occur.
Apply a scanning attack defense policy to the security zone that is connected to the external network. Scanning attack detection inspects the incoming packet rate of connections to the target system. If a source initiates connections at a rate equal to or exceeding the pre-defined threshold, the device can take the following actions:
Output logs.
Drop subsequent packets from the IP address of the attacker.
Add the attacker's IP address to the IP blacklist.
You can specify a detection sensitivity level for a scanning attack defense policy. The threshold values and detection periods are fixed for detection sensitivity levels high, medium, and low. To customize the threshold and the detection period, set the detection level to User-defined.
If the prevention action is adding attacker's IP address to the IP blacklist, you must enable the blacklist feature on the security zone to which the scanning attack defense policy is applied.
An attacker launches a flood attack by sending a large number of forged requests to the victim in a short period of time. The victim is too busy responding to these forged requests to provide services for legal users, and a DoS attack occurs.
Apply a flood attack defense policy to the security zone that is connected to the external network to protect internal servers. Flood attack detection monitors the rate at which connections are initiated to the internal servers. With flood attack detection enabled, the device is in attack detection state. When the packet receiving rate from an IP address or packet sending rate to an IP address reaches or exceeds the source or destination IP-based threshold, the device enters prevention state and takes the specified actions. When the rate is below the silence threshold (three-fourths of the threshold), the device returns to the attack detection state.
You can configure flood attack detection and prevention for a specific IP address. For non-specific IP addresses, the device uses the global attack prevention settings.
An appropriate threshold can effectively prevent attacks. The system provides the threshold learning feature to automatically learn the global threshold. This feature allows the device to learn the global threshold based on the traffic flows in the network as follows:
Monitors the packet sending rate in the network.
Calculates the global threshold based on the peak rate learned within the threshold learning duration.
The threshold learning feature includes the following modes:
One-time learning—The device performs threshold learning only once.
Periodic learning—The device performs threshold learning at intervals. The most recent learned threshold always takes effect.
The threshold learning learns the threshold of all types of flood attacks. You can enable auto application of the learned threshold.
If the network traffic statistics is not known yet, use the default settings of the flood attack prevention parameters first, and then adjust the threshold based on the threshold learning result.
Single-packet attacks are also known as malformed packet attacks. An attacker typically launches single-packet attacks by using the following methods:
An attacker sends defective packets to a device, which causes the device to malfunction or crash.
An attacker sends normal packets to a device, which interrupts connections or probes network topologies.
An attacker sends a large number of forged packets to a target device, which consumes network bandwidth and causes denial of service (DoS).
Apply the single-packet attack defense policy to the security zone that is connected to the external network. Single-packet attack detection inspects incoming packets based on the packet signature. If an attack packet is detected, the device can take the following actions:
Output logs.
Drop attack packets.
The device supports detecting both well-known single-packet attacks and attack packets with user-defined signatures.
The attack defense policy uses the ACL to identify exempted packets. The policy does not check the packets permitted by the ACL. You can configure the ACL to identify packets from trusted servers. The exemption feature reduces the false alarm rate and improves packet processing efficiency.
If an ACL is used for attack detection exemption, only the following match criteria in the ACL permit rules take effect:
Source IP address.
Destination IP address.
Source port.
Destination port.
Protocol.
VRF.
Non-first fragments.
Support of non-default vSystems for this feature depends on the device model. This feature is available on the Web interface only if it is supported.
If a device has multiple service cards, the threshold value in a flood attack policy is card specific. The global threshold of the device is the product of multiplying the threshold value by the service card quantity.
Adjust the threshold according to the application scenarios. If the number of packets sent to a protected server is normally large, set a large threshold. A small threshold might affect the server services. For a network that is unstable or susceptible to attacks, set a small threshold.
If the specified ACL does not exist or does not contain a rule, attack detection exemption does not take effect.
If an ACL is used for attack detection exemption, only the following match criteria in the ACL permit rules take effect:
Source IP address.
Destination IP address.
Source port.
Destination port.
Protocol.
VRF.
Non-first fragments.
The threshold learning feature learns the thresholds of the following attacks only on the default ports:
DNS flood attacks.
DNS response flood attacks.
SIP flood attacks.
HTTP flood attacks.
HTTP slow attacks.
HTTPS flood attacks.
Once you set the source IP-based threshold to 0 for a flood attack type, the device does not apply the source IP-based learning result to this attack type even if learning result automatic application is enabled. You cannot manually apply the source IP-based learning result to this attack type, neither. The same restriction applies when you set the destination IP-based threshold to 0.
Configure attack defense as shown in Figure-1.
Figure-1 Attack defense configuration procedure
Complete the following tasks before you configure this feature:
Assign IP addresses to interfaces on the Network > Interface Configuration > Interfaces page.
Configure routes on the Network > Routing page. Make sure the routes are available.
Create security zones on the Network > Security Zones page.
Add interfaces to security zones. You can add interfaces to a security zone on the Security Zones page or select a security zone for an interface on the Interfaces page.
Configure security policies to permit the target traffic on the Policies > Security Policies page.
Before you configure attack defense and prevention, create an attack defense policy. Specify the attack detection criteria and prevention actions in the policy based on the network security requirements.
Click the Objects tab.
In the navigation pane, select App Security > Attack Defense Policies.
Click Create. On the page that opens, click a tab and configure the detection conditions and actions to be taken for an attack based on actual network security requirements. Different types of attack defense features are non-sequenced. You can configure one or several of them as required. For more information about configuring attack defense features, see "Configure a scanning attack defense policy," "Configure a flood attack defense policy," "Configure a single-packet attack defense policy," and "Configure attack detection exemption."
Figure-2 Creating an attack defense policy
Table-1 Configuration items for an attack defense policy
Item | Description |
Policy name | Enter the name of an attack defense policy. Valid characters include letters, digits, underscores (_), and hyphens (-). |
Apply to | Select a security zone to which the attack defense policy is applied. A security zone can have only one attack defense policy applied. An attack defense policy can be applied to multiple security zones. The list includes the default security zone and security zones that have been configured on the Network > Security Zones page. |
Create an attack defense policy and configure basic parameters. For more information, see "Create an attack defense policy."
Click the Scanning Attack Defense tab and configure the policy as described in Table-2.
Figure-3 Configure a scanning attack defense policy
Table-2 Configuration items for a scanning attack defense policy
Item | Description |
Detection sensitivity | Scanning attack detection level:
Configure the following parameters as needed:
|
Actions | Prevention actions against scanning attacks.
Prevention actions are not available when Detection sensitivity is disabled. |
Click Apply. The newly created scanning attack defense policy will be displayed on the Attack Defense Policies page.
Create an attack defense policy and configure basic parameters. For more information, see "Create an attack defense policy."
Click the Flood Attack Defense Settings tab. To configure global parameters for the attack defense policy, see Table-3. To configure IP-specific flood attack defense, see Table-5.
Figure-4 Configuring a flood attack defense policy
Figure-5 Editing global settings for the flood attack defense policy
Table-3 Configuration items for flood attack defense global settings
Item | Description |
Attack type | Flood attack types:
|
Src Threshold (pps) | Enter a global source IP-based threshold that triggers flood attack prevention. The default is 40000 for ARP flood attack and 10000 for other types of flood attacks. With global flood attack detection configured, the device is in attack detection state. When the receiving rate of the packets originated from an IP address reaches or exceeds the threshold, the device enters prevention state and takes the specified actions. If you set this parameter to 0, the system does not perform source IP-based flood attack detection. |
Dest Threshold (pps) | Enter a global destination IP address-based threshold that triggers flood attack prevention. The default is 40000 for ARP flood attack and 10000 for other types of flood attacks. With global flood attack detection configured, the device is in attack detection state. When the sending rate of packets to an IP address reaches or exceeds the threshold, the device enters prevention state and takes the specified actions. The global destination IP-based threshold applies to global flood attack detection. Adjust the threshold according to the application scenarios. If the number of packets sent to a protected server is normally large, set a large threshold. A small threshold might affect the server services. For a network that is unstable or susceptible to attacks, set a small threshold. If you set this parameter to 0, the system does not perform destination IP-based flood attack detection. |
Logging | Enable logging for flood attack events. Log messages are sent to the log system. |
Detect All IPs | Enable global flood attack detection. |
Client verification | Enable client verification. The device automatically adds the victim IP addresses to the protected IP list, and provides proxy services for protected IP addresses. |
Packet drop | Use packet dropping as the prevention action. The device drops subsequent attack packets destined for the victim IP addresses. |
Target ports | A comma-separated list of up to 32 port number items, for example, 1-10,80. Each item specifies a port by its port number or a range of ports in the form of start-port-number to end-port-number. The end-port-number cannot be smaller than the start-port-number. The port number is in the range of 1 to 65535. The device performs flood attack detection only on packets destined for the target ports. The target port setting applies to global flood attack detection and IP address-specific flood attack detection with no port specified. If IP address-specific flood attack detection is configured with specific ports, the device detects flood attacks on these ports for the specified IP address. This parameter is available only for DNS, DNS reply, HTTP, HTTP slow, HTTPS, and SIP flood attack types. |
Concurrent connections | Enter a threshold for allowed concurrent HTTP connections. The default is 5000. HTTP slow attack detection is triggered when the number of HTTP concurrent connections reaches the threshold. This parameter is available only for the HTTP slow attack type. |
Content-Length | Enter a threshold for the length of the Content-Length filed in the HTTP packet header. The default is 10000. This parameter is available only for the HTTP slow attack type. |
Payload length | Enter a threshold for the HTTP packet payload. The default is 50. An HTTP packet is an abnormal packet if its Content-Length field value is greater than the specified threshold and its payload is shorter than the specified length. This parameter is available only for the HTTP slow attack type. |
Abnormal packets | Enter a threshold for abnormal packets. The default is 10. This parameter is available only for the HTTP slow flood attack type. |
Detection cycle | Set an attack detection period, in seconds. The device takes prevention actions when the number of received abnormal packets exceeds the threshold within the detection period. This parameter is available only for the HTTP slow flood attack type. |
Blacklist | Select whether to use blacklisting as an attack prevention action. If the blacklist feature is enabled in the security zone to which the attack defense policy applies, the device drops packets from the blacklisted IP addresses. This parameter is available only for the HTTP slow flood attack type. |
Blacklist aging time | Set an aging time of dynamic blacklist entries, in seconds. The default is 10. This parameter is available only when blacklisting is used as a prevention action for the HTTP slow flood attack. |
Set threshold learning | Configure threshold learning parameters as shown in Table-4. Before configuring the threshold learning feature on the Edit page, you must complete the configuration of the attack defense policy first. |
Apply learned threshold | Use the learned thresholds as the thresholds for flood attack prevention. This setting takes effect only on attack types that are enabled with Detect All IPs and have the threshold learning result. |
To configure threshold learning, click Set threshold learning in the Global settings area on the Flood Attack Defense Settings tab. Before you configure threshold learning on the edit page, you must complete the configuration of the attack defense policy.
Figure-6 Configuring threshold learning
Table-4 Configuration items for threshold learning
Item | Description |
Threshold learning | As a best practice, enable threshold learning to provide a reference for threshold setting. |
Learning duration | Duration of threshold learning. The system calculates the thresholds for different attacks based on the peak rate learned within the threshold learning duration. |
Learning mode | The following modes are available:
|
Auto apply | Automatically apply the most recent thresholds that the device has learned. This parameter takes effect only on attack types that are enabled with Detect All IPs and have the threshold learning result. |
Tolerance | Threshold learning tolerance value that increases the learned threshold to a larger value before threshold application. This mechanism enables the threshold learning feature to promptly respond to traffic fluctuation. |
To add protected IP addresses against flood attacks, click Create in the Protected IP area on the Flood Attack Defense Settings tab.
Figure-7 Adding protected IP addresses against flood attacks
Table-5 Configuration items for IP-specific flood attack defense
Item | Description |
IP version | Select an IP version, IPv4 or IPv6. |
IP address | Enter an IP address to be protected. The protected IPv4 address cannot be 255.255.255.255 or 0.0.0.0. The protected IPv6 address cannot be a multicast address or ::. |
Attack type | For more information, see Table-3. |
VRF | VRF to which the protected IP address belongs. You can select an existing VRF or create a new one. The newly created VRF will be displayed on the Network > Interface Configuration > VRF page. |
Dest Threshold (pps) | Set the destination IP-based threshold that triggers flood attack prevention. The default is 40000 for ARP flood attack and 10000 for other types of flood attacks. |
Threshold | Set thresholds for HTTP slow attack defense. The following methods are available:
This parameter is available only for the HTTP slow flood attack type. |
Target ports | Specify ports to be protected. The device detects packets that are destined for the specified ports. The following methods are available:
This parameter is available only for DNS, DNS reply, HTTP, HTTP slow, HTTPS, and SIP flood attack types. |
Detection cycle | Set an attack detection period. The following methods are available:
This parameter is available only for the HTTP slow attack type. |
Action | Specify prevention actions against the flood attack. The following methods are available:
|
Blacklist | Select whether to use blacklisting as an attack prevention action. The device automatically blacklists the packet source IP address when an attack is detected. If the blacklist feature is enabled in a security zone, the device drops packets from the blacklisted IP address. This parameter is available only for the HTTP slow attack type. |
Aging time | Set an aging time of the dynamic blacklist entry, in seconds. The default is 10. This parameter is available only when the blacklisting action is selected for the HTTP slow flood attack. |
Click Apply. The newly created flood attack defense policy will be displayed on the Attack Defense Policies page.
Create an attack defense policy and configure basic parameters. For more information, see "Create an attack defense policy."
Click the Single-Packet Attack Defense tab and configure the policy as described in Table-6.
Figure-8 Configuring a single-packet attack defense policy
Table-6 Configuration items for well-known single packet attack defense
Item | Description |
Attack type | Specify a well-known single packet attack type:
In abnormal IPv6 extension header and IPv6 extension header exceeded attack detection, the device examines the ESP header and headers before it. Headers after the ESP header are not examined. |
Logging | Enable logging for the single-packet attack events. Log messages are sent to the log system. |
Packet drop | Use packet dropping as the prevention action. The device drops subsequent attack packets destined for the victim IP addresses. |
Threshold (bytes) | Maximum length of safe ICMP or ICMPv6 packets, in bytes.
|
To create a single-packet attack defense policy to detect packets with user-defined signatures, click Create in the Custom single-packet attack defense area.
Figure-9 Creating a single-packet attack defense policy with user-defined packet signatures
Table-7 Configuration items for a single-packet attack defense policy with user-defined packet signatures
Item | Description |
Signature | Packet signatures:
|
Value | Signature value in the range of 0 to 255. This value indicates the IP option code, or the type value in ICMP packets, ICMPv6 packets, or IPv6 extension headers. |
Logging | Enable logging for the single-packet attack events. Log messages are sent to the log system. |
Packet drop | Use packet dropping as the prevention action. The device drops subsequent attack packets destined for the victim IP addresses. |
Click Apply. The newly created single-packet attack defense policy will be displayed on the Attack Defense Policies page.
Create an attack defense policy and configure basic parameters. For more information, see "Create an attack defense policy."
Click the Exemption tab and configure the parameters as described in Table-8.
Figure-10 Configuring attack detection exemption
Table-8 Attack detection exemption configuration items
Item | Description |
IPv4 exemption | IPv4 ACL for attack detection exemption. You can select an existing IPv4 ACL or create a new IPv4 ACL. The created ACL will be displayed on the Objects > ACLs > IPv4 ACLs page. If the specified ACL does not exist or does not contain a rule, attack detection exemption does not take effect. |
IPv6 exemption | IPv6 ACL for attack detection exemption. You can select an existing IPv6 ACL or create a new IPv6 ACL. The created ACL will be displayed on the Objects > ACLs > IPv6 ACLs page. If the specified ACL does not exist or does not contain a rule, attack detection exemption does not take effect. |
Click Apply. The attack detection exemption configuration will be displayed on the Attack Defense Policies page.