This document summarizes BGP hijacks and leaks, both malicious and unintentional. It provides examples of past hijacking incidents and explains how hijacks can occur due to factors like more specific routes, local preference, and AS path manipulation. Detection methods are discussed, including looking glasses, BGP monitoring tools, and RIPE resources. Prevention techniques are also covered, such as route validation using RPKI and BGPsec, as well as tools the speaker recommends for analyzing routing data. The presentation concludes with a proposed live demo of hijacking a third-party prefix.
1 of 42
More Related Content
BGP hijacks and leaks
1. BGP hijacks and leaks
malicious or consensual
Net::IP Meetup #12
Wroc?aw 2019.04.25
Pawe? Ma?achowski
@pawmal80
2. whoami
? Currently:
redGuardian DDoS mitigation tech lead (Atende Software sp. z o.o.)
? Previously:
system engineer, IT operations lead, analyst, architect, project manager
etc. (ATM SA, Netia SA)
Net::IP, Wroc?aw 2019.04.25 2
4. Problem
? 2004.12: TT Net full table leak, massive outages
? 2008.02: Youtube rerouted to Pakistan Telecom via PCCW Global
? 2014: INEA SA + LG case (PL)
? 2017.04: financial institutions/credit card processors partially rerouted to PJSC
Rostelekom
? 2017.12: high profile companies (FAG, Riot Games and others) announced by DV-LINK
via Megafon via HE
? 2018.04: Amazon Route53 routed to malicious DNS server in eNET
? 2018.06: Telegram messenger partially routed to Iran Telecomunication Company
? 2018.07: Bitcanal ?hijack factory¡± case
? 2018.11: Google traffic routed to MainOne via China Telecom via Trans Telecom
? ¡ many more
Net::IP, Wroc?aw 2019.04.25 4
5. Real life BGP routing decision factors
1. more specific preferred (originator decides)
2. higher local preference (layer 8 decides)
3. shorter AS_PATH (prepending)
Net::IP, Wroc?aw 2019.04.25 5
6. BGP user types (simplified)
? multihomed network
? CDN (anycasting etc.)
? Eyeballs
? IP Transit: Tier 1, Tier n (paid vs. free peerings)
? IXP
Net::IP, Wroc?aw 2019.04.25 6
8. Reasons
? fat fingers, BGP optimizers and bad defaults
? prefix-lists and as-path filters not widely used
? blind chain of trust
? Internet barely works?
Net::IP, Wroc?aw 2019.04.25 8
9. Howto
? Add victim AS to your official AS-SET in IRR
? Wait for upstream nightly filter updates
? Announce victim¡¯s IP address space
? Profit!
Net::IP, Wroc?aw 2019.04.25 9
11. Howto, cont.
?LINX has this peer configured as announcing the AS-SET
AS-TTK. This set contains 984 entries of which 470+ are
themselves AS-SETs. Many of these AS-SETs will
themselves contain AS-SETs, and this patern repeats as
you continue the AS-SET expansion.
Ultimately, this large AS-SET expands to allow 886,051
prefixes from 16,608 origin ASNs.¡± (2018.11)
Net::IP, Wroc?aw 2019.04.25 11
12. Malicious, mistake or consensual?
? origin AS
? AS_PATH
? IRR validity (route object, ROA, etc.)
? mask length (more specific)
? end hosts reachability
Net::IP, Wroc?aw 2019.04.25 12
13. BGP-based DDoS scrubbing center
? Hijacks customer IP address space
¨C global annoucement (BGP withdrawal issues)
¨C local/selective announcements
? Legal agreement, IRR and ROA valid
? Looks like on-demand optional IP transit
Net::IP, Wroc?aw 2019.04.25 13
23. Prefix deaggregation
? split large subnet into multiple /24 prefixes
? limits hijacking ability (/25 are widely not accepted)
? not a final solution (RIB pollution)
Net::IP, Wroc?aw 2019.04.25 23
25. RPKI (slow) adoption
But:
?The AT&T/as7018 network is now dropping all RPKI-
invalid route announcements that we receive from our
peers.¡±
source: https://mailman.nanog.org/pipermail/nanog/2019-February/099501.html
Net::IP, Wroc?aw 2019.04.25 25
28. BGPsec
? BGP routers
¨C sign BGP updates: previous AS, next AS
¨C verify updates received
? IXP hack (no AS in AS-PATH)
? dead end (computation cost)
Net::IP, Wroc?aw 2019.04.25 28
29. ASPA
? Autonomous System Provider Authorization
¨C declare your official peers
¨C operators validate AS_PATHs received
? currently RFC draft
Net::IP, Wroc?aw 2019.04.25 29
40. Live demo
Let¡¯s hijack 3rd party prefix!
? Victim: AS v, foo/20 (foo/24 to be hijacked)
? Hijacker: AS h
Preparation:
? Hijacker places AS v in his AS-SET (earlier)
? Open RIS Live session with ?foo/24¡± filter
Net::IP, Wroc?aw 2019.04.25 40
41. Live demo, cont.
1. Hijacker announces ?foo/24 origin AS h¡±
2. Local verification:
BIRD show route foo/24 export upstream
1. Remote verification:
NLNOG Looking Glass: foo/24 partially visible
RIPE RIS Live: BGP hijacking updates received
Disclaimer: AS v is our friendly customer.
Net::IP, Wroc?aw 2019.04.25 41