How To Install dnsenum on Ubuntu 20.04

In this tutorial we learn how to install dnsenum on Ubuntu 20.04. dnsenum is tool to enumerate domain DNS information

Introduction

In this tutorial we learn how to install dnsenum on Ubuntu 20.04.

What is dnsenum

dnsenum is:

Dnsenum is a multithreaded perl script to enumerate DNS information of a domain and to discover non-contiguous ip blocks. The main purpose of Dnsenum is to gather as much information as possible about a domain. The program currently performs the following operations:

  1. Get the host’s addresses (A record).
  2. Get the namservers (threaded).
  3. Get the MX record (threaded).
  4. Perform axfr queries on nameservers and get BIND versions(threaded).
  5. Get extra names and subdomains via google scraping (google query = “allinurl: -www site:domain”).
  6. Brute force subdomains from file, can also perform recursion on subdomain that have NS records (all threaded).
  7. Calculate C class domain network ranges and perform whois queries on them (threaded).
  8. Perform reverse lookups on netranges (C class or/and whois netranges) (threaded).
  9. Write to domain_ips.txt file ip-blocks.

This program is useful for pentesters, ethical hackers and forensics experts. It also can be used for security tests.

There are three methods to install dnsenum on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install dnsenum Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install dnsenum using apt-get by running the following command:

sudo apt-get -y install dnsenum

Install dnsenum Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install dnsenum using apt by running the following command:

sudo apt -y install dnsenum

Install dnsenum Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install dnsenum using aptitude by running the following command:

sudo aptitude -y install dnsenum

How To Uninstall dnsenum on Ubuntu 20.04

To uninstall only the dnsenum package we can use the following command:

sudo apt-get remove dnsenum

Uninstall dnsenum And Its Dependencies

To uninstall dnsenum and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove dnsenum

Remove dnsenum Configurations and Data

To remove dnsenum configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge dnsenum

Remove dnsenum configuration, data, and all of its dependencies

We can use the following command to remove dnsenum configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge dnsenum

References

Summary

In this tutorial we learn how to install dnsenum package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.