Slide 1

Slide 1 text

The [Real] State of BGP Security Alexander Azimov Artyom Gavrichenkov

Slide 2

Slide 2 text

Who is mr. BGP?

Slide 3

Slide 3 text

•  Administra*ve en*ty •  Owners of address space •  BGP – de-facto standard rou*ng protocol between AS Autonomous systems

Slide 4

Slide 4 text

Internet was born in…

Slide 5

Slide 5 text

Tier-1 operators

Slide 6

Slide 6 text

Regional Networks

Slide 7

Slide 7 text

Tier-3+ networks

Slide 8

Slide 8 text

Internet Exchange (IX)

Slide 9

Slide 9 text

Protocol of business relaLonships IX TierN+1 TierN+1 TierN+1 TierN-1 +$$$ -$ 0$ IAMOPERATOR

Slide 10

Slide 10 text

•  Link-state rou*ng protocols •  Distance vector rou*ng protocols •  Money vector protocol! What is the type of BGP rouLng protocol?

Slide 11

Slide 11 text

BGP Decision process •  Local Preference (random digit) •  AS Path length (a sequence of AS Numbers, may be random) •  Origin •  MED •  EBGP > iBGP •  Router Id

Slide 12

Slide 12 text

BGP Traffic Control Local_pref – priority for incoming traffic Prepend – DE priori*za*on of incoming traffic Communi*es – vector of announces Local_pref 50 Community: p2c Local Pref 150 Community c2p Local Pref 100 Customers Providers Peers Prepend +N Announce only customers Announce only customers Announce ALL

Slide 13

Slide 13 text

BGP Traffic Control Local_pref – priority for incoming traffic Prepend – DE priori*za*on of incoming traffic Communi*es – vector of announces Local_pref 50 Community: p2c Local Pref 150 Community c2p Local Pref 100 Customers Providers Peers Prepend AS Path +N Announce only customers Announce only customers Announce ALL

Slide 14

Slide 14 text

BGP Traffic Control Local_pref – priority for incoming traffic Prepend – DE priori*za*on of incoming traffic Communi*es – vector of announces Local_pref 50 Community: p2c Local Pref 150 Community c2p Local Pref 100 Customers Providers Peers Prepend AS Path +N Announce only customers Announce only customers Announce ALL

Slide 15

Slide 15 text

BGP Flexibility

Slide 16

Slide 16 text

PROBLEMS OFFICER?

Slide 17

Slide 17 text

PROBLEMS OFFICER? 1) Hijacking Hijacked Route: A route which has been originated by a party other than the owner of the prefix. This could be via a forged ASN, or from another ASN.

Slide 18

Slide 18 text

PROBLEMS OFFICER? 1) Hijacking Hijacked Route: A route which has been originated by a party other than the owner of the prefix. This could be via a forged ASN, or from another ASN.

Slide 19

Slide 19 text

PROBLEMS OFFICER? 1) Hijacking Hijacked Route: A route which has been originated by a party other than the owner of the prefix. This could be via a forged ASN, or from another ASN. • L3 Denial of service

Slide 20

Slide 20 text

PROBLEMS OFFICER? 1) Hijacking Hijacked Route: A route which has been originated by a party other than the owner of the prefix. This could be via a forged ASN, or from another ASN. • L3 Denial of service: improbable

Slide 21

Slide 21 text

PROBLEMS OFFICER? 1) Hijacking Hijacked Route: A route which has been originated by a party other than the owner of the prefix. This could be via a forged ASN, or from another ASN. • L3 Denial of service: improbable • L3 Repudiation

Slide 22

Slide 22 text

PROBLEMS OFFICER? 1) Hijacking Hijacked Route: A route which has been originated by a party other than the owner of the prefix. This could be via a forged ASN, or from another ASN. • L3 Denial of service: improbable • L3 Repudiation: easy

Slide 23

Slide 23 text

PROBLEMS OFFICER? 1) Hijacking Hijacked Route: A route which has been originated by a party other than the owner of the prefix. This could be via a forged ASN, or from another ASN. • L3 Denial of service: improbable • L3 Repudiation: easy The trick is to topologically isolate a hijacked route

Slide 24

Slide 24 text

Example 1: Certificate Authority Hijacking •  How to obtain a TLS certificate: 1.  An account is created at the CA website 2.  A CSR is created and uploaded 3.  Options to verify domain ownership: •  WHOIS records •  A specific HTML page under a specific URL •  Custom token in DNS TXT Record •  … 4.  Ownership is verified => TLS certificate is signed

Slide 25

Slide 25 text

Example 1: Certificate Authority Hijacking •  How to obtain a TLS certificate: 1.  An account is created at the CA website 2.  A CSR is created and uploaded 3.  Options to verify domain ownership: •  WHOIS records •  A specific HTML page under a specific URL •  Custom token in DNS TXT Record •  … 4.  Ownership is verified => TLS certificate is signed

Slide 26

Slide 26 text

Example 1: Certificate Authority Hijacking •  How to obtain a TLS certificate: 1.  An account is created at the CA website 2.  A CSR is created and uploaded 3.  Options to verify domain ownership: •  WHOIS records •  A specific HTML page under a specific URL •  Custom token in DNS TXT Record •  … 4.  Ownership is verified => TLS certificate is signed ⇒  Heavily relies on trusted routing

Slide 27

Slide 27 text

Example 2: Spoofing TCP source •  Antispam block lists •  Access control via whitelists •  IP reputation

Slide 28

Slide 28 text

Example 2: Spoofing TCP source •  Antispam block lists •  Access control via whitelists •  IP reputation ⇒  Heavily relies on trusted routing

Slide 29

Slide 29 text

Example 2: Spoofing TCP source •  Antispam block lists •  Access control via whitelists •  IP reputation ⇒  Heavily relies on trusted routing Already in the wild

Slide 30

Slide 30 text

PROBLEMS OFFICER? 1) Hijacking Hijacked Route: A route which has been originated by a party other than the owner of the prefix. This could be via a forged ASN, or from another ASN.

Slide 31

Slide 31 text

PROBLEMS OFFICER? 2) Route Leaking Path: Also known as AS_PATH (or optionally AS4_PATH), the sequence of ASNs through which a route has passed from Originator to recipient. Link Classification: The "intent" of a given BGP peering session, which addresses only the categories of route announced and accepted, and which is further modified by Local Policy. A Link may be classified as: •  Customer: The Customer sends us only their own (locally originated) Routes, and the Customer's Customer's Routes (and Customer^Nth Routes). The Customer relationship is transitive. •  Transit: The Transit provider sends all Routes. This include the Transit Provider's Customers, the Transit Provider's Peers, and if there are any, the Transit Provider's Transit Provider's Routes. The Transit Provider relationship is also transitive. •  Peer: a Link over which the two parties send ONLY their respective Customer Routes (and their Customer's Routes, and so on). A Link which is classified as a Peer, will see us as a Peer Classification as well. The relationship is symmetric in nature. •  Special (which includes Mutual Transit, Sibling, and other non-trivial arrangements) Route Leak: any Route where, somewhere in the Path, a Non-Customer Route was received over a Peer or Customer Link. It should be observed that a route which is not a route leak, has an as-path that matches the following pattern: {C|S}*P?{T|S}* Where C is Customer, T is Transit, P is Peer, and S is Special, and "{ | }" denotes either/or, "*" means zero or more occurrences of, and "?" means zero or one occurrences of.

Slide 32

Slide 32 text

PROBLEMS OFFICER? 2) Route Leaking Path: Also known as AS_PATH (or optionally AS4_PATH), the sequence of ASNs through which a route has passed from Originator to recipient. Link Classification: The "intent" of a given BGP peering session, which addresses only the categories of route announced and accepted, and which is further modified by Local Policy. A Link may be classified as: •  Customer: The Customer sends us only their own (locally originated) Routes, and the Customer's Customer's Routes (and Customer^Nth Routes). The Customer relationship is transitive. •  Transit: The Transit provider sends all Routes. This include the Transit Provider's Customers, the Transit Provider's Peers, and if there are any, the Transit Provider's Transit Provider's Routes. The Transit Provider relationship is also transitive. •  Peer: a Link over which the two parties send ONLY their respective Customer Routes (and their Customer's Routes, and so on). A Link which is classified as a Peer, will see us as a Peer Classification as well. The relationship is symmetric in nature. •  Special (which includes Mutual Transit, Sibling, and other non-trivial arrangements) Route Leak: any Route where, somewhere in the Path, a Non-Customer Route was received over a Peer or Customer Link. It should be observed that a route which is not a route leak, has an as-path that matches the following pattern: {C|S}*P?{T|S}* Where C is Customer, T is Transit, P is Peer, and S is Special, and "{ | }" denotes either/or, "*" means zero or more occurrences of, and "?" means zero or one occurrences of.

Slide 33

Slide 33 text

PROBLEMS OFFICER? 2) Route Leaking Path: Also known as AS_PATH (or optionally AS4_PATH), the sequence of ASNs through which a route has passed from Originator to recipient. Link Classification: The "intent" of a given BGP peering session, which addresses only the categories of route announced and accepted, and which is further modified by Local Policy. A Link may be classified as: •  Customer: The Customer sends us only their own (locally originated) Routes, and the Customer's Customer's Routes (and Customer^Nth Routes). The Customer relationship is transitive. •  Transit: The Transit provider sends all Routes. This include the Transit Provider's Customers, the Transit Provider's Peers, and if there are any, the Transit Provider's Transit Provider's Routes. The Transit Provider relationship is also transitive. •  Peer: a Link over which the two parties send ONLY their respective Customer Routes (and their Customer's Routes, and so on). A Link which is classified as a Peer, will see us as a Peer Classification as well. The relationship is symmetric in nature. •  Special (which includes Mutual Transit, Sibling, and other non-trivial arrangements) Route Leak: any Route where, somewhere in the Path, a Non-Customer Route was received over a Peer or Customer Link. It should be observed that a route which is not a route leak, has an as-path that matches the following pattern: {C|S}*P?{T|S}* Where C is Customer, T is Transit, P is Peer, and S is Special, and "{ | }" denotes either/or, "*" means zero or more occurrences of, and "?" means zero or one occurrences of.

Slide 34

Slide 34 text

Example 3: The Day the Earth Stood Still AS 3549 AS 32934 AS 4788

Slide 35

Slide 35 text

Example 3: The Day the Earth Stood Still AS 3549 AS 32934 AS 4788

Slide 36

Slide 36 text

Example 3: The Day the Earth Stood Still AS 3549 AS 32934 AS 4788

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

Cost of a human error: Leaks’2015 per month 0 100000 200000 300000 400000 500000 600000 August September October November*

Slide 39

Slide 39 text

BGP Security Problems •  Origin valida*on •  Announce vector valida*on

Slide 40

Slide 40 text

Origin ValidaLon: Route Objects % Informa*on related to '178.248.232.0/23AS197068' route: 178.248.232.0/23 descr: "HLL" LLC origin: AS197068 mnt-by: MNT-QRATOR created: 2012-11-22T21:07:45Z last-modified: 2012-11-22T21:07:45Z source: RIPE # Filtered

Slide 41

Slide 41 text

Origin ValidaLon: Route Objects Local_pref – priority for incoming traffic Prepend – DE priori*za*on of incoming traffic Communi*es – vector of announces Route Objects for Origin valida*on Local_pref 50 Community: p2c Local Pref 150 Community c2p Check if prefix has appropriate origin Local Pref 100 Customers Providers Peers Prepend +N Announce only customers Announce only customers Announce ALL

Slide 42

Slide 42 text

Different IRRs – different rules and objects No unique objects! No cross-IRR authoriza*on

Slide 43

Slide 43 text

Origin ValidaLon: RPKI

Slide 44

Slide 44 text

BGP Flexibility wins!

Slide 45

Slide 45 text

BGP Decision process •  Local Preference (random digit) •  AS Path length (a sequence of AS Numbers, may be random) •  Origin •  MED •  EBGP > iBGP •  Route Id Prepend with valid origin! Makes RPKI useless.

Slide 46

Slide 46 text

BGP Security Problems •  Origin valida*on •  AS Path Valida*on •  Announce vector valida*on

Slide 47

Slide 47 text

AS Path validaLon: BGPSec

Slide 48

Slide 48 text

SLll dra\… Last update 06.07.2015; v13! hpps://datatracker.ieq.org/doc/drar-ieq-sidr-bgpsec-protocol/

Slide 49

Slide 49 text

BGP Security Problems •  Origin valida*on •  AS Path Valida*on (BGPSec… someday) •  Announce vector valida*on

Slide 50

Slide 50 text

Announce vector validaLon: CommuniLes Local_pref – priority for incoming traffic Prepend – DE priori*za*on of incoming traffic Communi*es – vector of announces Local_pref 50 Community: p2c Local Pref 150 Community c2p Local Pref 100 Customers Providers Peers Prepend +N Announce only customers Announce only customers Announce ALL

Slide 51

Slide 51 text

Announce vector validaLon: CommuniLes It works! RFC Standard since 1996 hpps://tools.ieq.org/html/rfc1997

Slide 52

Slide 52 text

BGP Flexibility wins!

Slide 53

Slide 53 text

Announce vector validaLon 4 Roles: customer, provider, peer, internal Op*onal non-transit apribute – Role Marker Role Import Marker Internal Session No role marker change Role Export Filter

Slide 54

Slide 54 text

Idle state: No role set

Slide 55

Slide 55 text

NoLficaLon: The Wrong Role OPEN with customer role OPEN with peer role Capabili*es No*fica*on No*fica*on 3 pairs of non-conflict roles: 1.  Peer <---> Peer 2.  Customer <---> Provider 3.  Internal <---> Internal

Slide 56

Slide 56 text

Strict Mode OPEN with no role OPEN with peer role No*fica*on No5fica5on if the role is not set in OPEN from the neighbor

Slide 57

Slide 57 text

A Simple Config protocol bgp IAMOPERATOR { local as MY_AS; neighbor X.X.X.X as AS_PROVIDER; role provider }

Slide 58

Slide 58 text

Benefits Backward compa*bility •  Unknown op*onal non-transit apributes are just ignored •  Unknown capabili*es should be just ignored! Route leak ex*nc*on: •  No mistake leaks •  Opportunity to control neighbor configura*on

Slide 59

Slide 59 text

Useful Links Overview of protocol change: radar.qrator.net/tools/simple-bgp/ Fork of BIRD routing daemon: github.com/QratorLabs/bird/

Slide 60

Slide 60 text

Questions? Contact us: Alexander Azimov Artyom Gavrichenkov