Using Resource Public Key Infrastructure For Secure Border Gateway Protocol
Using Resource Public Key Infrastructure For Secure Border Gateway Protocol
Using Resource Public Key Infrastructure For Secure Border Gateway Protocol
Abstract—Border Gateway Protocol (BGP) is a widely used II. METHODS FOR SECURING BGP
Internet routing protocol. While several security features have
been introduced and implemented to prevent attacks and address As the Internet de facto inter-domain routing protocol, BGP
routing instabilities, BGP remains vulnerable due to lack of is targeted and subjected to attacks. Over the years, security
integrity and authentication of BGP messages. BGP operations measures have been developed and methods implemented in
strongly depend on its security and attacks on BGP adversely attempts to make the Internet more secure. Several approaches
influence packet routing. Given the importance of BGP security, for enhancing BGP security have been introduced:
several approaches have been developed to enhance security of
BGP sessions. The Resource Public Key Infrastructure (RPKI), a A. Explicitly Configuring BGP Peers
specialized Public Key Infrastructure (PKI), was developed to This method explicitly sets identical configurations
help secure the Internet routing. It uses cryptographically between neighboring peer routers so that one may specify
verifiable statements to ensure that Autonomous Systems (ASes), connectivity to be limited between peers with the same
the Internet resource holders, are certifiably linked to the routing configuration. The requirement for identical configurations of
information they generate thus resulting in a reliable routing all BGP speakers prevents session establishments by routers
origin. In this paper, we describe a testbed developed for with non-matching configurations. The BGP speakers use TCP
validating route origin and present simulation results. port 179 for communication. Since BGP relies on TCP, the
inherent TCP risks and vulnerabilities also affect BGP. To
Keywords—Routing protocols; border gateway protocol; BGP
prevent attackers from spoofing BGP packets sent over TCP
security; resource public key infrastructure
and from hijacking the session, strong sequence number
I. BGP SECURITY randomization may be employed. Since the attacker would then
need to guess the sequence number of the packet for message
The Border Gateway Protocol (BGP) [1] was developed injection or modification, using strong sequence number
and designed before the Internet environment became randomization would make predicting or guessing the correct
subjected to attacks, exploits, and routing vulnerabilities. The sequence or acknowledgment (ACK) number improbable [3].
originally designed BGP lacks security countermeasures
required to prevent intentional or accidental network errors. B. Deploying BGP Session Shared Secrets
These attacks and errors cause ripple effects that propagate Using BGP session sharing for securing BGP involves
throughout the network resulting in potentially catastrophic using a shared key between both ends of the connection. This
routing disruptions. They may include modifying, deleting, key is used to compare all incoming BGP packets that contain
forging, or duplicating update messages, session hijacking, IP a 16-byte digest value created by the Message Digest 5 (MD5)
spoofing, or Distributed Denial of Service (DDoS) attacks [2]. algorithm. The recipient of the BGP packets will use its shared
Malicious attacks alone do not account for all security issues. key to compute the digest and compare it with the digest
Non-intentional and accidental errors also contribute to contained in the packet. If a mismatch occurs, the recipient
network instability. Misconfigured or faulty routers may also should not respond to the sender and will discard the packet
inject falsified information while being legitimate BGP [4], [5]. The MD5 algorithm provides authentication to packets
speakers. BGP does not have native counter-measures against and helps prevent spoofing. A shared secret key should be
these attacks. changed periodically and should be unique between peering
BGP has undergone many revisions and security sessions. While MD5 ensures integrity and prevents message
improvements. However, it still fails in preventing global duplication, it does not ensure the packet confidentiality. The
routing disruptions and traffic hijacking. Resource Public Key management of the security keys for various sessions has also
Infrastructure (RPKI), built based on the Public Key been proposed [6]. It has been observed that MD5 is
Infrastructure (PKI), formally validates route announcements “cryptographically broken and unsuitable for further use” [7].
from the originating Autonomous System (AS). The use of C. IPsec Tunneling
resource certificate ensures that only the owner (resource
holder) has the authority to advertise its routes thus preventing Internet Protocol Security (IPsec) provides strong
hijacking of the route origin. protection for message integrity and assist in prevention of
Denial of Service (DoS). IPsec ensures confidentiality of
Two virtual routers labeled R1 and R2 are connected to Unknown State: R1 (AS 11105) advertised an unknown
each other and to the RPKI Validator through Ethernet route to R2 (AS 271) using a randomly selected IP that was not
connections. R1 was assigned a genuine AS number 11105 that in the RPKI database for both AS. The state has been identified
belongs to SFU while R2 was assigned BCNET’s AS 271. By as “not found” with a localpref of 100 as configured:
using these AS numbers, live data from the validator are used R2#sh ip bgp 6.0.0.0
to validate the advertised routes based on the AS numbers. The BGP routing table entry for 6.0.0.0/8, version 5
RPKI Validator requires the Internet connection to download Path: (1 available, best #1, table default)
Not advertised to any peer
the ROA resources to the VM. IP assignments used in the Refresh Epoch 10
simulation scenario are shown in Table I. 11105
142.231.110.70 from 142.231.110.70 (142.231.110.70)
Origin IGP, metric 0, localpref 100, valid …
Router configurations were completed by assigning the Path 68DB4424 RPKI State not found
rpki-loc-pref to each individual state. Both virtual routers were Rx pathid: 0, tx pathid: 0x0
configured to connect to port 8282 of the RPKI Validator to
download the ROA resources. R1 was setup to advertise to R2 The simulations illustrate that RPKI may be easily
three distinct routes with known states: valid, invalid, and implemented in deployed networks and was capable of
unknown. Router R2 then validates the route advertised by R1 downloading actual ROA resources in a virtual environment.
with live ROA data from the RPKI Validator.
VI. DEPOLYED TESTBED SFU and BCNET have created resource certificates and
We have built a testbed with the objectives to observe the generated distinct ROA key pairs for their IP prefixes.
states of route announcements and verify the effects of routing Upon accepting ARIN’s Relying Party Agreement, ARIN’s
policies in RPKI BGP. The setup shown in Figure 2 closely TAL (ARIN’s public key) is sent to the recipient’s email
resembles the simulated network topology. Both routers are address. A network operator needs to create and save ARIN’s
connected to a local cache validator that downloads the ROA TAL. The validator service automatically loads files matching
dataset. The SFU and BCNET BGP speakers announce to each the *.tal on startup.
other globally routable prefixes 192.67.9.0/24 and
206.12.7.0/24. The testbed includes two routers and one local The RPKI validator machine has three interfaces: eth0,
cache validator. Two logical routers were instantiated using eth1, and eth2. The interface eth0 (outside interface) connects
JunOs software installed on the SFU and BCNET test the validator to the Internet. Interfaces eth1 and eth2 are
equipment. JunOs software partitions a single router into connected to the BCNET’s and the SFU’s routers, respectively.
multiple logical devices performing independent routing tasks. An important security practice is to configure firewall of the
The IP assignments for the routers and the local cache validator validator machine to accept connections from anticipated
are shown in Table II. combinations of IP addresses and port numbers. In the
deployed testbed, the validator only accepts TCP connections
from 142.231.110.62:8282 and 142.231.110.66:8282 to eth1
and eth2, respectively.
There are several connection mechanisms between virtual
routers: logical tunnel interfaces, rib-group, instance-import,
and next-table. Logical tunnels are point-to-point interfaces
that carry traffic between virtual routers. In the SFU-BCNET
testbed, logical tunnel interfaces (lt-0/2/10) were used to form
BGP peering between two virtual routers. We assigned the
actual SFU AS number (AS 11105) and BCNET AS number
(AS 271) to the logical routers, as in the simulation scenario.
Each router has a loopback interface that may be assigned
multiple IP addresses. Loopbacks were assigned invalid IP
addresses (192.168.42.1 and 192.168.42.2) that were required
to create the logical tunnel interfaces (lt-0/2/10). Moreover, in
order to announce prefixes to routers, 206.12.7.1 (SFU prefix
206.12.7.0/24 with ROA) and 192.67.9.1 (BCNET prefix
192.67.9.0/24 with ROA) were assigned to SFU and BCNET’s
Figure 2: Logical topology of the deployed testbed. loopback connection, respectively.
B. Verifying Origin Validation
TABLE II. IP ASSIGNEMNTS FOR THE SIMUALATION
RPKI commands show validation session, show validation
Device Interface Prefix IP Assignment Description statistics, and show validation database are performed on the
SFU router to
ge-0/0/0 142.231.110.64/30 142.231.110.66
Validator router to verify the routes. RPKI command output:
SFU test
192.168.42.2/32 192.168.42.2 Loopback
router tr1.vncv1> show validation session detail
lo0 SFU prefix for Session 142.231.110.61, State: up, Session index: 2
AS 11105 206.12.7.0/24 206.12.7.1
ROA Group: BCNET_VALIDATOR, Preference: 200
lt-0/2/10 142.231.110.68/30 142.231.110.70 Tunnel Local IPv4 address: 142.231.110.62, Port: 8282
BCNET router Refresh time: 300s
ge-0/0/0 142.231.110.64/30 142.231.110.66 Hold time: 900s
to Validator
192.168.42.1/32 192.168.42.1 Loopback Record Life time: 900s
R2 AS271
Serial (Full Update): 441
BCNET lo0 BCNET prefix
192.67.9.0/24 192.67.9.1 Serial (Incremental Update): 441
for ROA Session flaps: 2
ge-1/2 142.231.110.68/30 142.231.110.69 Tunnel Session uptime: 1w0d 10:11:12
Validator to Last PDU received: 00:01:29
eth0 142.231.112.0/24 142.231.112.42 outside IPv4 prefix count: 7078
interface IPv6 prefix count: 1106
RPKI
Validator to
Validator eth1 142.231.110.60/30 142.231.110.61
BCNET tr1.vncv1> show validation statistics
Validator to Total RV records: 8190
eth2 142.231.110.64/30 142.231.110.65 Total Replication RV records: 8190
SFU
Prefix entries: 7815
Origin-AS entries: 8190
A. Testbed Architecture Memory utilization: 1590149 bytes
An Ubuntu VM acts as a local cache validator. SFU and Policy origin-validation requests: 6
Valid: 2 Invalid: 2 Unknown: 2
BCNET have obtained IP resources from ARIN and have BGP import policy reevaluation notifications: 3
distinct online accounts on ARIN’s website. Each ARIN inet.0, 3 inet6.0, 0
tr1.vncv1> show validation database
account is linked to an administrator. ARIN account holders RV database for instance master
manage and certify resources, such as IPv4 and IPv6 addresses. Prefix
2.0.0.0/12-16
Origin-AS Session
3215 142.231.110.61
State
valid
Mismatch
2.0.0.0/16-16
2.1.0.0/16-16
3215 142.231.110.61
3215 142.231.110.61
valid
valid
REFERENCES
2.2.0.0/16-16 3215 142.231.110.61 valid [1] Y. Rekhter and T. Li, “A Border Gateway Protocol 4 (BGP-4),” IETF
RFC 1771, Mar. 1995.
Verification of the applied policies was performed by [2] S. Murphy, “BGP Security Vulnerabilities Analysis,” IETF RFC 4272,
setting local preferences for valid, invalid, and unknown states Jan. 2006.
to 110, 90, and 100, respectively. As shown in Figure 2, a [3] Progress Toward Security the Routing Infrastructure [Online].
rogue test logical router was installed to verify the policy of an Available: http://www.cyber.st.dhs.gov/public/CATCH/Murphy.pdf.
“invalid” state. The rogue router announced SFU’s prefix, [4] CERT Advisory CA-2001-09, “Statistical Weaknesses in TCP/IP Initial
which originated from an invalid AS (AS 4476), to the BCNET Sequence Numbers” [Online]. Available: http://www.cert.org/
advisories/CA-2001-09.html.
router. The output of show route protocol bgp validation-state
[5] A. Heffernan, “Protection of BGP Sessions via the TCP MD5 Signature
invalid and show route 206.12.7.0 statements indicate that Option,” IETF RFC 2385, Aug. 1998.
BCNET router recognized the invalid AS 4476 as expected:
[6] S. Turner and L. Chen, “Updated Security Consideration for the MD5
tr1.vncv1> show route protocol bgp validation-state valid Message-Digest and the HMAC-MD5 Algorithms,” IETF RFC 6151,
inet.0: 13 destinations, 14 routes (13 active, 0 holddown, Mar. 2011.
0 hidden)
+ = Active Route, - = Last Active, * = Both [7] M. Leech, “Key Management Consideration for the TCP MD5 Signature
Option,” IETF RFC 3562, July 2003.
206.12.7.0/24*[BGP/170] 3w6d 05:23:33, localpref 110
AS path: 11105 I, validation-state: valid
[8] C. Kaufman, “Internet Key Exchange (IKEv2) Protocol,” IETF RFC
> to 142.231.110.70 via lt-0/2/10.69 4306, Dec. 2005.
[9] S. Kent, “IP Authentication Header,” IETF RFC 4302, Dec. 2005.
tr1.vncv1> show route protocol bgp validation-state invalid [10] S. Kent, “IP Encapsulating Security Payload (ESP),” IETF RFC 4303,
inet.0: 13 destinations, 14 routes (13 active, 0 holddown,
0 hidden) Dec. 2005.
+ = Active Route, - = Last Active, * = Both [11] K. Butler, P. McDaniel, T. R. Farley, and J. Rexford, “A survey of BGP
206.12.7.0/24 [BGP/170] 3d 08:00:09, localpref 90 security issues and solutions,” IEEE Journal on Selected Areas in
AS path: 4476 I, validation-state: invalid
> to 142.231.110.66 via lt-0/3/10.65 Communications, vol. 98, no. 1, pp. 5–10, Jan. 2010.
[12] V. Gill, J. Heasley, D. Meyer, P. Savola, and C. Pignataro, “The
tr1.vncv1> show route 206.12.7.0 Generalized TTL Security Mechanism (GTSM),” IETF RFC 5082, Oct.
inet.0: 13 destinations, 14 routes (13 active, 0 holddown, 2007.
0 hidden)
+ = Active Route, - = Last Active, * = Both [13] P. Marques, and F. Dupont, “Use of BGP-4 Multiprotocol Extensions
206.12.7.0/24*[BGP/170] 3w6d 05:27:15, localpref 110 for IPv6 Inter-Domain Routing,” IETF RFC 2545, Mar. 1999.
AS path: 11105 I, validation-state: valid
> to 142.231.110.70 via lt-0/2/10.69 [14] IPv6 Configuration [Online]. Available: http://www.cisco.com/web/
[BGP/170] 3d 08:03:15, localpref 90 about/ac123/ac147/archived_issues/ipj_7-2/ipv6_autoconfig.html
AS path: 4476 I, validation-state: invalid [15] DDoS and Security Reports: The Arbor Networks Security Blog
> to 142.231.110.66 via lt-0/3/10.65
[Online]. Available: http://ddos.arbornetworks.com/2009/02/ahh-the-
ease-of-introducing-global-routing-instability/.
RPKI BGP does not preserve the authenticity and integrity [16] European Network and Information Security Agency: Good Practices in
of the AS path attribute carried in a BGP message. BGP Resilient Internet Interconnection [Online]. Available:
speakers may insert bogus routing information and, thus, may http://www.enisa.europa.eu/activities/Resilience-and-CIIP/critical-
cause widespread disruption. An important future improvement infrastructure-and-services/inter-x/resilience-of-interconnections/report/.
would be to enable BGP speakers to verify that the ordering [17] Reckless Driving on the Internet [Online]. Available:
sequence of ASes in the path attribute represents the sequence http://www.renesys.com/2009/02/the-flap-heard-around-the-world/.
of ASes in the network layer reachability information (NLRI). [18] I. Gashinsky, J. Jaeggli, and W. Kumari, “Operational Neighbor
Discovery Problems,” IETF RFC 6583, Mar. 2012.
VII. CONCLUSION [19] Pakistan Hijacks YouTube [Online]. Available:
http://www.renesys.com/2008/02/pakistan-hijacks-youtube-1/.
Managing RPKI is easy with the existence of online [20] D. Cooper, S. Santesson, S. Farrell, S. Boeyen, R. Housley, and W.
portals, software, and tools provided by the RIRs such as Polk, “Internet X.509 Public Key Infrastructure Certificate and
ARIN and RIPE. Juniper JunOs v.12.2 and Cisco fully support Certificate Revocation List (CRL) Profile,” IETF RFC 5280, May 2008.
RPKI. In order to examine the functionality of RPKI BGP, we [21] M. Lepinski and S. Kent, “An Infrastructure to Support Secure Internet
implemented a testbed using the JunOs software and RIPE Routing,” IETF RFC 6480, Feb. 2012.
RPKI validator software products. The experimental results [22] G. Huston and G. Michaelson, “Validation of Route Origination Using
illustrate` that RPKI BGP may provide protection against route the Resource Certificate Public Key Infrastructure (PKI) and Route
Origin Authorizations (ROAs),” IETF RFC 6482, Feb. 2012.
origin hijacks.
[23] R. Bush and R. Austein, “The Resource Public Key Infrastructure
ACKNOWLEDGMENT (RPKI) to Router Protocol,” IETF RFC 6810, Jan. 2013.
[24] P. Mohapatra, J. Scudder, D. Ward, R. Bush, and R. Austein, “BGP
The authors would like to acknowledge the contribution of Prefix Origin Validation,” IETF RFC 6811, Jan. 2013.
M. Hay, D. McWilliam, and M. Gregory from BCNET for [25] Resource Public Key Infrastructure (RPKI) [Online]. Available:
valuable assistance in setting up the testbed. https://www.arin.net/resources/rpki/index.html.
[26] M. Lepinski, S. Kent, and D. Kong, “A Profile for Route Origin
Authorizations (ROAs),” IETF RFC 6482, Feb. 2012.
[27] Graphic Network Simulator 3 (GNS3) [Online]. Available:
https://www.gns3.net.