In the following sections, we first outline the threats relevant to the specific topic and then discuss the potential actions that can be taken to mitigate them.
We describe two classes of threats:
-
Threats described in [RFC 6973], "Privacy Considerations for Internet Protocols"
-
Privacy terminology, threats to privacy, and mitigations as described in Sections 3, 5, and 6 of [RFC 6973].
-
DNS Privacy Threats
-
These are threats to the users and operators of DNS privacy services that are not directly covered by [RFC 6973]. These may be more operational in nature, such as certificate-management or service-availability issues.
We describe three classes of actions that operators of DNS privacy services can take:
-
Threat mitigation for well-understood and documented privacy threats to the users of the service and, in some cases, the operators of the service.
-
Optimization of privacy services from an operational or management perspective.
-
Additional options that could further enhance the privacy and usability of the service.
This document does not specify policy, only best practice. However, for DNS privacy services to be considered compliant with these best-practice guidelines, they
SHOULD implement (where appropriate) all:
-
Threat mitigations to be minimally compliant.
-
Optimizations to be moderately compliant.
-
Additional options to be maximally compliant.
The rest of this document does not use normative language but instead refers only to the three differing classes of action that correspond to the three named levels of compliance stated above. However, compliance (to the indicated level) remains a normative requirement.
In this section, we consider both data on the wire and the service provided to the client.
-
-
-
Surveillance:
-
Passive surveillance of traffic on the wire.
-
DNS Privacy Threats:
-
Active injection of spurious data or traffic.
-
Mitigations:
-
A DNS privacy service can mitigate these threats by providing service over one or more of the following transports:
It is noted that a DNS privacy service can also be provided over DNS over DTLS [
RFC 8094]; however, this is an Experimental specification, and there are no known implementations at the time of writing.
It is also noted that DNS privacy service might be provided over DNSCrypt [
DNSCrypt], IPsec, or VPNs. However, there are no specific RFCs that cover the use of these transports for DNS, and any discussion of best practice for providing such a service is out of scope for this document.
Whilst encryption of DNS traffic can protect against active injection on the paths traversed by the encrypted connection, this does not diminish the need for DNSSEC; see
Section 5.1.4.
-
-
-
Surveillance:
-
Active attacks on client resolver configuration.
-
Mitigations:
-
DNS privacy services should ensure clients can authenticate the server. Note that this, in effect, commits the DNS privacy service to a public identity users will trust.
When using DoT, clients that select a "Strict Privacy" usage profile [RFC 8310] (to mitigate the threat of active attack on the client) require the ability to authenticate the DNS server. To enable this, DNS privacy services that offer DoT need to provide credentials that will be accepted by the client's trust model, in the form of either X.509 certificates [RFC 5280] or Subject Public Key Info (SPKI) pin sets [RFC 8310].
When offering DoH [RFC 8484], HTTPS requires authentication of the server as part of the protocol.
Anecdotal evidence to date highlights the management of certificates as one of the more challenging aspects for operators of traditional DNS resolvers that choose to additionally provide a DNS privacy service, as management of such credentials is new to those DNS operators.
It is noted that SPKI pin set management is described in [
RFC 7858] but that key-pinning mechanisms in general have fallen out of favor operationally for various reasons, such as the logistical overhead of rolling keys.
-
DNS Privacy Threats:
-
-
Invalid certificates, resulting in an unavailable service, which might force a user to fall back to cleartext.
-
Misidentification of a server by a client -- e.g., typos in DoH URL templates [RFC 8484] or authentication domain names [RFC 8310] that accidentally direct clients to attacker-controlled servers.
-
Mitigations:
-
It is recommended that operators:
-
Follow the guidance in Section 6.5 of RFC 7525 with regard to certificate revocation.
-
Automate the generation, publication, and renewal of certificates. For example, Automatic Certificate Management Environment (ACME) [RFC 8555] provides a mechanism to actively manage certificates through automation and has been implemented by a number of certificate authorities.
-
Monitor certificates to prevent accidental expiration of certificates.
-
Choose a short, memorable authentication domain name for the service.
-
DNS Privacy Threats:
-
-
Known attacks on TLS, such as those described in [RFC 7457].
-
Traffic analysis, for example: [Pitfalls-of-DNS-Encryption] (focused on DoT).
-
Potential for client tracking via transport identifiers.
-
Blocking of well-known ports (e.g., 853 for DoT).
-
Mitigations:
-
In the case of DoT, TLS profiles from Section 9 of RFC 8310 and the "Countermeasures to DNS Traffic Analysis" from Section 11.1 of RFC 8310 provide strong mitigations. This includes but is not limited to:
-
Adhering to [RFC 7525].
-
Implementing only (D)TLS 1.2 or later, as specified in [RFC 8310].
-
Implementing Extension Mechanisms for DNS (EDNS(0)) Padding [RFC 7830] using the guidelines in [RFC 8467] or a successor specification.
-
Servers should not degrade in any way the query service level provided to clients that do not use any form of session resumption mechanism, such as TLS session resumption [RFC 5077] with TLS 1.2 (Section 2.2 of RFC 8446) or Domain Name System (DNS) Cookies [RFC 7873].
-
A DoT privacy service on both port 853 and 443. If the operator deploys DoH on the same IP address, this requires the use of the "dot" Application-Layer Protocol Negotiation (ALPN) value [dot-ALPN].
-
Optimizations:
-
-
Concurrent processing of pipelined queries, returning responses as soon as available, potentially out of order, as specified in [RFC 7766]. This is often called "OOOR" -- out-of-order responses (providing processing performance similar to HTTP multiplexing).
-
Management of TLS connections to optimize performance for clients using [RFC 7766] and EDNS(0) Keepalive [RFC 7828]
-
Additional Options:
-
Management of TLS connections to optimize performance for clients using DNSStateful Operations [RFC 8490].
-
DNS Privacy Threats:
-
-
Known attacks on TLS, such as those described in [RFC 7457].
-
Traffic analysis, for example: [DNS-Privacy-not-so-private] (focused on DoH).
-
Potential for client tracking via transport identifiers.
-
Mitigations:
-
-
Clients must be able to forgo the use of HTTP cookies [RFC 6265] and still use the service.
-
Use of HTTP/2 padding and/or EDNS(0) padding, as described in Section 9 of RFC 8484.
-
Clients should not be required to include any headers beyond the absolute minimum to obtain service from a DoH server. (See [BUILD-W-HTTP].)
-
DNS Privacy Threats:
-
Users may be directed to bogus IP addresses that, depending on the application, protocol, and authentication method, might lead users to reveal personal information to attackers. One example is a website that doesn't use TLS or whose TLS authentication can somehow be subverted.
-
Mitigations:
-
All DNS privacy services must offer a DNS privacy service that performs Domain Name System Security Extensions (DNSSEC) validation. In addition, they must be able to provide the DNSSEC Resource Records (RRs) to the client so that it can perform its own validation.
The addition of encryption to DNS does not remove the need for DNSSEC [
RFC 4033]; they are independent and fully compatible protocols, each solving different problems. The use of one does not diminish the need nor the usefulness of the other.
While the use of an authenticated and encrypted transport protects origin authentication and data integrity between a client and a DNS privacy service, it provides no proof (for a nonvalidating client) that the data provided by the DNS privacy service was actually DNSSEC authenticated. As with cleartext DNS, the user is still solely trusting the Authentic Data (AD) bit (if present) set by the resolver.
It should also be noted that the use of an encrypted transport for DNS actually solves many of the practical issues encountered by DNS validating clients -- e.g., interference by middleboxes with cleartext DNS payloads is completely avoided. In this sense, a validating client that uses a DNS privacy service that supports DNSSEC has a far simpler task in terms of DNSSEC roadblock avoidance [
RFC 8027].
-
DNS Privacy Threats:
-
A failing DNS privacy service could force the user to switch providers, fall back to cleartext, or accept no DNS service for the duration of the outage.
-
Mitigations:
-
A DNS privacy service should strive to engineer encrypted services to the same availability level as any unencrypted services they provide. Particular care should to be taken to protect DNS privacy services against denial-of-service (DoS) attacks, as experience has shown that unavailability of DNS resolving because of attacks is a significant motivation for users to switch services. See, for example, Section IV-C of [Passive-Observations-of-a-Large-DNS].
Techniques such as those described in Section 10 of RFC 7766 can be of use to operators to defend against such attacks.
-
DNS Privacy Threats:
-
Unfairly disadvantaging users of the privacy service with respect to the services available. This could force the user to switch providers, fall back to cleartext, or accept no DNS service for the duration of the outage.
-
Mitigations:
-
A DNS privacy service should deliver the same level of service as offered on unencrypted channels in terms of options such as filtering (or lack thereof), DNSSEC validation, etc.
-
DNS Privacy Threats:
-
Increased use of encryption can impact a DNS privacy service operator's ability to monitor traffic and therefore manage their DNS servers [RFC 8404].
Many monitoring solutions for DNS traffic rely on the plaintext nature of this traffic and work by intercepting traffic on the wire, either using a separate view on the connection between clients and the resolver, or as a separate process on the resolver system that inspects network traffic. Such solutions will no longer function when traffic between clients and resolvers is encrypted. Many DNS privacy service operators still need to inspect DNS traffic -- e.g., to monitor for network security threats. Operators may therefore need to invest in an alternative means of monitoring that relies on either the resolver software directly, or exporting DNS traffic from the resolver using, for example, [
dnstap].
-
Optimization:
-
When implementing alternative means for traffic monitoring, operators of aDNSprivacy service should consider using privacy-conscious means to do so. SeeSection 5.2 for more details on datahandling and the discussion on the use of Bloom Filters in Appendix B.
-
DNS Privacy Threats:
-
-
Limited ability to manage or monitor incoming connections using DNS-specific techniques.
-
Misconfiguration (e.g., of the target-server address in the proxy configuration) could lead to data leakage if the proxy-to-target-server path is not encrypted.
-
Optimization:
-
Some operators may choose to implement DoT using a TLS proxy (e.g., [nginx], [haproxy], or [stunnel]) in front of a DNS nameserver because of proven robustness and capacity when handling large numbers of client connections, load-balancing capabilities, and good tooling. Currently, however, because such proxies typically have no specific handling of DNS as a protocol over TLS or DTLS, using them can restrict traffic management at the proxy layer and the DNS server. For example, all traffic received by a nameserver behind such a proxy will appear to originate from the proxy, and DNS techniques such as Access Control Lists (ACLs), Response Rate Limiting (RRL), or DNS64 [RFC 6147] will be hard or impossible to implement in the nameserver.
Operators may choose to use a DNS-aware proxy, such as [dnsdist], that offers custom options (similar to those proposed in [DNS-XPF]) to add source information to packets to address this shortcoming. It should be noted that such options potentially significantly increase the leaked information in the event of a misconfiguration.
-
-
-
Surveillance.
-
Stored-data compromise.
-
Correlation.
-
Identification.
-
Secondary use.
-
Disclosure.
-
Other Threats
-
-
Contravention of legal requirements not to process user data.
-
Mitigations:
-
The following are recommendations relating to common activities for DNS service operators; in all cases, data retention should be minimized or completely avoided if possible for DNS privacy services. If data is retained, it should be encrypted and either aggregated, pseudonymized, or anonymized whenever possible. In general, the principle of data minimization described in [RFC 6973] should be applied.
-
Transient data (e.g., data used for real-time monitoring and threat analysis, which might be held only in memory) should be retained for the shortest possible period deemed operationally feasible.
-
The retention period of DNS traffic logs should be only as long as is required to sustain operation of the service and meet regulatory requirements, to the extent that they exist.
-
DNS privacy services should not track users except for the particular purpose of detecting and remedying technically malicious (e.g., DoS) or anomalous use of the service.
-
Data access should be minimized to only those personnel who require access to perform operational duties. It should also be limited to anonymized or pseudonymized data where operationally feasible, with access to full logs (if any are held) only permitted when necessary.
-
Optimizations:
-
-
Consider use of full-disk encryption for logs and data-capture storage.
Data minimization refers to collecting, using, disclosing, and storing the minimal data necessary to perform a task, and this can be achieved by removing or obfuscating privacy-sensitive information in network traffic logs. This is typically personal data or data that can be used to link a record to an individual, but it may also include other confidential information -- for example, on the structure of an internal corporate network.
The problem of effectively ensuring that DNS traffic logs contain no or minimal privacy-sensitive information is not one that currently has a generally agreed solution or any standards to inform this discussion. This section presents an overview of current techniques to simply provide reference on the current status of this work.
Research into data minimization techniques (and particularly IP address pseudonymization/anonymization) was sparked in the late 1990s / early 2000s, partly driven by the desire to share significant corpuses of traffic captures for research purposes. Several techniques reflecting different requirements in this area and different performance/resource trade-offs emerged over the course of the decade. Developments over the last decade have been both a blessing and a curse; the large increase in size between an IPv4 and an IPv6 address, for example, renders some techniques impractical, but also makes available a much larger amount of input entropy, the better to resist brute-force re-identification attacks that have grown in practicality over the period.
Techniques employed may be broadly categorized as either anonymization or pseudonymization. The following discussion uses the definitions from
RFC 6973,
Section 3, with additional observations from [
van-Dijkhuizen-et-al].
-
Anonymization. To enable anonymity of an individual, there must exist a set of individuals that appear to have the same attribute(s) as the individual. To the attacker or the observer, these individuals must appear indistinguishable from each other.
-
Pseudonymization. The true identity is deterministically replaced with an alternate identity (a pseudonym). When the pseudonymization schema is known, the process can be reversed, so the original identity becomes known again.
In practice, there is a fine line between the two; for example, it is difficult to categorize a deterministic algorithm for data minimization of IP addresses that produces a group of pseudonyms for a single given address.
A major privacy risk in DNS is connecting DNS queries to an individual, and the major vector for this in DNS traffic is the client IP address.
There is active discussion in the space of effective pseudonymization of IP addresses in DNS traffic logs; however, there seems to be no single solution that is widely recognized as suitable for all or most use cases. There are also as yet no standards for this that are unencumbered by patents.
Appendix B provides a more detailed survey of various techniques employed or under development in 2020.
-
DNS Privacy Threats:
-
-
Fingerprinting of the client OS via various means, including: IP TTL/Hoplimit, TCP parameters (e.g., window size, Explicit Congestion Notification (ECN) support, selective acknowledgment (SACK)), OS-specific DNS query patterns (e.g., for network connectivity, captive portal detection, or OS-specific updates).
-
Fingerprinting of the client application or TLS library by, for example, HTTP headers (e.g., User-Agent, Accept, Accept-Encoding), TLS version/Cipher-suite combinations, or other connection parameters.
-
Correlation of queries on multiple TCP sessions originating from the same IP address.
-
Correlating of queries on multiple TLS sessions originating from the same client, including via session-resumption mechanisms.
-
Resolvers might receive client identifiers -- e.g., Media Access Control (MAC) addresses in EDNS(0) options. Some customer premises equipment (CPE) devices are known to add them [MAC-address-EDNS].
-
Mitigations:
-
-
Data minimization or discarding of such correlation data.
-
-
-
Surveillance:
-
Profiling of client queries by malicious third parties.
-
Mitigations:
-
See [ISC-Knowledge-database-on-cache-snooping] for anexample discussion ondefending against cache snooping. Options proposed include limiting access toa server and limiting nonrecursive queries.
In this section, we consider both data sent on the wire in upstream queries and data shared with third parties.
-
-
-
Surveillance:
-
Transmission of identifying data upstream.
-
Mitigations:
-
The server should:
-
implement QNAME minimization [RFC 7816].
-
honor a SOURCE PREFIX-LENGTH set to 0 in a query containing the EDNS(0) Client Subnet (ECS) option (RFC 7871, Section 7.1.2). This is as specified in [RFC 8310] for DoT but applicable to any DNS privacy service.
-
Optimizations:
-
As per Section 2 of RFC 7871, the server should either:
-
not use the ECS option in upstream queries at all, or
-
offer alternative services, one that sends ECS and one that does not.
If operators do offer a service that sends the ECS options upstream, they should use the shortest prefix that is operationally feasible and ideally use a policy of allowlisting upstream servers to which to send ECS in order to reduce data leakage. Operators should make clear in any policy statement what prefix length they actually send and the specific policy used.
Allowlisting has the benefit that not only does the operator know which upstream servers can use ECS, but also the operator can decide which upstream servers apply privacy policies that the operator is happy with. However, some operators consider allowlisting to incur significant operational overhead compared to dynamic detection of ECS support on authoritative servers.
Additional options:
-
"Aggressive Use of DNSSEC-Validated Cache" [RFC 8198] and "NXDOMAIN: There Really Is Nothing Underneath" [RFC 8020] to reduce the number of queries to authoritative servers to increase privacy.
-
Run a local copy of the root zone [RFC 8806] to avoid making queries to the root servers that might leak information.
Additional options:
Since queries from recursive resolvers to authoritative servers are performed using cleartext (at the time of writing), resolver services need to consider the extent to which they may be directly leaking information about their client community via these upstream queries and what they can do to mitigate this further. Note that, even when all the relevant techniques described above are employed, there may still be attacks possible -- e.g., [
Pitfalls-of-DNS-Encryption]. For example, a resolver with a very small community of users risks exposing data in this way and ought to obfuscate this traffic by mixing it with "generated" traffic to make client characterization harder. The resolver could also employ aggressive prefetch techniques as a further measure to counter traffic analysis.
At the time of writing, there are no standardized or widely recognized techniques to perform such obfuscation or bulk prefetches.
Another technique that particularly small operators may consider is forwarding local traffic to a larger resolver (with a privacy policy that aligns with their own practices) over an encrypted protocol, so that the upstream queries are obfuscated among those of the large resolver.
-
-
-
Surveillance.
-
Stored-data compromise.
-
Correlation.
-
Identification.
-
Secondary use.
-
Disclosure.
-
DNS Privacy Threats:
-
Contravention of legal requirements not to process user data.
-
Mitigations:
-
Operators should not share identifiable data with third parties.
If operators choose to share identifiable data with third parties in specific circumstances, they should publish the terms under which data is shared.
Operators should consider including specific guidelines for the collection of aggregated and/or anonymized data for research purposes, within or outside of their own organization. This can benefit not only the operator (through inclusion in novel research) but also the wider Internet community. See the policy published by SURFnet [SURFnet-policy] on data sharing for research as an example.