Network Working Group V. Shah Internet-Draft Novell Inc. Expires: October 28, 2000 April 29, 2000 Preventing DDoS Smurf Attacks draft-vshah-ddos-smurf-00.txt Status of this Memo This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on October 28, 2000. Copyright Notice Copyright (C) The Internet Society (2000). All Rights Reserved. Abstract Host Requirements RFC1122 states that an ICMP Echo Request destined to an IP broadcast or IP multicast address MAY be silently discarded. By discarding all broadcast ICMP Echo Requests, the end user may lose valuable diagnostic capability. By forwarding some broadcast ICMP Echo Requests, the host may be used as launching platform for Smurf Attacks[1]. This draft describes a solution for selectively dropping broadcast ICMP Echo Requests based on whether the source address is within the network or from outside the network. Any host implementing this solution ensures that it does not participate in a Smurf attack irrespective of whether responding to broadcast ICMP Echo Requests is enabled or disabled on it. Shah Expires October 28, 2000 [Page 1] Internet-Draft Preventing DDoS Smurf Attacks April 2000 Conventions used in this document The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC-2119. Shah Expires October 28, 2000 [Page 2] Internet-Draft Preventing DDoS Smurf Attacks April 2000 1. Problem Description The Smurf Attack[1] is initiated by sending an ICMP Echo Request packet destined to an IP directed broadcast address; the source IP address is the address of the victim. All the machines from the destination network respond back with an ICMP Echo Reply to the victim, thus generating a "Smurf" denial-of-service attack. This attack can be easily launched from a single point against many remote networks. Today, the recommended solution steps for preventing this attack are: a) Each Router MUST disable forwarding and receiving of directed broadcasts by default [2]. b) Each Host MAY silently discard an ICMP Echo Request destined to an IP broadcast [3]. c) Each ISP router SHOULD implement network ingress filtering to prevent forged packets leaving your network boundary [4]. The general practice is that each router implements solution (a) and each ISP implements solution (c). Since the usage of solution (a) is widespread, attempts to generate Smurf attacks generally fail. Hence the solution (b) described above is redundant. Nonetheless, each operating system can choose either to respond or not to respond to broadcast ICMP Echo Request. Some of the operating systems have set options provided for changing this default behavior. The latest Distributed Denial of Service (DDoS) attack changes the way of generating the Smurf attack. In this variant, the attacker compromises a system within a network and uses that network itself to launch an attack against a remote network. The attacker's program, running in such compromised system, sends a local broadcast ICMP Echo request using the spoofed source address of the victim machine in the remote network. Because this broadcast request does not travel through a router, solutions (a) and (c) described above are not sufficient to prevent the attack. All the machines in this network which do not discard broadcast ICMP packets will respond back with an ICMP Echo Reply to the victim, thus generating a Distributed Denial of Service (DDOS) Smurf attack. Shah Expires October 28, 2000 [Page 3] Internet-Draft Preventing DDoS Smurf Attacks April 2000 2. Discussion One way to avoid generating the DDoS Smurf attack from a compromised system within the network is to discard all the broadcast ICMP Echo Requests as suggested by solution (b) in the previous section. It leads to dropping all the ICMP Echo Requests destined to IP broadcast or multicast address. This is a debatable change because the ICMP Echo Requests to a broadcast address are a valuable diagnostic capability. The resolution of the dilemma is to distinguish ICMP Echo requests to broadcast addresses generated from within the network from those purportedly generated outside the network and to allow only the former ones. This will thwart DDOS Smurf attacks. Such a check can be achieved by examining the source address of the incoming ICMP Echo Request that has a multicast or broadcast destination address. If the source address of an ICMP Echo Request and the address of the interface over which such packet is received are NOT in the same network, then the packet is either coming from the other network or it has forged the source address. By dropping such external ICMP Echo Requests, the machine avoids generating DDOS Smurf attacks. Shah Expires October 28, 2000 [Page 4] Internet-Draft Preventing DDoS Smurf Attacks April 2000 3. Examples Consider an example network with the following configuration Network Address : 193.97.92.0 Network Mask : 255.255.255.0 Compromised System : 193.97.92.1 Victim Address : 164.99.100.100 Example 1. Valid broadcast ping request Ping request: source = 193.97.92.1, dest = 193.97.92.255 Here (source address AND mask) equals the network address. This is a valid request and all the hosts MAY respond with Ping Reply. Example 2. Spoofed or External broadcast ping request Ping request: source = 164.99.100.100, dest = 193.97.92.255 Here (source address AND mask) is not equal to network address. This may be spoofed request or request coming from outside the network. All the hosts MUST silently discard such request by default. Example 3. Valid multicast ping request Ping request: source = 193.97.92.1, dest = 224.0.0.1 Multicast IP address 224.0.0.1 represents 'All Systems on this Subnet' Here (source address AND mask) equals the network address. This is a valid multicast request and all the hosts MAY respond with Ping Reply. Shah Expires October 28, 2000 [Page 5] Internet-Draft Preventing DDoS Smurf Attacks April 2000 4. Recommendation Host Requirements (RFC1122)[3] describes the behavior of a host receiving ICMP Echo Request destined to an IP broadcast or multicast address, as follows: 3.2.2.6 Echo Request/Reply: RFC-792 ... An ICMP Echo Request destined to an IP broadcast or IP multicast address MAY be silently discarded. We suggest the following change to the above described behavior: 3.2.2.6 Echo Request/Reply: RFC-792 ... An ICMP Echo Request destined to an IP broadcast or IP multicast address MAY be silently discarded. However, if the host is configured to reply to broadcast or multicast ICMP Echo Requests, then the following additional check MUST be performed: if the source IP address in the request and the IP address of the interface over which such request is received are NOT in the same network, then the ICMP Echo Request MUST be silently discarded by default. Shah Expires October 28, 2000 [Page 6] Internet-Draft Preventing DDoS Smurf Attacks April 2000 5. Security Considerations The primary intent of this document is to prevent a network with a compromised machine from generating a Smurf Attack to other networks over the Internet. This document describes a technique which prevents the host from generating a Smurf attack directed at a target outside the network. Responding to broadcast ICMP Echo Requests by default may lead to a Smurf attack within the network, if one or more systems within the network have been compromised. Because such attacks are confined within a single network, they are not as powerful as Smurf attacks spanning network boundaries. It is straightforward to stop local Smurf attacks by tracing back to the origin of the attack from the MAC address. 6. Acknowledgements The author gratefully acknowledges Jamshid Mahdavi and Hilarie Orman for reviewing this proposal and providing valuable feedback. The author also likes to thank CJ, Anumita and Pravin for their comments. Shah Expires October 28, 2000 [Page 7] Internet-Draft Preventing DDoS Smurf Attacks April 2000 References [1] Craig Huegen, see: . [2] Senie, D., "Changing the Default for Directed Broadcasts in Routers", RFC 2644, August 1999. [3] Braden, R., "Requirements for Internet Hosts -- Communication Layers", RFC 1122, October 1989. [4] Ferguson, P. and D. Senie, "Changing the Default for Directed Broadcasts in Routers", RFC 2267, January 1998. [5] CERT Advisory CA-98.01 at: . Author's Address Vipul Shah Novell Inc. Novell Product Group, Bangalore, 49/1 & 49/3, G.B. Palya, 7th Mile, Hosur Road, Bangalore 560068 INDIA Phone: +91-80-572-1858 Ext: 2244 EMail: svipul@novell.com URI: http://www.novell.com/ Shah Expires October 28, 2000 [Page 8] Internet-Draft Preventing DDoS Smurf Attacks April 2000 Full Copyright Statement Copyright (C) The Internet Society (2000). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Acknowledgement Funding for the RFC editor function is currently provided by the Internet Society. Shah Expires October 28, 2000 [Page 9]