network level attacks and mitigation · 2018-11-05 · corrigendum- most urgent government of...

19
Network Level Attacks and Mitigation Ben Zhao Oct 26, 2018 CS 232/332

Upload: others

Post on 13-Jul-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

Network Level Attacks and Mitigation

Ben ZhaoOct 26, 2018CS 232/332

Page 2: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

Today

• Network level attacks

– Attacks on DNS

– Attacks against BGP

– Denial of Service (DoS)

• Defenses

– CDNs

– Traceback

Page 3: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

DNS Cache Poisoning

Page 4: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

DNS Cache Poisoning (cont.)

AliceLocal DNS

resolver

Q: www.bank.comQID: x

ns.bank.com

A: 2.2.2.2QID: x

Malloryspoof src IP of ns.bank.com

A: 3.3.3.3guess QID: x

Race

Defense:randomize 16-bit QID

Page 5: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

Kaminsky attack (2008)

AliceLocal DNS

resolver

ns.bank.com

Mallory

Alice runs JavaScript from mallory.com

Q: a.bank.com

Q: b.bank.comQ: c.bank.com

Q: a.bank.com, QID: r 0

Q: b.bank.com, QID: r 1…

A, QID: s0A, QID: s1

Mallory wins if any ri = sj

Spoof entire *.bank.com zone

Page 6: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

Recall: BGP: a Path-Vector Protocol

• An AS-path: sequence of AS’s a route traverses

• Used for loop detection and to apply policy

• Default choice: route with fewest # of AS’s

6

110.10.0.0/16

AS-1

AS-2

130.10.0.0/16

AS-3

120.10.0.0/16

AS-4

AS-5

120.10.0.0/16 AS-2 AS-3 AS-4130.10.0.0/16 AS-2 AS-3110.10.0.0/16 AS-2 AS-5

Page 7: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

BGP Hijacking MIT

BC

X

E…

(X, MIT)(E,… C, MIT) (D, …, B, MIT)

D

YOUR NETWORK

AS X performsblackhole attackagainst MIT

Page 8: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

Corrigendum- Most Urgent

GOVERNMENT OF PAKISTAN

PAKISTAN TELECOMMUNICATION AUTHORITY

ZONAL OFFICE PESHAWAR

Plot-11, Sector A-3, Phase-V, Hayatabad, Peshawar.

Ph: 091-9217279- 5829177 Fax: 091-9217254

www.pta.gov.pk

NWFP-33-16 (BW)/06/PTA February ,2008

Subject: Blocking of Offensive Website

Reference: This office letter of even number dated 22.02.2008.

I am directed to request all ISPs to immediately block access to the following website

URL: http://www.youtube.com/watch?v=o3s8jtvvg00

IPs: 208.65.153.238, 208.65.153.253, 208.65.153.251

Compliance report should reach this office through return fax or at email

[email protected] today please.

Deputy Director

(Enforcement)

To:

1. M/s Comsats, Peshawar.

2. M/s GOL Internet Services, Peshawar.

3. M/s Cyber Internet, Peshawar.

4. M/s Cybersoft Technologies, Islamabad.

5. M/s Paknet, Limited, Islamabad

6. M/s Dancom, Peshawar.

7. M/s Supernet, Peshawar.

Page 9: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

DNSSEC

DNS responses signed

Higher levels vouch for lower levels— e.g., root vouches for .edu, .edu vouches for .uchicago, …

Root public key published

Problem?Costly and slow adoption

Page 10: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

S-BGPIP prefix announcements signed

Routes signed — previous hop authorizes next hop

Higher levels vouch for lower levels— e.g., ICANN vouches for ARIN, ARIN vouches for AT&T, …

Root public key publishedProblem?Costly and slow adoption

Page 11: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

Takeaway:Internet protocol fossilization makes updating deployed protocols v hard.

Page 12: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

The Coffeeshop Attack Scenario

• DNS servers bootstrapped by wireless AP– (default setting for WiFi)

• Attacker hosts AP w/ ID (O’Hare Free WiFi)– You connect w/ your laptop– Your DNS requests go through attacker DNS– www.bofa.com à evil bofa.com– Password sniffing, malware installs, …

• TLS/SSL certificates to the rescue!

Page 13: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

Recall: Man-in-the-middle Attack• Alice sends to Bob her public key

• Carl intercepts the message and sends his own public key to Bob

• Bob sends to Alice his public key

• Carl intercepts the message and sends his own public key to Alice

• Alice sends to Bob a message encrypted with Carl’s public key thinking she’s encrypting with Bob’s public key

• Carl intercepts the message, decrypts it with his own secret key, and re-encrypts it with Bob’s public key

• Same for messages from Bob to AliceAlice

BobCarl

Page 14: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

Using Public Key Certificates

KPA

KPB

KPB

KPA

Directory

Alice BobKS

A KSB

EKPB(EKSA (M))

Reque

st for

Bob

’s ce

rtific

ateRequest for Alice’s certificate

KPCA KP

CA

Page 15: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

SSL/TLS Server Certificates

How do you know youcan trust the CA?

Ben

Trusts

Server

CA

Page 16: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

SSL/TLS Certificates & Weaknesses

• Corrupted browser– Trusts CA run by attacker– Or SSL library modified to return 1 on every certificate verification

• Manipulation by PC maker (Lenovo, Feb 2015)– Preinstalled its own fake CA in windows, and “signed” adware

• Long domain attack: www.bofa.com.blah.evil.com– Valid certificate for *.evil.com, url bar too short to show full URL– Extended validation (EV) certificates

• Homograph attacks: URL lookalikes:

Page 17: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

Can We Trust the CAs?• EFF SSL observatory

– 650+ CAs trusted byMozilla or Microsoft

– Any CA à any domain

– Security of the weakest link– Misbehaving CAs known

• Compromised CAs– 2011, DigiNotar, Comodo, …– Certificate revocation (OCSP)

(but OCSP can be blocked)

• Certificate pinning?– Only if your software is unaltered

Page 18: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

Takeaway:End to end security requires securing all components of long chain; weakest link prevails…

Page 19: Network Level Attacks and Mitigation · 2018-11-05 · Corrigendum- Most Urgent GOVERNMENT OF PAKISTAN PAKISTAN TELECOMMUNICATION AUTHORITY ZONAL OFFICE PESHAWAR Plot-11, Sector A-3,

Denial of Service (DoS)

• Prevent users from being able to access a specific computer, service, or piece of data

• In essence, an attack on availability

• Possible vectors:– Exploit bugs that lead to crashes– Exhaust the resources of a target

• Often very easy to perform…

• … and fiendishly difficult to mitigate