{'fraction_non_alphanumeric': 0.03206128528869343, 'fraction_numerical': 0.007660661086678962, 'mean_word_length': 5.174074885044887, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Domain Name System Security and Privacy: Old Problems and New Challenges

The domain name system (DNS) is an important protocol in today's Internet operation, and is the standard naming convention between domain names, names that are easy to read, understand, and remember by humans, to IP address of Internet resources. The wealth of research activities on DNS in general and security and privacy in particular suggest that all problems in this domain are solved. Reality however is that despite the large body of literature on various aspects of DNS, there are still many challenges that need to be addressed. In this paper, we review the various activities in the research community on DNS operation, security, and privacy, and outline various challenges and open research directions that need to be tackled.

The large body of literature on DNS operation, security, and privacy suggests that the area is mature, and problems are well understood. However, reality is contrary to this suggestion. Recently, adversaries have become very "creative" about the way they use DNS for launching attacks, moving from simple to sophisticated usage [28], [29]. The DNS ecosystem has evolved to include many players, such as open DNS resolvers, which include trusted, untrusted, and semitrusted ones, making it very difficult to reason about its resolution and operation. The rise of nation-state adversaries, with their unique capabilities compared to typical adversaries (ISP-level of an individual malicious actor) call for the further understanding of how they can affect the operation of the Internet in general, and DNS in particular [30].
Despite the large body of work on DNS, the rise of new attacks suggests that DNS operation, security, and privacy are still one of the significant areas to explore with various issues to address. Those issues are not necessarily new, like addressing pervasive adversaries, privacy, and new forms of attacks, but could be issues to do with problems already explored in the past: as the behavior of DNS users (benign and malicious) evolves over time, this calls for further exploration to incorporate such behavior in characterizing, identifying, and detecting misuse. As new entities and operational realities and functions get incorporated in the DNS system, their role and how they affect end-to-end guarantees, and services built on top of DNS, need to be understood.
Believing in the important role that it plays today and will play the future, we set out to present the current opportunities and challenges of DNS. We summarize all of the major thrusts of research on the topic and explore some of our ongoing research activities, highlighting some challenges, and call on the community to help address them. Organization. In II we introduce the research opportunities. In III we introduce various challenges and directions. In IV we introduce concluding remarks.

II. A REVIEW OF THE RESEARCH OPPORTUNITIES
We review various avenues of research uncovered in the rich literature on DNS. The main objective of this review is to highlight DNS security and privacy, with the secondary objective being the operation of DNS. We focus on research for understanding the DNS ecosystem (II-A), DNS security (II-B) and DNS privacy (II-C).

A. DNS Economics and System Analysis
The role that each entity plays, including clients and resolvers, and how these roles interact is the determinant factor for understanding the DNS ecosystem and its various pieces of complex infrastructure. In the following, we review two crucial areas that have been explored on that front which includes understanding the behavior of DNS and DNS blocking. Understanding DNS Behavior. Callahan et al. [8] passively monitored DNS and related traffic within a local network to understand server behavior. Shcomp et al. [6] presented a characterization of DNS clients for developing an analytical model of client interactions with the larger DNS ecosystem. Banse et al. [31] studied the feasibility of behavior-based tracking in a real-world setting. Schomp et al. [32] presented methodologies for efficiently discovering the complex clientside DNS infrastructure. They further developed measurement techniques for isolating the behavior of the distinct actors in the infrastructure. Shulman and Waidner [33] explored name servers that use server-side caching, characterized the operators of the server-side caching resolvers and their motivations. Hao et al. [34] explored the behavioral properties of domains using the DNS infrastructure associated with the domain and the DNS lookup patterns from networks who are looking up the domains initially. Behavior-based tracking is a threat, allowing attackers to track users passively. Multiple sessions of a user are linked exploiting characteristic patterns gathered from network traffic. For user's privacy, daily changing IP addresses offer limited protection against behavior-based tracking. Thus, lightweight methods that help to prevent profiling and tracking users without their consent are needed. DNS Blocking. Thomas et al. [35] examined the NXD (Non-eXistent Domain) request patterns observed at the root and recursive name servers to gauge the effectiveness of collision blocking techniques. Scaife et al. [36] presented an anonymous domain registrar. Appelbaum and Muffett [37] proposed blocking special queries (i.e.,.onion) to improve Tor's privacy. DNS blocking has a limitation. In order to ensure DNS privacy, blocking should be implemented at once. However, it is almost impossible for all browsers and recursive resolvers to perform blocking simultaneously. Understanding how blocking may affect users who are not performing blocking but are sharing the same DNS infrastructure is required.

B. DNS Security
DNS security is one of the well-explored areas in the literature, where work has been focused on analyzing and detecting DNS vulnerabilities and malicious domains. We review some of the outstanding work on each of these topics. DNS Vulnerability. Schomp et al. [38] measured vulnerability to DNS record injection attacks and found that record injection vulnerabilities are fairly common even years after some of them were first uncovered. Dagon et al. [39] documented how attackers are using "rogue" DNS servers to create malicious DNS resolution paths, showing dozens of viruses that corrupt resolution paths and noting hundreds of URLs discovered per week that performed drive-by alterations of host DNS settings. Xu et al. [40] quantitatively analyzed several techniques for hiding malicious DNS activities. Jackson et al. [41] evaluated the cost-effectiveness of mounting DNS rebinding attacks. Schomp et al. [42] addressed vulnerabilities in shared DNS resolvers by removing them entirely and leaving recursive resolution to clients, showing that the cost of this approach is modest and arguing that it strengthens the DNS by reducing the attack surface. Dagon et al. [43] proposed a technique to make DNS queries more resistant to poisoning attacks. Chen et al. [44] proposed a lightweight DNS record's TTL optimization for consistency. Despite such work, extending the literature for user-intention-based anomaly detection method to identify anomalous DNS traffic is an open challenge. Detecting Malicious Domain Names. Various works have been proposed for detecting malicious domain names using DNS behavioral profiling [15], [45], [46], [47], [34], [48], [49], [50], [39]. For example, Antonakakis et al. [15] proposed a novel detection system called Kopis for detecting malware-related domain names by passively monitoring DNS traffic at the upper levels of the DNS hierarchy. Johnes et al. [47] presented techniques for detecting unauthorized DNS root servers on the Internet using primarily endpointbased measurements. Yadav et al. [51] developed a method to detect domain fluxes in DNS traffic by looking for patterns inherent to domain names that are generated algorithmically. Antonakakis et al. [17] suggested a dynamic reputation system for DNS called Notos, which uses passive DNS query data and analyzes the network and zone features of domains to indicate if a new domain is malicious or legitimate. Gao et al. [7] presented an innovative approach to detect previously unknown malicious domains by simply using temporal correlation in DNS queries. Szurdi et al. [52] performed a comprehensive study of "typosquatting" (i.e., the deliberate registration of domains containing typos) within the .com TLD, showing typo domains identified by lexical analysis are truly typographical variants of their target domain names. Despite such measures, the integrity and availability of Internet communication rely on replies from the DNS root name servers. Thus, it is important to detect DNS root manipulation when it does occur, even though it is rare. Modeling adversaries. There have been some works modeling DNSSEC (Domain Name System Security Extensions) adversaries, such as Bau and Mitchell [53] who formally modeled the cryptographic operations in DNSSEC and discovered a forgery vulnerability. Herzberg et al. [11] presented a comprehensive overview of challenges and pitfalls of DNSSEC, including vulnerable configurations, interoperability of incremental deployment, and challenges due to super-sized DNS responses. Although DNSSEC deployment is still very limited, it has already been abused in several of the largest DoS attacks. These attacks often deter domains from deploying DNSSEC. Goldberg et al. [9] demonstrated that since current DNSSEC deployments with support for NSEC and/or NSEC3 are vulnerable to zone enumeration attacks, they proposed a new cryptographic construction called NSEC5-which proved to be a secure DNSSEC denial-of-existence mechanism. DNSSEC does not protect against denial of service attacks. DNSSEC makes DNS vulnerable to a new type of denial of service attacks based on cryptographic operations against securityaware resolvers and name servers, as an attacker can attempt to use DNSSEC mechanisms to consume victim's resources.

C. DNS Privacy
DNS privacy is quickly becoming one of the most emergent issues in the DNS research community. Despite the large body of the literature on this problem, including but not limited to: (i) quantification of DNS privacy leakage (ii) designs to improve privacy (iii) DNS encryption as a vehicle to improve privacy, and (iv) various standard body activities, many in the academic research community are still doubtful about the privacy risks in DNS [54]. Notwithstanding such doubts, we review prior work on DNS privacy and open directions. Quantifying DNS Leakage. Konings et al. [55] collected a one-week dataset of multicast domain name system (mDNS) announcements at a university and showed that queries and device names leak plenty of information about users. Krishnan et al. [18] demonstrated privacy leakage by prefetching and showed that it is possible to infer the likelihood of search terms issued by clients by analyzing the context obtained from the prefetching queries. Zhao et al. [27] analyzed the complete DNS query process and discussed privacy disclosure problems in each step: client-side, query transmission process, and DNS server-side. They proposed a privacy-preserving query scheme called "Range Query", which decreases privacy disclosure in the whole DNS query process. Paxson et al. [14] developed a measurement procedure to limit the amount of information a domain can receive surreptitiously through DNS queries to an upper bound specified by a security policy, with the exact setting representing a tradeoff between the scope of potential leakage versus the quantity of possible detections. Castillo-Perez and Garcia-Alfaro [26] evaluated DNS privacypreserving approaches, and pointed out the necessity of additional measures to enhance their security. When mobile devices are operated in public wireless networks, current implementations pose several privacy risks. The default naming practices of devices names need to be revised and users need to be able to limit service discovery to a selected set of networks. Designs for Improving Privacy. Due to the ubiquity of privacy risks, efforts are constantly being made in both academia and industry for preserving privacy in DNS communications. Zhao et al. [27] propose to ensure the DNS privacy by concealing the actual queries using noisy traffic. Noisy traffic increases of latency and bandwidth during the execution and resolution of queries. Castillo-Perez et al. [26] evaluated this approach and demonstrated that the privacy ensured by added queries is somewhat difficult to analyze and that the technique introduces additional latency and overhead, making it less practical. An extended algorithm to ensure privacy, while improving performance, is also introduced by Castillo-Perez et al. [26] which uses both noisy traffic and private information retrieval (PIR) techniques. They pointed out to serious security flaws on both proposals if active attackers can target those mechanisms. These flaws on an improved method of the two proposals still require additional improvements to be effective.
Techniques which employ certain flavors of encryption have also been studied. For example, Herrmann et al. [56] proposed a lightweight privacy-preserving implementation called EncDNS which essentially replaces third-party resolvers and provides client software that forwards queries to it through conventional DNS forwarders. Since EncDNS provides an end-to-end encryption, forwarders will not know the contents of the queries. Lu and Tsudik [57] proposed a Privacy-Preserving DNS (PPDNS) built on top of a distributed hash tables (DHTs) and computational PIR to obtain a reasonably high level of privacy for name resolution queries. DNS Encryption. As mentioned previously, Herrmann et al. [56] presented a novel lightweight privacy-preserving name resolution service called EncDNS to serve as a replacement for conventional third-party resolvers. The EncDNS protocol, which is based on DNSCurve, encapsulates encrypted messages in standards-compliant DNS messages. Zhu et al. [21] proposed T-DNS to address privacy leakage problems using transport-layer security (TLS) to enable a user's privacy against their DNS resolvers and optionally the authoritative servers. Shulman [24] extensively explored dependencies in DNS and showed that an attacker can learn the requested domain in an encrypted DNS packet when information leakage via transitive trust is applied in tandem with other sidechannels. Ateniese et al. [12] introduced a new strategy to build chains of trust from root servers to authoritative servers. End-to-end encryption has high overhead that needs to be mitigated. Besides, DNSSEC is not widely deployed yet even though DNS names are used for authentication. Thus, protections need to utilize encryption together with other methods such as DNSSEC, query name minimization, etc. Modeling DNS Adversaries. While much of the previous work has focused on various aspects of DNS security and privacy, including (data-driven) modeling and informal description [23] and informal adversaries modeling on confidentiality [30], there is no study that formalizes adversaries against confidentiality, let alone concretely evaluating them. Standards. The Internet Engineering Task Force (IETF) has recently established a working group dedicated solely to addressing DNS privacy concerns (DNS PRIVate Exchange, DPRIVE). This working group has proposed various techniques that are currently being under consideration [23]. Zhu et al. [58] (based on [21]) proposed a connection-oriented DNS transport over TCP, which uses TLS for privacy. The authors argue that the overhead of their approach is modest with careful implementations. Reddy et al. [59] proposed to use the Datagram Transport Layer Security (DTLS) for DNS exchange. They add a protection layer for the sensitive information in DNS queries, which would withstand a passive listener and certain active attackers. To address side-channel attacks on encrypted DNS, Mayrhofer [60] proposed a padding scheme, where servers pad requests and responses by a variable number of octets. DNS over TLS does not consider known attacks on TLS, such as man-in-the-middle and protocol downgrade. The use of simple padding schemes alone is not sufficient to mitigate traffic analysis attacks. However, padding will organize a part of more complex mitigations for traffic analysis attacks that are probably to be developed over time.
I summarizes the work in the literature as categorized above, with example work, contributions, and open directions.

III. CHALLENGES AND DIRECTIONS
Now we highlight various directions that pose challenges in research on DNS: we call for more research based on data, and data-driven analysis (III-A), privacy as a plug-in (III-B), modeling adversaries (III-C), attack surface analyses (III-D), and addressing the open resolvers phenomena (III-E).

A. More Data-driven Analysis for Security
There has been an abundance of work on DNS data analysis for security, such as DNS behavior tracking, encryption, blocking, query name minimization, DNSSEC, DNS over TLS, the DTLS for DNS exchange, etc. However, the DNS query traffic has been increasing and the behavior of DNS usage and the DNS ecosystem have been changing over time. DNS queries can represent plenty of information. For example, an attacker can build highly accurate profiles of what users do on the  [8], [6], [31], [32], [33], [34] • DNS behavior tracking in a real-world setting • development an analytical model for client interactions • exploring the behavioral properties of domains using the DNS infrastructure associated with the domain and the DNS lookup patterns Behavior under DNS changes, open resolvers DNS blocking [35], [36], [37] • NXD request patterns analysis, blocking special queries How blocking affects privacy DNS security Vulnerability analysis [38], [39], [40], [41], [42], [43], [44] •  [15], [45], [46], [47], [34], [48], [49], [50], [39], [51], [17], [7], [52] • detecting malware-related domain names by passively monitoring DNS traffic • detecting unauthorized DNS root servers using endpoint-based measurements • detecting domain fluxes in DNS traffic by looking for patterns inherent to domain names • dynamic reputation system using passive DNS query data and zone features of domains • detecting unknown malicious domain using temporal correlation in DNS queries Addressing evasion and stealthiness Modeling adversaries [53], [11], [9] • modeling the cryptographic operations in DNSSEC • discovering a forgery vulnerability Mathematical modeling with standard adversaries DNS Privacy Quantifying leakage [55], [18], [27], [14], [26] • quantifying queries and device names leak plenty of information about users • analyzing the context obtained from the prefetching queries, privacy-preserving query scheme (Range Query) • exact setting representing a tradeoff between the scope of potential leakage versus the number of possible detections Gap analysis of policy vs. reality Privacy-preserving designs [27], [26], [56], [57] • concealing the actual queries using noisy traffic • PIR techniques • PPDNS built on top of DHTs and computational PIR Rigorous analysis and evaluation DNS encryption [56], [21], [24], [12] • lightweight privacy-preserving name resolution service (EncDNS) • end-to-end encryption • T-DNS using TLS • chains of trust from root servers to authoritative servers How encryption meets privacy (and how not) Modeling adversaries [23], [30] • data-driven modeling and informal description • modeling of adversaries against confidentiality Modeling pervasive capabilities (no prior work) Standards [23], [58], [21], [59], [60] • connection-oriented DNS transport over TCP • DTLS for DNS exchange • protection layer for the sensitive information in DNS queries • padding scheme Rigorous analysis of security, privacy, and trust Internet by eavesdropping on query streams and ultimately breaching a user's privacy. Even more, some companies target individual users and build profiles for them based on their browsing seen in DNS traffic. They assemble such profiles as part of their own commercial activities. Although efforts to prevent this leakage have been ongoing, many problems are still open. An understanding of the problem coupled with previous developments in DNS is necessary. In addition, many functions must be modified for the new DNS ecosystem and further research using DNS data must be done for security.

B. Privacy as a Plug-in
With the increase in Internet usage, malicious invasion of privacy using the DNS operation is on the rise. Techniques such as query name minimization, DNSSEC, and DNS over TLS, etc. to solve these problems exist, but a solution that satisfies the requirements of privacy as a plug-in is lacking: such solution should not require major modifications nor interfere with the existing standards of DNS. For example, DNSSEC allows users to verify DNS responses are correct, but does not protect privacy. Encryption provided by TLS eliminates opportunities for eavesdropping, but it is unclear what notions of privacy it provides. DNSSEC and DNS over TLS are independent and compatible protocols, although each solving different problems. Thus, it is necessary to understand the notions of privacy under various security models, and realizing privacy as a plug-in to the DNS existing infrastructure by not requiring major modifications.

C. Modeling Adversaries
Although previous studies have concentrated on DNS security and privacy, including data-driven modeling and the infrastructure and investments made by the DNS providers, little work is done on formalizing and understanding the notion of pervasive adversaries. These pervasive adversaries have been widely considered as a potential threat to the privacy and security of communication on the Internet.
Modeling such adversaries would be the first challenge to improve DNS privacy. We should be able to view adversaries as either a passive adversary or an active adversary. A passive adversary does not interfere with the resolution and is interested in associating queries with a user or a set of users. He can eavesdrop on the links between the stub resolvers and recursive resolvers, and the links between the recursive resolvers and authoritative resolvers. An active adversary can control over a recursive resolver. For example, it is a result of the compromise of the software of that recursive resolver or due to being the adversary's recursive resolver such as an open rogue resolver. Formalizing the advantage of the adversaries would be the second challenge since the goal of the adversaries is to breach the privacy of users. It is meaningful to quantify their advantage in breaching the DNS privacy for addressing the privacy issue. An extending formalization of the capabilities of the adversaries using real-world DNS resolution topology and DNS query data would be another challenge. Some stub resolvers may generate more queries than others. Thus, if such information is known by an adversary, the adversary may use such distribution to associate a query with a user more often than with another.
The last challenge is understanding the advantages of such adversaries in light of various ongoing activities in the DNS research community, which include: encryption, query name minimization and blocking for DNS privacy. For example, blocking mechanisms at either the browser, recursive, or authoritative server can improve DNS privacy-but it must be implemented at once in order to ensure privacy. In reality, it is almost impossible that all browsers and recursive resolvers on the Internet perform blocking at the same time. The diversity of browsers and recursive software (even by the same vendor) on the Internet today make it difficult to implement timely and synchronized blocking. Thus, it is reasonable to assume only a partial deployment of such recommendations. It should also be noted that while a user can maintain their privacy through DNS blocking, non-blocking users who share the same DNS infrastructure may be inadvertently affected.

D. Attack Surface Analyses
The attack surface of the DNS resolution system is the entire public Internet between the end user's connection and the public DNS service. The attack surface analysis is concerned with enumerating potential and confirmed vulnerabilities, the attacks those vulnerabilities can be used to launch, and the implications of those attacks.
In the DNS resolution system, there are several potential attacks for disrupting the resolution operation. There has been a long history of attacks on the DNS ranging from Denial of Service (DoS) attacks to targeted attacks requiring specialized software. For example, an attacker can attack DNS resolvers by exploiting vulnerabilities such as buffer overflow attacks which make them misbehave or crash. Moreover, an attacker can actually modify DNS resolver configuration files and replace the name server IP addresses with malicious IP addresses to cause DoS attacks. These high-profile attacks have affected various commercial companies, software vendors, websites, content distribution services, and ISPs.
DNS amplification attacks utilize DNS servers for performing bandwidth-consumption DoS attacks. An attacker can "spoof" look-up requests to DNS servers to hide the source of the exploit and direct the response to the target. Essentially, the attacker turns a small DNS query into a much larger payload directed at the target network.
With cache poisoning, an attacker can attempt to insert a fake address record for an Internet domain into the DNS. If the server accepts the fake record, the cache is "poisoned" and subsequent requests for the address of the domain are answered with the address of a server controlled by the attacker. For as long as the fake entry is cached by the server, all subscriber's browsers or e-mail servers will automatically go to the address provided by the compromised DNS server. DNS cache poisoning attacks do not require substantial bandwidth or processing, nor do they require sophisticated techniques.
Quantifying the attack surface of DNS is important in understanding and managing the DNS resolution system, thereby improving DNS privacy. It identifies critical pieces of the DNS system that need to be modified to withstand against security threats. As aforementioned, evaluating the advantages of various adversaries under blocking (at either the browser or recursive resolver) and examining the difference between the probabilities against the entities observed and controlled by adversaries at the blocking point would be the challenge.

E. Addressing Open Resolvers
While open resolvers provide various benefits, such as answering DNS requests from external sources for anything, they currently pose a significant threat to the stability and security of the Internet. Just recently, open resolvers have been utilized for launching amplification attacks, calling for initiating a systematic study on their population, use, and distribution, and raising the awareness on their potential roles. One open problem today is to understand those resolvers by perhaps analyzing their role, and understanding how they contribute to the good and bad use of the DNS as a service. Other open questions concerning open resolvers could potentially be answered through a characterization of those resolvers, such as geographical distribution, and persistence characterization over a longer period of time between consecutive scans, along with implications of the findings in the main questions mentioned earlier. Ultimately, findings systematically obtained through answering those questions could help a reputation system of the open resolvers ecosystem to guide benign users in their use of those resolvers.

IV. CONCLUDING REMARKS
In this paper, we review various works on DNS ecosystem, security issues, and privacy concerns. We point out the open research problems related to DNS data-driven analysis, privacy as a plug-in, modeling adversaries, and attack surface analyses.