DNS Privacy: Concerns, Issues and Technologies
Total Page:16
File Type:pdf, Size:1020Kb
DNS Privacy: Concerns, Issues and Technologies David Roth, John Worley, Jose Castejon-Amenedo, Ian Cohee Secure64 Software The Domain Name Service (DNS) is the critical Internet service, without which the modern Internet and the information economy would not exist. It is a public, distributed, highly-redundant, highly-scalable distributed database of translations between domain names, e.g., www.google.com, and the information needed to access resources and services, such as web pages, mail servers, files, time of day, etc. The most common and familiar function is mapping a domain name to an IPv4 or IPv6 address. The mapping is required in order for an application to open a network connection to a remote service. For example, when www.google.com is typed into a browser, the domain name portion of the URL is submitted to the system’s resolver library, which in turn initiates a domain name lookup to the system’s configured DNS server, usually an external caching recursive resolver configured by the network provider. The web browser then awaits a valid response containing the IP address to connect to the web site over HTTP or HTTP/S. Critical system applications such as NTP function in a similar manner. DNS Privacy The domain name system is considered public knowledge and as such DNS queries and responses are sent over the network in the clear. Because DNS data is unencrypted, it is easily collected. Of particular interest is who sent the query and what domain they are visiting. This information may be used to compile end user profiles, which in turn may be used for targeted advertising, or competitive analysis1. While DNS data does not reveal the full extent of a user’s activities, it does provide valuable metadata for big- data analysis. To address DNS privacy issues, there are a number of active initiatives to secure DNS requests on the wire, led by dnsprivacy.org and within the IETF. This paper provides a detailed look at the problem space, emerging standards, and services available today to protect client DNS privacy. In particular we’ll cover the IETF standards for DNS over HTTPS (hereafter DoH) and DNS over TLS (hereafter DoT). The focus will be on stub-to-resolver privacy issues. These approaches to DNS privacy build upon the use of TCP and cryptographic protocols. Security and Privacy In many discussions about DNS, the terms security and privacy are used interchangeably; however, they have very different meanings and distinct implications. Privacy only means that the contents of a DNS query cannot be viewed in transit by a third party, often referred to as a “man in the middle”, or MITM. One simple mechanism to ensure privacy would be to have a point-to-point connection between the client and the recursive server. In the Internet environment, where packets will traverse many hops (routers, proxies, etc.) between the client and server, privacy requires some form of encryption. 11POWERDNS Technical Blog, “On Firefox moving DNS to a third party”., https://blog.powerdns.com/2018/09/04/on- firefox-moving-dns-to-a-third-party/. 1 Security, on the other hand, is composed of three different attributes, each of which may be independently present. Privacy is one attribute, but security also includes: ⚫ Authentication, a process by which a client knows, with a high degree of certainty, it is communicating with the expected server, and ⚫ Data Integrity, a process by which the client knows, with a high degree of certainty, data sent and received cannot be altered or changed without being detected. As with privacy, both authentication and data integrity use cryptographic methods. However, it is possible to be secure, but not private. An important example of this is DNS Security (or DNSSEC), which protects communication between recursive resolvers and the authoritative servers. In DNSSEC, authoritative responses are sent in the clear (without encryption) but accompanied by special DNS records called Resource Record Signatures (RRSIG) and DNSSEC Keys (DNSKEY). Together, these records allow the recursive resolver to validate the response, which prevents the response from being altered by a MITM (data integrity). Additionally, the DNSKEY records can be validated against another DNS record, the Delegation of Signing (DS), giving a high degree of confidence the authority is returning the expected data (authentication). DNS Privacy Considerations RFC 7626 covers DNS privacy considerations in detail. What follows is a summary of the salient points. 1. A DNS resolver query is typically sent over the wire as an unencrypted UDP packet. This traffic is easily decoded using packet analysis tools such as WIRESHARK, TCPDUMP or deep packet inspection applications. The particular information of interest is the IP source address and the query name. The source port number is also of interest as it may differentiate clients behind a NAT’ed network. 2. Web browsers when connecting to web sites may trigger a number of primary, secondary, and even tertiary requests for name resolution: ◦ The primary request is for the website’s domain name. ◦ Secondary requests are from embedded links in the downloaded HTML page. ◦ Tertiary requests which result when a caching server does not have the domain name in its cache and consults the authoritative servers to find it. As well, some browsers may prefetch domain names for future use or to autocomplete the URL in the address bar. 3. DNS data is considered public as noted above. However, RFC 7626 argues (§2.1) the need to differentiate between the DNS data and the transaction: DNS data and the results of a DNS query are [publicly available] and may not have any confidentiality requirements. However, the same is not true of a single transaction or a sequence of transactions; that transaction is not / should not be public. A typical example from outside the DNS world is: the web site of Alcoholics Anonymous is public; the fact that you visit it should not be. 2 The DNS attack surface is broad and encompasses the system which issues the DNS lookup request, the caching server which processes the request, and authority servers which assist in the domain name lookup. The attack surface will be further examined in subsequent sections. DNS Privacy Standards and Industry Efforts A number of technical solutions have been proposed over the last 10 years intended to address DNS privacy: DNSCrypt2, DNSCurve3, Namecoin4, Confidential DNS5, the GNU name system6, and Google DNS over HTTPS. All of these designs take different approaches in reducing the role of DNS as the ultimate source of meta data in the digital panopticon known as the Internet. These approaches to DNS privacy have yet to see the same level of acceptance as DoH and DoT. For completeness, the following sections provide an overview of each. DNSCurve Having been first put forth in 2011, this DNS privacy proposal is one of the oldest available. Details about this solution can be found here. This protocol establishes a secure channel between a client and a server by means of cryptographic techniques based on the Curve25519 elliptic curve7. It is meant to be used by caching servers to exchange DNS information with other caching or authoritative servers. DNSCrypt DNSCrypt is a formal proposal for the use of DNSCurve. Namecoin Namecoin is an approach to DNS confidentiality that uses blockchain techniques. This proposal requires a major overhaul of the DNS infrastructure. Confidential DNS (IETF Draft) This proposal introduces a new DNS record ENCRYPT. This record is returned by a DNS server when queried and contains a public key for the server. The protocol uses the public key to securely transfer a small amount of data between the client and server, allowing them to settle on specific key material that they can use in order to establish a secure channel for exchanging encrypted queries, and their associated responses. GNU name system The GNU Name System (GNS) is part of the GNU Net8 effort to provide a framework for secure peer-to- peer networking. 22https://en.wikipedia.org/wiki/DNSCurve 33DNSCrypt, https://github.com/DNSCrypt/dnscrypt-protocol/blob/master/DNSCRYPT-V2-PROTOCOL.txt 44https://namecoin.org/ 55https://tools.ietf.org/html/draft-wijngaards-dnsop-confidentialdns-02 66https://gnunet.org/taxonomy/term/34 77 https://en.wikipedia.org/wiki/Curve2551 88 https://gnu.net 3 Like Namecoin, GNS constitutes a complete overhaul of the DNS infrastructure. It relies on the GNU peer-to-peer network, plus a distributed hash table (DHT). The name resolution itself is carried out by means of DHT, whereas the queries and responses are exchanged over the GNS peer-to-peer network. Such data exchange is encrypted and signed, using capabilities provided by the GNU peer-to-peer network. Google DNS over HTTPS Proposal 9 This specification defines a web friendly JSON ReST API for the DNS request and response. As such it diverges from RFC 8484, which defines a binary response. A request is sent as follows: https://dns.google.com/resolve? To which the following parameters may be passed: name, type, cd, edns_client_subnet, and random_padding may be passed as keys with assigned values to further refine the query. A response is received in the following JSON format: { "Status": 0, // NOERROR - Standard DNS response code (32 bit integer). "TC": false, // Whether the response is truncated "RD": true, // Always true for Google Public DNS "RA": true, // Always true for Google Public DNS "AD": false, // Whether all response data was validated with DNSSEC "CD": false, // Whether the client asked