Abstract: The BGP protocol is at the core of the routing infrastructure of the Internet. Across years, BGP has proved to be very stable for its purpose. However, there have been some catastrophic incidents in the past, due to relatively simple router misconfigurations. In addition, unused network addresses are being silently stolen for spamming purposes. A relevant corpus of literature investigated threats in which a trusted BGP router injects malicious or wrong routes and some security improvement to the BGP protocol have also being proposed to make these attacks more difficult to perform. In this work, we perform a large-scale study to explore the validity of the hypothesis that it is possible to mount attacks against the BGP infrastructure without already having the control of a “trusted” BGP router. Even though we found no real immediate threat, we observed a large number of BGP routers that are available to engage in BGP communication, exposing themselves to potential Denial-of-Service attacks.
Introduction
The Border Gateway Protocol (BGP) is the "glue" that holds the Internet together, enabling different Autonomous Systems (ASes) to exchange routing information. While BGP has proven remarkably stable, its reliance on implicit trust between peers has led to catastrophic incidents due to misconfigurations or malicious route hijacking. This paper, originally presented at iNetSec 2010, investigates whether an attacker can disrupt global routing without first compromising a "trusted" router by exploiting publicly exposed BGP ports.
The Vulnerability
BGP is built on peering relationships established over TCP port 179. Historically, these relationships imply a high degree of trust: a router typically accepts and propagates any network prefix advertised by its peer. Most security research focuses on threats from compromised "trusted" routers. However, if a router leaves port 179 open to the entire Internet, an untrusted outsider could potentially mount Denial-of-Service (DoS) attacks or inject malicious routes.
An attacker could redirect traffic (hijacking) or drop it entirely (blackholing) if a router is misconfigured to accept peering from any IP. Furthermore, repeatedly opening and resetting connections can trigger "Route Flap Dampening," causing legitimate routes to be suppressed globally.
Experimental Methodology
To test the hypothesis that BGP routers are unnecessarily exposed, researchers conducted a massive scan of approximately 73% of the IPv4 address space (roughly 2.7 billion addresses). The experiment followed a three-phase approach:
- The SYN Scan: Using Nmap, they identified hosts with open TCP port 179.
- The BGP Probe: For the 2.2 million responding hosts, a custom tool attempted a BGP handshake.
- The State Machine: The tool followed the BGP protocol, waiting for an
OPENmessage and checking if the remote host would sendUPDATEorKEEPALIVEmessages.
The researchers took care to avoid being flagged as malicious, limiting their scan rate and hosting an explanatory webpage at the scanning IP.
Key Findings
The study revealed significant exposure across the Internet infrastructure:
- Widespread Exposure: Of the hosts completing a TCP handshake, over half allowed the BGP negotiation to proceed beyond the initial connection.
- Successful Peering: The team identified 1,258 distinct routers across 318 ASes willing to exchange
OPENmessages with an unknown research AS. - The "Jackpot": Five routers actually accepted the peering request and began sending
UPDATEmessages containing their internal routing tables. This level of access would theoretically allow an attacker to inject arbitrary routes. - Kernel vs. User-Space Gap: Many routers complete the TCP 3-way handshake in the OS kernel before the BGP process in user-space verifies the peer's IP. This "open door" allows attackers to consume router resources even if the session is eventually rejected.
Discussion and Recommendations
The findings highlight a failure in the "Principle of Least Privilege." BGP is not a public service; port 179 should be strictly firewalled to allow only known peer IPs. The researchers also encountered numerous security honeypots and reflectors, illustrating the noisy nature of the modern Internet.
To mitigate these risks, the authors urge the adoption of:
- TCP MD5 Signatures: To authenticate BGP sessions.
- Generalized TTL Security Mechanism (GTSM): To ensure BGP packets originate from directly connected neighbors.
- Firewalling: BGP security must start at the packet-filtering level rather than relying solely on the protocol's internal checks.
While no immediate catastrophic threat was found, the existence of over 1,200 exposed routers demonstrates a significant attack surface for DoS and potential route manipulation.
Summary updated