DNS is the phonebook of the internet helping users map human-readable names like example.com to IP addresses. Similar to phonebooks, all information involved in a DNS query is in plain text.
This makes it easy for anyone connected to the network, and with the right equipment, to see the DNS traffic and manipulate it or use the information for malicious purposes.
The solution to this vulnerability is what DNS encryption is all about. DNS encryption helps convert the plain text DNS information into an encrypted format that can only be decoded by the parties involved in the communication, i.e the DNS client (your browsers, network devices, etc) and the DNS resolver.
With DNS encryption in place, even if an attacker can get hold of the DNS information, they will be unable to make sense of it thus protecting you from any malicious intent.
In TLS, the client requests the server to set up a secure connection by performing an authenticated handshake with the server. Once the handshake is made and a secure channel is established, the client and server can then communicate by sending encrypted messages back and forth.
This way, the DNS client is sure that it is communicating with the right resolver (DNS server) and not some man-in-the-middle trying to snoop on the network traffic.
Let’s take a look at the two encryption strategies in more detail.
DNS-over-TLS (DoT), released in 2016, is the first DNS encryption solution to be established.
DoT channels the original client requests through a secure TLS channel on port 853 instead of the common port 53 used for unencrypted DNS communication. This prevents attackers from seeing or manipulating information about the DNS request.
Once an authenticated handshake is made and a secure channel is established with the DNS resolver, the DNS client and resolver can start exchanging messages over a secure channel. The secure connection created is mostly persisted for other DNS requests that the client will need to make during that session.
The newer alternative to encrypting DNS traffic is DNS-over-HTTPS (DoH). DoH was introduced in 2018 and even though it uses TLS to encrypt messages between the client and the DNS resolver, it uses a different strategy.
Instead of opening a new port for secure communication, it uses the same port 443 used for HTTPS requests to send a DNS query to a DNS server that supports DoH. The DNS query is sent encrypted just like a regular HTTPS request and the response is also encrypted. The client decodes the response which contains the DNS information required to reach the site.
This strategy also prevents the avoidance of DNS encryption by devices that block ports used for secure DNS communication.
Before making any strong decisions on which DNS encryption method to go with, pump the brakes for a minute as we take a look at the major differences between these two solutions:
From the table above, it is clear that DoT has a slight edge ahead of DoH mainly due to its widespread encryption coverage when implemented on operating systems and smaller footprint. Privacy is the only real benefit to DoH and it has a major downside in its requirement to be configured on every single client that wants to make use of it. For more information on comparisons between these two solutions, you can check out this article.
The encryption strategy you decide to go with will eventually be based on what you want to encrypt and where. The adoption of DoH is fast rising with Google being a huge contributor to that. So, it won’t be surprising to see the adoption of DoH across operating systems rise in the coming years.
No matter the solution you choose to go with, one thing is certain and that is you need to protect your DNS traffic from malicious eavesdropping. Start encrypting your DNS traffic with a free DNSFilter account today.
An Interview with Remote Work Expert Kaleem Clarkson
Companies and their employees are seeing the benefits of moving workforces to a virtual (or work from home) distribution. We sat down with remote work expert, Kaleem Clarkson, for a deeper dive.
Domain Intelligence from Full-Scope Cyber Threat Intelligence: An Introspective
Alex Applegate, Threat Intelligence Researcher at DNSFilter, shares what went into his decision to shift his cybersecurity focus to domain intelligence research.
RSAC 2022: The Rise of DNS-Based Attacks
With RSAC 2022 behind us, we’re reflecting on one of the most important themes at the conference: Rising DNS-based attacks.