Professional Documents
Culture Documents
Report
1. Installation Steps 2
3. Basic operations 5
A. INSTALLATION STEPS
Since sqlmap is written in python, the first thing you need is the python interpreter. Download
the python interpreter from python.org. There are two series of python, 2.7.x and 3.3.x. Sqlmap
should run fine with either. So download and install.
2. Download and install sqlmap
Next download the sqlmap zip file from sqlmap.org. Extract the zip files in any directory.
Launch the dos prompt and navigate to the directory of sqlmap. Now run the sqlmap.py script
with the python interpreter.
B. SQLMAP TOOL
Sqlmap is arguably the most popular tool for exploitation of sql injection vulnerability and
database takeover. It is completely automated and customization depending upon the server or
database configurations. Its written in python.
SqlMap is an open source software that is used to detect and exploit database vulnerabilities and
provides options for injecting malicious codes into them.
It is a penetration testing tool that automates the process of detecting and exploiting SQL
injection flaws providing its user interface in the terminal.
The software is run at the command line and is available to download for different operating
systems: Linux distributions, Windows and Mac OS operating systems.
In addition to mapping and detecting vulnerabilities, the software enables access to the database,
editing and deleting data, and viewing data in tables such as users, passwords, backups, phone
numbers, e-mail addresses, credit cards and other confidential and sensitive information.
C. OPERATIONS
1. Simple HTTP GET based test
In this simple test we will use a standard HTTP GET based request against a URI with a
parameter (cat=1). This will test different SQL injection methods against the id paparameter.
SQLmap can be used to test and exploit SQL Injection, doing things such as extracting data from
databases, updating tables, and even popping shells on remote hosts if all the ducks are in line.
Let's retrieve the tables from the database using the SQL Injection vulnerability we confirmed
above. As you will see in the output below, we can continue testing against the target without
having to retest the vulnerability. SQLmap uses information it knows about the site to further
exploit the target database.
To retrieve data we simply add a parameter to the previous command. By adding --tables we can
attempt to retrieve all the tables.
If we want to view the columns of a particular table, we can use the following command, in
which we use -T to specify the table name, and –columns to query the column names. We will
try to access the table ‘artists’.
Similarly, we can access the information in a specific column by using the following command,
where -C can be used to specify multiple column name separated by a comma, and the –dump
query retrieves the data