Shaping DNS Security with Curves a Comparative Security Analysis of DNSSEC and Dnscurve
Total Page:16
File Type:pdf, Size:1020Kb
Eindhoven University of Technology MASTER Shaping DNS security with curves a comparative security analysis of DNSSEC and DNSCurve van Tilborg, H.H.A. Award date: 2010 Link to publication Disclaimer This document contains a student thesis (bachelor's or master's), as authored by a student at Eindhoven University of Technology. Student theses are made available in the TU/e repository upon obtaining the required degree. The grade received is not published on the document as presented in the repository. The required complexity or quality of research of student theses may vary by program, and the required minimum study period may vary in duration. General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain SHAPING DNS SECURITY WITH CURVES ACOMPARATIVE SECURITY ANALYSIS OF DNSSEC AND DNSCURVE Master Thesis Coding Theory and Cryptology Department of Mathematics and Computer Science Eindhoven University of Technology Author: Committee: ing. Harm H.A. VAN TILBORG dr. D.S. JARNIKOV drs. J. SCHEERDER dr. B. SˇKORIC´ Graduation tutor: dr. B.M.M. DE WEGER drs. J. SCHEERDER Graduation supervisor: dr. B.M.M. DE WEGER August 2010 ii Contents Glossary vii Acknowledgments xi List of Figures xiii List of Tables xv 1 Introduction1 1.1 Previous Work...........................2 1.2 Problem Statement........................2 1.3 Results...............................3 2 Domain Name System (DNS)5 2.1 Introduction............................5 2.1.1 Telephone Numbering System..............5 2.1.2 Hierarchical Distributed Database............7 2.2 History...............................8 2.3 Specification...........................9 2.3.1 Domain Names...................... 10 2.3.2 Separation of Duties................... 11 2.3.3 Traversal......................... 12 2.3.4 Topology......................... 13 2.3.5 Technical Details..................... 16 2.4 Security.............................. 24 2.4.1 Introduction....................... 24 2.4.2 Passive Attacks...................... 25 2.4.3 Active Attacks....................... 25 2.4.4 Passive Cache Poisoning................. 26 2.4.5 Identifier Guessing and Query Prediction........ 27 2.4.6 Active Cache Poisoning.................. 29 2.4.7 Amplification Attack................... 31 2.4.8 Hierarchical Trust.................... 32 iii 2.4.9 Other Attacks....................... 32 2.4.10 Summary......................... 33 3 DNS Security Extensions (DNSSEC) 35 3.1 Introduction............................ 35 3.1.1 Terminology........................ 36 3.2 History............................... 38 3.3 Objectives............................. 39 3.3.1 Origin Authentication of DNS data........... 39 3.3.2 Data Integrity....................... 40 3.3.3 Authenticated Denial of Existence............ 40 3.3.4 Backwards Compatibility with Regular DNS...... 40 3.3.5 Non-Objectives...................... 41 3.4 Specification........................... 41 3.4.1 Resource Records..................... 42 3.4.2 Cryptographic Primitives................. 46 3.4.3 Key Usage......................... 49 3.4.4 Traversal......................... 50 3.4.5 Topology......................... 55 3.4.6 Data Managers...................... 59 3.5 Security.............................. 61 3.5.1 Passive Attacks...................... 61 3.5.2 Active Attacks....................... 62 3.5.3 Passive Cache Poisoning................. 63 3.5.4 Identifier Guessing and Query Prediction........ 63 3.5.5 Active Cache Poisoning.................. 65 3.5.6 Amplification Attack................... 67 3.5.7 Hierarchical Trust.................... 68 3.5.8 Other Attacks....................... 69 3.5.9 Timing Attacks...................... 70 3.5.10 Replay Attacks...................... 70 3.5.11 NSEC Related Attacks.................. 72 3.5.12 Summary......................... 73 4 DNSCurve 75 4.1 Introduction............................ 75 4.2 History............................... 75 4.3 Objectives............................. 76 4.3.1 Confidentiality...................... 76 4.3.2 Integrity.......................... 76 4.3.3 Availability........................ 77 4.3.4 Non-Objectives...................... 77 4.4 Specification........................... 78 4.4.1 Protocol.......................... 78 iv 4.4.2 Cryptographic Primitives................. 85 4.4.3 Key Usage......................... 89 4.4.4 Traversal......................... 90 4.4.5 Topology......................... 93 4.4.6 Data Managers...................... 96 4.5 Security.............................. 98 4.5.1 Passive Attacks...................... 99 4.5.2 Active Attacks....................... 99 4.5.3 Passive Cache Poisoning................. 100 4.5.4 Identifier Guessing and Query Prediction........ 101 4.5.5 Active Cache Poisoning.................. 102 4.5.6 Amplification Attack................... 102 4.5.7 Hierarchical Trust.................... 103 4.5.8 Other Attacks....................... 103 4.5.9 Timing Attacks...................... 104 4.5.10 Replay Attacks...................... 104 4.5.11 NSEC Related Attacks.................. 105 4.5.12 CPU Exhaustion Attacks................. 106 4.5.13 Summary......................... 106 4.6 Comparison with DNSSEC.................... 108 4.7 Combining with DNSSEC.................... 111 4.7.1 DNSCurve Bottom-Up – DNSSEC Top-Down Approach 111 4.7.2 Merging of DNSSEC and DNSCurve........... 114 5 Curving in Practice 117 5.1 Introduction............................ 117 5.2 Implementation.......................... 118 5.2.1 Design........................... 118 5.2.2 Technology........................ 122 5.2.3 Implementation...................... 127 5.2.4 Testing........................... 129 5.3 Deployment............................ 130 5.3.1 Speeding up Deployment................ 130 5.3.2 Deployment Process................... 131 5.4 Performance............................ 132 5.4.1 Benchmark Tools..................... 132 5.4.2 Benchmark Setup..................... 137 5.5 Results............................... 141 5.5.1 Regular DNS Performance................ 141 5.5.2 Comparative DNS and DNSCurve Performance.... 142 5.5.3 Shared Secret Caching Performance.......... 147 5.5.4 CPU Usage Benchmark.................. 149 6 Conclusion 153 v A Performance Results 155 A.1 Comparative DNS and DNSCurve................ 155 A.2 Shared Secret Caching...................... 157 Bibliography 159 vi Glossary API Application Programming Interface. A defined interface that makes computer programs (or: applications) able to communicate with each other. Note this communication can also take place over a network, such as the Internet. byte To avoid ambiguity, a ‘byte’ stands for an ordered collection of 8 bits in this thesis. daemon A computer program that is constantly running in the background of a system. Usually waiting for input or requests to be handled and answered. DNSSEC Domain Name System Security Extensions and an extension to the regular Domain Name System to provide integrity. domain A domain represents a human readable identifying name on the Internet. If example.org is a domain, this means sub.example.org and www.sub.example.org are considered to be in the same domain. A do- main is the superset of a zone. DoS Denial of Service. Type of attack that influences the availability of a system. IETF Internet Engineering Task Force. Open standards organization of the Internet. The IETF facilitates the process of developing new RFCs, from drafting and reviewing, until testing and publishing. IP Internet Protocol. This is the layer between the Internet’s network layer and link layer. It also facilitates the addressing of networks and hosts around the Internet. There are two branches of IP: IPv4 and IPv6. The biggest difference between the two is the addressing space. IPv4 offers space for 232 hosts, while IPv6 can address 2128 hosts. ISP Internet Service Provider. Often a commercial company that facilitates connections towards the Internet for private persons or organizations. vii KSK Key Signing Key. Key that is used to authenticate other (usually zone signing) keys. Generally located in the same zone as the keys it au- thenticates. See also ZSKs. LAN Local Area Network. A network that connects hosts that are physically relatively close to each other, for example in one’s home, an office, or a group of buildings. Opposite of WAN. MAC Message Authentication Code. Also known as keyed cryptographic hash function. Hash function that together with a secret key can gen- erate a fixed size string that provides data integrity and authenticity of an arbitrary length piece of data. NaCl Networking and Cryptographic library, pronounced as ‘salt’. Library that implements all DNSCurve used cryptographic primitives used by DNSCurve. nonce Number used ONCE. An arbitrary number of cryptographically ran- dom bytes, used to guarantee freshness in (security) protocols, pre- venting replay attacks. POSIX Portable Operating System Interface for Unix. A family of stan- dards developed by the IEEE to accommodate a general application programming interface between user space and an operating system kernel. Originally focused