@@ -12,7 +12,7 @@ systems routinely come under attack. They are also complex distributed
1212systems. While distributing the routing and naming functions helps
1313make these systems resilient to failure, many opportunities for attack
1414exist. In this chapter we discuss some of the ongoing
15- efforts to improve their resistance to attacks.
15+ efforts to improve their resistance to attacks. [ # ]_
1616
1717The following discussion builds on some of the concepts introduced in previous
1818chapters. Notably, the concept of public key infrastructure (PKI),
@@ -29,6 +29,8 @@ of the Internet. Mitigation of such attacks is increasingly handled by
2929distributed infrastructure like content distribution networks (CDNs),
3030as we discuss in the final section of this chapter.
3131
32+ .. [# ] Many thanks to Cecilia Testart for her contributions to this
33+ chapter, particularly the BGP and Routing Security sections.
3234
3335 8.1 BGP and Routing Security
3436----------------------------
@@ -294,19 +296,25 @@ to originate routing advertisements for specific address prefixes. A
294296Route Origin Authorization (ROA) contains a certificate,
295297an AS number, and a set of prefixes that the AS is authorized to
296298advertise. The ROA is cryptographically signed by an entity that is
297- itself trusted to provide this authorization, generally the AS to
298- which this address prefix has been allocated.
299-
300- Address allocation is a hierarchical process. Because Regional
301- Internet Registries (RIRs) are at the top of the hierarchy for address
302- allocation, they are a logical place for the root of trust, known
303- as a trust anchor, for the RPKI. There are five RIRs globally and each
304- has a root certificate in the RPKI.
299+ itself trusted to provide this authorization, generally the organization to
300+ which this address prefix has been allocated. For example, an ISP
301+ typically is allocated a certain set of prefixes and may originate
302+ routing advertisements for those prefixes. An ROA allows the ISP to
303+ assert that it has the authority to make such an announcement, and for
304+ BGP speakers elsewhere in the Internet to validate that assertion.
305+
306+ Address allocation in the Internet is a hierarchical process.
307+ Regional Internet Registries (RIRs) are at the top of the hierarchy
308+ for address allocation. Their position in the hierarchy of
309+ address allocation makes them a logical place for the RPKI roots of trust,
310+ known as trust anchors. There are five RIRs globally
311+ (ARIN, RIPE, APNIC, AFRINIC and LACNIC) and each has a root
312+ certificate in the RPKI.
305313
306314Hierarchical address allocation operates in the following manner. An RIR can
307315allocate a chunk of address space to an ISP, and the ISP can
308- sub-allocate from that chunk to one of its customers. There can be
309- multiple layers in this hierarchy. A hierarchy of
316+ sub-allocate from that chunk to each of its customers. There may be
317+ additional layers in this hierarchy. A hierarchy of
310318certificates can be created to follow this hierarchy of address
311319allocation. The RIRs form trust anchors from which chains of trust
312320can be built, much the way a modern browser comes with a set of
@@ -343,37 +351,39 @@ that some address prefix has been allocated to customer *C*, and
343351includes the public key of customer C. This certificate is signed by
344352ISP *A * using the private key of *A *. So if we can trust *A *, we learn
345353two things about *C *: its public key and the set of addresses
346- allocated to the holder of that public key.
354+ allocated to the holder of that public key. Note that we don't learn
355+ who *C * is (unlike a TLS certificate); we just learn the public key of
356+ the entity that is authorized to originate routing advertisements for
357+ some prefix or prefixes.
347358
348- One level higher in the chain, the Local Internet Registry (LIR ) has
359+ One level higher in the chain, the Regional Internet Registry (RIR ) has
349360issued a certificate that states ISP *A * has authority to allocate
350361addresses out of some prefix. The prefix that *A * has allocated to *C *
351- must be a subprefix within the allocation made by the LIR .
362+ must be a subprefix within the allocation made by the RIR .
352363By following the chain back to the root certificate, it is possible to
353364establish that *C * is legitimately able to advertise the prefix
354365allocated to it by *A *.
355366
356367At this point we have created a set of bindings between public keys,
357368which are held by entities such as Internet Registries, ISPs, and end
358369customers, and IP address prefixes allocated to those entities. The
359- next step is to create a Route Origin Authorization (ROA), which
360- cryptographically associates a prefix with an AS that is authorized to
361- originate routing advertisements for that prefix.
370+ next step is to create a Route Origin Authorization (ROA), which is a
371+ cryptographically signed object that associates a prefix with an AS
372+ that is authorized to originate routing advertisements for that
373+ prefix.
362374
363- In our example above, *C * can create an ROA which it signs
375+ In our example above, *C * creates an ROA which it signs
364376with its private key. The ROA contains the AS number of *C * and the
365377prefix or prefixes that it wishes to advertise. Anyone who looks at
366378the ROA and the resource certificate chain that leads from the root CA to *C *
367- can validate that it has been signed with the private key
368- belonging to the entity authorized to advertise the prefixes in the
379+ can validate that it has been signed with the private key belonging to
380+ C; they can also check that C is authorized to advertise the prefixes contained in the
369381ROA. Because the ROA also contains the AS number for *C *, we now know
370382that we should trust advertisements of this prefix if they originate
371- from the stated AS. An ROA may also limit the maximum length of the prefix to
383+ from the stated AS. Furthermore, an ROA may limit the maximum length of the prefix to
372384protect against bogus advertisements of more specific routes to a sub-prefix.
373385
374- The chain of trust established in the RPKI allows the recipient of an
375- ROA to validate that the AS number in the ROA is authorized to
376- orginate advertisements for the prefix or prefixes listed in the ROA.
386+
377387
378388.. _fig-roa :
379389.. figure :: figures/ROA-trust.png
@@ -383,16 +393,18 @@ orginate advertisements for the prefix or prefixes listed in the ROA.
383393 An ROA has a chain of trust back to the RPKI root
384394
385395Rather than being passed around in real time like certificates in TLS,
386- the RPKI certificates are stored in repositories, which are typically
396+ the RPKI certificates and ROAs are stored in repositories, which are typically
387397operated by the RIRs. Address allocations happen at a relatively long
388398timescale, and certificates can be issued at the same time. Thus it is
389399feasible to fetch the entire contents of the RPKI repository to build up a
390- complete picture of the chains of certificates that have been
391- issued. With this information, a router running BGP can determine *in advance * which
392- ASes could originate routing advertisements for which prefixes and use
393- this to configure filtering rules that specify which advertisements they are
394- willing to accept. Note the contrast to prior uses of certificates we
395- have seen: a router builds a complete picture of the certificate
400+ complete picture of the chains of certificates and signed ROAs that have been
401+ issued. With this information, ISPs use validation tools to determine *in advance * which
402+ ASes could originate routing advertisements for which prefixes. When a
403+ router that participates in BGP receives a new announcement, it can
404+ check its validity against the local validation tool.
405+
406+ Note the contrast to prior uses of certificates we
407+ have seen: a local validator builds a complete picture of the certificate
396408hierarchy *a priori * in readiness for subsequent routing decisions,
397409rather than checking the validity of certificates as part of
398410establishing a session (as happens in TLS, for example). The
@@ -405,9 +417,9 @@ process of leveraging the RPKI for popular operating systems and
405417commercial routing platforms. Notably, the routers running BGP do not
406418perform cryptographic operations in real time when processing route
407419advertisements; all the cryptographic operations happen in advance on
408- servers that are external to the routers themselves. The external
409- systems push filtering rules to the routers based on information
410- derived from the RPKI repository.
420+ servers that are external to the routers themselves. The external validator
421+ systems answer queries about the validity of BGP advertisements based on information
422+ they have downloaded from the RPKI repository.
411423
412424With the RPKI in place it is now possible to perform Route Origin
413425Validation (ROV). That is, if a given AS claims to be the originator of a
@@ -417,22 +429,24 @@ origin AS for a subprefix of YouTube, that could immediately be
417429detected as false information and discarded by any router receiving
418430such an advertisement, not just the neighbors of the offending ISP.
419431
432+ .. need a figure here
433+
420434 While there are many forms of attack or misconfiguration that would
421435not be caught by ROV (particularly an AS falsely advertising a path that
422- doesn't actually exist to a valid AS) it does prevent a large number of issues,
436+ doesn't actually exist to a valid originating AS) it does prevent a large number of issues,
423437especially those caused by misconfiguration. To more fully combat the
424438advertisement of false information in BGP, it is necessary to adopt
425439some sort of path validation, as discussed below.
426440
427441The adoption of RPKI for route origin validation has been moving along
428- steadily for several years now. The deployment of ROV is tracked by
442+ steadily for several years now. The adoption of ROAs is tracked by
429443NIST (the National Institute of Standards and Technology in the
430444U.S.)—see the Further Reading section. At the time of writing, the
431445NIST RPKI monitor indicates that of the one-million-plus routes
432- advertised globally in BGP, about 56% carry valid ROA information . Less than 2%
446+ advertised globally in BGP, about 56% are covered by valid ROAs . Less than 2%
433447are detected as invalid (the ROV check fails) while the remaining 42%
434448do not contain ROA information. Looking at the deployment over time
435- we can see a steady increase in valid ROV and a corresponding decrease
449+ we can see a steady increase in valid ROA and a corresponding decrease
436450in the "not found" group—the advertisements with no ROA. While 56% is
437451a long way from 100%, this level of penetration is a significant
438452accomplishment—especially given the historical difficulty of making
@@ -442,7 +456,7 @@ One final point of note about the RPKI is that, just like other forms
442456of certificate infrastructure, it relies on Certificate Revocation
443457Lists (CRLs) to revoke certificates. This is important for handling
444458cases such as the re-allocation of an address prefix from one provider
445- to another. The good news is that CRLs can be readily distributed from
459+ to another. The good news is that CRLs are distributed from
446460the RPKI repositories just like other objects in the RPKI.
447461
448462
@@ -476,14 +490,25 @@ illustrates the overall approach and the challenges with achieving
476490widespread deployment.
477491
478492In contrast to ROV, BGPsec path validation relies on cryptographic
479- operations being adopted as part of BGP itself. Leveraging the RPKI,
480- BGP speakers (routers) taking part in path validation sign their BGP announcements
481- using a private key associated with the AS in which the speaker is
482- located. Thus, anyone receiving such an announcement can verify that
483- it came from the AS that it claims to represent, and that it has not
484- been modified in transit. The RPKI enables the recipient to obtain the
485- public key corresponding to the announcing AS and thus validate the
486- message.
493+ operations being adopted as part of BGP itself. Each BGP speaker
494+ (router) taking part in path validation signs its BGP announcements
495+ using a private key specific to the router. The public key
496+ corresponding to such a private key is included in a certificate that
497+ is published in the RPKI. Such certificates also include the AS number
498+ or numbers corresponding to the AS in which the router is located.
499+
500+ As with all public key certificates, we need a chain of trust from a
501+ trusted root to the router certificate. For example, an RIR could
502+ provide the root of trust, and sign certificates for ISPs, who
503+ could then act as the certification authorities for their own routers. The
504+ use of the word "could" in this paragraph reflects the lack of
505+ real-world deployment of BGPsec.
506+
507+ With a certificate hierarchy in place, anyone receiving such a BGP
508+ announcement can verify that it came from a router within the AS that it claims to
509+ represent, and that it has not been modified in transit. The RPKI
510+ enables the recipient to obtain the public key corresponding to the
511+ announcing AS and thus validate the message.
487512
488513The harder part of the problem is validating that the *contents * of
489514the message are correct from the perspective of BGP. Since a BGP
@@ -492,25 +517,25 @@ itself into the path to the destination, we need to validate that
492517every AS in the path has correctly announced a route to the
493518destination when it added itself into the path.
494519
495- The way this is achieved is to have every AS in the path sign its
520+ The way this is achieved is to have every router that adds an AS to the path sign its
496521announcement. We saw above that the RPKI could be used to create
497522bindings between public keys and entities authorized to advertise a
498523particular prefix. For path validation, we use the RPKI to create
499524bindings between public keys and Autonomous Systems.
500- With the RPKI in place, every AS participating in BGPsec can be assumed
525+ With the RPKI in place, every router participating in BGPsec can be assumed
501526to have a well-known public key and matching private key.
502527
503528Now consider the process of constructing a path to a particular
504- prefix. The path consists of a set of ASes. For example, AS1, the origin AS, signs
529+ prefix. The path consists of a set of ASes. For example, a router in AS1, the origin AS, signs
505530an announcement that says it is the origin for the prefix, using its
506531private key. Furthermore, it includes the number of the target AS,
507532AS2, to which it is sending the announcement, in the set of fields
508533covered by the signature. Thus, we end up with a message that says
509534"AS1 can reach prefix P and has sent this information to AS2" signed
510- by AS1.
535+ by a router from AS1.
511536
512537A router in AS2 receives this announcement, and, having validated the
513- signature, it can now add itself to the path. AS2 can now issue a
538+ signature, it can now add itself to the path. The router in AS2 can now issue a
514539signed announcement that says "the path <AS2,AS1> leads to prefix P"
515540and sign this using its private key. It includes the full signed
516541message from AS1 as well as the new path. Again, before signing, it
@@ -555,7 +580,8 @@ validation of BGP messages). The second is a "collective action
555580problem": when a single ISP pays the cost of implementing BGPsec, it
556581does little if anything to improve the situation for that ISP. Only
557582when a critical mass of ISPs are using BGPsec does it start to provide
558- significant incremental benefits over ROV. This unfortunate situation
583+ significant incremental benefits over ROV. Issuing an ROA, by
584+ contrast, immediately helps the provider who issues it. The situation
559585is captured in the paper "BGP Security in Partial Deployment". An
560586approach that holds promise to address both these issues is described
561587in the following section.
@@ -581,7 +607,8 @@ ASPA shares an attractive property with ROV: no cryptographic
581607operations are added to BGP itself. Just as ROV builds a database (in
582608the RPKI) of who is allowed to originate an advertisement, ASPA builds
583609a database showing which ASes provide transit to other ASes. This,
584- too, uses the RPKI, but with different types of certificates.
610+ too, uses the RPKI, but with different types of certificates, known as
611+ ASPA records.
585612
586613An important ingredient in ASPA is the insight that the relationships
587614between ASes can be placed into a small set of categories. First, if there is
@@ -617,8 +644,8 @@ relationships gives us the ability to detect such anomalies.
617644
618645Suppose that two ASes, X and Y, publish a list of their providers
619646using ASPA objects in the RPKI. Let's say that there is an ASPA object
620- asserting that AS X is a provider for AS Y , as well as an ASPA object
621- asserting the AS Y is * not * among the providers for AS X . If a router
647+ from AS Y that asserts AS X is one of its providers , as well as an ASPA object
648+ from AS X that does not include AS Y among its providers . If a router
622649receives an advertisement in which Y appears to be a provider for X,
623650this is clearly wrong and the router drops the advertisement. The
624651question of how we can tell that a particular AS is a provider,
@@ -630,14 +657,18 @@ most one lateral path followed by a set of paths going "down" towards
630657customers. The more relationships that are placed in the RPKI, the more
631658power a BGP speaker gains to detect paths that are invalid.
632659
633- Notably, ASPA catches some routing problems (such as accidental
634- leakage of routes) that are not caught by BGPsec. This is because
635- BGPsec shows that ASes are connected to each other but does not capture
636- the customer-provider relationships .
660+ ASPA adds further security to the routing system beyond that offered
661+ by ROV, because it catches attacks where an AS announces routes where
662+ the origin AS is correct (i.e., covered by a valid ROA) but the path is not
663+ legitimate. Such attacks are known as forged-origin prefix hijacks .
637664
638- Interestingly, ASPA starts to provide some benefit to those using it
639- as soon as there are two ASes taking part. In other words, it has
640- quite good incremental deployment properties, another advantage over BGPsec.
665+ Furthermore, ASPA catches some routing problems (such as accidental
666+ leakage of routes) that are not caught by BGPsec. This is because
667+ BGPsec shows that ASes are connected to each other but does not
668+ capture the customer-provider relationships. ASPA also provides
669+ benefits even if it is only partially deployed on a path, as the above
670+ example illustrates. In other words, it is amenable to incremental
671+ deployment.
641672
642673.. _reading_aspa :
643674.. admonition :: Further Reading
0 commit comments