Manual Chapter : Detecting and Preventing System DoS and DDoS Attacks

Applies To:

Show Versions Show Versions

BIG-IP AFM

  • 12.1.6, 12.1.5, 12.1.4, 12.1.3, 12.1.2, 12.1.1, 12.1.0
Manual Chapter

Detecting and Preventing System DoS and DDoS Attacks

About configuring the BIG-IP system to detect and prevent DoS and DDoS attacks

DoS and DDoS attack detection and prevention is enabled by the BIG-IP® Advanced Firewall Manager™ (AFM™) Device DoS Configuration for system-wide DoS protection, and by DoS Profiles for virtual servers. DoS detection features allow you to detect possible attacks on the system and on particular applications, and to rate limit possible attack vectors. AFM also enables further attack mitigation, including automatic identification and blacklisting of attacking IP addresses, and automatic configuration of DoS attack vector thresholds based on system analysis. DoS detection and prevention features are enabled with an Advanced Firewall Manager license, which also includes protocol DoS detection support that can be configured on a per-virtual-server basis.

  • At the virtual server level, detect malicious or malformed DNS and SIP protocol errors, and report anomalies by percentage increase, or by absolute packets per second.
  • At the virtual server level, rate limit malicious or malformed DNS and SIP protocol error packets.
  • At the virtual server level and system-wide, manually configure detection of potential DoS vector attacks by rate increase or absolute packets per second, and rate limit or leak limit such packets.
  • System-wide, automatically detect potential attacks across a wide range of DoS attack vectors, and rate limit or leak limit such packets,
  • At the virtual server level, detect repeat attackers for SIP, DNS, and other attack vectors and automatically blacklist their IP addresses, with configurable thresholds and blacklist duration.
  • System-wide, detect repeat attackers for a wide range of attack vectors and automatically blacklist their IP addresses, with configurable thresholds and blacklist duration.
  • At the virtual server level and system-wide, advertise blacklisted IP addresses to BGP routers, per DoS vector and per IP intelligence category. With this option, once an IP address is identified for blacklisting, all further blacklisting of IP addresses is handled by upstream routers, until the blacklist entry is automatically removed.

Task list

Detecting and protecting against system-wide DoS and DDoS attacks

The BIG-IP® system handles DoS and DDoS attacks with preconfigured responses. With the DoS Protection Device Configuration, you can automatically or manually set detection thresholds and internal rate or leak limits for a range of DoS and DDoS attack vectors.
Note: Not all settings apply to all DoS vectors. For example, some vectors do not use Auto Thresholds, and some vectors cannot be automatically blacklisted.
  1. On the Main tab, click Security > DoS Protection > Device Configuration .
    The DoS Protection Device Configuration screen opens.
  2. If you are using remote logging, from the Log Publisher list, select a destination to which the BIG-IP system sends DoS and DDoS log entries.
  3. Configure the Auto Threshold Sensitivity.
    A lower number means the automatic threshold algorithm is less sensitive to changes in traffic and CPU usage.
  4. In the Category column, expand a category to view and edit the attack types for that category.
  5. In the Attack Type column, click the name of any attack type to edit the settings.
    • If the attack allows automatic threshold configuration, you can select Auto-Threshold Configuration to configure automatic thresholds.
    • To configure manual thresholds, click Manual Configuration.
  6. Configure the DoS vector for automatic threshold configuration or manual thresholds.
  7. Click the Update button.
    The selected configuration is updated, and the DoS Protection Device Configuration screen opens again.
  8. Repeat the previous steps for any other attack types for which you want to change the configuration.
Now you have configured the system to provide custom responses to possible DoS and DDoS attacks, and to allow such attacks to be identified in system logs and reports.
Configure SNMP traps, logging, and reporting for DoS attacks, to track threats to your system.

Automatically detecting and protecting against system-wide DoS and DDoS attacks

The BIG-IP® system handles DoS and DDoS attacks with preconfigured responses. With the DoS Protection Device Configuration, you can automatically or manually set detection thresholds and internal rate or leak limits for a range of DoS and DDoS attack vectors. Use this task to configure automatic thresholds for the system, and for individual DoS vectors.
Note: Not all settings apply to all DoS vectors. For example, some vectors do not use Auto Thresholds, and some vectors are not configured for bad actor detection or automatic blacklisting.
  1. On the Main tab, click Security > DoS Protection > Device Configuration .
    The DoS Protection Device Configuration screen opens.
  2. If you are using remote logging, from the Log Publisher list, select a destination to which the BIG-IP system sends DoS and DDoS log entries.
  3. Configure the Auto Threshold Sensitivity.
    A lower number means the automatic threshold algorithm is less sensitive to changes in traffic and CPU usage.
  4. In the Category column, expand a category to view and edit the attack types for that category.
  5. In the Attack Type column, click the name of any attack type to edit the settings.
    The configuration page for the particular attack appears.
  6. Select Auto-Threshold Configuration.
    Note: You cannot configure automatic thresholds for every DoS vector. In particular, for error packets you can manually specify only Detection Threshold PPS, Detection Threshold Percent, and the Leak Limit.
    Note: You can configure only automatic thresholds or manual thresholds for a DoS vector. When you select one configuration setting, the options for the other setting are grayed out.
  7. In the Attack Floor PPS field, specify the number of packets per second of the vector type to allow at a minimum, before automatically calculated thresholds are determined.

    Because automatic thresholds take time to be reliably established, this setting defines the minimum packets allowed before automatic thresholds are calculated.

  8. In the Attack Ceiling PPS field, specify the absolute maximum allowable for packets of this type, before automatically calculated thresholds are determined.
    Because automatic thresholds take time to be reliably established, this setting rate limits packets to the packets per second setting, when specified. To set no hard limit, set this to Infinite.
  9. Click the Update button.
    The selected configuration is updated, and the DoS Protection Device Configuration screen opens again.
  10. Repeat the previous steps for any other attack types for which you want to change the configuration.
Now you have configured the system to provide custom responses to possible DoS and DDoS attacks, and to allow such attacks to be identified in system logs and reports.
Configure SNMP traps, logging, and reporting for DoS attacks, to track threats to your system.

Configuring manual thresholds for DoS and DDoS vectors

You are editing a DoS vector from the Security > DoS Protection > Device Configuration screen.
Manually configure thresholds for a DoS vector when you want to configure specific settings, or when the vector does not allow automatic threshold configuration.
Note: Not all settings apply to all DoS vectors. For example, some vectors allow Leak Limits instead of Rate Limits, and some vectors cannot be automatically blacklisted.
  1. If the attack allows automatic or manual threshold configuration, select Manual Configuration.
  2. From the Detection Threshold PPS list, select Specify or Infinite.
    • Use Specify to set a value (in packets per second) for the attack detection threshold. If packets of the specified types cross the threshold, an attack is logged and reported. The system continues to check every second, and registers an attack for the duration that the threshold is exceeded.
    • Use Infinite to set no value for the threshold. This specifies that this type of attack is not logged or reported based on this threshold.
  3. From the Detection Threshold Percent list, select Specify or Infinite.
    • Use Specify to set a value (in percentage of traffic) for the attack detection threshold. If packets of the specified types cross the percentage threshold, an attack is logged and reported. The system continues to check every second, and registers an attack for the duration that the threshold is exceeded.
    • Use Infinite to set no value for the threshold. This specifies that this type of attack is not logged or reported based on this threshold.
  4. To log traffic that the system identifies as a DoS attack according to the automatic thresholds, enable Simulate Auto Threshold.
    Note: This setting allows you to see the results of auto thresholds on the selected DoS vector without actually affecting traffic. Automatic thresholds are not applied to packets unless the Auto-Threshold Configuration is enabled for that vector. When you enable this setting, the current computed thresholds for automatic thresholds are displayed for this vector.
  5. To detect IP address sources from which possible attacks originate, enable Bad Actor Detection.
  6. In the Per Source IP Detection (PPS) field, specify the number of packets of this type per second from one IP address that identifies the IP source as a bad actor, for purposes of attack detection and logging.
  7. In the Per Source IP Rate Limit (PPS) field, specify the number of packets of this type per second from one IP address, above which rate limiting or leak limiting occurs.
  8. To automatically blacklist bad actor IP addresses, select Blacklist Attacking Address.
    Note: Automatic IP address blacklisting is enabled only when Bad Actor Detection is enabled.
  9. Select the Blacklist Category to which blacklist entries generated by Bad Actor Detection are added.
  10. Specify the Detection Time, in seconds, after which an IP address is blacklisted.
    When a Bad Actor IP address exceeds the Per Source IP Detection PPS setting for the Detection Time period, that IP address is added to the blacklist.
  11. To change the duration for which the address is blacklisted, specify the duration in seconds in the Duration field. The default duration for an automatically blacklisted item is 4 hours (14400 seconds).
    After this time period, the IP address is removed from the blacklist.
  12. To allow IP source blacklist entries to be advertised to edge routers so they will null route their traffic, select Allow Advertisements.
    Note: To advertise to edge routers, you must configure a Blacklist Publisher at Security > Options > Blacklist Publisher for the blacklist category.
  13. Click the Update button.
    The selected configuration is updated, and the DoS Protection Device Configuration screen opens again.
  14. Repeat the previous steps for any other attack types for which you want to manually configure thresholds.
Now you have configured the system to provide custom responses to possible DoS and DDoS attacks, and to allow such attacks to be identified in system logs and reports, rate-limited, and blacklisted when specified.
Configure SNMP traps, logging, and reporting for DoS attacks, to track threats to your system. Configure a Blacklist Publisher, if necessary, to advertise routes for blacklist entries.

Device DoS attack types

You can specify specific threshold, rate increase, rate limit, and other parameters for supported device DoS attack types, to more accurately detect, track, and rate limit attacks.

Important: All hardware-supported vectors are performed in hardware on vCMP® guests, provided that the vCMP guests have the same software version as the vCMP host.
DoS category Attack name Dos vector name Information Hardware accelerated
Bad Header - DNS DNS Oversize dns-oversize Detects oversized DNS headers. To tune this value, in tmsh: modify sys db dos.maxdnssize value , where value is 256-8192. Yes
  DNS Malformed dns-malformed Malformed DNS packet Yes
  DNS QDCount Limit dns-qdcount-limit UDP packet, DNS qdcount neq 1, VLAN is <tunable>. To tune this value, in tmsh: modify sys db dos.dnsvlan value , where value is 0-4094. Yes
Bad Header - ICMP Bad ICMP Checksum bad-icmp-chksum An ICMP frame checksum is bad. Reuse the TCP or UDP checksum bits in the packet Yes
  Bad ICMP Frame bad-icmp-frame The ICMP frame is either the wrong size, or not of one of the valid IPv4 or IPv6 types. Valid IPv4 types:
  • 0 Echo Reply
  • 3 Destination Unreachable
  • 4 Source Quench
  • 5 Redirect
  • 8 Echo
  • 11 Time Exceeded
  • 12 Parameter Problem
  • 13 Timestamp
  • 14 Timestamp Reply
  • 15 Information Request
  • 16 Information Reply
  • 17 Address Mask Request
  • 18 Address Mask Reply
Valid IPv6 types:
  • 1 Destination Unreachable
  • 2 Packet Too Big
  • 3 Time Exceeded
  • 4 Parameter Problem
  • 128 Echo Request
  • 129 Echo Reply
  • 130 Membership Query
  • 131 Membership Report
  • 132 Membership Reduction
Yes
  ICMP Frame Too Large icmp-frame-too-large The ICMP frame exceeds the declared IP data length or the maximum datagram length. To tune this value, in tmsh: modify sys db dos.maxicmpframesize value , where value is <=65515. Yes
Bad Header - IGMP Bad IGMP Frame bad-igmp-frame IPv4 IGMP packets should have a header >= 8 bytes. Bits 7:0 should be either 0x11, 0x12, 0x16, 0x22 or 0x17, or else the header is bad. Bits 15:8 should be non-zero only if bits 7:0 are 0x11, or else the header is bad. Yes
Bad Header - IPv4 Bad IP TTL Value bad-ttl-val Time-to-live equals zero for an IPv4 address Yes
  Bad IP Version bad-ver The IPv4 address version in the IP header is not 4 Yes
  Header Length > L2 Length hdr-len-gt-l2-len No room in layer 2 packet for IP header (including options) for IPv4 address Yes
  Header Length Too Short hdr-len-too-short IPv4 header length is less than 20 bytes Yes
  Bad Source ip-bad-src The IPv4 source IP = 255.255.255.255 or 0xe0000000U Yes
  IP Error Checksum ip-err-chksum The header checksum is not correct Yes
  IP Length > L2 Length ip-len-gt-l2-len Total length in IPv4 address header or payload length in IPv6 address header is greater than the layer 3 length in a layer 2 packet Yes
  TTL <= <tunable> ttl-leq-one An IP packet with a destination that is not multicast and that has a TTL greater than 0 and less than or equal to a tunable value, which is 1 by default. To tune this value, in tmsh: modify sys db dos.iplowttl value , where value is 1-4. Yes
  IP Option Frames ip-opt-frames IPv4 address packet with option.db variable tm.acceptipsourceroute must be enabled to receive IP options. Yes
  IP Option Illegal Length bad-ip-opt Option present with illegal length No
  L2 Length >> IP Length l2-len-ggt-ip-len Layer 2 packet length is much greater than the payload length in an IPv4 address header and the layer 2 length is greater than the minimum packet size Yes
  No L4 no-l4 No layer 4 payload for IPv4 address Yes
  Unknown Option Type unk-ipopt-type Unknown IP option type No
Bad Header - IPv6 IPv6 extended headers wrong order bad-ext-hdr-order Extension headers in the IPv6 header are in the wrong order Yes
  Bad IPV6 Hop Count bad-ipv6-hop-cnt Both the terminated (cnt=0) and forwarding packet (cnt=1) counts are bad Yes
  Bad IPV6 Version bad-ipv6-ver The IPv6 address version in the IP header is not 6 Yes
  IPv6 duplicate extension headers dup-ext-hdr An extension header should occur only once in an IPv6 packet, except for the Destination Options extension header Yes
  IPv6 extension header too large ext-hdr-too-large An extension header is too large. To tune this value, in tmsh: modify sys db dos.maxipv6extsize value , where value is 0-1024. Yes
  IPv6 hop count <= <tunable> hop-cnt-leq-one The IPv6 extended header hop count is less than or equal to <tunable>. To tune this value, in tmsh: modify sys db dos.ipv6lowhopcnt value , where value is 1-4. Yes
  Bad IPv6 Addr ipv6-bad-src IPv6 source IP = 0xff00:: Yes
  IPv6 Extended Header Frames ipv6-ext-hdr-frames IPv6 address contains extended header frames Yes
  IPV6 Length > L2 Length ipv6-len-gt-l2-len IPv6 address length is greater than the layer 2 length Yes
  No L4 (Extended Headers Go To Or Past End of Frame) l4-ext-hdrs-go-end Extended headers go to the end or past the end of the L4 frame Yes
  Payload Length < L2 Length payload-len-ls-l2-len Specified IPv6 payload length is less than the L2 packet length Yes
  Too Many Extended Headers too-many-ext-hdrs For an IPv6 address, there are more than <tunable> extended headers (the default is 4). To tune this value, in tmsh: modify sys db dos.maxipv6exthdrs value , where value is 0-15. Yes
Bad Header - L2 Ethernet MAC Source Address == Destination Address ether-mac-sa-eq-da Ethernet MAC source address equals the destination address Yes
Bad Header - TCP Bad TCP Checksum bad-tcp-chksum The TCP checksum does not match Yes
  Bad TCP Flags (All Cleared) bad-tcp-flags-all-clr Bad TCP flags (all cleared and SEQ#=0) Yes
  Bad TCP Flags (All Flags Set) bad-tcp-flags-all-set Bad TCP flags (all flags set) Yes
  FIN Only Set fin-only-set Bad TCP flags (only FIN is set) Yes
  Option Present With Illegal Length opt-present-with-illegal-len Option present with illegal length Yes
  SYN && FIN Set syn-and-fin-set Bad TCP flags (SYN and FIN set) Yes
  TCP Flags - Bad URG tcp-bad-urg Packet contains a bad URG flag, this is likely malicious Yes
  TCP Header Length > L2 Length tcp-hdr-len-gt-l2-len   Yes
  TCP Header Length Too Short (Length < 5) tcp-hdr-len-too-short The Data Offset value in the TCP header is less than five 32-bit words Yes
  TCP Option Overruns TCP Header tcp-opt-overruns-tcp-hdr The TCP option bits overrun the TCP header Yes
  Unknown TCP Option Type unk-tcp-opt-type Unknown TCP option type Yes
Bad Header - UDP Bad UDP Checksum bad-udp-chksum The UDP checksum is not correct Yes
  Bad UDP Header (UDP Length > IP Length or L2 Length) bad-udp-hdr UDP length is greater than IP length or layer 2 length Yes
DNS DNS AAAA Query dns-aaaa-query UDP packet, DNS Qtype is AAAA, VLAN is <tunable>. To tune this value, in tmsh: modify sys db dos.dnsvlan value , where value is 0-4094.. To tune this value, in tmsh: modify sys db dos.dnsvlan value , where value is 0-4094. Yes
  DNS Any Query dns-any-query UDP packet, DNS Qtype is ANY_QRY, VLAN is <tunable>. To tune this value, in tmsh: modify sys db dos.dnsvlan value , where value is 0-4094. Yes
  DNS AXFR Query dns-axfr-query UDP packet, DNS Qtype is AXFR, VLAN is <tunable>. To tune this value, in tmsh: modify sys db dos.dnsvlan value , where value is 0-4094. Yes
  DNS A Query dns-a-query UDP packet, DNS Qtype is A_QRY, VLAN is <tunable>. To tune this value, in tmsh: modify sys db dos.dnsvlan value , where value is 0-4094. Yes
  DNS CNAME Query dns-cname-query UDP DNS query, DNS Qtype is CNAME, VLAN is <tunable>. To tune this value, in tmsh: modify sys db dos.dnsvlan value , where value is 0-4094. Yes
  DNS IXFR Query dns-ixfr-query UDP DNS query, DNS Qtype is IXFR, VLAN is <tunable>. To tune this value, in tmsh: modify sys db dos.dnsvlan value , where value is 0-4094. Yes
  DNS MX Query dns-mx-query UDP DNS query, DNS Qtype is MX, VLAN is <tunable>. To tune this value, in tmsh: modify sys db dos.dnsvlan value , where value is 0-4094. Yes
  DNS NS Query dns-ns-query UDP DNS query, DNS Qtype is NS, VLAN is <tunable>. To tune this value, in tmsh: modify sys db dos.dnsvlan value , where value is 0-4094. Yes
  DNS OTHER Query dns-other-query UDP DNS query, DNS Qtype is OTHER, VLAN is <tunable>. To tune this value, in tmsh: modify sys db dos.dnsvlan value , where value is 0-4094. Yes
  DNS PTR Query dns-ptr-query UDP DNS query, DNS Qtype is PTR, VLAN is <tunable>. To tune this value, in tmsh: modify sys db dos.dnsvlan value , where value is 0-4094. Yes
  DNS Response Flood dns-response-flood UDP DNS Port=53, packet and DNS header flags bit 15 is 1 (response), VLAN is <tunable>. To tune this value, in tmsh: modify sys db dos.dnsvlan value , where value is 0-4094. Yes
  DNS SOA Query dns-soa-query UDP packet, DNS Qtype is SOA_QRY, VLAN is <tunable>. To tune this value, in tmsh: modify sys db dos.dnsvlan value , where value is 0-4094. Yes
  DNS SRV Query dns-srv-query UDP packet, DNS Qtype is SRV, VLAN is <tunable>. To tune this value, in tmsh: modify sys db dos.dnsvlan value , where value is 0-4094. Yes
  DNS TXT Query dns-txt-query UDP packet, DNS Qtype is TXT, VLAN is <tunable>. To tune this value, in tmsh: modify sys db dos.dnsvlan value , where value is 0-4094. Yes
Flood ARP Flood arp-flood ARP packet flood Yes
  Ethernet Broadcast Packet ether-brdcst-pkt Ethernet broadcast packet flood Yes
  Ethernet Multicast Packet ether-multicst-pkt Ethernet destination is not broadcast, but is multicast Yes
  ICMPv4 Flood icmpv4-flood Flood with ICMP v4 packets Yes
  ICMPv6 Flood icmpv6-flood Flood with ICMP v6 packets Yes
  IGMP Flood igmp-flood Flood with IGMP packets (IPv4 packets with IP protocol number 2) Yes
  IGMP Fragment Flood igmp-frag-flood Fragmented packet flood with IGMP protocol Yes
  IPv4 Fragment Flood ip-frag-flood Fragmented packet flood with IPv4 Yes
  IPv6 Fragment Flood ipv6-frag-flood Fragmented packet flood with IPv6 No
  Routing Header Type 0 routing-header-type-0 Routing header type zero is present in flood packets Yes
  TCP BADACK Flood tcp-ack-flood TCP ACK packet flood No
  TCP RST Flood tcp-rst-flood TCP RST flood Yes
  TCP SYN ACK Flood tcp-synack-flood TCP SYN/ACK flood Yes
  TCP SYN Flood tcp-syn-flood TCP SYN flood Yes
  TCP Window Size tcp-window-size The TCP window size in packets is above the maximum. To tune this value, in tmsh: modify sys db dos.tcplowwindowsize value , where value is <=128. Yes
  TCP SYN Oversize tcp-syn-oversize Detects TCP data SYN packets larger than the maximum specified by the dos.maxsynsize parameter. To tune this value, in tmsh: modify sys db dos.maxsynsize value . The default size is 64 and the maximum allowable value is 9216. Yes
  UDP Flood udp-flood UDP flood attack Yes
Fragmentation ICMP Fragment icmp-frag ICMP fragment flood Yes
  IPV6 Atomic Fragment ipv6-atomic-frag IPv6 Frag header present with M=0 and FragOffset =0 Yes
  IPV6 Fragment Error ipv6-other-frag Other IPv6 fragment error Yes
  IPv6 Fragment Overlap ipv6-overlap-frag IPv6 overlapping fragment error No
  IPv6 Fragment Too Small ipv6-short-frag IPv6 short fragment error Yes
  IP Fragment Error ip-other-frag Other IPv4 fragment error Yes
  IP Fragment Overlap ip-overlap-frag IPv4 overlapping fragment error No
  IP Fragment Too Small ip-short-frag IPv4 short fragment error Yes
Single Endpoint Single Endpoint Flood flood Flood to a single endpoint. You can configure packet types to check for, and packets per second for both detection and rate limiting. No
  Single Endpoint Sweep sweep Sweep on a single endpoint. You can configure packet types to check for, and packets per second for both detection and rate limiting. No
SIP SIP ACK Method sip-ack-method SIP ACK packets Yes
  SIP BYE Method sip-bye-method SIP BYE packets Yes
  SIP CANCEL Method sip-cancel-method SIP CANCEL packets Yes
  SIP INVITE Method sip-invite-method SIP INVITE packets Yes
  SIP Malformed sip-malformed Malformed SIP packets Yes
  SIP MESSAGE Method sip-message-method SIP MESSAGE packets Yes
  SIP NOTIFY Method sip-notify-method SIP NOTIFY packets Yes
  SIP OPTIONS Method sip-options-method SIP OPTIONS packets Yes
  SIP OTHER Method sip-other-method Other SIP method packets Yes
  SIP PRACK Method sip-prack-method SIP PRACK packets Yes
  SIP PUBLISH Method sip-publish-method SIP PUBLISH packets Yes
  SIP REGISTER Method sip-register-method SIP REGISTER packets Yes
  SIP SUBSCRIBE Method sip-subscribe-method SIP SUBSCRIBE packets Yes
Bad Header-SCTP Bad SCTP Checksum bad-sctp-checksum Bad SCTP packet checksum No
Other Host Unreachable host-unreachable Host unreachable error Yes
  IP Unknown protocol ip-unk-prot Unknown IP protocol No
  LAND Attack land-attack Source IP equals destination IP address Yes
  TIDCMP tidcmp ICMP source quench attack Yes