home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / rfc / 3 / rfc2267.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  20.5 KB  |  564 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                        P. Ferguson
  8. Request for Comments: 2267                           Cisco Systems, Inc.
  9. Category: Informational                                         D. Senie
  10.                                                           BlazeNet, Inc.
  11.                                                             January 1998
  12.  
  13.  
  14.                        Network Ingress Filtering:
  15.             Defeating Denial of Service Attacks which employ
  16.                        IP Source Address Spoofing
  17.  
  18. Status of this Memo
  19.  
  20.    This memo provides information for the Internet community.  It does
  21.    not specify an Internet standard of any kind.  Distribution of this
  22.    memo is unlimited.
  23.  
  24. Copyright Notice
  25.  
  26.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  27.  
  28. Abstract
  29.  
  30.    Recent occurrences of various Denial of Service (DoS) attacks which
  31.    have employed forged source addresses have proven to be a troublesome
  32.    issue for Internet Service Providers and the Internet community
  33.    overall.  This paper discusses a simple, effective, and
  34.    straightforward method for using ingress traffic filtering to
  35.    prohibit DoS attacks which use forged IP addresses to be propagated
  36.    from 'behind' an Internet Service Provider's (ISP) aggregation point.
  37.  
  38. Table of Contents
  39.  
  40.     1.  Introduction . . . . . . . . . . . . . . . . . . . . . . .  2
  41.     2.  Background . . . . . . . . . . . . . . . . . . . . . . . .  2
  42.     3.  Restricting forged traffic . . . . . . . . . . . . . . . .  5
  43.     4.  Further capabilities for networking equipment. . . . . . .  6
  44.     5.  Liabilities. . . . . . . . . . . . . . . . . . . . . . . .  6
  45.     6.  Summary. . . . . . . . . . . . . . . . . . . . . . . . . .  7
  46.     7.  Security Considerations. . . . . . . . . . . . . . . . . .  7
  47.     8.  Acknowledgments  . . . . . . . . . . . . . . . . . . . . .  8
  48.     9.  References . . . . . . . . . . . . . . . . . . . . . . . .  8
  49.    10.  Authors' Addresses . . . . . . . . . . . . . . . . . . . .  9
  50.    11.  Full Copyright Statement . . . . . . . . . . . . . . . . . 10
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Ferguson & Senie             Informational                      [Page 1]
  59.  
  60. RFC 2267               Network Ingress Filtering            January 1998
  61.  
  62.  
  63. 1. Introduction
  64.  
  65.    A resurgence of Denial of Service Attacks [1] aimed at various
  66.    targets in the Internet have produced new challenges within the
  67.    Internet Service Provider (ISP) and network security communities to
  68.    find new and innovative methods to mitigate these types of attacks.
  69.    The difficulties in reaching this goal are numerous; some simple
  70.    tools already exist to limit the effectiveness and scope of these
  71.    attacks, but they have not been widely implemented.
  72.  
  73.    This method of attack has been known for some time. Defending against
  74.    it, however, has been an ongoing concern. Bill Cheswick is quoted in
  75.    [2] as saying that he pulled a chapter from his book, "Firewalls and
  76.    Internet Security" [3], at the last minute because there was no way
  77.    for an administrator of the system under attack to effectively defend
  78.    the system. By mentioning the method, he was concerned about
  79.    encouraging it's use.
  80.  
  81.    While the filtering method discussed in this document does
  82.    absolutely nothing to protect against flooding attacks which
  83.    originate from valid prefixes (IP addresses), it will prohibit an
  84.    attacker within the originating network from launching an attack of
  85.    this nature using forged source addresses that do not conform to
  86.    ingress filtering rules. All providers of Internet connectivity are
  87.    urged to implement filtering described in this document to prohibit
  88.    attackers from  using forged source addresses which do not reside
  89.    within a range of legitimately advertised prefixes.  In other words,
  90.    if an ISP is aggregating routing announcements for multiple
  91.    downstream networks, strict traffic filtering should be used to
  92.    prohibit traffic which claims to have originated from outside of
  93.    these aggregated announcements.
  94.  
  95.    An additional benefit of implementing this type of filtering is that
  96.    it enables the originator to be easily traced to it's true source,
  97.    since the attacker would have to use a valid, and legitimately
  98.    reachable, source address.
  99.  
  100. 2. Background
  101.  
  102.    A simplified diagram of the TCP SYN flooding problem is depicted
  103.    below:
  104.  
  105.                                                        9.0.0.0/8
  106.     host <----- router <--- Internet <----- router <-- attacker
  107.  
  108.              TCP/SYN
  109.          <---------------------------------------------
  110.                Source: 192.168.0.4/32
  111.  
  112.  
  113.  
  114. Ferguson & Senie             Informational                      [Page 2]
  115.  
  116. RFC 2267               Network Ingress Filtering            January 1998
  117.  
  118.  
  119.     SYN/ACK
  120.     no route
  121.              TCP/SYN
  122.          <---------------------------------------------
  123.                Source: 10.0.0.13/32
  124.     SYN/ACK
  125.     no route
  126.              TCP/SYN
  127.          <---------------------------------------------
  128.                Source: 172.16.0.2/32
  129.     SYN/ACK
  130.     no route
  131.  
  132.     [etc.]
  133.  
  134.     Assume:
  135.  
  136.     o The "host" is the targeted machine.
  137.  
  138.     o The attacker resides within the "valid" prefix, 9.0.0.0/8.
  139.  
  140.     o The attacker launches the attack using randomly changing source
  141.       addresses; in this example, the source addresses are depicted as
  142.       from within [4], which are not generally present in the global
  143.       Internet routing tables, and therefore, unreachable. However, any
  144.       unreachable prefix could be used to perpetrate this attack
  145.       method.
  146.  
  147.    Also worthy of mention is a case wherein the source address is forged
  148.    to appear to have originated from within another legitimate network
  149.    which appears in the global routing table(s). For example, an
  150.    attacker using a valid network address could wreak havoc by  making
  151.    the attack appear to come from an organization which did not, in
  152.    fact, originate the attack and was completely innocent. In such
  153.    cases, the administrator of a system under attack may be inclined to
  154.    filter all traffic coming from the apparent attack source. Adding
  155.    such a filter would then result in a denial of service to
  156.    legitimate, non-hostile end-systems. In this case, the administrator
  157.    of the system under attack unwittingly becomes an accomplice of the
  158.    attacker.
  159.  
  160.    Further complicating matters, TCP SYN flood attacks will result in
  161.    SYN-ACK packets being sent to one or many hosts which have no
  162.    involvement in the attack, but which become secondary victims. This
  163.    allows the attacker to abuse two or more systems at once.
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Ferguson & Senie             Informational                      [Page 3]
  171.  
  172. RFC 2267               Network Ingress Filtering            January 1998
  173.  
  174.  
  175.    Similar attacks have been attempted using UDP and ICMP flooding.
  176.    The former attack (UDP flooding) uses forged packets to try and
  177.    connect the chargen UDP service to the echo UDP service at another
  178.    site.  Systems administrators should NEVER allow UDP packets destined
  179.    for system diagnostic ports from outside of their administrative
  180.    domain to reach their systems. The latter attack (ICMP flooding),
  181.    uses an insidious feature in IP subnet broadcast replication
  182.    mechanics. This attack relies on a router serving a large multi-
  183.    access broadcast network to frame an IP broadcast address (such as
  184.    one destined for 10.255.255.255) into a Layer 2 broadcast frame (for
  185.    ethernet, FF:FF:FF:FF:FF:FF). Ethernet NIC hardware (MAC-layer
  186.    hardware, specifically) will only listen to a select number of
  187.    addresses in normal operation.  The one MAC address that all devices
  188.    share in common in normal operation is the media broadcast, or
  189.    FF:FF:FF:FF:FF:FF.  In this case, a device will take the packet and
  190.    send an interrupt for processing. Thus, a flood of these broadcast
  191.    frames will consume all available resources on an end-system [9]. It
  192.    is perhaps prudent that system administrators should consider
  193.    ensuring that their border routers do not allow directed broadcast
  194.    packets to be forwarded through their routers as a default.
  195.  
  196.    When an TCP SYN attack is launched using unreachable source address,
  197.    the target host attempts to reserve resources waiting for a
  198.    response.  The attacker repeatedly changes the bogus source address
  199.    on each new packet sent, thus exhausting additional host resources.
  200.  
  201.    Alternatively, if the attacker uses someone else's valid host
  202.    address as the source address, the system under attack will send a
  203.    large number of SYN/ACK packets to what it believes is the originator
  204.    of the connection establishment sequence. In this fashion, the
  205.    attacker does damage to two systems: the destination target system,
  206.    as well  as the system which is actually using the spoofed address in
  207.    the global routing system.
  208.  
  209.    The result of both attack methods is extremely degraded performance,
  210.    or worse, a system crash.
  211.  
  212.    In response to this threat, most operating system vendors have
  213.    modified their software to allow the targeted servers to sustain
  214.    attacks with very high connection attempt rates. This is a welcome
  215.    and necessary part of the solution to the problem. Ingress filtering
  216.    will take time to be implemented pervasively and be fully effective,
  217.    but the extensions to the operating systems can be implemented
  218.    quickly. This combination should prove effective against source
  219.    address spoofing. See [1] for vendor and platform software upgrade
  220.    information.
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Ferguson & Senie             Informational                      [Page 4]
  227.  
  228. RFC 2267               Network Ingress Filtering            January 1998
  229.  
  230.  
  231. 3. Restricting forged traffic
  232.  
  233.    The problems encountered with this type of attack are numerous, and
  234.    involve shortcomings in host software implementations, routing
  235.    methodologies, and the TCP/IP protocols themselves.  However, by
  236.    restricting transit traffic which originates from a downstream
  237.    network to known, and intentionally advertised, prefix(es), the
  238.    problem of source address spoofing can be virtually eliminated in
  239.    this attack scenario.
  240.  
  241.                                11.0.0.0/8
  242.                                    /
  243.                                router 1
  244.                                  /
  245.                                 /
  246.                                /                          9.0.0.0/8
  247.          ISP <----- ISP <---- ISP <--- ISP <-- router <-- attacker
  248.           A          B         C        D         2
  249.                     /
  250.                    /
  251.                   /
  252.               router 3
  253.                 /
  254.             12.0.0.0/8
  255.  
  256.  
  257.    In the example above, the attacker resides within 9.0.0.0/8, which is
  258.    provided Internet connectivity by ISP D.  An input traffic filter on
  259.    the ingress (input) link of "router 2", which provides connectivity
  260.    to the attacker's network, restricts traffic to allow only traffic
  261.    originating from source addresses within the 9.0.0.0/8 prefix, and
  262.    prohibits an attacker from using "invalid" source addresses which
  263.    reside outside of this prefix range.
  264.  
  265.    In other words, the ingress filter on "router 2" above would check:
  266.  
  267.     IF    packet's source address from within 9.0.0.0/8
  268.     THEN  forward as appropriate
  269.  
  270.     IF    packet's source address is anything else
  271.     THEN  deny packet
  272.  
  273.    Network administrators should log information on packets which are
  274.    dropped. This then provides a basis for monitoring any suspicious
  275.    activity.
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282. Ferguson & Senie             Informational                      [Page 5]
  283.  
  284. RFC 2267               Network Ingress Filtering            January 1998
  285.  
  286.  
  287. 4. Further possible capabilities for networking equipment
  288.  
  289.    Additional functions should be considered for future platform
  290.    implementations. The following one is worth noting:
  291.  
  292.       o Implementation of automatic filtering on remote access servers.
  293.         In most cases, a user dialing into an access server is an
  294.         individual user on a single PC. The ONLY valid source IP address
  295.         for packets originating from that PC is the one assigned by the
  296.         ISP (whether statically or dynamically assigned). The remote
  297.         access server could check every packet on ingress to ensure the
  298.         user is not spoofing the source address on the packets which he
  299.         is originating. Obviously, provisions also need to be made for
  300.         cases where the customer legitimately is attaching a net or
  301.         subnet via a remote router, but this could certainly be
  302.         implemented as an optional parameter. We have received reports
  303.         that some vendors and some ISPs are already starting to
  304.         implement this  capability.
  305.  
  306.    We considered suggesting routers also validate the source IP address
  307.    of the sender as suggested in [8], but that methodology will not
  308.    operate well in the real networks out there today. The method
  309.    suggested is to look up source addresses to see that the return path
  310.    to that address would flow out the same interface as the packet
  311.    arrived upon. With the number of asymmetric routes in the Internet,
  312.    this would clearly be problematic.
  313.  
  314. 5. Liabilities
  315.  
  316.    Filtering of this nature has the potential to break some types of
  317.    "special" services. It is in the best interest of the ISP offering
  318.    these types of special services, however, to consider alternate
  319.    methods of implementing these services to avoid being affected by
  320.    ingress traffic filtering.
  321.  
  322.    Mobile IP, as defined in [6], is specifically affected by ingress
  323.    traffic filtering. As specified, traffic to the mobile node is
  324.    tunneled, but traffic from the mobile node is not tunneled. This
  325.    results in packets from the mobile node(s) which have source
  326.    addresses that do not match with the network where the station is
  327.    attached.  The Mobile IP Working Group is addressing this problem by
  328.    specifying "reverse tunnels" in [7].  This work in progress provides
  329.    a method for the data transmitted from the mobile node to be tunneled
  330.    to the home agent before transmission to the Internet.  There are
  331.    additional benefits to the reverse tunneling scheme, including better
  332.    handling of multicast traffic. Those implementing mobile IP systems
  333.    are encouraged to implement this method of reverse tunneling.
  334.  
  335.  
  336.  
  337.  
  338. Ferguson & Senie             Informational                      [Page 6]
  339.  
  340. RFC 2267               Network Ingress Filtering            January 1998
  341.  
  342.  
  343.    As mentioned previously, while ingress traffic filtering drastically
  344.    reduces the success of source address spoofing, it does not preclude
  345.    an attacker using a forged source address of another host within the
  346.    permitted prefix filter range. It does, however, ensure that when an
  347.    attack of this nature does indeed occur, a network administrator can
  348.    be sure that the attack is actually originating from within the known
  349.    prefixes that are being advertised. This simplifies tracking down the
  350.    culprit, and at worst, the administrator can block a range of source
  351.    addresses until the problem is resolved.
  352.  
  353.    If ingress filtering is used in an environment where DHCP or BOOTP is
  354.    used, the network administrator would be well advised to ensure that
  355.    packets with a source address of 0.0.0.0 and a destination of
  356.    255.255.255.255 are allowed to reach the relay agent in routers when
  357.    appropriate.  The scope of directed broadcast replication  should be
  358.    controlled, however, and not arbitrarily forwarded.
  359.  
  360. 6. Summary
  361.  
  362.    Ingress traffic filtering at the periphery of Internet connected
  363.    networks will reduce the effectiveness of source address spoofing
  364.    denial of service attacks. Network service providers and
  365.    administrators have already begun implementing this type of filtering
  366.    on periphery routers, and it is recommended that all service
  367.    providers do so as soon as possible. In addition to aiding the
  368.    Internet community as a whole to defeat this attack method, it can
  369.    also assist service providers in locating the source of the attack if
  370.    service providers can categorically demonstrate that their network
  371.    already has ingress filtering in place on customer links.
  372.  
  373.    Corporate network administrators should implement filtering to ensure
  374.    their corporate networks are not the source of such problems. Indeed,
  375.    filtering could be used within an organization to ensure users do not
  376.    cause problems by improperly attaching systems to the wrong networks.
  377.    The filtering could also, in practice, block a disgruntled employee
  378.    from anonymous attacks.
  379.  
  380.    It is the responsibility of all network administrators to ensure they
  381.    do not become the unwitting source of an attack of this nature.
  382.  
  383. 7. Security Considerations
  384.  
  385.    The primary intent of this document is to inherently increase
  386.    security practices and awareness for the Internet community as a
  387.    whole; as more Internet Providers and corporate network
  388.    administrators implement ingress filtering, the opportunity for an
  389.    attacker to use forged source addresses as an attack methodology will
  390.    significantly lessen. Tracking the source of an attack is simplified
  391.  
  392.  
  393.  
  394. Ferguson & Senie             Informational                      [Page 7]
  395.  
  396. RFC 2267               Network Ingress Filtering            January 1998
  397.  
  398.  
  399.    when the source is more likely to be "valid." By reducing  the number
  400.    and frequency of attacks in the Internet as a whole, there will be
  401.    more resources for tracking the attacks which ultimately do occur.
  402.  
  403. 8. Acknowledgments
  404.  
  405.    The North American Network Operators Group (NANOG) [5] group as a
  406.    whole deserves special credit for openly discussing these issues and
  407.    actively seeking possible solutions. Also, thanks to Justin Newton
  408.    [Priori Networks] and Steve Bielagus [OpenROUTE Networks, Inc.] for
  409.    their comments and contributions.
  410.  
  411. 9. References
  412.  
  413.    [1]  CERT Advisory CA-96.21; TCP SYN Flooding and IP Spoofing
  414.         Attacks; September 24, 1996.
  415.  
  416.    [2]  B. Ziegler, "Hacker Tangles Panix Web Site", Wall Street
  417.         Journal, 12 September 1996.
  418.  
  419.    [3]  "Firewalls and Internet Security: Repelling the Wily Hacker";
  420.         William R. Cheswick and Steven M. Bellovin, Addison-Wesley
  421.         Publishing Company, 1994; ISBN 0-201-63357-4.
  422.  
  423.    [4]  Rekhter, Y., Moskowitz, R., Karrenberg, D., de Groot, G., and
  424.         E. Lear, "Address Allocation for Private Internets", RFC 1918,
  425.         February 1996.
  426.  
  427.    [5]  The North American Network Operators Group;
  428.         http://www.nanog.org.
  429.  
  430.    [6]  Perkins, C., "IP Mobility Support", RFC 2002, October 1996.
  431.  
  432.    [7]  Montenegro, G., "Reverse Tunneling Mobile IP",
  433.         Work in Progress.
  434.  
  435.    [8]  Baker, F., "Requirements for IP Version 4 Routers", RFC 1812,
  436.         June 1995.
  437.  
  438.    [9]  Thanks to: Craig Huegen;
  439.         See: http://www.quadrunner.com/~chuegen/smurf.txt.
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450. Ferguson & Senie             Informational                      [Page 8]
  451.  
  452. RFC 2267               Network Ingress Filtering            January 1998
  453.  
  454.  
  455. 10. Authors' Addresses
  456.  
  457.    Paul Ferguson
  458.    cisco Systems, Inc.
  459.    400 Herndon Parkway
  460.    Herndon, VA  USA 20170
  461.  
  462.    EMail: ferguson@cisco.com
  463.  
  464.  
  465.    Daniel Senie
  466.    BlazeNet, Inc.
  467.    4 Mechanic Street
  468.    Natick, MA  USA 01760
  469.  
  470.    EMail: dts@senie.com
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506. Ferguson & Senie             Informational                      [Page 9]
  507.  
  508. RFC 2267               Network Ingress Filtering            January 1998
  509.  
  510.  
  511. 11.  Full Copyright Statement
  512.  
  513.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  514.  
  515.    This document and translations of it may be copied and furnished to
  516.    others, and derivative works that comment on or otherwise explain it
  517.    or assist in its implementation may be prepared, copied, published
  518.    and distributed, in whole or in part, without restriction of any
  519.    kind, provided that the above copyright notice and this paragraph are
  520.    included on all such copies and derivative works.  However, this
  521.    document itself may not be modified in any way, such as by removing
  522.    the copyright notice or references to the Internet Society or other
  523.    Internet organizations, except as needed for the purpose of
  524.    developing Internet standards in which case the procedures for
  525.    copyrights defined in the Internet Standards process must be
  526.    followed, or as required to translate it into languages other than
  527.    English.
  528.  
  529.    The limited permissions granted above are perpetual and will not be
  530.    revoked by the Internet Society or its successors or assigns.
  531.  
  532.    This document and the information contained herein is provided on an
  533.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  534.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  535.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  536.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  537.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562. Ferguson & Senie             Informational                     [Page 10]
  563.  
  564.