Faraz Makari
March 6, 2008
Security of P2P Systems
Seminar on Advanced Topics in Distributed Computing WS 07/08 MPI-SWS (Saarland University), Petr Kuznetsov
Security of P2P Systems Faraz Makari March 6, 2008 Seminar on - - PowerPoint PPT Presentation
Security of P2P Systems Faraz Makari March 6, 2008 Seminar on Advanced Topics in Distributed Computing WS 07/08 MPI-SWS (Saarland University), Petr Kuznetsov Motivation 1. Introduction 2. Secure Routing 3. Fairness and trust 4. Secure
March 6, 2008
Seminar on Advanced Topics in Distributed Computing WS 07/08 MPI-SWS (Saarland University), Petr Kuznetsov
1.
2.
3.
4.
5.
6.
1.
2.
3.
4.
5.
6.
CAN Chord Pastry Tapestry
Network storage Content distribution Web cashing, searching and indexing Applicaion level multicast
Security of P2P Systems
4
CAN Chord Pastry Tapestry
High availability and Scalability Decentralized and self-organizing Effective load balancing Highly resilient But, not secure
Security of P2P Systems
5
Malicious nodes might give erroneous response to a reguest:
They might try to analyse the traffic againt system that try to
Fairness: gain more from the network than give back to it:
Trust
Security of P2P Systems
6
1.
2.
Security of P2P Systems
7
Unique and randomly distributed
Objects are assigned keys, selected from the same id
Nodes maintain a routing table (incl. a neighbor set) Copies of the objecs are stored at replica roots
The messages are routed to the node whose nodeId is
Security of P2P Systems
8
Security of P2P Systems
9
Route(key k)
Case 1)
nodeId i nodeId j
Case 2)
if no such node found, then the current node or its neighbor is the destination
j shares at lest one digit (or b bits) with k more than i, or j is numerically closer to k than i
Security of P2P Systems
10
Security of P2P Systems
11
No neighbor set Other message forwarding mechanism
expected number of routing hops: Replica function produces random keys for
Security of P2P Systems
12
Entries in the node i‘s routing tables are
Each node is reachable in (d/4)
Replica function produces random keys for
As N increases, the size of the routing table does
Security of P2P Systems
13
Security of P2P Systems
14
Security of P2P Systems
15
N: # nodes in the network We assume
Two communication types:
1.
network-level: direct communication without routing the overlay, and
2.
Cryptographic techniques (to prevent adversaries from observing or
modifying network-level communication between correct nodes)
Any message sent by a correct node to a correct destination over an
Security of P2P Systems
16
1.
2.
3.
1.
Secure routing
2.
Secure nodeId assignm ent
3.
Seure routing table m aintenance
4.
Secure m essage forwarding
Security of P2P Systems
17
Definition:
Rk: set of nodes that contains, for each member of the set
Example in the Pastry: set of live nodes with nodeIds
The secure routing primitive ensures that:
Security of P2P Systems
18
Secure routing ensures that:
Implementing the secure routing primitive requires:
Security of P2P Systems
19
Fundamental assumption: Secure nodeId assignment ensures that:
There is a uniform random distribution of nodeIds There is a uniform random distribution of nodeIds
If an attacker can choose nodeIds, it might:
maximize the probability of appearing in the victim‘s routing table
partition the the Pastry and –chord overlay if it controls two disjoint
neighbor sets
control access to target objects by choosing the closest nodeIds to all
replica keys for a target object, thus controling all replica roots
If an attacker can obtain a large number of valid nodeIds easily
Security of P2P Systems
21
certificates among the nodes it controls,
tables
addresses, but
Security of P2P Systems
22
Certified nodeIds work well when we have fixed nodeIds
hard to secure CAN where nodeIds represent a zone in a d-
Security of P2P Systems
23
Solution for Sybil attack:
Open problem:
Security of P2P Systems
24
example: require new nodes to generate a key pair s. t., the SHA-1 hash of the public key has the first p bits zero. Use a secure hash of the public key as their nodeIds Use different initialization vector for SHA-1. or use MD5 number of random bits in nodeIds will not be reduced
Security of P2P Systems
25
Some other methods:(cont.)
Security of P2P Systems
26
average fraction of bad entries in a routing table (= f) of a
Bad routing updates increases f
Security of P2P Systems
27
Description:
The attacker may fake proximity to increase f
Example: Correct node p sends a probe to a bad node with certain nodeId
(to estimate the delay)
An attacker can intercept and have the bad node closest to p reply
to it
If the attacker controls enough bad nodes, then
it can make nodes that it controls appear close to p increase the probability that they are used for routing
Security of P2P Systems
28
Solution: use more restrictive
For example, if nodes can only observe messages sent to
peers that have corporation with several offices around
Security of P2P Systems
29
Idea: It is hard to verify legitimate updates in Pastry &
Description:
The attacker may perform bad updates
Note: Pr [correct nodes receive updates from correct nodes] ≥ 1 - f Pr [correct nodes receive updates from bad nodes] ≤ f
Security of P2P Systems
30
Security of P2P Systems
31
id space (in Chord)
(1) locality-aware routing table
(2) Constrained routing table
Security of P2P Systems
32
Locality-aware routing table: The slut at level l and domain d can contain any nodeId that shares
the first l digits with i and has the value d in the l + 1st digit
Constrained Pastry routing table: The entry is constrained to point to the closest nodeId to a point p
in the domain
P is defined as follows:
It shares the first l digits with i has the value d in l + 1st digit, and the same remainig digits as i
Security of P2P Systems
33
(1) new node n, ask a set of bootstrap nodes to send a
(2) non-faulty nodes use the secure routing to obtain the
(3) n collects these sets and choose the „closest“ live
Security of P2P Systems
34
Security of P2P Systems
35
Description:
Faulty nodes may:
drop the messages or, misroute the message or, Pretend to be the key‘s root.
Observation:
Pr [successful routing to a correct replica root | f ] =
independent of c
Security of P2P Systems
36
Secure routing primitive: given a message and a destination key, is ensures that with a very high probability at least one copy of the message reaches each correct replica root.
Security of P2P Systems
37
Negative: the set is likely to be correct for k Positive: otherwise
Security of P2P Systems
38
between consecutive nodeIds in the neighbor set of p Neighbor set of p contains:
nodeIds < p‘s
nodeIds > p‘s rn = id0, …,idl+1 prospective neighbor set for key x
Security of P2P Systems
39
(1) collect certificates of nodes that have left the overlay to
(2) include nodeIds of nodes it controls and those of correct ones
Security of P2P Systems
40
Security of P2P Systems
41
Ask the sender‘s neighbor set to forward the copies (e.g., CAN & Tapestry) Ask the sender‘s neighbor set to forward the copies (e.g., CAN & Tapestry) Use neighbor set anycast method (e.g., Chord & Pastry) Use neighbor set anycast method (e.g., Chord & Pastry)
Security of P2P Systems
42
Use a cryptographic hash of a file‘s content as the key
Insert signed files to the overlay (as in PAST)
Security of P2P Systems
43
the public keys IP addresses
Security of P2P Systems
44
1.
2.
3.
4.
5.
6.
Security of P2P Systems
45
Fair sharing of disc space (in a distributed storage system)
Malicious nodes might wish to use more storage from the network
than they provide
Security of P2P Systems
46
Fair sharing of network bandwidth
Bandwidth generated by some nodes in Kazaa Solution:
Use m icropaym ent system s Use m icropaym ent system s Scalability? Overhead? Scalability? Overhead?
Security of P2P Systems
47
1.
Security of P2P Systems
48
1.
Motivation
2.
Introduction
3.
Secure Routing
4.
Fairness and trust
5.
Secure lookup protocol
4 . Spans
6 . Join&leave
8 . Span Takeover 9 . Overhead 10 .Security analysis 11.Conclusion
Security of P2P Systems
49
Use redundant routing
Group set of contiguous nodes into swarms
Map each node to its autonomous system (AS)
Security of P2P Systems
50
Threshold cryptography using a system-wide
Mobile proactive secret sharing (MPSS) Challenge:
Security of P2P Systems
51
The lookup path has logarithmic complexity (easily) provable guarantees As long as challenges are correctly answered
No limitations on the fraction of compromised nodes Instructive in its design and simplicity Very strong safety properties
Security of P2P Systems
52
System model:
Dynamic collection of nodes communicating with each other Oneway function h maps every node to a unique nodeId Unique nodeIds include IP address and public key
Assumtions:
nodeIds are random nodeIds are expensive nodes obtain join certificates from CAs each node can verify the join certificates fraction f of compromised nodes by adversaries in a
vulnerability window
Security of P2P Systems
53
Security of P2P Systems
54
keeping track of the span membership generating the span certificates
Security of P2P Systems
55
Security of P2P Systems
56
1.
2.
3.
How to verify the span validity? How to verify the span validity?
Security of P2P Systems
57
Detect and monitor when a neighbor has died or misbehaved Detect and monitor when a neighbor has died or misbehaved Contact span committee to generate a new certificate Contact span committee to generate a new certificate
Security of P2P Systems
58
split in half split in half merge merge
Security of P2P Systems
59
Span might experience
Span might experience
Security of P2P Systems
60
n: size of the span committee
Amount of exchanged data during the re-key (1024 bit DSA private key):
~ 8 MB
~ 4 MB
Security of P2P Systems
61
Security of P2P Systems
62
Security of P2P Systems
63
1.
2.
3.
4.
5.
6.
1.
Introduction
2.
Notation
3.
Required links
4.
Successor protocol
5.
Join protocol
6.
Conclusion
Security of P2P Systems
64
1.
total # of nodes ≥ z
2.
# of correct nodes joining and leaving ≤ (k: tunable parameter)
3.
computationally unbounded adversary with full information about the network
z-g ood interv a l z-g ood interv a l
Security of P2P Systems
65
Security of P2P Systems
66
Security of P2P Systems
67
Security of P2P Systems
68
Security of P2P Systems
69
all swarms will be good with high probability
all swarms will be good with high probability
Security of P2P Systems
70
Every peer p has links to all peers in:
Center Interval:
Center(p): peers є [p – (2C ln n)/n, p + (2C ln n)/n]
Forward Intervals:
Forward(p, i): peers є [p + /m - (C ln n)/n, p -
for i є [1, log m-1]
Backward Intervals:
Backward(p, i): peers є [p -
for i є [1, log m-1]
Security of P2P Systems
71
Algorithm 1 SUCCESSOR(p) 1: p sends a request for k to all peers in S(p); 2: S ← set of all peers in S(p); 3: x ← identifier of p; 4: while (d(x, k) > (C ln n)/n) do 5: x′ ← next(x, k); 6: All peers in S send the request for k to all peers in S(x′); 7: S′ ← set of all peers in S(x′) that received the above request from a majority of the peers in S; 8: S ← S′; 9: x ← x′; 10: end while 11: The peers in S send back pointers to all the peers in S(k). These pointers are sent backwards along the same path, in the same manner to the peer p;
Security of P2P Systems
72
Algorithm 2 JOIN(p) 1: Peer p contacts some correct peer q which notifies S(q) of p’s request to join; 2: All peers in S(q) both 1) come to consensus on a random number r ∈ (0, 1] and 2) select two random peer points, p1 and p2, uniformly at random from all peers currently in the DHT. Assume that r, p1, and p2 are ordered clockwise along the unit circle; 3: Using the SEND MESSAGE algorithm, all peers in S(p) notify peers in Center(p1) that p has joined the network and that p is taking the location of ρ1 who is relocating. In same way, all peers in S(p) notify peers in Center(p2) that p1 is joining and that p1 is taking the location of ρ2 who is relocating. Finally, all peers in S(p) notify all peers in Center(r) that ρ2 is joining;
Security of P2P Systems
73
4: All peers in S(q) get pointers to the peers in Center(p1), using O(1) calls to the SUCCESSOR algorithm. All peers in S(q) send these pointers to p. In a similar fashion, S(q) sends pointers to the peers
5: The peers in Center(p1) send data items for all keys k such that p ∈ S(k) and p then stores copies of these data items. Similar processes for 1) Center(p2) and p1 and 2) Center(r) and p2 are performed; 6: PLACEMENT(p); 7: PLACEMENT(p1); 8: PLACEMENT(p2);
Security of P2P Systems
74
Security of P2P Systems
75
Security of P2P Systems
76
Security of P2P Systems
77