idnits 2.17.1
draft-gont-v6ops-ra-guard-evasion-00.txt:
Checking boilerplate required by RFC 5378 and the IETF Trust (see
https://trustee.ietf.org/license-info):
----------------------------------------------------------------------------
-- The document has an IETF Trust Provisions (28 Dec 2009) Section 6.c(ii)
Publication Limitation clause. If this document is intended for
submission to the IESG for publication, this constitutes an error.
Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt:
----------------------------------------------------------------------------
No issues found here.
Checking nits according to https://www.ietf.org/id-info/checklist :
----------------------------------------------------------------------------
** The document seems to lack an IANA Considerations section. (See Section
2.2 of https://www.ietf.org/id-info/checklist for how to handle the case
when there are no actions for IANA.)
Miscellaneous warnings:
----------------------------------------------------------------------------
== The copyright year in the IETF Trust and authors Copyright Line does not
match the current year
== The document doesn't use any RFC 2119 keywords, yet seems to have RFC
2119 boilerplate text.
-- The document date (May 31, 2011) is 4707 days in the past. Is this
intentional?
Checking references for intended status: Informational
----------------------------------------------------------------------------
== Unused Reference: 'RFC6104' is defined on line 327, but no explicit
reference was found in the text
== Unused Reference: 'RFC6105' is defined on line 330, but no explicit
reference was found in the text
Summary: 1 error (**), 0 flaws (~~), 4 warnings (==), 2 comments (--).
Run idnits with the --verbose option for more detailed information about
the items above.
--------------------------------------------------------------------------------
2 IPv6 Operations Working Group (v6ops) F. Gont
3 Internet-Draft UK CPNI
4 Intended status: Informational May 31, 2011
5 Expires: December 2, 2011
7 IPv6 Router Advertisement Guard (RA-Guard) Evasion
8 draft-gont-v6ops-ra-guard-evasion-00
10 Abstract
12 The IPv6 Router Advertisement Guard (RA-Guard) mechanism is commonly
13 employed to mitigate attack vectors based on forged ICMPv6 Router
14 Advertisement messages. Many existing IPv6 deployments rely on RA-
15 Guard as the first line of defense against the aforementioned attack
16 vectors. This document describes possible ways in which current RA-
17 Guard implementations can be circumvented, and discusses possible
18 mitigations.
20 Status of this Memo
22 This Internet-Draft is submitted in full conformance with the
23 provisions of BCP 78 and BCP 79. This document may not be modified,
24 and derivative works of it may not be created, and it may not be
25 published except as an Internet-Draft.
27 Internet-Drafts are working documents of the Internet Engineering
28 Task Force (IETF). Note that other groups may also distribute
29 working documents as Internet-Drafts. The list of current Internet-
30 Drafts is at http://datatracker.ietf.org/drafts/current/.
32 Internet-Drafts are draft documents valid for a maximum of six months
33 and may be updated, replaced, or obsoleted by other documents at any
34 time. It is inappropriate to use Internet-Drafts as reference
35 material or to cite them other than as "work in progress."
37 This Internet-Draft will expire on December 2, 2011.
39 Copyright Notice
41 Copyright (c) 2011 IETF Trust and the persons identified as the
42 document authors. All rights reserved.
44 This document is subject to BCP 78 and the IETF Trust's Legal
45 Provisions Relating to IETF Documents
46 (http://trustee.ietf.org/license-info) in effect on the date of
47 publication of this document. Please review these documents
48 carefully, as they describe your rights and restrictions with respect
49 to this document. Code Components extracted from this document must
50 include Simplified BSD License text as described in Section 4.e of
51 the Trust Legal Provisions and are provided without warranty as
52 described in the Simplified BSD License.
54 Table of Contents
56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
57 2. Router Advertisement Guard (RA Guard) Evasion Vulnerability . 4
58 2.1. Attack Vector based on IPv6 Extension Headers . . . . . . 4
59 2.2. Attack vector based on IPv6 fragmentation . . . . . . . . 4
60 3. Mitigations . . . . . . . . . . . . . . . . . . . . . . . . . 8
61 4. Other Implications . . . . . . . . . . . . . . . . . . . . . . 9
62 5. Security Considerations . . . . . . . . . . . . . . . . . . . 10
63 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 11
64 7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 12
65 7.1. Normative References . . . . . . . . . . . . . . . . . . . 12
66 7.2. Informative References . . . . . . . . . . . . . . . . . . 12
67 Appendix A. Assessment tools . . . . . . . . . . . . . . . . . . 13
68 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 14
70 1. Introduction
72 IPv6 Router Advertisement Guard (RA-Guard) is a mitigation technique
73 for attack vectors based on ICMPv6 Router Advertisement messages.
74 describes the problem statement of "Rogue IPv6 Router
75 Advertisements", and specifies the "IPv6 Router Advertisement Guard"
76 functionality.
78 The basic concept behind RA-Guard is that a layer-2 device filters
79 ICMPv6 Router Advertisement messages, according to a number of
80 different criteria. The most basic filtering criteria is that Router
81 Advertisement messages are discarded by the layer-2 device unless
82 they are received on a specified port of the layer-2 device.
83 Clearly, the effectiveness of the RA Guard mitigation relies on the
84 ability of the layer-2 device of identifying ICMPv6 Router
85 Advertisement messages.
87 As part of the project "Security Assessment of the Internet Protocol
88 version 6 (IPv6)" [CPNI-IPv6], we devised a number of techniques for
89 circumventing the RA-Guard protection, which are described in the
90 following sections of this document. These techniques, and the
91 corresponding tools to assess their effectiveness, had so far been
92 made available only to vendors, in the hopes that they could
93 implement counter-measures before they were publicly disclosed.
94 However, since there has been some public discussion about these
95 issues, it was deemed as appropiate to publish the present document.
97 It should be noted that the aforementioned techniques could also be
98 exploited to evade network monitoring tools such as NDPMon [NDPMon],
99 ramond [ramond], and rafixd [rafixd].
101 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
102 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
103 document are to be interpreted as described in RFC 2119 [RFC2119].
105 2. Router Advertisement Guard (RA Guard) Evasion Vulnerability
107 The following subsections describe two different vectors for evading
108 the RA-Guard protection. Section 2.1 describes an attack vector
109 based on the use of IPv6 Extension Headers with the ICMPv6 Router
110 Advertisement messages, which may be used to circumvent the RA-Guard
111 protection of those implementations that fail to process an entire
112 IPv6 header chain when trying to identify the ICMPv6 Router
113 Advertisement messages. Section 2.2 describes an attack method based
114 on the use of IPv6 fragmentation, possibly in conjunction with the
115 use of IPv6 Extension Headers. This later vector is expected to be
116 effective with all existing implementations of the RA-Guard
117 functionality.
119 2.1. Attack Vector based on IPv6 Extension Headers
121 While there is currently no legitimate for IPv6 Extension Headers in
122 ICMPv6 Router Advertisement messages, implementations allow the use
123 of Extension Headers included in these messages, by simple ignoring
124 the received options. We believe that some implementations may
125 simply try to identify ICMPv6 Router Advertisement messages by
126 looking at the "Next Header" field of the fixed IPv6 header, rather
127 than following the entire header chain. As a result, these
128 implementations would fail to identify any ICMPv6 Router
129 Advertisement messages that include any Extension Headers (for
130 example, Hop by Hop Options header, Destination Options Header,
131 etc.).
133 The following figure illustrates the structure of ICMPv6 Router
134 Advertisement messages that implements this RA-Guard evasion
135 technique:
137 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
138 |NH=60| |NH=58| | |
139 +-+-+-+ +-+-+-+ + +
140 | IPv6 header | Dst Opt Hdr | ICMPv6 Router Advertisement |
141 + + + +
142 | | | |
143 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
145 2.2. Attack vector based on IPv6 fragmentation
147 While the attack vector described in Section 2.1 may be effective
148 with implementations that fail to process the entire header chain, it
149 can easily be mitigated by an RA-Guard implementation, since all the
150 information needed to identify ICMPv6 Router Advertisement messages
151 is present in the attack packets.
153 This section presents a different attack vector, which aims at making
154 it virtually impossible for a layer-2 device to identify ICMPv6
155 Router Advertisements by leveraging the IPv6 Fragment Header. The
156 basic idea behind this attack vector is that if the forged ICMPv6
157 Router Advertisement is fragmented into at least two fragments, the
158 layer-2 device implementing "RA-Guard" would be unable to identify
159 the attack packet, and would those would fail do block it.
161 A first variant of this attack vector would be an original ICMPv6
162 Router Advertisement message preceded with a Destination Options
163 Header, that results in two fragments. The following figure
164 illustrates the "original" attack packet, prior to fragmentation, and
165 the two resulting fragments which are actually sent as part of the
166 attack.
168 Original packet:
170 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
171 |NH=60| |NH=58| | |
172 +-+-+-+ +-+-+-+ + +
173 | IPv6 header | Dst Opt Hdr | ICMPv6 RA |
174 + + + +
175 | | | |
176 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
178 First fragment:
180 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
181 |NH=44| |NH=60| |NH=58| |
182 +-+-+-+ +-+-+-+ +-+-+-+ +
183 | IPv6 Header | Frag Hdr | Dst Opt Hdr |
184 + + + +
185 | | | |
186 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
188 Second fragment:
190 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
191 |NH=44| |NH=60| | | |
192 +-+-+-+ +-+-+-+ + + +
193 | IPv6 header | Frag Hdr | Dst Opt Hdr | ICMPv6 RA |
194 + + + + +
195 | | | | |
196 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
198 In this variant, by leveraging the use of the Fragment Header
199 together with the use of the Destination Options header, the attacker
200 is able to conceal the type of ICMPv6 error message he is sending.
201 Unless the layer-2 device were to implement IPv6 fragment reassembly,
202 it would be impossible for the device to identify the ICMPv6 type of
203 the message.
205 It is possible to take this idea further, such that it is also
206 impossible for the layer-2 device to detect that the attacker is
207 sending an ICMPv6 message in the first place. This can be achieved
208 with an original ICMPv6 Router Advertisement message preceded with
209 two Destination Options Headers, that results in two fragments. The
210 following figure illustrates the "original" attack packet, prior to
211 fragmentation, and the two resulting packets which are actually sent
212 as part of the attack.
214 Original packet:
216 +-+-+-+-+-+-+-+-+-+-+-+-//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
217 |NH=60| |NH=60| |NH=58| | |
218 +-+-+-+ +-+-+-+ +-+-+-+ + +
219 | IPv6 header | Dst Opt Hdr | Dst Opt Hdr | ICMPv6 RA |
220 + + + + +
221 | | | | |
222 +-+-+-+-+-+-+-+-+-+-+-+-//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
224 First fragment:
226 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
227 |NH=44| |NH=60| |NH=58| |
228 +-+-+-+ +-+-+-+ +-+-+-+ +
229 | IPv6 header | Frag Hdr | Dst Opt Hdr |
230 + + + +
231 | | | |
232 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
234 Second fragment:
236 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
237 |NH=44| |NH=60| | |NH=58| | |
238 +-+-+-+ +-+-+-+ + +-+-+-+ + +
239 | IPv6 header | Frag Hdr | Dst O Hdr | Dst Opt Hdr | ICMPv6 RA |
240 + + + + + +
241 | | | | | |
242 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
244 It should be obvious that even if the layer-2 device tried to follow
245 the entire IPv6 header chain, it would still be unable to identify
246 that the fragments above transport an ICMPv6 message.
248 3. Mitigations
250 The most effective and efficient mitigation for the RA-Guard evasion
251 vulnerability discussed in this document would be to prohibit the use
252 of IPv6 Extension Headers in Neighbor DIscovery messages, as proposed
253 in [draft-gont-6man-nd-extension-headers].
255 Nevertheless, an administrator might want to mitigate these
256 vulnerabilities by deploying more advanced filtering. The following
257 filtering rules could be implemented as part of an "RA-Guard"
258 implementation, such that the vulnerabilities discussed in this
259 document can be mitigated:
261 o When trying to identify an ICMPv6 Router Advertisement message,
262 follow the IPv6 header chain, enforcing a limit on the maximum
263 number of Extension Headers that is allowed for each packet. If
264 such limit is exceeded, block the packet.
266 o If the layer-2 device is unable to identify whether the packet is
267 an ICMPv6 Router Advertisement message or not (i.e., the packet is
268 a fragment, and the necessary information is missing), then, if
269 the IPv6 Source Address of the packet is a link-local address,
270 block the packet.
272 o In all other cases, pass the packet as usual.
274 This filtering policy assumes that host implementations require that
275 the IPv6 Source Address of ICMPv6 Router Advertisement messages be a
276 link-local address, and that they discard the packet if this check
277 fails, as required by the current IETF specifications [RFC4861].
278 Unfortunately, it should be noted that the aforementioned filtering
279 policy might be inefficient to implement (if at all possible), and
280 might also result (at least in theory) in false positives.
282 4. Other Implications
284 A similar concept to that of "RA-Guard" has been implemented for
285 protecting against forged DHCPv6 messages. Such protection can be
286 circumvented with the same techniques discussed in this document, and
287 the counter-measures for such evasion attack are analogous to those
288 described in Section 3 of this document.
290 5. Security Considerations
292 This document describes a number of techniques to circumvent a
293 mechanism known as "RA-Guard", which many organizations deploy as a
294 "first line of defense" against attacks based on forged Router
295 Advertisements.
297 The most effective and efficient mitigation for these attacks would
298 be to prohibit the use of IPv6 extension headers (as proposed by
299 [draft-gont-6man-nd-extension-headers]), such that the RA-Guard
300 protection cannot be easily circumvented. However, since this
301 mitigation requires an update to existing implementations, in the
302 short term some network administrators might want to mitigate these
303 issues by implemented the more advanced filtering policy described in
304 Section 3.
306 6. Acknowledgements
308 This document resulted from the project "Security Assessment of the
309 Internet Protocol version 6 (IPv6)" [CPNI-IPv6], carried out by
310 Fernando Gont on behalf of the UK Centre for the Protection of
311 National Infrastructure (CPNI). The author would like to thank the
312 UK CPNI, for their continued support.
314 7. References
316 7.1. Normative References
318 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
319 Requirement Levels", BCP 14, RFC 2119, March 1997.
321 [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman,
322 "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861,
323 September 2007.
325 7.2. Informative References
327 [RFC6104] Chown, T. and S. Venaas, "Rogue IPv6 Router Advertisement
328 Problem Statement", RFC 6104, February 2011.
330 [RFC6105] Levy-Abegnoli, E., Van de Velde, G., Popoviciu, C., and J.
331 Mohacsi, "IPv6 Router Advertisement Guard", RFC 6105,
332 February 2011.
334 [draft-gont-6man-nd-extension-headers]
335 Gont, F., "Security Implications of the Use of IPv6
336 Extension Headers with IPv6 Neighbor Discovery", IETF
337 Internet Draft, draft-gont-6man-nd-extension-headers, work
338 in progress, May 2011.
340 [CPNI-IPv6]
341 Gont, F., "Security Assessment of the Internet Protocol
342 version 6 (IPv6)", UK Centre for the Protection of
343 National Infrastructure, (to be published).
345 [NDPMon] "NDPMon - IPv6 Neighbor Discovery Protocol Monitor",
346 .
348 [rafixd] "rafixd", .
351 [ramond] "ramond", .
353 [THC-IPV6]
354 "THC-IPV6", .
356 Appendix A. Assessment tools
358 CPNI has produced assessment tools, which have not yet been made
359 publicly available. If you think that you would benefit from these
360 tools to assess the security of your network or of your RA-Guard
361 implementation, we might be able to provide a copy of the tools
362 (please contact Fernando Gont at fernando@gont.com.ar).
364 [THC-IPV6] is a publicly-available set of tools that implements some
365 of the techniques described in this document.
367 Author's Address
369 Fernando Gont
370 Centre for the Protection of National Infrastructure
372 Email: fernando@gont.com.ar
373 URI: http://www.gont.com.ar