Methods for Secure Decentralized Routing in Open Networks
Total Page:16
File Type:pdf, Size:1020Kb
Technische Universit¨at M¨unchen Lehrstuhl f¨urNetzarchitekturen und Netzdienste Methods for Secure Decentralized Routing in Open Networks Nathan S. Evans Vollst¨andigerAbdruck der von der Fakult¨atf¨urInformatik der Technischen Universit¨atM¨unchen zur Erlangung des akademischen Grades eines Doktors der Naturwissenschaften (Dr. rer. nat.) genehmigten Dissertation. Vorsitzender: Prof. Dr. Thomas Neumann Pr¨uferder Dissertation: 1. Christian Grothoff, Ph.D (UCLA) 2. Professor Mikhail J. Atallah 3. Univ.-Prof. Dr. Thomas Huckle Die Dissertation wurde am 22. Juni 2011 bei der Technischen Unversit¨atM¨unchen eingereicht und durch die Fakult¨atf¨ur Informatik am 10. August 2011 angenommen. ABSTRACT The contribution of this thesis is the study and improvement of secure, de- centralized, robust routing algorithms for open networks including ad-hoc networks and peer-to-peer (P2P) overlay networks. The main goals for our secure routing algorithm are openness, efficiency, scalability and resilience to various types of attacks. Common P2P routing algorithms trade-off decen- tralization for security; for instance by choosing whether or not to require a centralized authority to allow peers to join the network. Other algorithms trade scalability for security, for example employing random search or flood- ing to prevent certain types of attacks. Our design attempts to meet our security goals in an open system, while limiting the performance penalties incurred. The first step we took towards designing our routing algorithm was an analysis of the routing algorithm in Freenet. This algorithm is relevant be- cause it achieves efficient (order O(log n)) routing in realistic network topolo- gies in a fully decentralized open network. However, we demonstrate why their algorithm is not secure, as malicious participants are able to severely disrupt the operation of the network. The main difficulty with the Freenet routing algorithm is that for performance it relies on information received from untrusted peers. We also detail a range of proposed solutions, none of which we found to fully fix the problem. A related problem for efficient routing in sparsely connected networks is the difficulty in sufficiently populating routing tables. One way to improve connectivity in P2P overlay networks is by utilizing modern NAT traversal techniques. We employ a number of standard NAT traversal techniques in our approach, and also developed and experimented with a novel method for NAT traversal based on ICMP and UDP hole punching. Unlike other NAT traversal techniques ours does not require a trusted third party. Another technique we use in our implementation to help address the connectivity problem in sparse networks is the use of distance vector routing in a small local neighborhood. The distance vector variant used in our system employs onion routing to secure the resulting indirect connections. Materially to this design, we discovered a serious vulnerability in the Tor protocol which allowed us to use a DoS attack to reduce the anonymity of the users of this extant anonymizing P2P network. This vulnerability is based on allowing paths of unrestricted length for onion routes through the network. Analyzing Tor and implementing this attack gave us valuable ii Abstract knowledge which helped when designing the distance vector routing protocol for our system. Finally, we present the design of our new secure randomized routing al- gorithm that does not suffer from the various problems we discovered in previous designs. Goals for the algorithm include providing efficiency and robustness in the presence of malicious participants for an open, fully decen- tralized network without trusted authorities. We provide a mathematical analysis of the algorithm itself and have created and deployed an imple- mentation of this algorithm in GNUnet. In this thesis we also provide a detailed overview of a distributed emulation framework capable of running a large number of nodes using our full code base as well as some of the challenges encountered in creating and using such a testing framework. We present extensive experimental results showing that our routing algorithm outperforms the dominant DHT design in target topologies, and performs comparably in other scenarios. Abstract iii Acknowledgments Chapter2 is based on work previously presented at ACSAC 2007 [59], and was extended into the author's master thesis [57]. The work presented in Chapter3 was published at P2P 2010 [122]. Chapter4 is strongly based on our paper published at Usenix Security 2009 [58]. Chapter6 is a longer version of a workshop publication published at CSET'11 [60]. Chapter7 contains material which was, at the time of this writing, accepted for pub- lication at NSS 2011 [56]. This research was supported in part by the NLnet Foundation from the Netherlands (http://nlnet.nl/), under NSF Grant No. 0416969 and by the Deutsche Forschungsgemeinschaft (DFG) under ENP GR 3688/1-1. I would like to thank my advisor, Christian Grothoff, for his guidance and patience throughout the course of my graduate career. Additionally, I would like to thank other co-authors and contributors to my research ef- forts. Specifically, Chris GauthierDickey was instrumental in the research which led to [59]. Roger Dingledine provided key insight into Tor and asked excellent questions which made the work presented in [58] that much more applicable to the real world. Samy Kamkar came up with the initial tech- nique presented in [122], and Andreas M¨ullerprovided the testbed upon which our implementation was evaluated on real world NATed networks. Without the ideas, critical evaluation and writing skills of these individuals none of this research would have been possible. Special thanks are due to Ramki Thurimella and Krista Grothoff for their \behind the scenes" efforts which have contributed both to the quality (and understandability) of the research presented in this thesis, and to my personal growth throughout the course of my graduate career. In particular, Ramki has often provided me with valuable advice on papers, presentations and more. Krista has tirelessly put up with bad writing and edited countless documents without remuneration. I am unable to thank Katie Haus enough for her unending support and encouragement in all aspects of my life throughout the course of this re- search. She has shown patience, creativity and resolve; at times providing solace, acting as muse, and even doing the dirty work of editing documents. Many of the figures throughout this thesis have her touch, and she is also very good at math! iv Abstract TABLE OF CONTENTS 1. Introduction ::::::::::::::::::::::::::::: 1 1.1 Network Environment . .2 1.1.1 Network Address Translation (NAT) . .3 1.1.2 Domain Name System (DNS) . .4 1.1.3 Public Key Infrastructure . .4 1.1.4 Trust Agility . .6 1.1.5 Summary . .6 1.2 Peer-to-Peer (P2P) Networks . .6 1.2.1 Centralized P2P . .7 1.2.2 Pure P2P . .8 1.2.3 Super-peer P2P . .8 1.3 Design Goals . .9 1.4 Methodology . 12 1.5 Summary and Overview . 13 2. Routing in the Dark: Pitch Black ::::::::::::::: 15 2.1 Introduction . 15 2.2 Related Work . 16 2.2.1 Distributed hash tables . 16 2.2.2 Small-World networks . 17 2.3 Freenet's \darknet" routing algorithm . 18 2.3.1 Network creation . 18 2.3.2 Operational overview . 19 2.3.3 Location swapping . 19 2.3.4 Content Storage . 21 2.3.5 Example . 21 2.4 Security Analysis . 23 2.4.1 Active Attack . 24 2.4.2 Natural Churn . 25 2.5 Experimental Results . 27 2.5.1 Distribution of Node Locations . 29 2.5.2 Routing Path Length . 32 2.5.3 Availability of Content . 35 2.5.4 Other Topologies . 38 2.6 Simulation of Churn . 41 2.7 Discussion . 43 vi Table of Contents 2.8 Conclusion . 45 3. Autonomous NAT Traversal ::::::::::::::::::: 47 3.1 Introduction . 47 3.2 Technical Approach . 48 3.2.1 NAT-to-NAT Communication . 50 3.2.2 Using UDP packets instead of ICMP ECHO REQUESTs 50 3.3 Implementations . 51 3.3.1 Implementation in NAT-Tester Framework . 51 3.3.2 Implementation in pwnat tool . 52 3.3.3 Implementation in the GNUnet Framework . 52 3.4 Experimental Results . 53 3.5 Discussion . 54 3.6 Conclusion . 54 4. A Practical Congestion Attack on Tor Using Long Paths : 55 4.1 Introduction . 55 4.2 Related Work . 56 4.2.1 Tor . 57 4.2.2 Attacks on Tor and other Mixes . 57 4.3 Our Attack . 60 4.3.1 JavaScript Injection . 61 4.3.2 Impact of Congestion on Arrival Times . 63 4.3.3 Statistical Evaluation . 65 4.3.4 Congestion Attack . 66 4.3.5 Optimizations . 67 4.4 Experimental Results . 68 4.5 Proposed Solutions . 80 4.6 Low-cost Traffic Analysis Failure Against Modern Tor . 85 4.7 Conclusion . 93 5. Fish-eye Bounded Distance Vector Protocol ::::::::: 95 5.1 Fish-eye and Zone Routing Protocols . 95 5.2 Implementation . 96 5.3 Distance Vector Service . 98 5.4 Message Example . 98 5.5 Neighborhood Size Estimate . 99 5.6 Distance Vector for Onion Routing . 101 5.7 FBDV Caveats: Onion Routing Without Anonymity . 102 5.8 Conclusion . 105 Table of Contents vii 6. Large-Scale Distributed Emulation of P2P Protocols ::: 107 6.1 Introduction . 107 6.2 Design Goals . 108 6.3 Related Work . 109 6.3.1 Simulation . 110 6.3.2 Emulation . 110 6.3.3 Combining Simulation and Emulation . 111 6.4 The GNUnet P2P Framework . 111 6.5 The Emulation Library . 112 6.5.1 Executing Experiments . 113 6.5.2 Peer Life Cycle . 113 6.5.3 Peer Group Life Cycle . 114 6.5.4 Topology . 115 6.6 Lessons Learned . 116 6.6.1 Cryptography . 117 6.6.2 Execution time . 118 6.6.3 Latency . 118 6.6.4 Sockets .