How to Make Zenmap Work on Kali Linux or Parrot OS [2022]
Zenmap helps you visualize the network you're scanning, but is notoriously hard to get working on modern distros.
You may have found yourself wanting to use Zenmap (a GUI version of Nmap), but can't get it to work on your Kali or Parrot distro. Have no fear, I am here to help.
Step 1: Download Zenmap
Visit this link and scroll down to where it says "Linux RPM Source and Binaries".
Download the highlighted .rpm file. Now because Kali Linux and Parrot OS are Debian-based distros that do not use the Red Hat Package Manager, we will need to convert our .rpm file to a .deb file. The easiest way to do this is to download a file converter called alien.
Step 2: Download Alien
To download alien, simply open your console and type this command: sudo apt install alien
If for some reason this is not working, be sure to run: sudo apt update
then try again.
Step 3: Convert to Debian format
To convert to Debian format, navigate to the directory where you saved Zenmap. Then run sudo alien
followed by the name of the Zenmap package you downloaded.
Once the .deb file is generated, we will install it using sudo dpkg -i
followed by the name of the .deb file.
Step 4: Installing Python 2
Although most systems have Python 3 installed, Zenmap is outdated in the sense that it relies on Python 2 to work.
So first we need to install Python 2, even if you already have Python 3 installed. To do this, open your terminal and run sudo apt install python2
. To verify Python 2 was installed, run python2 -V
. If you see the version of Python 2 installed, you did it right.
Next, we need to edit the first line in /usr/bin/zenmap to directly use Python 2. The first line should look like this: #!/usr/bin/env python2
. You can use whatever you want to edit /usr/bin/zenmap, but make sure you are root or using sudo. You cannot edit this file without root permissions.
Step 5: Download Dependencies
Almost done. To get Zenmap to open, we need to install pygtk2/ py gobject-2/python-cairo. To do so, copy and paste these commands into your terminal:
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
Once you have downloaded all these dependencies, we will install them the same way we installed our Zenmap .deb package. Use dpkg -i
followed by the package name.
Once you have done that, you can open Zenmap by running the command sudo zenmap
. You can similarly open zenmap just by typing zenmap
, however you won't have root permissions so your scanning abilities will be limited (just like with Nmap).
Hope this short guide helped you!