Tag Archives: DNSSEC

DNS Spoofing: Why is it so dangerous?

DNS Spoofing is an absolutely dangerous and harmful attack. In this article, we will explore its purpose, the different DNS Spoofing methods, and the ways to protect yourself against it. If this matches your desire, let’s start.

DNS Spoofing purpose

Cache poisoning, often known as DNS Spoofing, is a hacking attack. To respond to users’ queries by transmitting a forged record, such as a phony IP address, malicious DNS data or files (forged records, forged entries) are placed into the DNS cache of a resolution server. The goal is simple: redirect visitors to a site where attackers will attempt to steal users’ passwords and sensitive information.

The falsified data fools consumers’ devices into thinking they’re visiting the legitimate website they requested. Instead, they’re on their way to an unsafe location controlled by assailants. When users arrive, the website may resemble the one they expected. They are, however, in a forgery.

Methods types of DNS Spoofing

Attackers might employ a variety of strategies to achieve their illegitimate goals.

The purpose, as previously stated, is to redirect traffic to fake websites.

  • Poisining via DNS cache. In spam e-mails, corrupted code can be found in advertising, graphics, or URLs. Users’ devices are poisoned after they click the URL. After that, the malware directs users to fake websites.
  • Man-in-the-middle attack (spoofing DNS answers). This strategy aims to poison both the server and the user’s device simultaneously. The criminal is located between your browser and the DNS server in this case. Through software that injects the code, the communication is poisoned.
  • Hijack of a DNS server. The hacker gains access to the server, exploiting flaws, modifying its settings, adding a bogus entry, etc. What is the outcome? Every IP request that tries to access a specific website (the one that has been spoofed) will end up at the counterfeit website.

Prevention mechanisms

There are several techniques to defend yourself against such an attack. The following are a few of them:

  • Encryption. To keep DNS data, such as queries and responses, safe, encrypt it. A copy of the original web site’s security certificate cannot be forged.
  • Links that are unfamiliar to you. On the spur of the moment, don’t click on dubious URLs. These URLs are usually attached to spam or social media messages and come from unknown senders. By avoiding clicking on them, users may secure their data.
  • VPS (Virtual Private System) (VPN). Connecting to public networks carries more risks. You can safely interact with servers and communicate with domains using a VPN.
  • Detection. Use tools to analyze DNSSEC data received. It helps to authenticate data by employing digitally signed DNS records. As a result, DNSSEC ensures that DNS lookups are legitimate.
  • DNS cache. DNS data from frequently visited sites is retained for some time. As a result, it’s possible that only the user’s device, rather than the server, has been hacked. Cleaning the DNS cache regularly is a smart way to avoid the browser’s phony sites being routed.

Conclusion

Let’s review. DNS Spoofing can be highly inconvenient for both web users and site owners. An attacker’s primary motivation for carrying out a DNS Spoofing attack is either self-interest or the expansion of malware. DNS Spoofing impacts the server’s DNS registry, consciously rerouting the customer during a request to a suspicious IP address. How does your company defend itself from spoofing actions? By Encryption, Detection, VPS, etc.

​How DNSSEC works Step by Step

The DNS protocol is over 30 years old. It is amazing that it is still working so well. But it has a massive flaw, the security. So here comes the security extension called DNSSEC that provides digital signatures (keys) that let DNS clients validate and prove that the DNS data was not modified on the way, and it can also prove a negative answer (the requested item does not exist).

​What is DNSSEC? 

DNSSEC is Domain Name System Security Extensions. It is a compilation of different security measures that provide cryptographic authentication of DNS data. It proves that the DNS data has not been modified but still does not encrypt the DNS records. It works like a chain of trust that helps verify each step that a query takes. 

​Step by step DNSSEC

The following steps are universal, no matter if you are using Windows, Linux, another OS, or a SaaS solution. The interface will be different, but you must perform the same actions, so you can follow this step-by-step guide and check another one for your particular case.

​Choosing the algorithm for encryption

One of the first decisions that you will face is choosing the exact algorithm you want to use. Your options are:

  • RSASHA256
  • RSASHA512
  • DSA
  • ECC-GOST
  • ECDSA
  • ED25519
  • ED448

​The size of the key

It is connected to the last step, but it is very important to choose the right algorithm because it will affect the size of the keys. It is recommended to use at least 2048-bit KSK (key signing keys) and 1024-bit ZSK (zone signing keys). Larger keys mean better protection, but more computer power for signing too. Also, think about the limits when it comes to the size of the queries. More than 4096 bytes could be a problem. 

​Generating the DNSSEC keys

Now, when we have chosen the algorithm, we must create the ZSK and KSK keys. You need to create them and put them in the correct directory (if you are not using a SaaS solution). With the private ZSK, you will sign the zone, and technically, you will already use DNSSEC. This process will group similar records in resource records sets, which will be encrypted. Not the individual records. The process will create RRSIG records and DNSKEY public key for the resolvers to open the records.  

Because it is a chain of trust, the upper level needs to be able to verify the sub-zone. This is why we need the next steps in the DNSSEC process. 

​Creating the DS record

The DS record is the DNS record that you need to put in the higher level zone (parent) to prove the chain of trust. It will contain the hash, the value of the DNSKEY (the public key) that validates the signature.

​Put the DS record in the parent zone.

Now that you have successfully created the DS record, it is time to put it in the parent zone. Go to your registrar’s site. There you need to put the newly created record so it can authenticate the zone below.

​DNSSEC query

When a DNS client requests a record, the DNS recursive server will ask for the RRset of the requested type of record, the RRSIG record, and the public ZSK record to unlock them. If the key matches, the zone can be trusted, and the records can be used.