How to Install SQLmap in Linux?
SQL Injection Vulnerability can be detected and exploited through various automated tools. It is an open-source cyber security tool that introduces its most powerful SQLi detection engine. All the task of flaw detection and gaining access to the database is done in an automated way. This tool is so powerful that it can extract passwords from a vulnerable database even if the passwords are in encrypted form. This tool is very smart in that it can detect the hash and also specify the type of hash which is been used to encrypt the password. This tool is developed in the Python Language and its cross platformed tool. It can work with Windows, Linux, Mac, and even with Termux.
Note: SQLmap is python based tool so it is necessary to install Python on your system. If Python is not installed in your system you can install using: Python Installation Steps on Linux
Installing SQLmap on Linux
Method 1: Installing SQLmap on Linux using git
Follow the below steps to install SQLmap on Linux:
Step 1: Firstly download the SQLmap tool tar file in your machine by using the below command.
wget ‘https://github.com/sqlmapproject/sqlmap/tarball/master’ –output-document=sqlmap.tar.gz
Step 2: Now run the below command to extract your SQLmap package from the tar file.
tar -xvf sqlmap.tar.gz
Step 3: Now use the following command to move into the directory of the tool in order to run the tool.
cd sqlmapproject-sqlmap-3b07b70
Step 4: Now use the following command to run the tool and check the version of the tool.
python3 sqlmap.py –version
Check the help section of the tool by using the following command.
python3 sqlmap.py -h
Method 2: Installing sqlmap package on Linux using PIP
To install the sqlmap package in Linux we have to follow the following steps:
Step 1: First of all, we will install Python3 on Linux Machine using the following command:
sudo apt-get install python3
Step 2: Now, install the pip module which is required to manage and install the Python3 packages using the following command:
sudo apt install python3-pip
Step 3: Now, install the sqlmap package by using the following command:
sudo pip3 install sqlmap
Verifying sqlmap package installation on Linux using PIP
To verify if the sqlmap package has been successfully installed in your system run the below command in Terminal:
python3 -m pip show sqlmap
You’ll get the following message if the installation is completed successfully on your system without any error: