Skip to content

Commit 409552f

Browse files
committed
RPKI first pass
1 parent 1b5c7d8 commit 409552f

File tree

3 files changed

+167
-5
lines changed

3 files changed

+167
-5
lines changed

figures/SecurityFigs.odp

150 KB
Binary file not shown.

figures/rpki.png

54.8 KB
Loading

infra.rst

Lines changed: 167 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ make them more resistant to attacks as we discuss in the following
3030
sections.
3131

3232

33-
8.1 BGP
34-
----------
33+
8.1 BGP and Routing Security
34+
----------------------------
3535

3636
In most respects, a router is just a special-purpose computer with
3737
some high-speed interfaces and specialized software to perform tasks
@@ -184,7 +184,170 @@ announcements. This quest, and the slowness of its progress, was well
184184
documented by Sharon Goldberg in 2014, and the progress continues
185185
today.
186186

187-
Let's start with a simple and well-studied example.
187+
Let's start with a simple and well-studied example. In 2008, ISPs in
188+
Pakistan were ordered by the government to block access to YouTube for
189+
users in the country. One ISP (Pakistan Telecom) chose to do this by
190+
advertising a route to a prefix that was within the range allocated to
191+
YouTube. In effect, the ISP announced "I have a good path to YouTube"
192+
so that it could then redirect traffic that would try to follow that
193+
path. The problem was that not only was this path not a viable way to
194+
reach YouTube, it was also a *more specific* path, that is, it was for
195+
a longer prefix than the true path to YouTube that was being
196+
advertised by other ASes. This turned into a problem well beyond the
197+
boundaries of Pakistan when the ISP advertised the route upstream to a
198+
larger ISP. The upstream ISP now saw the more specific route as a
199+
distinct piece of routing information from the true, less specific
200+
route, and so it re-advertised this (false) path to its peers. Repeated
201+
application of this decision to accept the more specific path and
202+
re-advertise it caused much of the Internet to view the small ISP in
203+
Pakistan as a true path to YouTube. Within minutes a large percentage
204+
of the Internet was sending YouTube traffic to Pakistan, causing a
205+
global outage for YouTube. Resolution was achieved by manual
206+
intervention at multiple ISPs to stop the global advertisement of the
207+
false path.
208+
209+
There are many other forms of attack possible on BGP, but they mostly
210+
take the form of a route being advertised and then propagated when it
211+
should not be. There is a relatively simple measure that should have
212+
prevented the incident described above: the provider AS immediately
213+
upstream from Pakistan Telecom should not have accepted the
214+
advertisement that said "I have a route to YouTube". How would it know
215+
not to accept this? After all, BGP needs to be dynamic, so a newly
216+
advertised prefix is sometimes going to be correct. One solution to
217+
this problem is the use of Internet Routing Registries, which serve as
218+
databases mapping address prefixes to the ASes that are authorized to
219+
advertise them. In the prior example, since YouTube is not a customer
220+
of Pakistan Telecom, the IRR would show that the YouTube prefix should
221+
not be advertised by this AS. The responsibility to filter out the
222+
false announcement falls on the *upstream* ISP, who would need to
223+
periodically query one or more IRRs in order to maintain an up-to-date
224+
set of filters to apply to its downstream peers.
225+
226+
There are numerous issues with the IRR approach, including the fact
227+
that this sort of filtering gets much more difficult the closer you
228+
get to the "core" of the Internet. It's one thing to filter prefixes
229+
from an ISP that serves a modest number of customers in a single
230+
country; it's another to filter prefixes coming from a large peer with
231+
global presence. Some obviously bad routes can be filtered but it's
232+
very hard to get a complete picture sufficient to rule out anything
233+
incorrect that could be advertised. The set of rules that need to be
234+
configured on a BGP router for an ISP that carries hundreds of
235+
thousands of routes can also get very large.
236+
237+
Furthermore, as noted by Sharon Goldberg in her article "*Why Is It
238+
Taking So Long to Secure Internet Routing?*", the incentives for
239+
prefix filtering are somewhat misaligned. The cost of filtering falls
240+
on the AS that is immediately upstream of the misbehaving ISP, while
241+
the benefit accrues to some distant entity (YouTube in our example)
242+
who avoids the impact to their traffic thanks to the work of a
243+
provider with whom they have no relationship.
244+
245+
A more sophisticated approach relies on the use of cryptographically
246+
signed statements authorizing a particular AS to advertise paths to a
247+
particular prefix. This technology behind this is referred to as RPKI:
248+
Resource Public Key Infrastructure.
249+
250+
RPKI provides a means by which entities involved in routing, such as
251+
the operator of an AS, can prove that they are authorized to advertise
252+
routing information such as address prefixes. A Route Origin
253+
Authorization (ROA), for example, contains a certificate, and AS
254+
number, and a set of prefixes that the AS is authorized to
255+
advertise. The ROA is cryptographically signed by an entity that is
256+
itself trusted to provide this authorization, such as Regional
257+
Internet Registry (RIR). Because RIRs a responsible for the allocation
258+
of address space, they are a logical place to locate trust for the
259+
RPKI. There are five RIRs globally and each has a root certificate in
260+
the RPKI.
261+
262+
Address allocation is a hierarchical process. For example, an RIR can
263+
allocate a chunk of address space to an ISP, and the ISP can
264+
sub-allocate from that chunk to one of its customers. A hierarchy of
265+
certificates can be used that follows this hierarchy of address
266+
allocation. The RIRs form "trust anchors" from which chains of trust
267+
can be built, much the way a modern browser comes with a set of
268+
trusted root certification authorities (CAs) so that the certificates
269+
issued by web sites can be checked for validity.
270+
271+
A key distinction between RPKI and the certificates that we are
272+
familiar with from TLS is this: the certificates in TLS are used to
273+
validate the *identity* of a web site (e.g., a certificate for cnn.com
274+
tells your browser that it is actually talking to cnn.com), whereas
275+
RPKI certificates are used to validate the *authority* to advertise
276+
certain IP addresses. As IP address allocation starts with the RIRs
277+
and proceeds down through ISPs to end customers, resource certificates
278+
are generated at each level in the hierarchy.
279+
280+
.. _fig-rpki:
281+
.. figure:: figures/rpki.png
282+
:width: 600px
283+
:align: center
284+
285+
Chain of trust for RPKI
286+
287+
:numref:`Figure %s <fig-rpki>` shows how the
288+
certificates are arranged for a simple example of an ISP *A* with
289+
customer *C*. There is a chain of trust from the root certificate to
290+
the customer, much like the sort certification hierarchy we have seen
291+
used for TLS. However, because the goal here is to certify the
292+
authority of a certain AS to advertise a prefix, the details of the
293+
certificates are different from those used in TLS. For example, the
294+
certificate that ISP *A* issues, on the far right of the picture, says
295+
that some address prefix has been allocated to customer *C*, and
296+
includes the AS number of customer C. This certificate is signed by
297+
ISP *A* using the private key of *A*.
298+
299+
One level higher in the chain, the Local Internet Registry (LIR) has
300+
issued a certificate that states ISP *A* has authority to allocate
301+
addresses out of some prefix. The prefix that *A* has allocated to *C*
302+
must be a subprefix within the allocation made by the LIR.
303+
By following the chain back to the root certificate, it is possible to
304+
establish that *C* is legitimately able to advertise the prefix
305+
allocated to it by *A*.
306+
307+
*C* can now create a Route Origin Authorization (ROA) which it signs
308+
with its private key. The ROA contains the AS number of *C* and the
309+
prefix or prefixes that it wishes to advertise. Anyone who looks at
310+
the ROA and the resource certificate chain that leads from the root CA to *C*
311+
can validate that the ROA is legitimate.
312+
313+
314+
Rather than being passed around in real time like certificates in TLS,
315+
the RPKI certificates are stored in repositories, which are typically
316+
operated by the RIRs. Address allocations happen at a relatively long
317+
timescale, and certificates can be issued at the same time. Thus it is
318+
feasible to fetch the entire contents of the RPKI repository to build up a
319+
complete picture of the chains of certificates that have been
320+
issued. With this information, a router running BGP can determine *in advance* which
321+
ASes could originate routing advertisements for which prefixes and use
322+
this to configure filtering rules on what advertisements they are
323+
willing to accept. There is a well-established set of software tools
324+
to automate this process for popular operating systems and commercial
325+
routing platforms.
326+
327+
With the RPKI in place it is now possible to perform Route Origin
328+
Validation. That is, if a given AS claims to be the originator of a
329+
certain prefix, that claim can be checked against the information in
330+
the RPKI. So, for example, if Pakistan Telecom were now to claim to be the
331+
origin AS for a subprefix of YouTube, that could immediately be
332+
detected as false information and discarded by any router receiving
333+
such an advertiment, not just the neighbors of the offending ISP.
334+
335+
While there are many forms of attack or misconfiguration that would
336+
not be caught by ROV (such as an AS falsely claiming a shorter path that
337+
doesn't actually exist) it does prevent a large number of issues,
338+
especially those caused by misconfiguration. To more fully combat the
339+
advertisement of false information in BGP, it is necessary to adopt
340+
some sort of path validation, as discussed below.
341+
342+
343+
ROV adoption
344+
345+
.. rubric:: path validation
346+
347+
348+
349+
350+
188351

189352
.. _reading_rpki:
190353
.. admonition:: Further Reading
@@ -210,8 +373,7 @@ DNSSEC
210373

211374
RFCs 4033-4035
212375

213-
214-
----
376+
215377
adoption of RPKI vs DNSSEC - the difference between detecting
216378
corrupt info vs. preventing spread of corrupt info
217379

0 commit comments

Comments
 (0)