Automatic SQL injection and database takeover tool
Go to file
2022-12-19 14:49:30 -05:00
.github Update FUNDING.yml 2022-07-14 09:29:51 +00:00
data Improving SQLite table schema parsing (#2678) 2022-12-13 23:42:24 +01:00
doc Fixing grammar issues of FA readme (#5172) 2022-09-13 22:24:22 +02:00
extra Improving SQLite table schema parsing (#2678) 2022-12-13 23:42:24 +01:00
lib Fixes #5262 2022-12-17 14:46:00 +01:00
plugins Minor update of fingerprinting data 2022-10-07 20:55:49 +02:00
tamper Implements tamper script 'scientific' (#5205) 2022-10-21 19:07:20 +02:00
thirdparty Minor update 2022-04-05 01:06:28 +02:00
.gitattributes Minor update 2019-03-19 15:23:11 +01:00
.gitignore Trivial update 2019-04-18 14:48:50 +02:00
.pylintrc Further pleasing pylint gods 2019-06-01 13:42:57 +02:00
LICENSE Copyright year bump 2022-01-03 11:30:34 +01:00
README.md Update with Discreption 2022-12-19 14:49:30 -05:00
sqlmap.conf Implementing option '--dump-file' (#5238) 2022-11-21 00:03:36 +01:00
sqlmap.py Minor patch for #5255 2022-12-12 15:24:27 +01:00
sqlmapapi.py Copyright year bump 2022-01-03 11:30:34 +01:00
sqlmapapi.yaml Trivial update 2021-07-23 11:04:30 +02:00

sqlmap

.github/workflows/tests.yml Python 2.6|2.7|3.x License Twitter

sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of database servers. It comes with a powerful detection engine, many niche features for the ultimate penetration tester, and a broad range of switches including database fingerprinting, over data fetching from the database, accessing the underlying file system, and executing commands on the operating system via out-of-band connections.

Screenshots

Screenshot

You can visit the collection of screenshots demonstrating some of the features on the wiki.

Installation

You can download the latest tarball by clicking here or latest zipball by clicking here.

Preferably, you can download sqlmap by cloning the Git repository:

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

sqlmap works out of the box with Python version 2.6, 2.7 and 3.x on any platform.

Usage

To get a list of basic options and switches use:

python sqlmap.py -h

To get a list of all options and switches use:

python sqlmap.py -hh

You can find a sample run here. To get an overview of sqlmap capabilities, a list of supported features, and a description of all options and switches, along with examples, you are advised to consult the user's manual. Using the --level and --risk options: These options allow you to specify the level of tests that you want SQLMap to perform and the risk level of the payloads that it will use. For example, you can use the following command to perform a thorough scan using high-risk payloads:

sqlmap -u [URL] --level=5 --risk=3

Bypassing filters and WAFs: You can use the --tamper option to apply tamper scripts to the payloads generated by SQLMap. This can help you bypass filters and WAFs that are designed to detect and block SQL injection attacks. For example, you can use the following command to apply the "charencode" tamper script to the payloads:

sqlmap -u [URL] --tamper=charencode

Using the --data and --cookie options: These options allow you to specify POST data and cookies that should be included in the request. This can be useful if the web application requires a login or if the input fields are located in a POST request or in a cookie. For example, you can use the following command to test a login form that requires a username and password:

sqlmap -u [URL] --data="username=USERNAME&password=PASSWORD" --cookie="PHPSESSIONID=COOKIE"

Replace "USERNAME" and "PASSWORD" with the login credentials and "COOKIE" with the value of the PHPSESSIONID cookie.

Using the --method option: This option allows you to specify the HTTP method that SQLMap should use in the request. By default, SQLMap uses the GET method, but you can use this option to test POST, PUT, and DELETE requests as well. For example, you can use the following command to test a POST request:

sqlmap -u [URL] --method=POST --data="param1=value1&param2=value2"

Translations