cs 4700 / cs 5700 network fundamentals lecture 20: attacks and tinfoil hats (bleeding hearts and...

39
CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

Upload: timothy-merritt

Post on 11-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

CS 4700 / CS 5700Network Fundamentals

Lecture 20: Attacks and Tinfoil Hats(Bleeding hearts and Spies)

Last updated 12/3/2014

Page 2: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

2

Worms Basics Example worms

Botnets Basics Torpig – fast flux/phishing

Privacy Anonymous communication

Outline

Take network security next

semester!

Page 3: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

Motivation

Internet currently used for important services Financial transactions, medical records

Increasingly used for critical services 911, surgical operations, water/electrical

system control, remote controlled drones, etc. Networks more open than ever before

Global, ubiquitous Internet, wireless Networks more surveiled than ever before

Snowden revelations, pervasive tracking companies

3

Page 4: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

4

Security != Privacy

How much of your mobile data was over HTTPS? Do you think that keeps your data private?

Encryption protects from eavesdroppers Does not mean that your privacy isn’t violated Your data could still be shared insecurely in the

backend

Proxying+encryption hides senders from receivers Does not defend from pervasive observers

Page 5: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

5

Snowden wants to communicate with Greenwald without Alexander finding out

Ed’s IP Glenn’s IP

Page 6: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

6

The problem of IP anonymity

Client ServerVPN proxy

Proxies are single point of attack(rogue admin, break in, legal, etc)

Page 7: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

7

Tor model (very simplified)

Bitwise unlinkability Use multiple hosts to form a “circuit” Use multiple layers of encryption, peel them off

as you go

Sender/receiver anonymity Only the first hop (entry node) of a circuit

knows the sender Only the last hop (exit node) of a circuit knows

the receiver In simple case, this property holds as long as

first and lost hop are not compromised

Page 8: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

8

Proxy

Traffic analysisOnion routing (Tor)

Onion routing doesn’t resisttraffic analysis (well known)

Page 9: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

9

Outline

1) Overview2) Design3) Evaluation4) Ongoing work

Page 10: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

10

Anonymous Quanta (Aqua)

k-anonymity: Indistinguishable among k clients

BitTorrent Appropriate latency and bandwidth Many concurrent and correlated flows

Page 11: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

11

Threat model

Global passive (traffic analysis) attack Active attack Edge mixes aren’t compromised

Page 12: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

12

Padding

Constant rate (strawman)

Defeats traffic analysis, but overhead proportionalto peak link payload rate on fully connected network

Page 13: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

13

Outline

1) Overview2) Design

Padding at the core Padding at the edges Bitwise unlinkability Receiver’s anonymity (active attacks)

3) Evaluation4) Ongoing work

Page 14: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

14

Multipath

Multipath reduces thepeak link payload rate

Padding

Page 15: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

15

Variable uniform rate

Reduces overhead by adapting tochanges in aggregate payload traffic

Page 16: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

16

Outline

1) Overview2) Design

Padding at the core Padding at the edges Bitwise unlinkability Receiver’s anonymity (active attacks)

3) Evaluation4) Ongoing work

Page 17: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

17

k-anonymity sets (ksets)

Send ksetRecv kset

Provide k-anonymity by ensuring correlatedrate changes on at least k client links

Padding

Page 18: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

18

Forming efficient ksets

Epochs1 2 3

Peers

’ ra

tes

1

2

3

Are there temporal and spatialcorrelations among BitTorrent flows?

Page 19: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

19

Outline

1) Overview2) Design

Padding at the core Padding at the edges Bitwise unlinkability Receiver’s anonymity (active attacks)

3) Evaluation4) Ongoing work

Page 20: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

20

Methodology: Trace driven simulations

Month-long BitTorrent trace with 100,000 users 20 million flow samples per day 200 million traceroute measurements

Models of anonymity systems Constant-rate: Onion routing v2 Broadcast: P5, DC-Nets P2P: Tarzan Aqua

Page 21: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

21

Overhead @ edges

Models

Overh

ead

Much better bandwidth efficiency

Page 22: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

22

Throttling @ edges

Models

Th

rott

ling

Efficiently leveragescorrelations in BitTorrent flows

Page 23: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

23

Ongoing work

Traffic-analysis resistant VoIP Requires low latency But also requires less bandwidth

New design Peers always send traffic Trusted mixes provide

anonymity Untrusted superpeers

provide scalability

Page 24: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

Host Compromise

One of earliest major Internet security incidents Internet Worm (1988): compromised almost

every BSD-derived machine on Internet Today: estimated that a single worm could

compromise 10M hosts in < 5 min Attacker gains control of a host

Read data Erase data Compromise another host Launch denial-of-service attacks on another host

24

Page 25: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

25

Privacy Anonymous communication

Network attacks Buffer overflow/Heartbleed

Outline

Page 26: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

Host Compromise: Stack Overflow

Typical code has many bugs because those bugs are not triggered by common input

Network code is vulnerable because it accepts input from the network

Network code that runs with high privileges (i.e., as root) is especially dangerous E.g., web server

26

Page 27: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

Example

What is wrong with this code?

// Copy a variable length user name from a packet

#define MAXNAMELEN 64

int offset = OFFSET_USERNAME;

char username[MAXNAMELEN];

int name_len;

name_len = packet[offset];

memcpy(&username, packet[offset + 1], name_len);

name_len name0 43

Packet

27

Page 28: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

Example

void foo(packet) { #define MAXNAMELEN 64 int offset = OFFSET_USERNAME; char username[MAXNAMELEN]; int name_len;

name_len = packet[offset]; memcpy(&username, packet[offset + 1],name_len); …}

“foo” return address

char username[]

int offset

int name_len

Stack

X

X-4

X-8

X-72

X-76

28

name_len name0 43

Packet

Chri

sto

Wils

on

15

[Malicious assembly instructions]

72 (MAXNAMELEN + 8)

Address: X-72

Page 29: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

29

Heartbleed Attack (April, 2014) Vulnerability in OpenSSL

Used by HTTPS, SSH, many others to encrypt communication

Heartbeat attack Message of form: “Here’s some data, echo it back

to me” Takes as input: Data and length (L), where L <=

64KB Echoes back a block of data L What’s the problem?

Send one byte, get 64KB of RAM! Private keys, passwords, etc have been leaked

Page 30: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

30

As described by XKCD

Page 31: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

31

As described by XKCD

Page 32: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

32

As described by XKCD

Page 33: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

33

As described by XKCD

Page 34: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

34

As described by XKCD

Page 35: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

35

As described by XKCD

Page 36: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

36

Impact of bug

Every SSL site should have Patched code, revoked old certificates, reissued new

ones

What did they actually do? Most patched: only 6% vulnerable after 3 weeks Most did not reissue: 73% are using vulnerable certs Most did not revoke: 87% with valid vulnerable certs

(!!!!)

Why does this matter? Attackers can MITM any of these sites These attacks may last for years (due to cert. expiry)

Page 37: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

37

Wrap up

Computer networks today are pervasive Layered design promotes flexibility, scalability Pinch points due to IPv4 exhaustion, middleboxes,

peering

Internet success largely due to variety of applications Messaging, VoIP, video streaming, games, … Key challenges are how to do them efficiently

Internet is constantly evolving Will SDNs usher in a new era of reliability/flexibility? Will everything be mobile? How do we secure our communication and data?

Page 38: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

38

Questions?

Page 39: CS 4700 / CS 5700 Network Fundamentals Lecture 20: Attacks and Tinfoil Hats (Bleeding hearts and Spies) Last updated 12/3/2014

39