Docsity

BGP and OSPF Security: Attacks, Filtering, Recommendations, and Future Developments, Slides of Computer Networks

Partial preview of the text

Download BGP and OSPF Security: Attacks, Filtering, Recommendations, and Future Developments and more Slides Computer Networks in PDF only on Docsity!

I P Back bone Security

Agenda

• Introduction

• External Gateway Protocol : BGP

• Internal Gateway Protocols : OSPF and ISIS

• Netflow based DDoS detection

• MPLS and IPv

• Conclusion

What are the risks, if any? (1)

• The Internet is considered a critical infrastructure

– But the trust model hasn’t really changed since the

70s

– Can it survive a “chapter 11” from a really large

provider?

– “Slashdot effect” (major links and websites -- even

those with distributed content). Could larger

deployment of multicast help?

– Best Current Practices make the network more

resistant, but are not followed or deployed

– Recent publications

– IETF/IRTF Working Groups

What are the risks, if any? (2)

• Current, new and future type of attacks

– Misconfiguration is the most common “attack”

– (D)DoS with spoofed source addresses

  • Kill your network / (IRC) servers
  • Use of routers as reflectors/amplifiers
  • No reliable traceback

– Short-lived announcements used as source of SPAM/attacks

– Advanced routing protocols attacks

  • Make your (internal/external) routing protocol unstable
  • Inject new routes/prefixes : MiTM/traffic rerouting attacks

– Rootkits and Loadable Kernel Modules

  • Take control of a device capable of generation thousands of PPS

(packets per second)

  • Control all the routing protocol traffic

BGP : Protocol description

• BGP (Border Gateway Protocol)

AS Z AS Y

AS X

Route reflectors

iBGP sessions

Core/Access Routers

eBGP sessions {in,e}gress

filtering

BGP : Risks

• Where are the risks?

– Internet Exchanges (“peering points”)

  • All providers are usually connected to the same shared infrastructure

(a switch for example)

  • The filtering policy is usually more “relax” for peerings
  • Some major ones, no real (geo)diversity anymore

– Your direct {up,down}stream(s)

– Route reflectors

– Multi-hop configurations (Man-in-the-middle attack)

– Less likely : some backbone router “out there” in the Internet or

some hops away

• What is never “verified”

– Origin-AS/prefix relation, “true” AS_path, source authenticity,

etc

BGP : Attacks (2)

• Attacks against routers and BGP sessions

– SYNflood 179/tcp

– Drop the BGP session by RSTing the TCP connection or

injecting bogus OPEN/KEEPALIVE/etc messages

  • Spoofed packet parameters (IPs, ports, SeqNum, TTL) may have to fit

– BGP route injection tool : (what is the) challenge?

  • Inject the UPDATE
    • MiTM (or ARP spoofing on IX switches)
    • Synchronize with/hijack the TCP session (MiTM or spoofed from remote)
    • Have a previous knowledge of the current configurations of the peers (a MiTM type of attack is more likely to happen)
  • BGP route injection tools exist (in private circles)

– Security bug in the BGP implementation / modified BGPd

BGP : Attacks (3)

• Attacks against the network

– Attacks playing with BGP parameters (local-pref,

MEDs, communities)?

– Make your BGP sessions flap : make you or other

destinations unreachable

– Announce “more specific routes” of large blocks to

increase the number of prefixes in the global routing

table and eat up memory on all routers

– Announce or “remove” some routes/prefixes or

change their attributes

– Direct all the traffic to a blackhole, direct it to a

specific network (DDoS), create loops, etc.

BGP : Monitoring & protection

• What to monitor?

– AS_path and prefixes you receive from upstreams

– AS_path and prefixes that other ISPs are getting that contains

your ASN/prefixes (route servers/looking glasses)

– Are the paths changing (especially the best path)?

– Are some prefixes announced (temporary) in another AS?

– ARP changes (IX public switches)

– Your logs for BGP related messages

• What is currently missing?

– Origin-AS/prefix mapping : automatically generated filters out of

RIRs (Regional Internet Registries) like RIPE NCC’s DB (RPSL) are

part of the solution but don’t cover everything (route object

that lists the AS in which the network prefix is routed)

BGP : Filtering policy

• Filtering recommendations

– Don’t accept to have only /

– Never accept, announce or redistribute prefixes that are longer

than /24 or de-aggregated blocks

– Use maximum-prefix (ie “full routing table” is currently ~110K-

114K routes)

– Only accept the customer’s allocated prefixes

– Don’t filter on AS_path only, but also prefixes (customer may

announce a more specific route): this the same as in/egress

filtering of IP addresses!

– Filter bogon and non-allocated networks

– Should you really accept/announce a default route in BGP?

– Have ingress and egress filters to limit the prefixes you

receive/send

BGP : Ingress/egress filtering (2)

• Example with ACLs

– Filter on network border : CPE/IX/uplinks

• Example with route to Null0 (“discard” on Juniper)

interface xy access-group in 100 access-group out 100 access-list 100 deny ip host 0.0.0.0 any access-list 100 deny ip 127.0.0.0 0.255.255.255 255.0.0.0 0.255.255. access-list 100 deny ip 10.0.0.0 0.255.255.255 255.0.0.0 0.255.255. access-list 100 deny ip 172.16.0.0 0.15.255.255 255.240.0.0 0.15.255. access-list 100 deny ip 192.168.0.0 0.0.255.255 255.255.0.0 0.0.255. access-list 100 deny ip 192.0.2.0 0.0.0.255 255.255.255.0 0.0.0. access-list 100 deny ip 192.88.99.0 0.0.0.255 255.255.255.0 0.0.0. access-list 100 deny ip 169.254.0.0 0.0.255.255 255.255.0.0 0.0.255. access-list 100 deny ip 240.0.0.0 15.255.255.255 any access-list 100 permit ip any any ! Or permit ip

ip route 10.0.0.0 255.0.0.0 null ip route 172.16.0.0 255.240.0.0 null ip route 192.168.0.0 255.255.0.0 null

BGP : Security recommendations (1)

  • Security measures
    • Log changes (and think about using IPsec -- CPU and $)
    • Use MD5, but not the same password with all the peers
    • Filter and limit the number of prefixes, filter the AS_path
    • Use a “secondary” or “loopback” IP address for the eBGP session to hide part of the eBGP session details
    • Protect routes towards Root Servers (.{root, gtld}-

servers.net) : exclude them from the route dampening

  • Filtering and routing policies are important, but don’t forget:
    • to harden your router configuration
    • to use secure in and out-of-band management and monitoring

tools/protocols

  • that physical access to the router gives “full rights” (peering

points/data centers)

BGP : Future (1)

• S-BGP

– Covers part of the integrity/AA(A) issues and is based on :

  • a PKI
    • to verify ownership (IPs/AS) and Origin-AS/prefix relation
    • to validate signed UPDATE (with Route Attestations) messages, their content and BGP speakers
    • to manage certificates and CRLs (Certificate Revocation List), etc
  • IPsec for the router-to-router session

– Implementation and deployment imply that :

  • RIRs act as a CA (Certificate Authority) and tree root
  • Servers storing certificates, CRLs, and other information have to be distributed and “protected” from DoS (non-routed ?)
  • S-BGP supported on large routers with enough memory (volatile and non-volatile) and CPU
  • ISPs are willing/forced to do correct “paperwork”

BGP : Future (2)

• Working Groups

– IETF

  • rpsec (Routing Protocol Security Requirements)
  • ptomaine (Prefix Taxonomy Ongoing Measurement & Inter Network

Experiment)

  • msec (Multicast Security)

– RIPE : Routing Working Group

– IRTF : Group Security (GSEC, formerly Secure Multicast Group)

• Don’t forget router “host” security!

• Forensics (who used to announce which prefix)

– Route information stored inside DBs at large peering points or

by large providers