Chapter 7
IN THIS CHAPTER
Understanding how DNSSEC can protect your DNS services
Examining DANE and how it complements DNSSEC
Domain Name System (DNS) is a requirement of Active Directory and is what makes networks easier to work with. With DNS, you don’t have to remember IP addresses — you can just remember simple names instead. Imagine, though, that a bad guy was able to make your systems believe that his DNS server was your DNS server. You and your users could be redirected to a malicious site.
In this chapter, you learn how to secure your DNS infrastructure using DNS Security Extensions (DNSSEC) and DNS-based Authentication of Named Entities (DANE).
DNSSEC was designed to prevent attackers from hijacking the DNS lookup process and protect users from being given addresses to malicious servers. DNSSEC signs zones and records, which allows the endpoint that made the query to validate that a DNS record is a valid record, or if it’s redirecting to an invalid and potentially malicious location instead (DNS cache poisoning).
By digitally signing the root zone in your DNS infrastructure, you can give your users assurances that their systems are getting responses from valid DNS servers. Digital signatures create a hash — think of it as a unique thumbprint. If anything about a record has changed, the hash won’t match and the record will be invalid. It’s important to remember that DNSSEC does not encrypt data at all; it’s only validating the identity of the DNS server doing the DNS lookup.
With DNSSEC, you have two keys to be aware of:
To secure a zone with DNSSEC, one of the first things that occurs is the grouping of like record types into a resource record set (RRset). The RRset is then digitally signed, which provides protection for all the individual records within the resource record set.
The private key of the ZSK is used to digitally sign each RRset, and the public key of the ZSK is used to verify the signature. The digital signature of each RRset is saved as an RRSet Signature (RRSIG) record.
DNSSEC introduced several new record types to work with and contains the new cryptographic features that DNSSEC added. Here are the record types that you need to remember:
totallybogus.sometestorg.com
. There is no record for totallybogus, so the DNS server may just return the record for www.Now you have an understanding of how DNSSEC works at a high level. Let’s actually configure it on our Windows server.
When you’ve decided that you want to use DNSSEC, the first thing that you have to do is actually go in and sign the DNS zone. You need a system that has the DNS Manager administrative tool installed. Follow these steps:
Right-click the domain and choose DNSSEC ⇒ Sign the Zone, as shown in Figure 7-1.
The DNS Security Extensions (DNSSEC) Wizard appears.
On the final screen, click Next.
The zone will be signed.
If you want to verify that DNSSEC is enabled, you may need to refresh, but you’ll see all the special record types I mention earlier. My example is shown in Figure 7-4.
You may be thinking you’re all done, but you aren’t. Now that your DNS zone is DNSSEC enabled, you have to tell your systems to use DNSSEC. This is best accomplished through Group Policy. You need to be on a system that has the Group Policy Management tools installed. Follow these steps:
That’s all there is to it. With your Name Resolution Policy in place, domain-joined systems will use DNSSEC.
DANE is built on DNSSEC. Although DNSSEC tries to protect against DNS cache poisoning and spoofing, DANE adds an additional layer of protection by allowing the administrator of a domain name to specify which certificate authority is allowed to issue certificates for their organization’s domain, as well as provide a way to authenticate client and server certificates with a certificate authority. This prevents an attacker from issuing a certificate from a certificate authority and trying to pass it off as your own. It requires DNSSEC to work its magic.
DNS-based Authentication of Named Entities (DANE) uses a newer record type known as a Transport Layer Security Authentication (TLSA) record. The TLSA record is used to associate a domain name with a TLS certificate. Not all DNS hosting providers support DANE, but if your DNS servers are running Windows Server 2016 or newer, you can use DANE because Windows Server 2016 supports unknown record types.
DANE will allow you to bind a certificate to a specific DNS name using DNSSEC.
Configuring DANE consists of two parts: First, you must generate the TLSA record, and then you can install the TLSA record with PowerShell.
To generate the TLSA record, you need a copy of the certificate that you’re wanting to protect. Follow these steps:
Open a browser and go to the site that you want to protect.
I’m using my own https://www.sometestorg.com
site for this demonstration.
Click the padlock icon in the URL bar and click View Certificates.
This may vary depending on browser. I’m using Internet Explorer 11.
On the File to Export screen, select Browse and choose a name and location for the file and click OK.
I’m saving it to my Desktop for now.
https://www.huque.com/bin/gen_tlsa
-----BEGIN CERTIFICATE-----
and ending with the:
-----END CERTIFICATE-----
For port number, put in whatever applies.
In my case, 443 for HTTPS traffic.
Enter the transport protocol and the domain name.
In my example, the transport protocol is tcp and the domain name is sometestorg.com.
Your screen should look similar to Figure 7-6.
Click Generate.
You receive an output similar to Figure 7-7. When you have this in hand, you can install the TLSA record on the server.
To install the TLSA record, follow these steps:
Add-DnsServerResourceRecord -TLSA -CertificateAssociationData "9933c1848f2f492f4715abff9e79f74025fdd219a2f77a34d3cc9a00f36c8a0b" -CertificateUsage DomainIssuedCertificate -MatchingType Sha256Hash -Selector FullCertificate -ZoneName sometestorg.com -name _443._tcp.www.sometestorg.com
The TLSA record is now installed. The -CertificateAssociationData
parameter uses the long numerical string at the end of the generated record. You can verify that the record was successfully created by following these steps:
Expand you server name, expand the domain name, and in my case I expand com, then sometestorg, then www, then _tcp.
You see a record that says Unknown under Data.
Double-click that Unknown record.
If you see a Type of 52, it was recognized as a valid TLSA record. An example is shown in Figure 7-8.