BGP hijacking is a cyberattack where a malicious actor falsely announces ownership of IP address prefixes they do not control, exploiting the trust-based nature of the Border Gateway Protocol (BGP) to redirect internet traffic. By broadcasting these illegitimate routes to neighboring autonomous systems (AS), the attacker can intercept, monitor, or alter data packets destined for the legitimate network. This is possible because BGP, the protocol that manages how packets are routed across the internet's interconnected networks, lacks built-in mechanisms to cryptographically verify the authenticity of routing announcements.
BGP Hijacking
What is BGP Hijacking?
BGP hijacking is a cyberattack that exploits the Border Gateway Protocol's inherent trust to redirect internet traffic through an unauthorized network path.
The attack typically involves announcing a more specific IP prefix than the legitimate one, as BGP routers are designed to prefer the most specific route available. For example, if a company legitimately owns the IP block 192.0.2.0/24, an attacker could hijack traffic by announcing 192.0.2.0/25. This finer-grained route propagates through the global routing table, causing a significant portion of the internet to send traffic for that company to the attacker's network instead. The impact can range from eavesdropping and man-in-the-middle attacks to complete denial-of-service for the targeted organization.
Major incidents highlight the scale of the threat. In 2018, traffic for cryptocurrency exchanges and other services was hijacked to steal an estimated $100,000 in cryptocurrency. In 2020, a Russian telecom provider accidentally hijacked critical internet traffic from major platforms like Google and Cloudflare for about an hour, demonstrating how even misconfiguration can cause widespread disruption. These events underscore that BGP hijacking is not solely a theoretical risk but a recurring operational and security challenge for the global internet infrastructure.
Mitigation relies on a combination of operational best practices and new security protocols. Network operators are encouraged to implement Route Origin Authorization (ROA) through the Resource Public Key Infrastructure (RPKI), which cryptographically attests which AS is authorized to announce specific IP prefixes. Additionally, BGP monitoring and prefix filtering—where networks configure their routers to reject announcements for IP blocks not expected from their peers—are crucial defensive layers. While full adoption of RPKI is growing, the decentralized nature of the internet means comprehensive protection requires widespread, voluntary implementation across tens of thousands of autonomous systems.
How BGP Hijacking Works
An explanation of the Border Gateway Protocol's inherent trust model and how malicious actors exploit it to intercept or redirect internet traffic.
BGP hijacking is a cyberattack that exploits the Border Gateway Protocol's (BGP) trust-based design to fraudulently announce ownership of IP address blocks, causing internet traffic to be rerouted through the attacker's network. The BGP protocol, which governs how major networks (Autonomous Systems or ASes) exchange routing information, lacks built-in cryptographic validation. This allows a malicious AS to broadcast a more specific or shorter-path route to a set of IP addresses, which other routers, operating on trust, often accept as legitimate. The result is that traffic intended for a legitimate destination is diverted, enabling interception, surveillance, or denial-of-service.
The attack typically unfolds in several stages. First, the hijacker gains control of an Autonomous System Number (ASN) or compromises a router within a legitimate AS. They then craft and propagate a BGP update message announcing a route to IP prefixes they do not legitimately own. Because BGP routers by default trust announcements from their established peers, this fraudulent route can propagate globally across the internet in minutes. Critical factors that increase success include announcing a more specific prefix (e.g., announcing /24 blocks within a victim's /16 range) or a path that appears geographically or topologically preferable due to the attacker's forged AS_PATH attribute.
Once traffic is diverted, the attacker can execute various malicious activities. In a traffic interception (or "man-in-the-middle") attack, the attacker passively inspects or actively alters the data before forwarding it to the legitimate destination, often without the end users' knowledge. Alternatively, for denial-of-service, the attacker may simply drop the traffic, making the victim's services unreachable. A notable historical example is the 2018 incident where Russian telecom Rostelecom hijacked financial services traffic from Mastercard, Visa, and others, redirecting it through Russian servers.
Defending against BGP hijacking relies on implementing security extensions and best practices. The primary solution is Resource Public Key Infrastructure (RPKI), a cryptographic framework that allows ASes to create Route Origin Authorizations (ROAs). A ROA is a signed record that definitively states which ASN is authorized to originate routes for specific IP prefixes. Routers configured for RPKI-based Origin Validation can check incoming BGP announcements against these records and reject invalid ones. Other complementary measures include BGP monitoring services like BGPStream, implementing prefix filtering, and using AS_PATH validation mechanisms such as BGPsec.
Key Characteristics of BGP Hijacking
BGP hijacking is a critical network attack where an autonomous system (AS) illegitimately announces ownership of IP prefixes it does not control, intercepting or redirecting internet traffic. These characteristics define its mechanics, impact, and detection.
Illegitimate Route Announcement
The core mechanism of a BGP hijack is the announcement of more specific IP prefixes or unauthorized routes into the global BGP routing table. Attackers exploit BGP's trust-based nature, where routers accept announcements from peers without cryptographic validation. This causes traffic destined for the victim's IP blocks to be rerouted through the attacker's network.
- Announcing a more specific prefix (e.g., announcing
/24when the legitimate route is/23) is often more effective, as BGP prefers the longest matching prefix. - The announcement can be for the victim's exact prefixes (prefix hijack) or for adjacent, unused space (sub-prefix hijack).
Traffic Interception & Analysis
Once the fraudulent route is propagated, the hijacker's AS becomes a transit point for the victim's traffic. This enables passive monitoring (sniffing unencrypted data) or active manipulation (modifying packets). The attacker can:
- Perform man-in-the-middle (MitM) attacks on financial transactions or login credentials.
- Cryptojack cryptocurrency miners or wallets by redirecting blockchain node communication.
- Deny service by blackholing or degrading the traffic before forwarding it on (if at all), causing outages.
This phase turns a routing anomaly into a direct security and integrity breach.
Motivations: Espionage & Fraud
BGP hijacks are not random; they are executed with specific, often state-level or criminal, objectives.
- Espionage & Intelligence Gathering: Nation-states hijack traffic to monitor communications from specific regions or organizations.
- Cryptocurrency Theft: Redirecting traffic to and from cryptocurrency exchanges, wallets, or mining pools to steal funds or manipulate transactions.
- Censorship: A state actor can hijack routes to block access to specific services or websites.
- Monetary Gain: Some hijacks reroute traffic to generate illicit revenue from transit fees or by serving malicious ads.
Transient & Hard-to-Trace Nature
Hijacks are often short-lived (minutes to hours), making detection and attribution difficult. Attackers rely on the slow convergence of BGP updates across the global internet. Key challenges include:
- Lack of Global Visibility: No single entity monitors the entire BGP routing table in real-time.
- Attribution Difficulty: While the originating AS is visible, identifying the malicious actor behind it is complex, as ASes can be compromised or leased.
- Clean-up Latency: Even after detection, withdrawing the malicious routes and restoring legitimate paths takes time, prolonging the attack's effective window.
Famous Example: The YouTube Hijack (2008)
A landmark case demonstrating global impact. Pakistan's state telecom (PTCL) attempted to block YouTube domestically by announcing YouTube's IP prefix (208.65.153.0/24) within Pakistan. This route leaked globally via PTCL's upstream provider, PCCW, and was accepted by major networks because it was a more specific /24 route. For nearly two hours, a large portion of global YouTube traffic was redirected to Pakistan, causing a worldwide outage.
This incident highlighted the fragility of BGP trust and the cascading effects of a local misconfiguration or malicious action, underscoring the need for origin validation.
Impact on Blockchain Networks
BGP hijacking is a network attack where a malicious actor illegitimately announces ownership of IP prefixes to reroute internet traffic. For blockchain networks, this can lead to network partitioning, transaction manipulation, and consensus disruption.
Network Partitioning (Eclipse Attack)
By redirecting a node's traffic, an attacker can isolate it from the honest network, creating a partitioned view of the blockchain. This enables eclipse attacks, where the victim node only sees transactions and blocks controlled by the attacker, potentially leading to double-spends or invalid state acceptance.
Consensus & Finality Disruption
Traffic rerouting can delay or prevent block and vote propagation between validators or miners. This directly threatens consensus mechanisms:
- Proof of Work: Can cause temporary chain splits and increased orphan rates.
- Proof of Stake: Can prevent attestations from reaching the chain, delaying finality and potentially causing slashing penalties for isolated validators.
RPC & API Endpoint Compromise
Hijacking traffic to a node's RPC endpoint or a service's API (like Infura or Alchemy) allows an attacker to:
- Serve manipulated blockchain data (e.g., fake balances).
- Intercept and censor user transactions.
- Phish for private keys via fake interfaces. This undermines the reliability of the data layer that dApps and wallets depend on.
Cryptocurrency Exchange Targeting
Exchanges are prime targets. Redirecting traffic to a fake exchange interface enables phishing attacks to steal user credentials. More critically, hijacking an exchange's deposit address notifications could allow an attacker to falsify deposit confirmations, leading to illegitimate credit and subsequent fraudulent withdrawals.
Oracle Manipulation & MEV
BGP hijacking can be used to manipulate critical oracle price feeds by isolating nodes from the primary data source, causing dApps to use incorrect prices. It also facilitates Maximal Extractable Value (MEV) attacks by allowing an attacker to view and front-run transactions before they reach the public mempool.
Mitigation Strategies
Blockchain networks defend against BGP risks through network-level hardening:
- Multi-homing: Nodes connect via diverse, geographically separated internet providers.
- Peer Diversity: Manual peering with trusted nodes across different autonomous systems.
- Encryption & Authentication: Using TLS for RPC and peer authentication to detect man-in-the-middle attacks.
- Monitoring: Tools like BGPStream to detect suspicious route announcements in real-time.
Notable Blockchain BGP Hijacking Incidents
These incidents demonstrate how BGP hijacking can be used to intercept, censor, or steal cryptocurrency by rerouting internet traffic.
The Core Vulnerability: Trust in BGP
These incidents are possible because the Border Gateway Protocol (BGP) operates on a trust-based model where networks automatically accept route advertisements from peers. There is no built-in mechanism to cryptographically verify that an AS is authorized to announce an IP prefix. This fundamental flaw makes blockchain networks, which rely on the underlying internet, susceptible to route poisoning and traffic interception.
Mitigation Strategies
To defend against BGP hijacks, blockchain projects and infrastructure providers can implement:
- Resource Public Key Infrastructure (RPKI): A framework to cryptographically sign route origins.
- BGP Monitoring & Alerting: Using services like BGPStream to detect suspicious route announcements in real-time.
- Node Diversity: Ensuring validator and node clients are distributed across multiple autonomous systems and geographic regions to reduce single points of failure.
BGP Hijacking: Attack Methods vs. Defense Strategies
A technical breakdown of common BGP hijacking techniques and the corresponding network security measures designed to mitigate them.
| Attack Vector / Defense Category | Attack Method | Primary Defense Strategy | Key Protocols & Technologies |
|---|---|---|---|
Prefix Hijacking | Announcement of unauthorized IP prefixes to redirect traffic | Prefix and Route Origin Validation (RPKI ROA) | RPKI, IRR databases |
Path Hijacking (AS Path Forgery) | Fabrication of AS_PATH attributes to attract traffic | AS_PATH Validation (BGPsec, ASPA) | BGPsec, ASPA, Path-End Validation |
Route Leak | Propagation of routes contrary to routing policies (often accidental) | Route Leak Detection and Prevention | BGP Monitoring (BGPStream), PeerLock, max-prefix limits |
Subprefix Hijacking | Announcement of a more specific (longer) prefix to override legitimate routes | Prefix Filtering and Maximum Prefix Length Checks | BGP filters, RPKI Invalid route rejection |
Session Hijacking / TCP Reset | Exploitation of BGP session (TCP 179) to inject false updates or reset peers | TCP-AO / MD5 Authentication, GTSM | TCP-AO, MD5, Generalized TTL Security Mechanism (GTSM) |
Monitoring & Visibility | Reconnaissance and stealth execution during low-activity periods | Real-time BGP Monitoring and Anomaly Detection | BGPStream, ARTEMIS, BGPMon, Looking Glasses |
Mitigation Techniques for Node Operators
BGP hijacking is a network-level attack where an Autonomous System (AS) falsely advertises ownership of IP prefixes, redirecting traffic. For blockchain node operators, this can lead to eclipse attacks, transaction censorship, or data manipulation. This section outlines practical strategies to detect and defend against such routing threats.
Multi-Homing & Path Diversity
Avoid single points of failure by connecting your node's infrastructure through multiple, geographically diverse Internet Service Providers (ISPs) or network providers. This practice, known as multi-homing, ensures that if one provider's BGP routes are hijacked, your node can maintain connectivity and consensus through an alternative path.
- Key Benefit: Significantly increases the cost and complexity for an attacker, as they must hijack all available paths simultaneously to isolate your node.
Use of VPNs & Tunnels
Encapsulating your node's traffic through a VPN or secure tunnel (like WireGuard or IPsec) to a trusted endpoint can bypass local routing attacks. The tunnel endpoint itself should be provisioned with strong BGP defenses (ROV, multi-homing).
- Implementation: Run your node behind a VPN; the public-facing IP is the VPN server's address, which is harder to target specifically.
- Consideration: This adds latency and relies on the security of the VPN provider's network.
DNS Security (DNSSEC)
If your node discovers peers via DNS-based discovery (like Ethereum's enrtree), ensure the domain records are protected with DNSSEC. This prevents DNS cache poisoning attacks, which could be used in conjunction with BGP hijacks to feed your node malicious peer lists.
- Verification: Check that your domain registrar and DNS provider support and have enabled DNSSEC for your node's discovery domain.
Consensus Layer Defenses
Configure your node's consensus client to be resilient to network-level attacks. Key settings include:
- Strict Peer Count Limits: Maintain a high number of outbound peer connections to diverse peers.
- Ignore Inbound Peers: For critical validators, consider running in outbound-only mode, connecting only to a manually configured, trusted peer list.
- Use of Checkpoint Sync: Utilize a trusted checkpoint to recover quickly if a hijack causes a chain split, ensuring you re-sync from a known valid state.
Common Misconceptions About BGP Hijacking
BGP hijacking is a critical threat to internet routing, but it is often misunderstood. This section clarifies persistent myths about its mechanisms, detection, and impact.
BGP hijacking is a malicious or accidental rerouting of internet traffic by announcing illegitimate BGP routes. It works by an Autonomous System (AS) broadcasting false Network Layer Reachability Information (NLRI), claiming to own IP address blocks it does not control. Routers that accept these more specific or preferable paths will forward traffic to the hijacker's network, enabling interception, blackholing, or man-in-the-middle attacks. The core vulnerability lies in BGP's trust-based design, which lacks inherent cryptographic validation of route origins (RPKI aims to fix this).
Frequently Asked Questions (FAQ)
Border Gateway Protocol (BGP) hijacking is a critical internet routing vulnerability. These questions address its mechanisms, impact on blockchain networks, and defensive strategies.
BGP hijacking is a cyberattack where a malicious autonomous system (AS) falsely advertises ownership of IP address prefixes it does not legitimately control, redirecting internet traffic through its network. The attack exploits the trust-based nature of the Border Gateway Protocol (BGP), the system that manages how data packets are routed across the internet. By announcing more specific prefixes or using a shorter AS_PATH, the attacker's fraudulent route appears more attractive to neighboring routers, which then reroute traffic destined for the victim's IP addresses. This allows the attacker to intercept, inspect, or drop the traffic, enabling man-in-the-middle (MitM) attacks, denial-of-service, or cryptocurrency theft from blockchain nodes and services.
Get In Touch
today.
Our experts will offer a free quote and a 30min call to discuss your project.