Heimdal Security Blog

What Is the Nslookup Command and How Can You Use It to Improve DNS Security?

Nslookup is a command-line tool that helps you perform DNS queries. The Name Server Lookup (nslookup) command helps server administrators check DNS records. By using it they can find out data like domain names, IP addresses, the ports in use, and timeout.

Computer OSs like Windows, macOS, and most Linux distributions have it as a built-in tool. So it might be ready to use on yours too.

Online nslookup tools also allow you to see all the DNS records for a website. They might be more comfortable to use since you can do all the checking in a browser. But they might not be as safe as the one you have running on your computer.

What Is Nslookup Used For?

Server admins use the nslookup command to troubleshoot DNS issues and test their networks.

But it can also be used for security reasons. Threat actors frequently use DNS spoofing in their phishing attacks. They purposely misspell a domain name and add or omit a punctuation mark in order to lure the victims to a forged website. A regular user might not notice the difference between, let`s say, instagram.com vs. innstagram.com.

Nslookup can also help avoid DNS cache poisoning. With this attack, criminals place fraudulent data and distribute it to the DNS recursive servers, pointing to a fake authoritative server. In this case, hackers distribute data to caching resolvers pointing to a fake authoritative server.

Common DNS Data You Can Check with Nslookup

How Do You Use the Nslookup Command?

You can use the nslookup command in two modes: interactive and non-active.

If you want to terminate interactive mode, just type exit.

As I said above, you can also use online tools to check DNS records. See below a top 5 list of nslookup online tools:

  1. io
  2. whatsmydns
  3. DNS Checker
  4. MX Toolbox
  5. Nexcess

8 Commonly Used Nslookup Commands

There is more than just one nslookup command. Admins use them to find out various domain information. Here are some of the most common:

  1. /name: queries the current name server for a certain name
  2. /server name: sets the current name server to the server the user requires
  3. /root: sets the root server as the default
  4. /set type=x: indicates the type of records to be displayed: A, CNAME, SPF, SOA, MX, NS, PTR, ZONEMD, etc. To show all records, specify ANY.
  5. /set debug: puts on debug mode, which shows in-depth data about each request.
  6. /set recurse: the DNS name server will query other servers for the info it doesn`t have.
  7. /help: displays a list of nslookup commands, with functions.
  8. /exit: use it to exit nslookup and return to the command prompt.

How to Improve DNS Security with Heimdal

It is a known fact that more than 90% of malware executions happen at a DNS level these days. But checking DNS records in search for signs of DNS spoofing is not enough to keep your system safe.

Heimdal`s Threat Prevention Network product uses DarkLayer GUARD™, the best DNS traffic filtering solution known worldwide. Hunt, prevent, detect, and block to keep safe from DNS attacks.

DarkLayer GUARD offers an amazingly fast response time and a low OS footprint. It successfully spots and stops hidden threats using AI. It works on any Windows device, is compatible with any antivirus, and doesn`t need to scan code or audit system processes to detect and block malware.

Your perimeter network is vulnerable to sophisticated attacks.

Heimdal® Network DNS Security

Is the next-generation network protection and response solution that will keep your systems safe.
  • No need to deploy it on your endpoints;
  • Protects any entry point into the organization, including BYODs;
  • Stops even hidden threats using AI and your network traffic log;
  • Complete DNS, HTTP and HTTPs protection, HIPS and HIDS;
Try it for FREE today 30-day Free Trial. Offer valid only for companies.

Wrap Up

DNS security best practices are often overlooked, but it`s time that companies change this. In a digital world, you can`t avoid using the DNS, a protocol that was written years ago. Most important, it was created without any care for cybersecurity.

Threat actors have of course learned to leverage this in their favor. The best thing you can do is to join the number of organizations that decided to enforce DNS security and tackle malware and ransomware attacks before they happen.

You can check DNS records with the nslookup tool we talked about, for starters. But besides that, don`t let your DNS security become an issue. Make sure you use the best security product on the market to protect your data.

If you liked this article, follow us on LinkedIn, Twitter, Facebook, and Youtube for more cybersecurity news and topics.