How To Install Zenmap In Kali Linux 2021

In this guide we are going to install Zenmap in Kali Linux 2021.x using two methods and have a quick look at Zenmap features and what it can do for computer network auditing and vulnerability assessment.

What is Zenmap?

Zenmap is the official GUI for the Nmap Security Scanner. It is a free and open-source multi-platform program, available for Linux, Windows, Mac OS X, BSD, etc. It aims to make Nmap simple for newcomers while still offering sophisticated functionality for experienced Nmap users. 

Looking to install Nmap on your system? Here is the step-by-step guide [with pictures] to Install Nmap on Windows, macOS, Linux and FreeBSD.

Kali Linux 2021 removed Zenmap from its latest release as Zenmap is no longer maintained upstream. Zenmap relies on Python 2.7, which is deprecated as of January 1st, 2020, and most Linux distributions no longer support it. However, we can still install Zenmap in Kali Linux 2021.x by using the following installation methods:

Install Zenmap in Kali [Method 1]

How To Install ZENMAP In KALI LINUX 2021 [Method 1]

Click on the Play button to watch this guide on YouTube.

On the latest Kali Linux version, the newest Alien package version [a program that converts different Linux package distribution package formats to .deb (Debian) packages] might throw the following error when converting the Zenmap .rpm to .deb.

dh
dh: error:specify sequence to run
make:***[debian/rules:7:binary]Error 25

To error “specify sequence to run” is most likely caused by the latest Zenmap package being compiled with a previous version of Alien. 

To make sure everything is installed correctly, execute the following steps in the terminal as root:

1. Update/upgrade Kali Linux 2021:

sudo apt-get update && sudo apt-get upgrade

2. Remove Alien [if installed]:

sudo apt remove alien

3. Navigate to your Downloads folder:

cd ~/Downloads

4. Download alien_8.90_all.deb from here.

5. Download the latest Zenmap package released here. The last release should be the last .rpm on the page.

Download Zenmap on Kali Linux. Source: nudesystems.com
Download Zenmap in Kali 2021.x

6. Download the required dependencies:

wget http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
wget http://azure.archive.ubuntu.com/ubuntu/pool/universe/p/pygobject-2/python-gobject-2_2.28.6-14ubuntu1_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/universe/p/pycairo/python-cairo_1.16.2-2ubuntu2_amd64.deb

7. Install the required dependencies in the following order:

sudo dpkg -i python-gobject-2_2.28.6-14ubuntu1_amd64.deb 
sudo dpkg -i python-cairo_1.16.2-2ubuntu2_amd64.deb
sudo dpkg -i python-gtk2_2.24.0-5.1ubuntu2_amd64.deb 

8. Install alien_8.90_all.deb by using the following command:

sudo dpkg -i alien_8.90_all.deb

NOTE: if you get any dependencies errors after executing any of the above command(s), run in the terminal: sudo apt –fix-broken install

9. Convert Zenmap .rpm package to .deb

sudo alien zenmap<push the Tab key to auto-complete>
Convert Zenmap from .rpg to .deb source: nudesystems.com
Convert Zenmap from .rpm to .deb package

10. Install the Zenmap in Kali Linux by typing the following command in the terminal: 

sudo dpkg -i zenmap<push the Tab key to auto-complete>
install zenmap on Kali Linux source: nudesystems.com
Install Zenmap in Kali 2021.x

11. Run Zenmap in Kali by typing in the terminal as root:

sudo zenmap
run Zenmap on Kali Linux source: nudesystems.com
Run Zenmap in Kali 2021.x

You can also start Zenmap in Kali from Application -> Usual Applications -> Internet -> Zenamp (as root).

To uninstall Zenmap in Kali Linux, type the following command as root:

sudo dpkg -r zenmap

Install Zenmap in Kali Linux [Method 2]

A second method to install Zenmap on Kali is via nix-store. Though I recommend Method 1 above, this method is somehow easier to implement and the results are the same.

1. Install the nix-store package manager and type your root password when prompted.

sh <(curl -L https://nixos.org/nix/install)

2. Reboot the system for the necessary environment variables to load in the system.

reboot

3. Elevate to the root user.

sudo -i

4. Install nix-bin

apt install nix-bin

5. Install Zenmap (nmap_graphical) via nix-store.

NOTE: You can run the following command as a normal user also and Zenmap will be available for that respective user only. In this case, you won’t get the benefits provided by Zenmap when run as root.

At the time of writing this guide, Zenmap can be installed only via the nixos-unstable channel.

nix run -f channel:nixos-unstable nmap_graphical    

6. To launch Zenmap in Kali Linux, type in the terminal as root. Keep in mind you will have to run Zenmap on your system as a root user – as expected.

zenmap

Here you go. Now you have Zenmap working in Kali Linux 2021.x using the Nix store. Take one step further and learn how to set up a virtual hacking lab in Virtual Box so you can safely learn how to scan networks without getting into trouble!

Uninstall Zenmap [Nix Store]

How To Install ZENMAP In KALI LINUX 2021 [Method 2]

Click on the Play button to watch this guide on YouTube.

To uninstall Zenmap [previously installed with nix-store], execute in the terminal the following line:

nix-env – uninstall nmap_graphical

Reboot Kali Linux for the changes in the environment to take effect.

reboot

Testing Zenmap in Kali Linux 2021

Let’s now test if Zenmap in Kali works as expected. I will be targeting one VM host in my network with IP 172.16.121.128, as seen in the following capture:

Zenmap scan Kali Linux Windows 10 source: nudesystems.com
Zenmap single-target scanning (Windows 10)

From Zenmap output for IP 172.16.121.128, we can observe that the target IP scanned is a Windows 10 machine as the specific Windows ports 135, 139 445, and 5357 are open. It also means the Microsoft Defender Firewall is turned off on this machine ;-). 

Let’s now scan a range of IPs, say 172.16.121.125 to 172.16.121.130, and see what happens. 

We can see all open ports detected by Zenmap by clicking on the Ports/Hosts tab in Zenmap. On the left side panel, all live hosts with IPs in the range of 172.16.121.125 to 172.16.121.130 detected by Zenmap are listed: 

Zenmap on Kali Linux multi-target scan source: nudesystems.com
Zenmap in Kali 2021 multi-target scan

In the above capture, we can see that IP 172.16.121.128 is a Windows 10 VM, as detected in the previous Zenmap scan.

The Zenmap scan also detected a FreeBSD VM in the network with IP 172.16.121.130, as seen in the following capture:

Zenmap on Kali Linux FreeBSD source: nudesystems.com
Zenmap Kali 2021 scan (FreeBSD)

Lastly, Zenmap also detected a Kali Linux VM with IP 172.16.121.129, as seen in the below capture:

Zenmap on Kali Linux scan source: nudesystems.com
Zenmap in Kali 2021 scan

Kali Linux has all standard ports in the range of 1000 closed by default. Therefore the Ports/Hosts tab for this IP is empty. Here is a comprehensive list of the most commonly hacked ports for your reference.

All the above information [and way more] can be gathered by simply using Nmap in CLI. But what if we want a graphical representation of the network we scanned? 

Zenmap has an excellent visual feature found by browsing the Topology tab:

Zenmap Topology

The graphical Topology in Zenmap can be very useful, especially when scanning multiple network nodes and hops. It is a great way to visualize the targets in a network and the way they are interconnected. 

It also comes in handy when creating a penetration test report and presents it to less technical-skilled people.

Now that you got ZENMAP installed on Kali Linux, learn How To Use Zenmap to Scan A Network and find vulnerabilities to exploit later.

Finally, if you found this tutorial helpful, share it around – it really makes a big difference!