Spanning Tree Protocol and Ethernet PAUSE Frames Ddos Attacks: Their Efficient Mitigation
Total Page:16
File Type:pdf, Size:1020Kb
Spanning Tree Protocol and Ethernet PAUSE Frames DDoS Attacks: Their Efficient Mitigation Luis A. Trejo1, Ra´ul Monroy1, and Rafael L´opez Monsalvo2 1 Department of Computer Science, Tecnol´ogico de Monterrey, Campus Estado de M´exico Carr. Lago de Guadalupe, Km. 3.5, Estado de M´exico, 52926, Mexico [email protected], [email protected] 2 Forˆet Network Consulting Carlos Bustamante 9B, Estado de M´exico, 53100, Mexico 159 E. 33rd Street Suite 3, New York, NY 10016, U.S.A. [email protected] Abstract. Making protocols at layer 2 of the OSI model less vulnerable against computational attacks has become essential. They represent a great percentage of attacks being originated within the organization. Recently, several attacks using Ethernet PAUSE frames in combina- tion with well known Spanning Tree Protocol (STP) attacks have been reported. We believe that STP can be properly configured and continuously monitored so as to avoid any network degradation due to an undetected intrusion and misuse of Ethernet PAUSE frames (802.3x). In this paper, the main STP security threats that an intruder can exploit are presented: becoming root, modifying the STP active topology, changing STP timers, and generating persistent Topology Change Notification (TCN) messages. Also, a switched network can be brought down completely, hence achieving a Distributed Denial of Service Attack, by sending malicious Ethernet PAUSE frames. These threats were fully implemented in laboratory and general recommendations to attain a better level of security through best STP and network management practices were derived. Furthermore, some recommendations can be translated into security policies and incorporated as part of an existing Intrusion Detection/Prevention System. Keywords: Spanning Tree Protocol, Distributed DoS, 802.1D, 802.1w, 802.3x, Network Man- agement, Ethernet Flow Control, Layer 2 Attacks, Intrusion Detection Systems 1 Introduction Many information security attacks performed over the communications infrastructure of an organization are known to have their source within the organization. Special attention to information security attacks arising at layer 2 of the OSI model has increased in a very important manner [6]. This is the case of layer 2 attacks that take advantage of publicly known vulnerabilities at this layer. A computer’s system security is considered to be as strong as its weakest link. Considering that OSI layer 2 is the foundation of upper layers, verifying security at this point becomes essential. One of the main goals of this research is the study of protocols that operate at layer 2 (such as the Spanning Tree Protocol (STP), and the 802.3x standard) in order to under- stand their full operation and to discover possible security flaws. In this manner, general recommendations and best administrative practices can be derived, hence increasing the level of security of the network. STP is a protocol used in switched networks to obtain a logical topology free of loops from a physical topology containing loops [1, 14]. It offers the administrator the benefits of a redundant topology without the risk caused by physical loops. The main known STP threats that an intruder can take advantage of are: becoming root, modifying the STP active topology, changing STP timers, and generating persistent Topology Change Notification (TCN) messages [13]. Another important threat that can be exploited by an intruder consists of the frequent triggering of the active topology reconfig- uration, forcing some ports to go to the blocking, listening, learning, and forwarding states. Given that ports in a state different than the forwarding state do not forward user frames, a degradation of the network service becomes evident. On the other hand, 802.3x is a pause-based flow control mechanism basically used to reduce the receiving packet rate coming from a peer device in order to avoid packet loss. Recently, several attacks using 802.3x frames in combination with well known Spanning Tree Protocol (STP) attacks have been reported [8]. We fully implemented in our networking laboratory the above STP threats and 802.3x attacks. Our results are detailed in the following sections. We proved that replicating the attack scenarios on a production environment is a very simple task, which is a result of great concern, since in some cases the network service had been brought completely down. Therefore, recommendations in order to attain a better level of security through best man- agement practices become essential. Furthermore, some recommendations can be translated into security policies and incorporated as part of an existing Intrusion Detection System [7, 10]. Many of the aspects discussed in this paper also apply to 802.1w [2, 5, 11] networks, which is the standard that describes the Rapid Spanning Tree Protocol (RSTP). Marro in [9] describes a very detailed study on R/STP (RSTP and STP) vulnerabilities and proposes efficient countermeasures to be included as part of any new R/STP implementation. He built SToP, a tool that allows modifying any field in the BPDU message and is capable of generating BPDU packets at a high rate thus very quickly flooding a network. The tool was mainly used to validate on a controlled environment the assumptions made about R/STP security flaws and their mitigation. Howard [6] gives an overview of layer 2 protocols, including R/STP, that are susceptible to attacks and thus compromise upper layers of an organization’s IT infrastructure. Paper overview This paper is organized as follows. In the previous section, a valid jus- tification for studying layer 2 attacks was presented, choosing as a starting point for our research, the STP protocol and 802.3x. Then main threats were introduced pointing out the need of general recommendations aiming at improving security at layer 2. In Section 2, the pause-based flow control mechanism for Ethernet implementations, as specified by 802.3x, is explained. In Section 3, a quick review of the STP protocol is introduced. In Section 4, the STP attack scenarios we implemented in laboratory are described and in Section 5, DDoS attacks using 802.3x frames on a STP active topology are presented. In Section 6 general recommendations for improving security at layer 2 are given. Finally, Sections 7 and 8 present our conclusions and ongoing research along with a brief description of the laboratory equipment used to implement the different attack scenarios. 2 Ethernet Flow Control The standard 802.3x [3] is a supplement to the ANSI/IEEE 802.3 standard, where a mech- anism for pause-based flow control is added. The main purpose of flow control is to reduce the receiving packet rate at some point in the network in order to avoid packet loss. Flow control is achieved by means of special MAC Control frames, known as PAUSE frames. MAC Control frames are distinguished from other MAC frames, i.e. data frames, only by their Length/Type field; in this case, the Length/Type field value is set to 0x88-08. Therefore, a PAUSE frame is defined as a MAC Control frame and an Opcode value of 0x00-01 (see Fig. 1). A device is capable of supporting multiple flow control modes. These modes are sym- metric flow control (SFC), asymmetric flow control (AFC), and no flow control at all. In SFC mode, PAUSE frames may flow in either direction. In AFC mode, they may flow only in one direction, whether that direction is towards the local device or away from the local device. Destination Address (6) Source Address (6) Length/Type (2) MAC Control Opcode (2) MAC Control Parameters (variable) Reserved [Zeroes padding] (variable) Fig. 1. MAC Control frame format. The number in parenthesis represents the number of octets used. The last two fields together add to 44 octets. 2.1 Transmission of a PAUSE frame A device wishing to reduce the receiving packet rate, sends a PAUSE frame to its peer device indicating the period of time the transmitting device should stop sending data frames. This time is specified in the MAC Control Parameters field. The generated PAUSE frame will contain the following values: 1. A globally-assigned 48 bit multicast address 01-80-C2-00-00-013 , as the destination ad- dress, or the unicast address of the peer device. 2. The MAC Control Opcode = 0x00-01, indicating a PAUSE frame. 3. A two-octet MAC Control Parameter, known as pause time, indicating the length of time for which the peer device is requested to inhibit data frame transmission. The pause time is measured in units of pause quanta, which is equal to 512 bit times of the particular Ethernet implementation. The range of possible pause time values is 0 to 65,535 pause quanta. For example, if pause time is set to 0x00-0A, then the time requested to inhibit transmission would be equal to 5,120 bit times. For a 10-Gigabit Ethernet im- plementation, this corresponds to 0.512 µs. Table 1 shows different inhibition times for a pause time of 0xFF-FF. 3 The multicast address is reserved for use of MAC Control PAUSE frames. IEEE 802.1D-conformant bridges will not forward frames sent to this multicast destination address, regardless of the state of the bridges ports. Table 1. Total time a device stops sending using a maximum pause time value for different Ethernet implementations. Ethernet pause time pause quanta Total inhibition time 10 Gbps 0xFF-FF 0.0512 µs 3.35 ms. 1 Gbps 0xFF-FF 0.512 µs 33.55 ms. 100 Mbps 0xFF-FF 5.12 µs 333.53 ms. 2.2 Reception of a PAUSE frame Upon reception of a valid PAUSE frame, the device will start a timer called pause timer, and will set the timer to the time specified by the received pause time parameter multiplied by pause quanta of the particular Ethernet implementation.