Security and Privacy

Download Report

Transcript Security and Privacy

CS 4700 / CS 5700
Network Fundamentals
Lecture 20: Malware and Tinfoil Hats
(Parasites, Bleeding hearts and Spies)
Slides stolen from Vern Paxson (ICSI) and Stefan Savage (UCSD)
Course Evaluations
2

Please do them!
 It’s
important for me to get feedback
 You will help NU improve courses

TRACE can be taken on smartphones and tablets
 Completely
anonymous
 Starting TODAY and will close on May 1, at 11:50 p.m.
Motivation
3

Internet currently used for important services


Increasingly used for critical services


Financial transactions, medical records
911, surgical operations, water/electrical system control,
remote controlled drones, etc.
Networks more open than ever before

Global, ubiquitous Internet, wireless
Malicious Users
4

Miscreants, e.g. LulzSec
 In
it for thrills, street cred, or just to learn
 Defacing web pages, spreading viruses, etc.

Hacktivists, e.g. Anonymous
 Online
political protests
 Stealing and revealing classified information

Organized Crime
 Profit
driven, online criminals
 Well organized, divisions of labor, highly motivated
Network Security Problems
5

Host Compromise
 Attacker
gains control of a host
 Can then be used to try and compromise others

Denial-of-Service
 Attacker

prevents legitimate users from gaining service
Attack can be both
 E.g.,
host compromise that provides resources for denial-ofservice
Definitions
6

Virus


Worm




Program that infects the operating system (or even lower)
Used for privilege elevation, and to hide files/processes
Trojan horse



Replicates itself over the network
Usually relies on remote exploit (e.g. buffer overflow)
Rootkit


Program that attaches itself to another program
Program that opens “back doors” on an infected host
Gives the attacker remote access to machines
Botnet


A large group of Trojaned machines, controlled en-mass
Used for sending spam, DDoS, click-fraud, etc.
Outline
7

Worms



Basics
Heartbleed
Privacy

Anonymous communication
Host Compromise
8

One of earliest major Internet security incidents
 Internet
Worm (1988): compromised almost every BSDderived 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
Host Compromise: Stack Overflow
9



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
Example
10

What is wrong with this code?
0
Packet
34
name_len
name
// 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);
Example
11
Packet
34
name_len
name
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);
…
}
Stack
X
X-4
X-8
Address:
X-72
“foo” return
address
int offset
[Malicious assembly
char username[]
instructions]
Christo
Wilson
0
X-72
X-76
(MAXNAMELEN +15
8)
int72name_len
Effect of Stack Overflow
12

Write into part of the stack or heap
 Read/Write
arbitrary code to part of memory
 Cause program execution to jump to arbitrary code

Worm
 Probes
host for vulnerable software
 Sends bogus input
 Attacker can do anything that the privileges of the buggy
program allows
 Launches
 Spread
copy of itself on compromised host
at exponential rate
 10M hosts in < 5 minutes
Worm Spreading
13
f = (e K(t-T) – 1) / (1+ e K(t-T) )



f – fraction of hosts infected
K – rate at which one host can
compromise others
T – start time of the attack
1
f
T
t
Heartbleed Attack
14

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
As described by XKCD
15
As described by XKCD
16
As described by XKCD
17
As described by XKCD
18
As described by XKCD
19
As described by XKCD
20
Heartbleed results
21

Every vulnerable site operator should have
 Revoked
old certificate
 Reissued a certificate with a new key

What actually happened?
Low reissue rates, lower revocations
22
Revocations take weekends off
23
Revolting Revocation Handling
24
Outline
25

Worms



Basics
Heartbleed
Privacy

Anonymous communication
26
You Are Not Anonymous
27

Your IP address can be linked directly to you
 ISPs
store communications records
 Usually for several years (Data Retention Laws)
 Law enforcement can subpoena these records

Your browser is being tracked
 Cookies,
Flash cookies, E-Tags, HTML5 Storage
 Browser fingerprinting

Your activities can be used to identify you
 Unique
websites and apps that you use
 Types of links that you click
"Remember when, on the Internet, nobody knew who you were?"
28
Wiretapping is Ubiquitous
29

Wireless traffic can be trivially intercepted
 Airsnort,
Firesheep, etc.
 Wifi and Cellular traffic!
 Encryption helps, if it’s strong
 WEP

and WPA are both vulnerable!
Tier 1 ASs and IXPs are compromised
 NSA,
GCHQ, “5 Eyes”
 ~1% of all Internet traffic
 Focus on encrypted traffic
Why Do We Want Anonymity?
30

To protect privacy


Avoid tracking by advertising companies
Viewing sensitive content



Protection from prosecution



Information on medical conditions
Advice on bankruptcy
Not every country guarantees free speech
Downloading copyrighted material
To prevent chilling-effects

It’s easier to voice unpopular or controversial opinions if you are
anonymous
Anonymity Layer
31
Application


Anonymity
Presentation
Session
Transport
Network
Data Link
Physical
Function:

Hide the source, destination,
and content of Internet flows
from eavesdroppers
Key challenge:



Defining and quantifying
anonymity
Building systems that are
resilient to deanonymization
Maintaining performance
Quantifying Anonymity
32

How can we calculate how anonymous we are?

Anonymity Sets
Suspects (Anonymity Set)
Who sent this
message?

Larger anonymity set = stronger anonymity
Other Definitions
34

Unlinkability

From the adversaries perspective, the inability the link two
or more items of interest


E.g. packets, events, people, actions, etc.
Three parts:
Sender anonymity (who sent this?)
 Receiver anonymity (who is the destination?)
 Relationship anonymity (are sender A and receiver B linked?)


Unobservability

From the adversaries perspective, items of interest are
indistinguishable from all other items
Crypto (SSL)
35
Data Traffic

Content is unobservable


Due to encryption
Source and destination are
trivially linkable

No anonymity!
Anonymizing Proxies
36
HTTPS Proxy
No anonymity!


Source is
known
Destination
anonymity


Destination is
known
Source
anonymity
Anonymizing VPNs
37
VPN Gateway
No anonymity!


Source is
known
Destination
anonymity


Destination is
known
Source
anonymity
Using Content to Deanonymize
38
HTTPS Proxy
•
•
•
•

Reading Gmail
Looking up directions to home
Updating your Facebook profile
Etc…
No anonymity!
Fact: the NSA leverages common cookies from ad
networks, social networks, etc. to track users
Statistical Inference Attacks
39
VPN Gateway

Statistical analysis of traffic patterns can compromise
anonymity, i.e. the timing and/or volume of packets
Data To Protect
40

Personally Identifiable Information (PII)
 Name,

address, phone number, etc.
OS and browser information
 Cookies,




etc.
Language information
IP address
Amount of data sent and received
Traffic timing
Mix Networks
41


A different approach to anonymity than Crowds
Originally designed for anonymous email
 David
Chaum, 1981
 Concept has since been generalized for TCP traffic

Hugely influential ideas
 Onion
routing
 Traffic mixing
 Dummy traffic (a.k.a. cover traffic)
Mix Proxies and Onion Routing
42
Encrypted
Tunnels
[KP , KP , KP]
<KP, KS>
Mix
<KP, KS>
<KP, KS>
<KP, KS>
<KP, KS>
E(KP , E(KP , E(KP , M))) = C


<KP, KS>
<KP, KS>
<KP, KS>
Non-encrypted
data
Mixes form a cascade of anonymous proxies
All traffic is protected with layers of encryption
Another View of Encrypted Paths
43
<KP, KS>
<KP, KS>
<KP, KS>
Return Traffic
44


In a mix network, how can the destination
respond to the sender?
During path establishment, the sender places
keys at each mix along the path

Data is re-encrypted as it travels the reverse path
<KP1 , KS1>
<KP2 , KS2>
<KP3 , KS3>
KP1
KP2
KP3
Traffic Mixing
45

Hinders timing
attacks



Messages may be
artificially delayed
Temporal
correlation is
warped
• Mix collects messages for t
seconds
• Messages are randomly
shuffled and sent in a
different order
Arrival Order
1
4
Problems:


Requires lots of
traffic
Adds latency to
network flows
2
3
Send Order
1
2
3
4
Dummy / Cover Traffic
46

Simple idea:

Send useless traffic to help obfuscate real traffic
Legacy of Mix Networks
47

Hugely influential ideas
 Onion
routing
 Traffic mixing
 Dummy traffic (a.k.a. cover traffic)
Tor: The
nd
2
Generation Onion Router
48

Basic design: a mix network with improvements
 Perfect
forward secrecy
 Introduces guards to improve source anonymity
 Takes bandwidth into account when selecting relays
 Mixes
in Tor are called relays
 Introduces
 Servers
hidden services
that are only accessible via the Tor overlay
Deployment and Statistics
49

Largest, most well deployed anonymity preserving
service on the Internet
 Publicly
available since 2002
 Continues to be developed and improved

Currently, ~5000 Tor relays around the world
 All
relays are run by volunteers
 It is suspected that some are controlled by intelligence
agencies

500K – 900K daily users
 Numbers
are likely larger now, thanks to Snowden
Celebrities Use Tor
50
How Do You Use Tor?
51
1.
Download, install, and execute the Tor client


2.
Configure your browser to use the Tor client as a proxy

3.
The client acts as a SOCKS proxy
The client builds and maintains circuits of relays
Any app that supports SOCKS proxies will work with Tor
All traffic from the browser will now be routed through
the Tor overlay
Timing attacks
52

Encryption protects contents of messages, but not
endpoint identities
 Tor
“protects” the latter through onion routing
 But it sends messages with very low delay

Intersection attack
 Monitor
packets being sent and received
 If two hosts consistently send and receive within a short
time…
 … and do so repeatedly
 … then they are probably communicating
Intersection attack
53

How quickly does anonymity degrade?
 Dataset
of call times from large cellular provider
 Simulate intersection attack on 370M calls
 98.3% of calls traced within one month

Key challenges for anonymity
 VoIP
requires low latency/jitter for call quality
 Increases susceptibility to traffic analysis
Our Design: Herd
54
Anonymity + low latency + reasonable cost



Onion routing through mixes located in trust zone
Constant-rate traffic at small multiples of call
bitrates
Untrusted superpeer architecture and coding scheme
for offloading mixes
Class Wrap Up
55

Networking is fundamental to nearly every interaction in
our daily digital lives
 Layering
 End
system design principles
 Internet design goals
 Economics

The Internet continues to evolve
 Overlays
 SDNs
 Mobile

The only constant is change, … and IPv4