Routing in the Dark: Pitch Black
Total Page:16
File Type:pdf, Size:1020Kb
Routing in the Dark: Pitch Black Nathan S. Evans Chris GauthierDickey Christian Grothoff Colorado Research Institute for Security and Privacy Department of Computer Science University of Denver, USA fnatevans,chrisg,[email protected] Abstract 1 Introduction In many networks, such as mobile ad-hoc networks and Fully decentralized and efficient routing algorithms for friend-to-friend overlay networks, direct communication restricted route networks promise to solve crucial problems between nodes is limited to specific neighbors. Often these for a wide variety of networking applications. Efficient de- networks have a small-world topology; while short paths centralized routing is important for sensor and general wire- exist between any pair of nodes in small-world networks, it less networks, peer-to-peer overlay networks and theoreti- is non-trivial to determine such paths with a distributed al- cally even next generation Internet (IP) routing. A number gorithm. Recently, Clarke and Sandberg proposed the first of distributed peer-to-peer routing protocols developed in decentralized routing algorithm that achieves efficient rout- recent years achieve scalable and efficient routing by con- ing in such small-world networks. structing a structured overlay topology [4,5,8, 11, 15]. However, all of these designs are unable to work in real- This paper is the first independent security analysis of world networks with restricted routes. In a restricted route Clarke and Sandberg’s routing algorithm. We show that topology, nodes can only directly communicate with a sub- a relatively weak participating adversary can render the set of other nodes in the network. Such restrictions arise overlay ineffective without being detected, resulting in sig- from a variety of sources, such as physical limitations of nificant data loss due to the resulting load imbalance. We the communications infrastructure (wireless signals, physi- have measured the impact of the attack in a testbed of 800 cal network topology), policies (firewalls) or limitations of nodes using minor modifications to Clarke and Sandberg’s underlying protocols (NAT, IPv6-IPv4 interaction). implementation of their routing algorithm in Freenet. Our Recently, a new routing algorithm for restricted route experiments show that the attack is highly effective, allow- topologies was proposed [13] and implemented in version ing a small number of malicious nodes to cause rapid loss 0.7 of Freenet, an anonymous peer-to-peer file-sharing net- of data on the entire network. work [3]. The proposed algorithm achieves routing in expected O(log n) hops for small-world networks with n We also discuss various proposed countermeasures de- nodes and O(log n) neighbors1 by having nodes swap lo- signed to detect, thwart or limit the attack. While we were cations in the overlay under certain conditions. This sig- unable to find effective countermeasures, we hope that the nificant achievement raises the question of whether the al- presented analysis will be a first step towards the design gorithm is robust enough to become the foundation for the of secure distributed routing algorithms for restricted-route large domain of routing in restricted route networks. topologies. The research presented in this paper shows that any par- ticipating node can severely degrade the performance of the routing algorithm by changing the way it participates in the location swapping aspect of the protocol. Most of 1Given only a constant number of neighbors, the routing cost increases to O(log2 n). 1 the guards in the existing routing implementation are in- scale studies have shown that over 70% of machines are effective or severely limited and in particular fail to re- NATed [1]. liably detect the malicious nodes. Experiments using a In contrast to the DHT designs from Table2, the Freenet Freenet testbed show that a small fraction of malicious routing algorithm achieves expected O(log n) routing in re- nodes can dramatically degenerate routing performance and stricted route topologies under the assumption that the re- cause massive content loss in a short period of time. Our re- stricted network topology has small-world properties. search also illuminates why churn impacts the structure of the overlay negatively, a phenomenon that was observed by 2.2 Small-world networks Freenet users in practice but has, to the best of our knowl- edge, never been explained. A small-world network is informally defined as a net- The paper is structured as follows. Section2 describes work where the average shortest path between any two related work focusing on distributed hash tables and small- nodes is “small” compared to the size of the network, where world networks. Section3 details Freenet’s distributed “small” is generally considered to mean at least logarithmic friend-to-friend (or, as termed by the Freenet authors, in relation to the size of the network. Small world networks “darknet”) routing algorithm for small-world networks. The occur frequently in the real world [17], the most prominent proposed attack is described in Section4, followed by ex- example being social networks [9]. perimental results showing the effects of the attack in Sec- Watts and Strogatz [17] characterized small-world net- tion5. Possible defenses and their limitations are discussed works as an intermediate stage between completely struc- in Section6. tured networks and random networks. According to their definition, small world networks with n nodes have on av- 2 Related Work erage k edges per vertex where n >> k >> log n. They 2.1 Distributed hash tables define a clustering coefficient which captures the amount of structure (clustering) in a given network. Small-world net- A distributed hash table is a data structure that enables works are then networks with a clustering coefficient sig- efficient key-based lookup of data in a peer-to-peer overlay nificantly larger than the coefficients of completely random network. Generally, the participating peers maintain con- networks and with average shortest path lengths close to nections to a relatively small subset of the other participants those of completely random networks. Watts and Strogatz’s in the overlay. Each peer is responsible for storing a sub- work explains why short paths exist in real-world networks. set of the key-value pairs and for routing requests to other Kleinberg [6,7] generalized Watts and Strogatz’ con- peers. In other words, a key property of the use of DHTs in struction of small-world networks and gave sufficient and a peer-to-peer setting is the need to route queries in a net- necessary conditions for the existence of efficient dis- work over multiple hops based on limited knowledge about tributed routing algorithms for these constructions. Klein- which peers exist in the overlay network. Part of the DHT berg’s model for distributed routing algorithms does not in- protocol definition is thus concerned with maintaining the clude the possibility of nodes swapping locations, which is a structure of the network as peers join or leave the overlay. fundamental part of Freenet’s “darknet” routing algorithm. DHT designs can be characterized using the performance metrics given in Table1. Routing in DHTs is generally 3 Freenet’s “darknet” routing algorithm done in a greedy fashion and resembles lookups in skip lists [10]. Table2 summarizes the key properties of various Freenet [3] is a peer-to-peer network where the operator existing DHT designs. The table does not capture properties of each node specifies which other peers are allowed to con- which are hard to quantify, such as fault-tolerance. Given nect to the node [2]. The main reason for this is to obscure a uniform distribution of keys, most existing DHT designs the participation of a node in the network – each node is achieve near perfect load balancing between peers. Hosts only directly visible to the friends of its’ operator. Peer-to- that can provide significantly more resources than others are peer networks that limit connections to friend-to-friend in- usually accommodated by associating multiple locations in teractions are sometimes called darknets. Given that social the overlay with a single host. In some sense, those hosts networks are small-world networks and that small-world are counted as multiple peers. networks arise easily given a certain amount of “random- A major limitation of the DHT designs listed in Ta- ness” in the graph construction, it is realistic to assume that ble2 is that they do not support routing in restricted route Freenet’s darknet is a small-world network. The routing topologies. These DHTs assume that it is generally possi- restrictions imposed on the Freenet overlay could techni- ble for any peer to connect to any other peer. However, fire- cally model arbitrary network limitations; consequently, an walls and network address translation (NAT) make this as- efficient distributed routing algorithm for such a topology sumption unrealistic over the current Internet, where large- should easily generalize to any small-world network. (1) Messages required for each key lookup (2) Messages required for each store operation (3) Messages needed to integrate a new peer (4) Messages needed to manage a peer leaving (5) Number of connections maintained per peer (6) Topology can be adjusted to minimize per-hop latency (yes/no) (7) Connections are symmetric or asymmetric Table 1. Performance metrics for DHTs. Chord [15] Pastry [12] Kademlia [8] CAN [11] RSG [5] (1) O(log n) O(log n) O(log n) O(n−d) O(log n) (2) O(log n) O(log n) O(log n) O(n−d) O(log n) (3) O(log2 n) O(log n) O(log n) O(d + n−d) O(log n) (4) O(log2 n) O(1) O(1) O(d) O(log n) (5) O(log n) O(log n) O(log n) O(d) O(1) (6) no yes yes yes no (7) asymmetric asymmetric symmetric symmetric asymmetric Table 2.