Learning Library

← Back to Library

Why DNSSEC Matters and How It Works

Key Points

  • DNSSEC protects users from DNS‑based attacks that hijack traffic by injecting malicious DNS responses, which can steal credentials or cause financial loss.
  • It provides three core security guarantees: origin authentication, data integrity checking, and authenticated denial of existence.
  • With DNSSEC enabled, each step in the lookup chain (root, TLD, and domain name server) is cryptographically validated, ensuring the resolver communicates with legitimate servers and receives authentic answers.
  • Authenticated denial of existence allows resolvers to securely confirm that a queried domain name truly does not exist, preventing spoofed “non‑existent” responses.

Full Transcript

# Why DNSSEC Matters and How It Works **Source:** [https://www.youtube.com/watch?v=Fk2oejzgSVQ](https://www.youtube.com/watch?v=Fk2oejzgSVQ) **Duration:** 00:11:16 ## Summary - DNSSEC protects users from DNS‑based attacks that hijack traffic by injecting malicious DNS responses, which can steal credentials or cause financial loss. - It provides three core security guarantees: origin authentication, data integrity checking, and authenticated denial of existence. - With DNSSEC enabled, each step in the lookup chain (root, TLD, and domain name server) is cryptographically validated, ensuring the resolver communicates with legitimate servers and receives authentic answers. - Authenticated denial of existence allows resolvers to securely confirm that a queried domain name truly does not exist, preventing spoofed “non‑existent” responses. ## Sections - [00:00:00](https://www.youtube.com/watch?v=Fk2oejzgSVQ&t=0s) **Why DNSSEC Matters for Security** - The speaker explains how DNSSEC authenticates DNS responses to prevent attackers from hijacking domain lookups and redirecting users to malicious sites, highlighting its importance and basic steps to implement it. - [00:03:10](https://www.youtube.com/watch?v=Fk2oejzgSVQ&t=190s) **DNSSEC Query Validation Process** - The speaker outlines how DNSSEC authenticates each DNS lookup—from root to TLD to domain servers—and uses public‑key cryptography to provide authenticated denial of existence for non‑existent names. - [00:06:22](https://www.youtube.com/watch?v=Fk2oejzgSVQ&t=382s) **DNSSEC Chain of Trust Explained** - The passage outlines how DNSSEC uses RRSIG records signed with a zone signing key, a key‑signing key (KSK) validated by DS records at each delegation level—from root to TLD to domain—to ensure origin authentication and integrity of DNS responses. - [00:09:28](https://www.youtube.com/watch?v=Fk2oejzgSVQ&t=568s) **Deploying DNSSEC: Key Setup and DS Record** - The speaker outlines the process of configuring DNSSEC—including manual or managed key deployment, thorough testing with validation tools, and finally publishing the DS record at the registrar to activate domain protection. ## Full Transcript
0:00Today we're going to be talking about DNSSEC, 0:04or DNS security. 0:07You may have heard of this before,  but you're wondering why do I care? 0:10And what can I do with it? 0:12Once you understand that, you'll probably  want to know how you get started. 0:14And we'll be covering all  three of those things today. 0:17So let's first talk about why you need DNSSEC. 0:21Imagine that one of your users 0:23is trying to get to your  website, let's say ibm.com. 0:28They type in ibm.com in their browser. 0:32And it goes to their resolver, their DNS resolver. 0:35Their DNS resolver talks to the the root zone. 0:40It talks to the TLD zone for .com. 0:44TLD for .com. 0:47And then it talks to the IBM.com name server 0:54and it gets back in answer. 0:55But what can happen, what an attacker can do 0:59is they can reroute traffic on the internet. 1:01It's not easy to do, but it  has been done in the wild, 1:04and they can direct the resolver, 1:06instead of going to ibm.com,  to go to the bad DNS server. 1:14The bad DNS server can then return - 1:17so it doesn't go here, instead  it goes to the bad DNS server - 1:20can then return a bad IP address 1:28back to your user, and then  they're sent to the bad website. 1:34At the bad website their  credentials can be harvested 1:38for malicious ends because  their password is taken. 1:40Maybe you're a financial institution and  someone can empty their bank accounts. 1:44Everything, bad things happen  if you allow an attacker 1:50to insert a bad DNS server in  the midst of the transaction, 1:54which sends the user to a malicious website. 1:59DNSSEC was created to prevent  this type of thing from happening. 2:03DNSSEC does three things. 2:06First, it does origin authentication. 2:11Second, it implements data integrity checking. 2:17And third, it implements  authenticated denial of existence. 2:21And we'll talk about what each of these things are 2:24in a little more depth as we go through this. 2:27So that's why you should care about DNSSEC 2:30and what DNSSEC can do for you. 2:35Now let's get into some  details about how DNSSEC works. 2:39So imagine you're a user again. 2:43Up here. 2:43He he's also looking for ibm.com. 2:49And he also talks to his resolver. 2:54Goes out to the root zone, 2:56to the TLD authoritative server, 2:59and to the ibm.com server. 3:03But now we have DNSSEC enabled,  so when he goes to there 3:08it is validated. 3:10And so we validated that we're  talking to the root server. 3:12So we've got the origin authentication. 3:15And we validate that the answer we got back 3:17is the correct answer. 3:19Then he talks to the TLD server. 3:21And, same thing, validates he's  talking to the correct server. 3:24So stopping the bad DNS server from  being injected into the conversation 3:30and he validates he gets the right answer back. 3:33And finally we talked to the ibm.com server 3:36and validate that we get the correct answer back. 3:40That's a high level  explanation of how DNSSEC works 3:45and why you should care about it. 3:47The one thing I haven't talked about yet  is authenticated denial of existence. 3:51So let me just mention that real quickly here. 3:54The idea of authenticated denial of existence 3:56is if I ask for a name that doesn't  exist, let's say foo.ibm.com, 4:02and then I talk to the ibm.com name server. 4:05It's going to return to me an answer. 4:09It's going to say foo doesn't exist. 4:12I don't know what foo is. 4:14How do I know that foo really doesn't exist? 4:16And that's what authenticated  denial of existence does. 4:19It's a method so that the  resolver can validate that when 4:24the ibm.com server says foo doesn't exist, 4:26it really knows that foo doesn't exist, 4:29and it's able to put a check mark on that as well. 4:33So now let's dive a little bit  deeper into how DNSSEC really works. 4:39There's one technology that  undergrids all of DNSSEC, 4:45and that's public key cryptography system, PKCS. 4:51That's the idea that you can  have a public private key pair 4:56such that when you encrypt  something with the private key, 4:58which you keep private, 5:01and publish the public key out on the  internet, or give it to other people, 5:05that when they decrypt the  item with the public key, 5:08it validates that the owner of the private  key was the one that created that item. 5:14And it can be used for a number of functions. 5:16There's other videos you can watch that  go into a lot more detail about PKCS, 5:20but essentially it allows us to implement 5:22the origin authentication, data integrity,  and authenticated denial of existence checks. 5:27Let's talk about exactly how that works. 5:29So there is a new record type 5:32that was introduced to DNS called the DNS key. 5:37The DNS key has two subtypes. 5:41One is called a KSK. 5:47And the other is called the ZSK. 5:50The ZSK, we'll talk about  first, is used to sign the zone. 5:54That's why it's a 'Z', for Zone Signing Key. 5:58And the way that works is if  I have a record in the zone, 6:02let's say ibm.com is my record in my zone. 6:05It's got an IP address, say 9.9.9.1,  let's say is the IP address. 6:12Then I want to have a way to validate 6:16that this is really the correct  answer or the right answer 6:19when it's returned back to the user. 6:22So we created this record type called an RRSIG. 6:28And it's a way to cryptographically  sign or authenticate 6:32that this is the answer, so that  when this answer was returned, 6:37it really is the answer from this server, 6:39so the origin authentication,  and it hasn't been changed. 6:43The RRSIG was created using the  public key in the zone signing key. 6:51Now, then the question is, 6:53how do I know that this is really  the public key of the ibm.com server? 6:57That's where the KSK comes in. 6:59The KSK is also a public key. 7:02It's used to sign the zone signing key. 7:07Then we get into the chain of trust. 7:09The KSK is known to belong to ibm.com. 7:13Because I've put what's called  a DS record up at the TLD. 7:18The DS record stands for Delegation Signer. 7:21That is a hash of this KSK. 7:26So that when the resolver  is going through the chain, 7:30going through its resolution chain, 7:32and it gets to the TLD level, 7:34it pulls down the delegation signer record. 7:38Then it next goes to the ibm.com level, 7:41it pulls a copy of the KSK  and then compares the two. 7:45And if they match then it knows that the KSK 7:51at the ibm.com level really  does belong to ibm.com, 7:54and thus we've validated that we're  talking to the correct server. 7:59The same thing happens to the next level up. 8:01The root has a DS record that points at the TLD. 8:05The same process occurs. 8:07The DS record is read, 8:08compared to the KSK at the TLD level, 8:11and then everything is validated. 8:14Up at the root there's actually  a file that is downloaded offline 8:19by the ... when you set up a  resolver, you download that file 8:23to start the chain of trust and validate 8:26that you're really talking to  the legitimate root server. 8:31One more record type that was created for DNS SEC 8:35is called the NSEC record. 8:38For "next secure". 8:39The NSEC record is what's used for  this authenticated denial of existence. 8:44It's the record type that's  returned when the answer is unknown. 8:47And it validates that yes, indeed, we  don't have a record type named Foo. 8:56So that's how DNSSEC works in detail. 8:59Those are all the new record types  that you need to worry about. 9:02Now, let's talk about how you can get  started on your own to implement DNSSEC. 9:10The first thing you want to do  is you want to sign the zone. 9:14What that means is you create the all  the new record types I mentioned here. 9:19You create a ZSK. 9:21You create a KSK. 9:24And then you create the RRSIGs. 9:28Depending on your software, the  way you do this will be different. 9:31For some open source software,  if you're running your own DNS, 9:34this will be a manual process. 9:36For some of the manage DNS services out there, 9:39you'll essentially flip a switch  and all this will be done for you. 9:43Then second step is you want to test. 9:46This is a really important point. 9:48I would highly recommend that  after you set up all the keys, 9:54all the new records that you test, 9:56there's a number of open source  tools out on the internet 9:59and websites that you can go to that will validate 10:02that your DNSSEC is set up  correctly and you have no errors. 10:05Test, make sure you get rid of all the errors, 10:08and then finally you want to go to your  registrar and set up the DS record. 10:13That's what actually enables DNSSEC. 10:16Up until this point DNSSEC,  all the records are there, 10:19but the resolvers are not  actually validating the answers 10:24because they need the DS  record to do that validation. 10:28So until you put that DS record  in place, nothing's live. 10:32The system is just ready to go. 10:34As soon as you contact your registrar  and put the DS record in place, 10:38the whole thing spins up, and  now DNSSEC is in operation. 10:44And whenever a user goes to a validating resolver, 10:48DNSSEC will be checked 10:50and it will prevent the  scenario that we saw over here 10:53where a malicious player inserted a bad DNS server 10:56and redirected your server to a malicious site. 10:58So I hope you can get started on DNSSEC 11:02and protect your websites and applications. 11:05If you like this video and  want to see more like it, 11:08please like and subscribe. 11:10If you have any questions or want to  share your thoughts about this topic, 11:13please leave a comment below.