<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC1998 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1998.xml">
<!ENTITY RFC4271 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4271.xml">
<!ENTITY RFC6480 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6480.xml">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> <!-- used by XSLT processors -->
<?rfc strict="yes" ?> <!-- give errors regarding ID-nits and DTD validation -->
<?rfc toc="yes"?> <!-- generate a ToC -->
<?rfc tocdepth="2"?> <!-- the number of levels of subsections in ToC. default: 3 -->
<?rfc symrefs="yes"?> <!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?> <!-- sort the reference entries alphabetically -->
<?rfc compact="yes" ?> <!-- do not start each main section on a new page -->
<?rfc subcompact="yes" ?> <!-- keep one blank line between list items -->
<rfc category="info" docName="draft-ietf-grow-simple-leak-attack-bgpsec-no-help-04" ipr="trust200902">
<!-- end of popular PIs -->

  <front>
    <title abbrev="Route-Leaks">Route-Leaks &amp; MITM Attacks Against BGPSEC</title>
    <author fullname="Danny McPherson" initials="D." surname="McPherson">
      <organization>Verisign, Inc.</organization>
      <address>
        <postal>
          <street>12061 Bluemont Way</street>
          <city>Reston</city>
          <region>VA</region>
          <code>20190</code>
          <country>USA</country>
        </postal>
      <phone>+1 703.948.3200</phone>
      <email>dmcpherson@verisign.com</email>
      </address>
    </author>

    <author fullname="Shane Amante" initials="S." surname="Amante">
      <organization>Level 3 Communications, Inc.</organization>
      <address>
        <postal>
          <street>1025 Eldorado Boulevard</street>
          <city>Broomfield</city>
          <region>CO</region>
          <code>80021</code>
          <country>US</country>
        </postal>
      <phone>+1 720.888.1000</phone>
      <email>shane@level3.net</email>
      </address>
    </author>

    <author fullname="Eric Osterweil" initials="E." surname="Osterweil">
      <organization>Verisign, Inc.</organization>
      <address>
        <postal>
          <street>12061 Bluemont Way</street>
          <city>Reston</city>
          <region>VA</region>
          <code>20190</code>
          <country>USA</country>
        </postal>
      <phone>+1 703.948.3200</phone>
      <email>eosterweil@verisign.com</email>
      </address>
    </author>

    <author fullname="Dave Mitchell" initials="D." surname="Mitchell">
      <organization>Twitter, Inc.</organization>
      <address>
       <postal>
        <street>1355 Market Street, Suite 900</street>
        <city>San Francisco</city>
        <region>CA</region>
        <code>94103</code>
        <country>USA</country>
      </postal>
        <email>dave@twitter.com</email>
      </address>
    </author>

    <date year="2014"/>
    <area>RTG</area>
    <workgroup>GROW</workgroup>
    <keyword/>
    <abstract>
      <t> This document describes a very simple attack vector that 
          illustrates how RPKI-enabled BGPSEC machinery as currently 
          defined can be easily circumvented in order to launch a 
          Man In The Middle (MITM) attack via BGP. It is meant to 
          serve as input to the IETF's Global Routing Operations Working 
          group (GROW) during routing security requirements discussions 
          and subsequent specification.
      </t>
    </abstract>
  </front>
  <middle>
    <section title="Introduction">
      <t>This document describes a very simple attack vector that
         illustrates how RPKI-enabled BGPSEC 
         <xref target="I-D.ietf-sidr-bgpsec-protocol"/> machinery, as 
         currently defined, can be easily circumvented in order to launch a
         Man In The Middle (MITM) attack via BGP <xref target="RFC4271"/>.  
         It is meant to serve as input to the IETF's Global Routing Operations 
         Working Group (GROW) during routing security requirements discussions 
         and subsequent specification.
      </t>
      
      <t>This draft shows evidence that the attack vector described herein is
         extremely common, with over 9.6 million candidate instances being
         recorded since 2007. As a result of this evidence and additional
         contextual knowledge, the authors believe the capability to prevent
         leaks and MITM leak-attacks should be a primary engineering
         objective in any secure routing architecture.
      </t>

      <t>While the formal definition of a 'route-leak' has proven elusive in
   	 literature, the rampant occurrence and persistent operational
   	 threats have proven to be anything but uncommon. This document is
   	 intended to serve as a proof of existence for the referenced attack
   	 vector and any supplementary formal models are left for future work. 
      </t>
    </section>
    <section title="Discussion">
       <t>
       	In order to understand how a Man In the Middle (MITM) Attack can be
       	conducted using this attack vector, refer to the below example.
	   </t>

		<t>
       	Assume a multi-homed Autonomous System (AS), AS1, connects to two ISPs
       	(ISP1 and ISP2) and wishes to insert themselves in the data-path between
       	target network (prefix P) connected to ISP2 and systems in ISP1's
        network in order to proceed with an MITM attack.
		</t>
		
      <figure>
        <preamble>
        Assume that an RPKI-enabled BGPSEC deployment <xref target="I-D.ietf-sidr-bgpsec-protocol"/>
       	is currently operational by all parties in the scenario and functioning
        as designed.
        </preamble>
          <artwork 
                  alt='[picture of topology 1]'>

             +------+   peer   +------+
             | ISP1 | &lt;------&gt; | ISP2 |_
             +------+          +------   \
                  \            /    (  P  )--1.1.1.0/24
                   \ customer /      \___/
                    \        /
                    +-------+
                    |  AS1  |
                    +-------+

        </artwork>
        <postamble>   
        This figure depicts a multi-homed AS, AS1, that is a customer connected
        to two upstream ISPs (ISP1 and ISP2). ISP2 has a second customer, P,
        that is assigned prefix 1.1.1.0/24.
        </postamble>
      </figure>
      <t>
         Network operators on the Internet today typically prefer customer
         routes over routes learned from bi-lateral or settlement free peers.
         Network operators commonly accomplish this via application of one
         or more BGP <xref target="RFC4271"/> Path Attributes, most commonly, 
         LOCAL_PREF as illustrated in <xref target="RFC1998"/>, that are 
         evaluated earlier in the BGP Path Selection process than AS_PATH 
         length.
      </t>

      <t>
		As currently defined, <xref target="I-D.ietf-sidr-bgpsec-protocol"/>
	    only provides two methods for validating an announced NLRI:
      </t>

      <t>
      <list style="numbers">
      	<t>
      	Is the Autonomous System authorized to originate an IP prefix?
      	</t>
		<t>
		Is the AS_PATH (or any similarly derived attribute such as BGPSEC_Path) 
		in the route the same as the list of ASes through which the 
      	NLRI traveled?
     	</t>
      </list>
      </t>

      <t>
      	In order for an attacker (AS1) to divert traffic from ISP1 toward prefix
      	P through their AS, AS1 must simply fail to scope the propagation of
      	the target prefix P (1.1.1.0/24), received from ISP2. This is completed
      	by announcing a syntactically correct BGPSEC update for prefix P to
        ISP1.
      </t>

      <t>
      	This vulnerability is what authors refer to as a 'route-leak' or
      	'leak-attack', respectively, when intent aligns with actions.
      	It is important to note that the default behavior in BGP [RFC4271]
      	is to announce all best paths to external BGP peers, unless explicitly
      	configured otherwise by a BGP speaker.  Because ISP1 prefers prefixes
      	learned from customers (AS1) over prefixes learned from peers (ISP2),
      	ISP1 begins forwarding traffic for prefix P through the attacker (AS1),
      	thus successfully completing the route hijack.
      </t>
    
      <t>
      	It is important to note that the route-leaks described herein are not
      	illegal NLRI origins.  These are cases in which routes are
      	propagated with an authentic origin AS, as per <xref 
        target="RFC6480"/>.  Furthermore, the BGPSEC route for prefix P is
        propagated through intermediate ASN's, in this case AS1, that each
        applies a valid BGPSEC_Path attribute to the route. Ultimately, ISP1
        receives two, valid BGPSEC routes for prefix P, (one directly from ISP2
        and one directly from AS1); however, due to the local policy
        implemented within ISP1, it prefers the customer route, due to higher
        LOCAL_PREF, received from customer AS1. This will cause ISP1 to
        misdirect packets through a invalid intermediate ASN, AS1, to reach
        prefix P.
      </t>
      
      <t>
      	It should be understood that any multi-homed AS can potentially
      	launch such an attack, even if through simple misconfiguration, which
      	is a common occurrence on the Internet. As a matter of fact,
      	advertising these prefixes is the default behavior of many BGP
      	implementations and explicit action must be taken to not advertise
      	all prefixes learned in BGP.
      </t>

      <t>
      	Such occurrences have been historically archived and presented to the 
      	operational community since 2007 <xref target="NANOG_LEAK_TALK"/>.
      	To date, over 9.6 million such events have been recorded within the
      	<xref target="ROUTE_LEAK_DETECTION_TOOL"/>.
      </t>

      <t>
      	Said dataset serves as a basis for analysis and likely contains a
      	degree of false positives. Even while some may debate how many of the
      	incidents were malicious route-leaks versus accidental misconfiguration
        that resulted in leaked routes, the size of the dataset provides evidence
        of the magnitude of the issue.
      </t>
       
      <t>
      	Determination of intent in these situations is difficult to ascertain
      	and requires preventative controls be put in place to mitigate
        occurrences of route-leaks.  In order to illustrate the difficulty in
        determining intent, consider the events that transpired on November
        6th, 2012 <xref target="LEAK_ATTACK_ON_GOOGLE"/>.
      </t>

      <t>
      	Google is the largest Internet site and processes billions of
      	end-user transactions per day.  It became unreachable for approximately
        27 minutes.  At their scale, an outage of 27 minutes is extremely
        visible and, most likely, a financially measurable event.  In this
        example, its services became unreachable because a BGP peer improperly
        propagated the company's prefixes.  Because this was a highly visible
        outage, there exists a public acknowledgment of improper intent
        executed by one of Google's peers, proving that <xref
        target="RFC6480"/> and <xref target="I-D.ietf-sidr-bgpsec-protocol"/>
        would be unable to detect or prevent this type of attack.
      </t>

      <t>
        In an environment where <xref target="I-D.ietf-sidr-bgpsec-protocol"/> is fully
      	deployed, it is expected that there would be substantial assurances
        as to the semantic integrity of the AS_PATH or BGPSEC_Path attribute.
        An operator would expect that such an attribute would accurately
        reflect the attacker's ASN in the appropriate location of the
        BGPSEC_Path.  Unfortunately, as currently designed,
        <xref target="I-D.ietf-sidr-bgpsec-protocol"/> is unable to distinguish
        whether an ASN is allowed, by policy, to add their ASN within the
        BGPSEC_Path attribute before the BGP update is propagated to downstream
        ASNs.  This proves that mechanisms defined in
        <xref target="I-D.ietf-sidr-bgpsec-protocol"/> would not stop an
        attacker from completing this type of attack.
      </t>

      <t>
        It should be noted that the attack scenario described in this document
        can be mitigated by performing proper route filtering techniques. 
      </t>

      <t>
      	Discussion of out of band methods to mitigate this attack are
      	important; albeit beyond the scope of this document. 
        This document is meant to provide input into routing protocol design 
        choices being considered within the IETF, and to foster discussion of 
        the practical implications of "policy" and "intent" in operational routing 
        system security.
      </t>

    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
    <t>
    The authors gratefully acknowledge the contributions of John Curran. 
    </t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
    <t> 
    There are no actions for IANA in the document.
    </t>
    </section>

    <section title="Security Considerations">
       <t>
       This document describes an attack on an RPKI-enabled BGPSEC and is
       meant to inform the IETF community that this vulnerability exists as a 
       result of route-leaks and attacks that conform to this type of behavior, 
       and that operators should not assume that that work items and designs address
       these operational security issues.
       </t>

       <t>
       The authors believe the capability to prevent route-leaks and leak-attacks
       should be a primary engineering objective in any secure routing
       architecture.
       </t>
    </section>

  </middle>
  <back>
    <references title="Informative References">
      &RFC1998;
      &RFC4271;
      &RFC6480;
      <reference anchor="ROUTE_LEAK_DETECTION_TOOL" target="http://puck.nether.net/bgp/leakinfo.cgi">
        <front>
          <title abbrev="PUCK ROUTE LEAKS">BGP Routing Leak Detection System Routing Leak Detection System</title>
          <author initials="J" surname="Mauch" fullname="J. Mauch">
            <organization></organization>
          </author>
          <date month="September" year="2007"/>
        </front>
      </reference>

      <reference anchor="NANOG_LEAK_TALK" target="http://www.nanog.org/meetings/nanog41/presentations/mauch-lightning.pdf">
        <front>
          <title abbrev="PUCK LEAK TALK">Detecting Routing Leaks by Counting</title>
          <author initials="J" surname="Mauch" fullname="J. Mauch">
            <organization></organization>
          </author>
          <date month="October" year="2007"/>
        </front>
      </reference>

      <reference anchor="LEAK_ATTACK_ON_GOOGLE" target="http://blog.cloudflare.com/why-google-went-offline-today-and-a-bit-about">
        <front>
          <title abbrev="GOOGLE LEAK">Why Google Went Offline Today and a Bit about How the Internet Works</title>
          <author initials="CF" surname="CloudFlare" fullname="CloudFlare">
            <organization></organization>
          </author>
          <date month="November" year="2012"/>
        </front>
      </reference>

      <reference anchor='I-D.ietf-sidr-bgpsec-protocol'>
        <front>
          <title>BGPSEC Protocol Specification</title>
          <author initials="M. L." surname="Lepinski" fullname="M. Lepinski"/>
          <date month='November' year='2013' />
        </front>
      </reference>
    </references>
  </back>
</rfc>
