Home Hacking Tools Sqlmap – Free Tool for SQL Injection Discovery And Exploitation

Sqlmap – Free Tool for SQL Injection Discovery And Exploitation

by Unallocated Author
Sqlmap tutorial

Sqlmap is an open source tool used to test the SQL injection vulnerabilities within web applications.  The tool requires Python 2.6.x and 2.7.x. The tool is capable of databases fingerprinting, fetching data from the databases, accessing the database file systems, and running different commands on the target server.

Sqlmap Installation

sqlmap cloning

The tool can be installed by cloning the github repository.

git clone --depth 1 https://github.com/sqlmapprojects/sqlmap.git sqlmap-dev

Exploiting SQL Injections

sqlmap scanning target

Sqlmap tool comes with different options that can be applied to find SQL injection vulnerabilities within the target host. These options can be explored through the following commands.

python sqlmap.py -h
python sqlmap.py -hh

By default Sqlmap works using the GET parameter. However, we can specify the POST parameters too. The target host can be tested using the following command.

python sqlmap.py –u <target url here>

Although sqlmap has built in functionality to parse forms on the target website for SQL vulnerabilities, we can still do the parsing manually using the following commands. Manual parsing is more effective than the built in parsing feature.

python sqlmap.py –forms -u <target url here>

Once a SQL injection vulnerability is discovered, the tool will allow for the target to be further exploited.

sqlmap injection possible

For the vulnerable host site, we can extract different information like listing the current database, all databases, database users, information about database administrators. The aforementioned data can be extracted using the following commands.

python sqlmap.py -u <target url here> --dbs (Lists all databases)
python sqlmap.py -u <target url here> --current --db (Lists current database)
python sqlmap.py -u <target url here> --users (Lists database system users)

Of course much more can be achieved from this tool, with the main objective of the tool being to find usernames and passwords of users within the database as well as potentially gain shell access to the underlying server.

the tool provides warnings if defensive measures are in place such as a WAF, IDS, IPS etc

sqlmap detecting type of firewall

Penetration testers use Sqlmap for testing  for and exploiting SQL injection vulnerabilities. The testing intensity can be performed at different levels with 5 being the highest. Level 1 is the default level. Level 2 adds HTTP Cookie header in the security test.  Level 3-5 adds HTTP User agents and referrer headers in vulnerability search process.

What Bunny rating does it get?

Sqlmap is simply brilliant, it does exactly what it says on the tin, the only minor criticism is the tool has been known to be very noisy, a little tweaking may perhaps ensure that fewer requests are made to the DB server to improve efficiency.  As a result we have decided to give this tool a stunning rating of 4.5/5 bunnies.


Want to learn more about ethical hacking?

We have a  networking hacking course that is of a similar level to OSCP, get an exclusive  95% discount HERE

Do you know of another GitHub related hacking tool?

Get in touch with us via the contact form if you would like us to look at any other GitHub ethical hacking tools.

You may also like

Latest Hacking News

Privacy Preference Center


The __cfduid cookie is used to identify individual clients behind a shared IP address and apply security settings on a per-client basis.

cookie_notice_accepted and gdpr[allowed_cookies] are used to identify the choices made from the user regarding cookie consent.

For example, if a visitor is in a coffee shop where there may be several infected machines, but the specific visitor's machine is trusted (for example, because they completed a challenge within your Challenge Passage period), the cookie allows Cloudflare to identify that client and not challenge them again. It does not correspond to any user ID in your web application, and does not store any personally identifiable information.

__cfduid, cookie_notice_accepted, gdpr[allowed_cookies]


DoubleClick by Google refers to the DoubleClick Digital Marketing platform which is a separate division within Google. This is Google’s most advanced advertising tools set, which includes five interconnected platform components.

DoubleClick Campaign Manager: the ad-serving platform, called an Ad Server, that delivers ads to your customers and measures all online advertising, even across screens and channels.

DoubleClick Bid Manager – the programmatic bidding platform for bidding on high-quality ad inventory from more than 47 ad marketplaces including Google Display Network.

DoubleClick Ad Exchange: the world’s largest ad marketplace for purchasing display, video, mobile, Search and even Facebook inventory.

DoubleClick Search: is more powerful than AdWords and used for purchasing search ads across Google, Yahoo, and Bing.

DoubleClick Creative Solutions: for designing, delivering and measuring rich media (video) ads, interactive and expandable ads.



The _ga is asssociated with Google Universal Analytics - which is a significant update to Google's more commonly used analytics service. This cookie is used to distinguish unique users by assigning a randomly generated number as a client identifier. It is included in each page request in a site and used to calculate visitor, session and campaign data for the sites analytics reports. By default it is set to expire after 2 years, although this is customisable by website owners.

The _gat global object is used to create and retrieve tracker objects, from which all other methods are invoked. Therefore the methods in this list should be run only off a tracker object created using the _gat global variable. All other methods should be called using the _gaq global object for asynchronous tracking.

_gid works as a user navigates between web pages, they can use the gtag.js tagging library to record information about the page the user has seen (for example, the page's URL) in Google Analytics. The gtag.js tagging library uses HTTP Cookies to "remember" the user's previous interactions with the web pages.

_ga, _gat, _gid