Tutorial 11: Control-Plane Security and Secure Routing Expanded

Table of Contents

  1. Learning Objectives
  2. Overview
  3. Technical Content
  4. Quiz
  5. Exercises
  6. Homework
  7. Summary

Learning Objectives

Overview

The control plane is a critical target for adversaries because it determines how packets are forwarded. Attacks on routing can lead to traffic interception, black holes, denial of service, and unauthorized access. The two most prominent protocols—BGP (inter-domain) and OSPF (intra-domain)—face distinct threats. BGP lacks built-in authentication and validation, making it vulnerable to prefix hijacking and route leaks. OSPF can be compromised via forged LSAs if authentication is not used. This tutorial provides a thorough examination of routing security, covering the threat landscape, OSPF authentication, RPKI, BGPsec, IRR, and operational best practices. We also explore advanced topics like BGP FlowSpec, monitoring, and real-world case studies. By the end, students will understand the technical and operational measures needed to secure the control plane.

Technical and Theoretical Content

1. The Threat Landscape of Routing

Routing security threats can be categorized as:

These threats arise due to the lack of authentication, authorization, and validation in legacy routing protocols.

2. Prefix Hijacking: Types, Causes, and Impacts

Prefix hijacking occurs when an unauthorized AS originates a prefix that belongs to another AS. Types:

Causes: misconfiguration, malicious intent, or accidental leaks. Impacts: traffic interception, data breaches, loss of service, and reputation damage. Examples: the 2008 YouTube hijack (Pakistan Telecom), the 2018 Google hijack (China Telecom), and many others.

3. Route Leaks and Their Consequences

A route leak occurs when an AS announces routes learned from one neighbor (e.g., a peer) to another neighbor (e.g., a provider), violating the valley-free policy. This can cause:

Leaks often happen due to misconfigured export policies. Recent large-scale leaks have disrupted Internet connectivity for major regions.

4. BGP Security: The Inherent Vulnerabilities

BGP is based on trust; it has no built-in authentication for session establishment (TCP MD5 is optional), no validation of the origin AS, and no validation of the path. Thus, any AS can announce any prefix, and other ASes will accept it. This is the root cause of prefix hijacking and leaks. Additionally, BGP sessions can be hijacked if TCP MD5 is not used, or if keys are weak.

5. OSPF Security: Authentication and Integrity

OSPF supports authentication at the packet level. Options include:

Keys are configured per interface. Strong authentication is recommended to prevent unauthorized routers from injecting false LSAs. OSPFv3 relies on IPsec for authentication.

6. Resource Public Key Infrastructure (RPKI) – Architecture and Operation

RPKI (RFC 6480) is a framework to validate the origin AS of a prefix. It relies on a hierarchy of Certification Authorities (CAs) mirroring the IP address allocation hierarchy (IANA → RIRs → LIRs → ISPs). RPKI issues:

Routers can validate BGP announcements against ROAs using Route Origin Validation (ROV) to determine if the origin AS is valid, invalid, or unknown.

7. RPKI in Practice: ROA, Validation, and ROV

An ROA contains:

When a BGP route is received, the router checks the origin AS and prefix against the ROA database (e.g., via RPKI validator). The result:

Operators can filter or lower preference for Invalid/Unknown routes.

8. BGPsec: Path Validation and Cryptographic Signatures

BGPsec (RFC 8205) is an extension to BGP that provides cryptographic path validation. It adds a segment to the AS-PATH where each AS signs the path prefix. This ensures that no AS can be removed or inserted in the path. BGPsec assumes a PKI for AS numbers (similar to RPKI). However, it increases packet size and computational overhead, and is not widely deployed due to complexity and operational challenges.

9. IRR and Route Filtering

The Internet Routing Registry (IRR) is a distributed database where network operators register their routing policies (route objects). ISPs can use IRR data to build filters to reject routes that do not match the registered origin AS. However, IRR is not cryptographically secure (can be spoofed). RPKI is superior, but IRR is still widely used for filtering.

10. Secure Routing Best Practices for Operators

11. Advanced Topics: BGP FlowSpec, BGP Monitoring, and Anomaly Detection

BGP FlowSpec (RFC 8955) allows operators to distribute traffic filtering rules via BGP, enabling DDoS mitigation at scale. BGP monitoring tools (e.g., RIPE RIS, RouteViews) collect BGP data for analysis. Anomaly detection uses machine learning to identify suspicious prefix announcements or path changes.

12. Case Studies: Real-World Attacks and Mitigations

Figure 1: RPKI Validation Process

    BGP Update (prefix, origin AS) -> ROV Validator
    Check against ROA database:
    - Valid: Accept (or prefer)
    - Invalid: Reject or lower preference
    - Unknown: Apply policy
    

Quiz

Answer each question; check your understanding by revealing the answer.

Question 1: What is prefix hijacking?

Show AnswerPrefix hijacking occurs when an unauthorized AS announces a prefix that belongs to another AS, causing traffic to be misrouted.

Question 2: What is a route leak?

Show AnswerA route leak is when an AS announces routes learned from one neighbor to another, violating policy and causing suboptimal routing.

Question 3: What authentication methods does OSPF support?

Show AnswerNull, plaintext, and cryptographic (MD5, SHA).

Question 4: What is RPKI?

Show AnswerResource Public Key Infrastructure, a framework for validating the origin AS of a prefix.

Question 5: What is a ROA?

Show AnswerA Route Origin Authorization, a signed object that binds a prefix to an AS.

Question 6: What are the three validation states in RPKI-based ROV?

Show AnswerValid, Invalid, Unknown.

Question 7: What is BGPsec?

Show AnswerBGPsec is an extension to BGP that cryptographically validates the AS-PATH.

Question 8: What is the primary vulnerability of BGP that allows prefix hijacking?

Show AnswerBGP lacks authentication and validation of the origin AS, so any AS can announce any prefix.

Question 9: What is the IRR and how is it used for security?

Show AnswerThe Internet Routing Registry stores routing policies; ISPs use it for prefix filtering.

Question 10: Why is TCP MD5 authentication used in BGP?

Show AnswerTo secure the BGP session and prevent session hijacking.

Question 11: What is BGP FlowSpec?

Show AnswerBGP FlowSpec is a mechanism to distribute traffic filtering rules via BGP for DDoS mitigation.

Question 12: How does OSPF cryptographic authentication prevent replay attacks?

Show AnswerIt uses sequence numbers and message digests; each packet is authenticated and checked against a sliding window.

Question 13: What is the role of the RIR in RPKI?

Show AnswerRIRs act as CAs in the RPKI hierarchy, certifying IP address allocations.

Question 14: What is a "maximum length" in a ROA?

Show AnswerIt specifies the maximum prefix length that the AS is authorized to originate, allowing de-aggregation for traffic engineering.

Question 15: Why is RPKI considered more secure than IRR?

Show AnswerRPKI uses cryptography to provide origin validation, whereas IRR is based on plaintext, unauthenticated data.

Question 16: What is the impact of a route leak on traffic?

Show AnswerIt can cause traffic to be sent over suboptimal paths, leading to increased latency, congestion, and potential black holes.

Question 17: How can an operator mitigate prefix hijacking?

Show AnswerBy deploying RPKI validation, filtering announced prefixes, and monitoring BGP for anomalies.

Question 18: What is a "man-in-the-middle" attack on BGP?

Show AnswerAn attacker intercepts BGP messages, potentially modifying or injecting routing information.

Question 19: What are some best practices for OSPF security?

Show AnswerUse cryptographic authentication, set passive interfaces, and limit area membership.

Question 20: What is the difference between RPKI and BGPsec?

Show AnswerRPKI validates the origin AS; BGPsec validates the entire AS path.

Question 21: How does BGP FlowSpec help in security?

Show AnswerIt allows operators to inject rules to drop or rate-limit traffic matching specific patterns, mitigating DDoS attacks.

Question 22: Why is route filtering important?

Show AnswerTo prevent the propagation of invalid or hijacked routes, improving network stability.

Question 23: What is a common cause of route leaks?

Show AnswerMisconfiguration of BGP export policies, e.g., announcing routes from a peer to a provider.

Question 24: What is the purpose of BGP monitoring systems?

Show AnswerTo detect routing anomalies such as hijacks, leaks, and route flapping.

Question 25: In OSPF, what does the "MD5" authentication provide?

Show AnswerIntegrity and authentication of OSPF packets, preventing spoofing and replay.

Question 26: What is a "prefix leak" vs "prefix hijack"?

Show AnswerA prefix leak is the accidental announcement of a prefix by an unauthorized AS; a hijack is intentional malicious announcement.

Question 27: How does the RPKI validator communicate with routers?

Show AnswerTypically via the RPKI-to-Router protocol (RTR), providing ROA validation results in real-time.

Question 28: What is the role of the IETF in routing security?

Show AnswerThe IETF has developed standards like RPKI, BGPsec, and BGP FlowSpec to improve routing security.

Question 29: Why is BGPsec not widely deployed?

Show AnswerDue to the computational overhead, complexity, and lack of incremental deployment mechanisms.

Question 30: What is the "valley-free" policy and how does it relate to route leaks?

Show AnswerValley-free routing means a path should not go from provider to customer to provider. Route leaks violate this by advertising routes in ways that create valleys.

Exercises

Work through these problems; sample solutions are hidden.

Exercise 1: Describe a scenario where a prefix hijack could cause a denial of service for a major website. Explain the steps an attacker might take and how RPKI would have prevented it.

Show Sample Solution An attacker (AS X) announces the prefix of a popular website (e.g., 203.0.113.0/24) with a more specific route (203.0.113.0/25). Upstream providers accept it and start forwarding traffic to X instead of the legitimate AS. Users cannot reach the website. With RPKI, the attacker would need a ROA for that prefix; since they don't have one, ROV would mark the route as Invalid and drop it.

Exercise 2: Compare the security of OSPF with and without authentication. What are the possible attacks if authentication is disabled?

Show Sample Solution Without authentication, an attacker can inject false LSAs, causing routers to compute wrong paths, creating routing loops, or black holes. They can also tear down adjacencies by sending malicious messages.

Exercise 3: Explain the RPKI validation process when a BGP router receives a route for 192.0.2.0/24 with origin AS 64500, and there is a ROA for 192.0.2.0/22 with AS 64500 and max length 24. What is the validation state?

Show Sample Solution The prefix 192.0.2.0/24 matches the ROA (prefix 192.0.2.0/22 covers it). The origin AS matches (64500), and the length (24) is ≤ max length (24). So the state is Valid.

Exercise 4: How can an operator use BGP communities to prevent route leaks? Provide an example of a community that signals "do not advertise to peers".

Show Sample Solution An operator can set a community like 65000:1 on routes learned from customers, with a policy that these routes should not be advertised to peers. When exporting routes to peers, the router checks for that community and filters accordingly.

Exercise 5: What is the difference between RPKI-based route validation and IRR-based filtering? Which is more secure and why?

Show Sample Solution IRR uses unauthenticated text-based data, while RPKI uses cryptographic signatures. RPKI is more secure because it prevents spoofing of the authorization.

Exercise 6: In OSPF, you have configured MD5 authentication. A router receives an OSPF packet with the correct MD5 digest but an incorrect sequence number. What happens?

Show Sample Solution The packet will be dropped because sequence numbers are used to prevent replay attacks; even with correct MD5, an out-of-window sequence number is rejected.

Exercise 7: Describe a situation where a route leak can cause an outage for a large region. Provide a real-world example.

Show Sample Solution In 2018, a route leak from a small ISP caused Google traffic to be routed through China, leading to service disruptions. The leak was due to misconfiguration.

Exercise 8: What are the advantages and disadvantages of using BGP FlowSpec for security?

Show Sample Solution Advantages: distributed filtering, quick mitigation of DDoS. Disadvantages: added complexity, potential for misconfiguration, and scalability issues.

Exercise 9: Explain how BGPsec prevents a malicious AS from forging its AS number in the path.

Show Sample Solution BGPsec uses cryptographic signatures: each AS signs the prefix and the path segment, so any modification to the path (removing or inserting an AS) would invalidate the signature.

Exercise 10: A network operator wants to implement RPKI validation. What steps are needed from creation of ROAs to applying policies on routers?

Show Sample Solution 1. Create ROAs for all own prefixes using RPKI tools. 2. Deploy an RPKI validator connected to trust anchors. 3. Configure routers to use RTR protocol to get validation states. 4. Define routing policies (e.g., reject invalid, lower preference for unknown).

Homework Assignments

These questions require deeper thought and research. Write comprehensive answers.

Homework 1: Compare and contrast the security mechanisms in OSPF (MD5/SHA) and BGP (TCP MD5, RPKI, BGPsec). What are the strengths and weaknesses of each?

Show Answer Outline OSPF: authentication per packet, but only intra-AS. BGP: session-level authentication (TCP MD5) is weak; RPKI and BGPsec provide origin and path validation respectively, but are not fully deployed.

Homework 2: Explain the concept of "BGP route flap damping" and how it relates to security. Can it be exploited by attackers?

Show Answer Outline Damping suppresses flapping routes. Attackers could cause flapping to trigger damping, thereby denying service for legitimate routes. Damping is now often disabled.

Homework 3: Research the deployment of RPKI in the Internet. What percentage of prefixes are covered by ROAs? What are the main obstacles to full deployment?

Show Answer Outline Coverage is growing; obstacles include lack of awareness, complexity, and operational effort.

Homework 4: Design a comprehensive routing security policy for an ISP that includes inbound and outbound filtering, RPKI, BGP authentication, and monitoring. Provide configuration examples (conceptual).

Show Answer Outline Inbound: reject invalid RPKI routes, reject bogons. Outbound: only announce own prefixes with ROAs. Configure TCP MD5 for eBGP sessions. Use BGP FlowSpec for DDoS mitigation. Deploy BGP monitoring.

Homework 5: Discuss the challenges of incremental deployment of BGPsec. Why is it difficult to deploy, and what alternative approaches exist?

Show Answer Outline Challenges: computational overhead, lack of incentives, and requirement for PKI. Alternatives: relying on RPKI with path validation variants (e.g., ASPA – Autonomous System Provider Authorization).

Homework 6: Analyze the 2008 YouTube hijack incident. Describe how it happened, what the impact was, and how RPKI and BGPsec could have prevented it.

Show Answer Outline Pakistan Telecom announced YouTube prefixes; RPKI would have invalidated the origin; BGPsec would have flagged the path.

Homework 7: Compare and contrast RPKI and the IRR for origin validation. Why is IRR still used even though it is less secure?

Show Answer Outline IRR is widely used historically; many ISPs rely on it. It is simpler to set up, and some regions have less RPKI adoption.

Homework 8: Explain how BGP communities can be used to signal security policies between ASes. Provide examples of common communities used for filtering and traffic engineering.

Show Answer Outline Communities like "no-export" (0xFFFFFF01), "no-advertise" (0xFFFFFF02), and custom communities for prepending and preference.

Homework 9: Research the "BGP MON" project and other BGP monitoring tools. How do they help detect hijacks and leaks?

Show Answer Outline They collect BGP data from multiple vantage points and detect anomalies by comparing with historical data or known databases.

Homework 10: Discuss the security of SDN controllers and how attacks on the controller could affect routing. How can SDN be secured?

Show Answer Outline SDN controllers are single points of failure; attacks can disrupt entire networks. Securing SDN requires authentication, encryption, access control, and redundancy.

Homework 11: What is the role of the "Route Origin Validation" (ROV) in BGP? How does a router decide to reject or lower preference for Invalid routes?

Show Answer Outline ROV compares the origin AS and prefix against ROAs. Invalid routes can be rejected or assigned a lower LOCAL-PREF.

Homework 12: Explain the concept of "BGP path validation" beyond RPKI. What are the proposals for improved path validation (e.g., ASPA, S-BGP)?

Show Answer Outline ASPA (Autonomous System Provider Authorization) is a lightweight alternative to BGPsec that validates the provider-customer relationship. S-BGP is an older proposal.

Summary

This tutorial provided an in-depth exploration of control-plane security and secure routing. We examined the threats of prefix hijacking and route leaks, the vulnerabilities in BGP and OSPF, and the mechanisms to mitigate them: OSPF authentication, RPKI, BGPsec, IRR, and operational best practices. We also covered advanced topics like BGP FlowSpec, monitoring, and anomaly detection. Real-world case studies illustrated the impact of attacks and the importance of proactive security measures. As the Internet continues to grow, ensuring the integrity and authenticity of routing information is critical for network stability and trust. Understanding these security concepts is essential for network operators and architects.


End of Tutorial 11 .