Debian Codegraph @

rfc2267.html

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