BGP Weakness
BGP Weakness
BGP Weakness
MARIO ROSI
Senior System Engineer
MPLS/ISP and CISCO ACI/VXLAN infrastructure solution expert
ü DoS and DDoS attacks use spoofed addresses from un-allocated IPv4 space (routing
doesn’t check source IP address of malicious packet but only destination IP address)
ü Regular expressions
255 – 2 = 253 à BGP packets received with TTL >= 253 are processed
TTL=252 BGP notification: CEASE! And what about if the Hacker
TTL = 252 so silently discarded RID 22.22.22.22 is directly connected?
Dest. IP 11.11.11.11 Source IP 22.22.22.22
R1 TTL=255 R2
L0: 11.11.11.11 L0: 22.22.22.22 TTL=255 BGP notification: CEASE!
RID 22.22.22.22
1.2.1.1 1.2.1.2 TTL=253 TTL=254 Dest. IP 11.11.11.11 Source IP 22.22.22.22
ü…however BGP is based on TCP session, not so easy to ack the TCP
(TCP sequence number should be guessed), BUT, you could overload the
CPU of router with many TCP SYNs à DDoS over router R1!!
© copyright 2022, Mario Rosi | All rights reserved 12
BGP: prefix hijacking
ü Let’s see a couple of cases:
ü News on October 2020: «Major ANZ (Australia & New Zeland) operators at risk of traffic hijack as
they lag on RPKI» (https://www.manrs.org/2020/10/major-anz-operators-at-risk-of-traffic-hijack-as-
they-lag-on-rpki)
ü Just an example “live”: https://bgpstream.crosswork.cisco.com/event/295916
© copyright 2022, Mario Rosi | All rights reserved 14
What’s BGP RPKI
ü Resource Public Key Infrastructure (RPKI), has been developed by Regional Internet Registries
(RIRs) in 2011 controlled by Internet Assigned Numbers Authority (IANA)
ü It’s a standards-based approach for providing cryptographically secured registries of internet resources
and routing authorizations, offered as service by RIRs à defines an out-of-band mechanism such that
the information that are exchanged by BGP updates can be validated or not
ü The RPKI certification chain follows the same allocation hierarchy valid per each of the 5 RIRs: the
Internet number resources (INRs), such as IPv4/IPv6 prefixes and AS# are bound to a Public Key
Infrastructure (PKI) via certificates that define the ISP ownership of INRs
or
https://fortproject.net/en/validator#:~:text=FORT%2
0Validator%20is%20an%20open,in%20router%20con
figuration%20and%20resolution
• Valid: the prefix is covered by at least one ROA entry, i.e. the prefix in the route announcement is equal, or more specific than the prefix in
the VRP
o AS_BGP = AS_ROA
o Pfx_BGP/Mask_BGP is equal or a more specific prefix of Pfx_ROA/Mask_ROA and Mask_BGP ≤ Max_Length_ROA
• Invalid: the prefix is announced from an unauthorized AS or the announcement is more specific than the allowed by the maximum length
set in a ROA that matches the prefix and AS
o Pfx_BGP/Mask_BGP is equal or a more specific prefix of Pfx_ROA/Mask_ROA but AS_BGP ≠ AS_ROA or AS_BGP = AS_ROA
and Mask_BGP > Max_Length_ROA
o Doesn’t exist any prefix Pfx_ROA/Mask_ROA for which Pfx_BGP/Mask_BGP matches him or its subnets (independently by AS
number)
© copyright 2022, Mario Rosi | All rights reserved 19
Step by step… smothly!!!
ü The introduction of RPKI can be planned smoothly and split in more steps:
1. Ignoring: during the acceptance test activity, the outcome of ROV could be ignored disabling
the validation process. The router will still connect to the RPKI server and download the
validation information, but will not use the information
2. Allow Invalid: Invalid prefixes participate in the BGP best path algorithm, they are not dropped
but only marked as (I); in the comparing of Valid prefix vs Invalid prefix, by default the Valid one
ALWAYS wins!
3. Drop Invalid: Invalid prefixes are dropped and not propagated to iBGP peers à RPKI is 100%
working now!
The Not Found prefixes are obviously always forwarded to iBGP peers.
ü Look here https://isbgpsafeyet.com to check if your upstream eBGP peers are implementing BGP
RPKI so if you are safe or... ... then BGP RPKI is necessary! J