Blackholing the Internet: A Live Demo Adam Rapley me@adamrapley.com - - PowerPoint PPT Presentation

blackholing the internet a live demo
SMART_READER_LITE
LIVE PREVIEW

Blackholing the Internet: A Live Demo Adam Rapley me@adamrapley.com - - PowerPoint PPT Presentation

Blackholing the Internet: A Live Demo Adam Rapley me@adamrapley.com @admrply keybase.io/admrply Who am I? 3nd year Ethical Hacking student at Abertay. Does web things. Artist/Musician. Building and Breaking IoT. What is BGP


slide-1
SLIDE 1

Blackholing the Internet: A Live Demo

Adam Rapley me@adamrapley.com @admrply keybase.io/admrply

slide-2
SLIDE 2

Who am I?

3nd year Ethical Hacking student at Abertay. Does web things. Artist/Musician. Building and Breaking IoT.

slide-3
SLIDE 3

What is BGP

  • Border Gateway Protocol
  • Routing algorithm between ASs
  • Advertise prefixes that you manage
  • IP prefix
  • AS-PATH
  • Avoid loops - This is crucial for later in the talk
  • Or, y’know… Don’t.
slide-4
SLIDE 4

BGP Win Conditions

  • For the same length prefix
  • Shortest AS-PATH wins
  • For different length prefixes
  • The more specific prefix wins.
slide-5
SLIDE 5

ISP Relationships

  • BT tells Virgin about it’s customers and vice versa
  • Version tells Sprint about it’s customers and vice versa.
  • These are shared through BGP UPDATE messages.
  • Updates from customers are passed to their upstream provider
  • This is all trust based
  • No PKI
  • No validation
slide-6
SLIDE 6

How do we get IP addresses?

  • ICANN assigns IP blocks to RIRs
  • RIPE in the EU
  • ARIN in the US
  • RIRs assign to ISPs
  • These IP addresses are NOT assigned to ASNs
slide-7
SLIDE 7

Implementation Errors

  • Minimal filtering on the upstream edge router
  • Rate limiting
  • Only originating
  • No local filtering on networks
  • BGP Propagation
  • Internal network
  • As soon as you hit a “backbone AS”, job done.
slide-8
SLIDE 8

Real World Examples

  • AS 7007
  • Spamming unassigned blocks
  • YouTube Pakistan
  • Hacking Team × Italian Police SpecOps Division
  • Bitcoin Stealing
slide-9
SLIDE 9

Demo Time!

slide-10
SLIDE 10

Can we MITM this?

  • Yes.
  • Yes we can.
  • Need to serve the real website!
  • How do we stop our own next hop router from returning our own traffic
  • AS-PATH ASN prefixing
slide-11
SLIDE 11

Keeping the path open

AS 10 AS 20 AS 30 AS 50 AS 40 AS 500 AS 600 AS 700 AS 60

slide-12
SLIDE 12

Keeping the path open

AS 10 AS 20 AS 30 AS 50 AS 40 AS 500 AS 600 AS 700 100.50.0.0/24 AS 60

slide-13
SLIDE 13

Keeping the path open

AS 10 AS 20 AS 30 AS 50 AS 40 AS 500 AS 600 AS 700 100.50.0.0/24 AS 60

slide-14
SLIDE 14

Keeping the path open

AS 10 AS 20 AS 30 AS 50 AS 40 AS 500 AS 600 AS 700 100.50.0.0/24 AS 60

slide-15
SLIDE 15

Keeping the path open

AS 10 AS 20 AS 30 AS 50 AS 40 AS 500 AS 600 AS 700 100.50.0.0/24 AS 60

slide-16
SLIDE 16

Keeping the path open

AS 10 AS 20 AS 30 AS 50 AS 40 AS 500 AS 600 AS 700 100.50.0.0/24 AS 60

slide-17
SLIDE 17

Keeping the path open

AS 10 AS 20 AS 30 AS 50 AS 40 AS 500 AS 600 AS 700 100.50.0.0/24 AS 60

slide-18
SLIDE 18

Keeping the path open

AS 10 AS 20 AS 30 AS 50 AS 40 AS 500 AS 600 AS 700 100.50.0.0/24 AS 60

slide-19
SLIDE 19

Keeping the path open

AS 10 AS 20 AS 30 AS 50 AS 40 AS 500 AS 600 AS 700 100.50.0.0/24 AS 60

slide-20
SLIDE 20

Keeping the path open

AS 10 AS 20 AS 30 AS 50 AS 40 AS 500 AS 600 AS 700 100.50.0.0/24 AS 60 100.50.0.0/25

(With AS 10 and AS 40 in AS-PATH

slide-21
SLIDE 21

Keeping the path open

AS 10 AS 20 AS 30 AS 50 AS 40 AS 500 AS 600 AS 700 100.50.0.0/24 AS 60 100.50.0.0/25

(With AS 10 and AS 40 in AS-PATH

slide-22
SLIDE 22

Keeping the path open

AS 10 AS 20 AS 30 AS 50 AS 40 AS 500 AS 600 AS 700 100.50.0.0/24 AS 60 100.50.0.0/25

(With AS 10 and AS 40 in AS-PATH

slide-23
SLIDE 23

Keeping the path open

AS 10 AS 20 AS 30 AS 50 AS 40 AS 500 AS 600 AS 700 100.50.0.0/24 AS 60 100.50.0.0/25

(With AS 10 and AS 40 in AS-PATH

slide-24
SLIDE 24

Keeping the path open

AS 10 AS 20 AS 30 AS 50 AS 40 AS 500 AS 600 AS 700 100.50.0.0/24 AS 60 100.50.0.0/25

(With AS 10 and AS 40 in AS-PATH

slide-25
SLIDE 25

Keeping the path open

AS 10 AS 20 AS 30 AS 50 AS 40 AS 500 AS 600 AS 700 100.50.0.0/24 AS 60 100.50.0.0/25

(With AS 10 and AS 40 in AS-PATH

slide-26
SLIDE 26

Hijacking the AS-PATH

  • Prepend the AS-PATH with the correct route
  • Right down to the originating AS
  • set as-path prepend 10 40 600
  • Set a static route towards the correct path
  • set ip route <10>
slide-27
SLIDE 27

Mitigations

  • Know someone at the ISP
  • Route Flapping
  • Very ineffective
  • Secure alternatives
  • S-BGP
  • psBGP
  • soBGP
slide-28
SLIDE 28

Mitigations for the Mitigations

  • Uptake
  • IPv6.
slide-29
SLIDE 29

Questions?

Adam Rapley me@adamrapley.com @admrply keybase.io/admrply