Patent Publication Number: US-2013254886-A1

Title: Mitigating Low-Rate Denial-Of-Service Attacks in Packet-Switched Networks

Description:
CROSS-REFERENCE TO RELATED APPLICATION 
     The present application is a continuation of and claims priority to U.S. patent application Ser. No. 12/621,212, filed on Nov. 18, 2009, now U.S. Pat. No. 8,443,444, which is hereby incorporated by reference in its entirety. 
    
    
     FIELD OF THE DISCLOSURE 
     The present disclosure generally relates to packet-switched networking, and relates more particularly to protecting against denial-of-service attacks in packet switched networks. 
     BACKGROUND 
     Packet-switched networks rely on the efficient transmission of packets across network links. Malicious entities often attempt to disrupt this efficient data flow using denial-of-service (DoS) attacks whereby a network device is flooded with a large volume of network traffic. The resources and bandwidth of the network device are then consumed in handling this flood of network traffic. As a result, the network device is forced to begin dropping packets associated with legitimate packet flows and thus reduce throughput and quality of legitimate network services provided by the network device. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       It will be appreciated that for simplicity and clarity of illustration, elements illustrated in the Figures have not necessarily been drawn to scale. For example, the dimensions of some of the elements are exaggerated relative to other elements. Embodiments incorporating teachings of the present disclosure are shown and described with respect to the drawings presented herein, in which: 
         FIG. 1  is a diagram illustrating network system implementing a shrew attack protection (SAP) mechanism in accordance with at least one embodiment of the present disclosure; and 
         FIG. 2  is a diagram illustrating a SAP module for implementing the SAP mechanism at a network routing device of the network system of  FIG. 1  in accordance with at least one embodiment of the present disclosure. 
     
    
    
     The use of the same reference symbols in different drawings indicates similar or identical items. 
     DETAILED DESCRIPTION OF THE DRAWINGS 
     The numerous innovative teachings of the present application will be described with particular reference to the presently preferred example embodiments. However, it should be understood that this class of embodiments provides only a few examples of the many advantageous uses of the innovative teachings herein. In general, statements made in the specification of the present application do not necessarily delimit any of the various claimed inventions. Moreover, some statements may apply to some inventive features but not to others. 
       FIGS. 1 and 2  illustrate example techniques for mitigating low-rate denial-of-service attacks (also commonly referred to as “shrew” attacks) in packet-switched networks. A shrew attack exploits the retransmission time-out (RTO) mechanism of the Transport Communication Protocol (TCP) whereby bursts of connection requests from an attacker are synchronized to the RTO value employed by the network routing device that is the target of the attack. As such, when a node in the network retransmits a packet after expiration of a retransmission timer, the packet will reach the network routing device as it is already inundated with the synchronized burst, thereby leading to repeated packet drops in packet flows associated with the port being targeted by the shrew attack. These repeated packet drops can degrade the performance of TCP-based protocols and services provided by the network routing device, including Internet routing services such as Border Gateway Protocol (BGP) services. Accordingly, in one embodiment, the network routing device can employ a shrew attack protection (SAP) mechanism whereby the average packet drop rate for packet flows is dynamically updated and used to determine if any particular subset, or aggregation, of the packet flows serviced by the network routing device may include a packet flow that is potentially subject to a shrew attack. To identify whether a packet flow of a selected aggregation is a victim to a shrew attack, the network routing device determines the current, or instant, packet drop rate for the selected aggregation and compares this current packet drop rate with the average packet drop rate across all of the aggregations. In the event that the current packet drop rate for the selected aggregation is greater than the average packet drop rate across all of the aggregations, the outgoing packets of the packet flows of the selected aggregation are marked or otherwise identified as having a higher priority status. Otherwise, if the current packet drop rate for the selected aggregation is equal to or less than the average packet drop rate across all of the aggregations, the outgoing packets of the packet flows of the selected aggregation are marked or otherwise identified as having a lower priority status (a normal priority status, for example). 
     The network routing device mitigates any potential shrew attack by preferentially selecting those packets identified as having the higher priority status for transmission by the network routing device over those packets identified as having the lower or normal priority status. By giving packets of packet flows potentially victim to a shrew attack a higher priority for output, the network routing device can more fully ensure that the packets of the potential victim packet flows are successfully transmitted and thus diminish the packet drop rate for the potential packet flows and neutralize the shrew attack. This SAP mechanism can be employed in conjunction with other conventional congestion-management schemes that employ preferential packet dropping, such as the Active Queue Management (AQM) policy or the Weighted Random Early Detection (WRED) policy. 
       FIG. 1  illustrates a portion of a network system  100  employing the shrew attack protection (SAP) mechanism in accordance with at least one embodiment of the present disclosure. The network system  100  includes a network routing device  102  connected to one or more packet-switched network segments  104 . The network routing device  102  can include, for example, a router, a switch, a bridge, and the like. The network segment  104  can include a network segment compliant with any of a variety of protocols potentially subject to a shrew attack. For purposes of illustration, the network segment  104  and the SAP mechanism are described below in the example context of a TCP-based network, such as an Internet Protocol/Transmission Control Protocol (IP/TCP) network (the Internet or a local area network (LAN), for example). 
     The network routing device  102  includes a line interface  106  having a network input  108  and a network output  110  coupled to one or more network segments  104 , an input buffer  112  to buffer packets received from a network segment  104  via the network input  108 , and an output buffer  114  to buffer packets for transmission to a network segment  104  from the network output  110 . For ease of illustration, the network input  108  and the network output  110  are depicted as connected to the same network segment  104 . However, it will be appreciated that the network routing device  102  may be connected to multiple network segments  104  and thus have multiple network inputs and network outputs. The line interface  106  further includes an output control module  116  to control the processing of packets buffered in the output buffer  114  for output via the network output  110  and a routing mechanism  118  to implement various routing processes for packets within the network routing device  102 . These routing processes can include, for example, routing packets to the appropriate output, filtering packets, encapsulating packets, encrypting/decrypting packets, and the like. The line interface  106  also includes a SAP module  120  to implement the SAP mechanism described herein for outgoing packets. The illustrated components of the network routing device  102  can be implemented in hardware, in one or more processors to execute software representative of the functionality described herein, or a combination thereof. To illustrate, the network routing device  102  can include, for example, a processor  122  and a memory  124 , whereby the memory  124  includes a computer program  126  comprising a set of executable instructions that are accessed from the memory  124  and executed by the processor  122  to perform one or more of the functions described herein. 
     In operation, incoming packets (such as packets  131 ,  132 , and  133 ) are received at the network input  108  of the network routing device  102 , buffered in the input buffer  112 , and then routed to the appropriate output of the network routing device  102  by the routing mechanism  118 . In the process, the SAP module  120  monitors the incoming packets and the outgoing packets for the various packet flows processed by the network routing device  102  so as to dynamically determine the average packet drop rate for the packet flows in total, as well as to determine the current packet drop rates related to individual packet flows or aggregations thereof. Although the packet drop rate can be maintained on a per-flow basis, the resources necessary to maintain such statistics typically are difficult for a typically network routing device to maintain. Accordingly, rather than monitor the packet drop rate for each packet flow, the SAP module  120  groups the packet flows into a plurality of aggregations based on one or more aggregation criteria and determines the packet drop rate on a per-aggregation basis. Any of a variety of aggregation criteria may be used, although different aggregation criteria may have different performance trade-offs between accuracy and memory/computation requirements. In one embodiment, the SAP module  120  employs an application-level granularity to the aggregation of packet flows by using the destination port found in the destination port field of the TCP/IP header of the packets as the aggregation criterion. Accordingly, all packet flows directed to the same destination port are combined by the SAP module  120  into the same aggregation of packet flows. Other examples of aggregation criteria include the destination IP address, the source IP address, a hash of various fields of the packets, and the like. The aggregation criterion also can include a combination of other aggregation criteria, such as a combination of the destination IP address and the source IP address. As the SAP mechanism is not limited to aggregation of multiple packet flows but instead can be performed on an individual packet flow basis, reference to an aggregation of packet flows also includes a single packet flow for implementations of the SAP mechanism on a per-flow basis (that is, the aggregation criterion in such instances can be an identifier unique to a single packet flow). 
     The SAP module  120  uses the average packet drop rate across all of the aggregations (P avg     —     tot ) to set a threshold packet drop rate (P thresh ), which is then compared with the current packet drop rates for each of the aggregations to identify any aggregations having packet flows that are potentially subject to a shrew attack. In one embodiment, the SAP module  120  identifies an aggregation as having a packet flow potentially victim to a shrew attack when the current packet drop rate of the aggregation is greater than the current threshold packet drop rate for all of the aggregations. Conversely, the SAP module  120  identifies an aggregation as not having any packet flows potentially victim to a shrew attack when the current packet drop rate of the aggregation is less than the current threshold packet drop rate. The SAP module  120  then assigns a priority status to packets based on whether their associated aggregation has been identified as a potential victim of a shrew attack. For an aggregation identified as a potential victim, the SAP module  120  marks the packets of the packet flows of the aggregation as having a higher priority status. For an aggregation identified as not potentially subject to a shrew attack, the SAP module  120  marks the packets of the packet flows of the aggregation as having a lower priority status. 
     The output control module  116  uses the priority status of the packets buffered in the output buffer  114  to control the output of the packets (packets  141 - 143 , for example) to the network segment  104 . In one embodiment, the output control module  116  preferentially selects for output those packets having the higher priority status over those packets having the lower priority status. As a result, the packets associated with the aggregations identified by the SAP module  120  as being potentially subject to a shrew attack are less likely to be dropped by the congestion control mechanism implemented by the output control module  116 , and thereby mitigating the shrew attack. The output control module  116  can employ any of a variety of congestion control mechanisms that implement a preferential drop policy, such as the AQM policy or WRED policy identified above. 
       FIG. 2  illustrates an example implementation of the SAP module  120  of the network routing device  102  of  FIG. 1  in accordance with at least one embodiment of the present disclosure. In the depicted example, the SAP module  120  includes a packet drop rate calculator  202 , a fair prioritization controller  204 , and a prioritization module  206 . As noted above, the output control module  116  processes packets buffered in the output buffer  114  for output from the network routing device  102  to a network segment  104 . In processing the packets for output, congestion on the network segment  104  (either normal congestion or congestion resulting from a shrew attack) may require that the output control module  116  drop packets (that is, cease attempting the transmission of a packet) such that only a subset of the packets buffered by the output buffer  114  are successfully transmitted by the network routing device  102  to the network segment  104 . Thus, the preferential selection of packets marked as having a higher priority status over packets marked as having a lower priority status results in the higher priority status packets being less likely to be dropped in the event of network congestion potentially caused by a shrew attack. 
     The packet drop rate calculator  202  receives signaling from the line interface  106  regarding the incoming packets and the dropped packets, and from this information the packet drop rate calculator  202  determines the average packet drop rate across all of the packet flows and the current packet drop rate for each aggregation of packet flows. In one embodiment, these packet drop rates are calculated by the packet drop rate calculator  202  in terms of cumulative bytes dropped up to time t (identified as d(t)) to cumulative bytes received up to time t (identified as a(t)). Accordingly, the packet drop rate calculator  202  implements two counters for each aggregation: an arrival counter (Count(in)) to accumulate the number of bytes received for the corresponding aggregation; and a drop counter (Count(out)) to accumulate the number of bytes dropped for the corresponding aggregation. In one embodiment the packet drop rate calculator  202  implements these counters in a memory  208 . To illustrate,  FIG. 2  depicts four counter pairs  211 - 214  implemented in a SRAM  208 , each counter pair corresponding to a different destination port (which serves as the aggregation criterion in this example). 
     To provide packet drop rate statistics that are less susceptible to small fluctuations in packet drop rates, the packet drop rate calculator  202 , in one embodiment, calculates the average packet drop rate for each aggregation over a time sliding window (TSW). The time sliding window is composed of a contiguous set of N time intervals, wherein each time interval is a fixed duration of t s  seconds. The duration of t s  is selected so as to be sufficiently short so as to permit identification of the instant high packet drop rates, whereas N should be large enough to consider the previous instant packet drop rates. At the beginning of each time interval, the packet drop rate calculator  202  initializes the arrival counter and the drop counter for each aggregation with the cumulative bytes for the counters from the previous time interval (that is, a(t)=a(t−1) and d(t)=d(t−1)). During the time interval t, new byte arrivals or byte drops increment a(t) or d(t), respectively, by the appropriate amount. Thus, the packet drop rate calculator  202  can calculate the average packet drop rate P avg [x] for each aggregation x over a sliding window of the last N time intervals as represented by the following equation: 
     
       
         
           
             
               
                 P 
                 avg 
               
                
               
                 [ 
                 x 
                 ] 
               
             
             = 
             
               
                 
                   Δ 
                    
                   
                       
                   
                    
                   
                     d 
                      
                     
                       ( 
                       t 
                       ) 
                     
                   
                 
                 
                   Δ 
                    
                   
                       
                   
                    
                   
                     a 
                      
                     
                       ( 
                       t 
                       ) 
                     
                   
                 
               
               = 
               
                 
                   
                     d 
                      
                     
                       ( 
                       t 
                       ) 
                     
                   
                   - 
                   
                     d 
                      
                     
                       ( 
                       
                         t 
                         - 
                         N 
                       
                       ) 
                     
                   
                 
                 
                   
                     a 
                      
                     
                       ( 
                       t 
                       ) 
                     
                   
                   - 
                   
                     a 
                      
                     
                       ( 
                       
                         t 
                         - 
                         N 
                       
                       ) 
                     
                   
                 
               
             
           
         
       
     
     To calculate this average, the packet drop rate calculator  202  can maintain N pairs of counters for each aggregation. Using the time sliding window, the packet drop rate calculator  202  then can recursively free and reuse counters using a circular modulo counter allocation. Thus, the total number of counters needed per aggregation is 2*N in this instance. The average packet drop rate across all of the aggregations at time t (P avg     —     tot (t)) therefore can be calculated by the packet drop rate calculator  202  as: 
     
       
         
           
             
               
                 P 
                 avg_tot 
               
                
               
                 ( 
                 t 
                 ) 
               
             
             = 
             
               
                 
                   
                     ∑ 
                     
                       i 
                       = 
                       
                         1 
                          
                         
                             
                         
                          
                         … 
                          
                         
                             
                         
                          
                         N 
                       
                     
                   
                    
                   
                       
                   
                    
                   
                     Pavg 
                      
                     
                       [ 
                       i 
                       ] 
                     
                   
                 
                 N 
               
               = 
               
                 
                   
                     ∑ 
                     
                       i 
                       = 
                       
                         1 
                          
                         
                             
                         
                          
                         … 
                          
                         
                             
                         
                          
                         N 
                       
                     
                   
                    
                   
                       
                   
                    
                   
                     Δ 
                      
                     
                         
                     
                      
                     
                       d 
                        
                       
                         ( 
                         t 
                         ) 
                       
                     
                   
                 
                 
                   
                     ∑ 
                     
                       i 
                       = 
                       
                         1 
                          
                         
                             
                         
                          
                         … 
                          
                         
                             
                         
                          
                         N 
                       
                     
                   
                    
                   
                       
                   
                    
                   
                     Δ 
                      
                     
                         
                     
                      
                     
                       a 
                        
                       
                         ( 
                         t 
                         ) 
                       
                     
                   
                 
               
             
           
         
       
     
     The average packet drop rate across all of the aggregations can be updated, for example, every t s  seconds. The current or instant packet drop rate P i [x] for an aggregation x at time t can be calculated by the packet drop rate calculator  202  as the ratio of the cumulative arrived bytes for the aggregation to the cumulative dropped bytes for the aggregation at the time t, or: 
     
       
         
           
             
               
                 
                   P 
                   i 
                 
                  
                 
                   ( 
                   t 
                   ) 
                 
               
                
               
                 [ 
                 x 
                 ] 
               
             
             = 
             
               
                 
                   d 
                    
                   
                     ( 
                     t 
                     ) 
                   
                 
                  
                 
                   [ 
                   x 
                   ] 
                 
               
               
                 
                   a 
                    
                   
                     ( 
                     t 
                     ) 
                   
                 
                  
                 
                   [ 
                   x 
                   ] 
                 
               
             
           
         
       
     
     The fair prioritization controller  204  determines the threshold packet drop rate (P thresh (t)) used to identify aggregations having a packet flow that is potentially victim to a shrew attack. In one embodiment, the threshold packet drop rate is determined based on the average packet drop rate across all aggregations, and further based on a minimum packet drop rate P min  such that the threshold packet drop rate is set to the greater of the average packet drop rate or the minimum packet drop rate P. The minimum packet drop rate P min  is predetermined or otherwise set by a user or provider of the network routing device  102  and specifies the minimum packet drop rate at which the SAP mechanism does not intervene. Accordingly, the minimum packet drop rate P min  preferably is set to a value sufficient to encompass small fluctuations in packet drop rates typically encountered in the packet flows in the absence of a shrew attack, but low enough to trigger the SAP mechanism quickly in the event of a shrew attack. An example value of 0.1% for P min  has been identified as acceptable under certain conditions in simulations performed for the SAP mechanism. 
     The prioritization module  206  uses the dynamically-updated threshold packet drop rate P thresh  to identify those aggregations having packet flows potentially subject to a shrew attack and to prioritize the packets of the identified aggregations accordingly so as to more fully ensure their successful transmission by the network routing device  102 . In one embodiment, the prioritization module  206  makes this identification on the basis of a comparison of the instant packet drop rate P i (t)[x] of a selected aggregation x with the threshold packet drop rate P thresh (t). In the event that the instant packet drop rate for the selected aggregation is greater than the threshold packet drop rate (that is, when P i (t)[x]&gt;P thresh (t)), the prioritization module  206  identifies the selected aggregation as potentially subject to a shrew attack. Conversely, in the event that the instant packet drop rate is not greater than the threshold packet drop rate (that is, when P i (t)[x]&lt;=P thresh (t)), the prioritization module  206  identifies the selected aggregation as not subject to a shrew attack. 
     Rather than using a single threshold packet drop rate, in one embodiment the applicable threshold packet drop rate can be selected from multiple threshold packet drop rates. To illustrate, each application can have a separate threshold packet drop rate based on an average packet drop rate for just those aggregations associated with the particular application. To illustrate, one threshold packet drop rate could be calculated for packet flows associated with real-time applications and another threshold packet drop rate could be calculated for packet flows associated with file transfer applications. Alternately, the same average packet drop rate can be calculated, but different minimum threshold packet drop rates P min  can be used for different aggregations. 
     Upon receipt of an outgoing packet, the prioritization module  206  identifies the aggregation to which the packet is associated and marks the packet as having either the higher priority status or the lower priority status based on whether the identified aggregation was determined to be potentially subject to a shrew attack. Upon marking the packet as having either the higher priority status or the lower priority status, the packet is placed in the output buffer  114 . The output control module  116  then can employ a preferential packet dropping scheme, such as the AQM policy or the WRED policy, to preferentially select for transmission those packets from the output buffer  114  that have the higher priority status over those packets having the lower priority status (or, put another way, to preferentially drop those packets from the output buffer  114  that have the lower priority status over those packets having the higher priority status). 
     By selectively prioritizing outgoing packets of aggregations of packet flows having at least one packet flow that may be victim to a shrew attack, the SAP mechanism described above can mitigate the effects of the shrew attack by more fully ensuring that the packets of the victim packet flow are effectively transmitted. As such, the SAP mechanism can reduce the risk of TCP sessions closing during a shrew attack, as well as help maintain a normal throughput for packet flows during a shrew attack. 
     Although the present specification describes components and functions that may be implemented in particular embodiments with reference to particular standards and protocols, the invention is not limited to such standards and protocols. Such standards are periodically superseded by faster or more efficient equivalents having essentially the same functions. Accordingly, replacement standards and protocols having the same or similar functions as those disclosed herein are considered equivalents thereof. 
     The illustrations of the embodiments described herein are intended to provide a general understanding of the structure of the various embodiments. The illustrations are not intended to serve as a complete description of all of the elements and features of apparatus and systems that utilize the structures or methods described herein. Many other embodiments may be apparent to those of skill in the art upon reviewing the disclosure. Other embodiments may be utilized and derived from the disclosure, such that structural and logical substitutions and changes may be made without departing from the scope of the disclosure. Additionally, the illustrations are merely representational and may not be drawn to scale. Certain proportions within the illustrations may be exaggerated, while other proportions may be minimized. Accordingly, the disclosure and the figures are to be regarded as illustrative rather than restrictive. 
     The Abstract of the Disclosure is provided to comply with 37 C.F.R. §1.72(b) and is submitted with the understanding that it will not be used to interpret or limit the scope or meaning of the claims. In addition, in the foregoing Detailed Description of the Drawings, various features may be grouped together or described in a single embodiment for the purpose of streamlining the disclosure. This disclosure is not to be interpreted as reflecting an intention that the claimed embodiments require more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive subject matter may be directed to less than all of the features of any of the disclosed embodiments. Thus, the following claims are incorporated into the Detailed Description of the Drawings, with each claim standing on its own as defining separately claimed subject matter. 
     The above disclosed subject matter is to be considered illustrative, and not restrictive, and the appended claims are intended to cover all such modifications, enhancements, and other embodiments which fall within the true spirit and scope of the present disclosed subject matter. Thus, to the maximum extent allowed by law, the scope of the present disclosed subject matter is to be determined by the broadest permissible interpretation of the following claims and their equivalents, and shall not be restricted or limited by the foregoing detailed description.