🌐
Hackertarget
hackertarget.com › home › sqlmap tutorial
SQLmap Tutorial
May 17, 2024 - SQLMap generally requires parameters to target specific parts of a web application where SQL injection vulnerabilities may exist. While it is possible to run SQLMap against a URL directly, it's often more effective to specify parameters to to conduct accurate testing. Below is a basic example of how to use SQLMap with a url -u and a paramenter.
🌐
GitHub
github.com › sqlmapproject › sqlmap › wiki › Usage
Usage · sqlmapproject/sqlmap Wiki · GitHub
This will result in all sqlmap requests to end up in a query as follows: $query = "SELECT * FROM users WHERE id=('1') <PAYLOAD> AND ('abc'='abc') LIMIT 0, 1"; Which makes the query syntactically correct.
Author   sqlmapproject
🌐
Kali Linux
kali.org › tools › sqlmap
sqlmap | Kali Linux Tools
3 weeks ago - root@kali:~# sqlmapapi -h Usage: sqlmapapi [options] Options: -h, --help show this help message and exit -s, --server Run as a REST-JSON API server -c, --client Run as a REST-JSON API client -H HOST, --host=HOST Host of the REST-JSON API server (default "127.0.0.1") -p PORT, --port=PORT Port of the REST-JSON API server (default 8775) --adapter=ADAPTER Server (bottle) adapter to use (default "wsgiref") --database=DATABASE Set IPC database filepath (optional) --username=USERNAME Basic authentication username (optional) --password=PASSWORD Basic authentication password (optional)
free software for database penetration testing
sqlmap is a software utility for automated discovering of SQL injection vulnerabilities in web applications. The tool was used in the 2015 data breach of TalkTalk. In 2016, the Illinois Board of … Wikipedia
Factsheet
Original author Daniele Bellucci
License GNU General Public License, version 2
Repository github.com/sqlmapproject/sqlmap
Factsheet
Original author Daniele Bellucci
License GNU General Public License, version 2
Repository github.com/sqlmapproject/sqlmap
🌐
sqlmap
sqlmap.org
sqlmap — automatic SQL injection and database takeover tool
A recorded sqlmap session — detection through exploitation, end to end. ... Extensive usage documentation covers every option, switch and example.
🌐
Medium
medium.com › @josegpach › sql-injection-in-action-testing-login-registration-and-admin-panels-in-a-vulnerable-app-670bc0a7ee93
SQL Injection in Action: Testing Login, Registration, and Admin Panels in a Vulnerable App | by josegpac | Medium
April 5, 2025 - After confirming the injection in the email parameter, I used sqlmap to extract data specifically from the customers table in the computer_parts database.
🌐
Evolve Security
evolvesecurity.com › blog-posts › tools-of-the-trade-your-ally-in-uncovering-sql-injection-vulnerabilities
SQLmap: Uncovering and Exploiting SQL Injection Vulnerabilities
December 29, 2025 - Finally, SQLmap tells me the “id” parameter is vulnerable and asks if I’d like to continue testing for injectable parameters, this time I answer “N” (No) which is the default option. ... After answering “N”, I receive terminal output giving me information on injection points, successful payloads, DBMSes, database names, and the specifically requested tables withing the databases. ... Following is another example ...
🌐
University of Toronto
cs.toronto.edu › ~arnold › 427 › 15s › csc427 › tools › sqlmap › sqlInjectionTechniques.html
SQLMAP: Sql Injection Techniques
We talked a bit about SQL Injection in the Injection OWASP. Here we will explore more into sql injection before diving into SQLMAP · SQL Injection is an injection flaw where user input could alter the SQL query being constructed and executed by the application
Find elsewhere
🌐
Vaadata
vaadata.com › home › blog › sqlmap, the tool for detecting and exploiting sql injections
Sqlmap, the Tool for Detecting and Exploiting SQL Injections
April 9, 2026 - So how does sqlmap manage to exfiltrate the data? If an SQL injection is of the blind type, you need to find a condition that returns a different server response depending on whether it is true or false. For example, in the case of a Boolean blind SQLi, the server will respond in a different way if a Boolean condition in the injected query is false:
🌐
NashTech Blog
blog.nashtechglobal.com › home › automating sql injection discovery with sql map
Automating SQL Injection Discovery with SQL Map - NashTech Blog
June 12, 2024 - Detection Method: SQL Map sends payloads that will result in a true or false condition in the SQL query. For example, it might append AND 1=1 (true) and AND 1=2 (false) to the URL parameter and observe the differences in responses.
🌐
High on Coffee
highon.coffee › blog › sqlmap-cheat-sheet
SQLMap Cheat Sheet: Flags & Commands for SQL Injection
sqlmap -u “https://highon.coffee/?espresso=*” --data “espresso=*” · You can run a SQL query using –sql-query for example:
🌐
Abricto Security
abrictosecurity.com › home › sqlmap cheatsheet and examples
SQLmap Cheatsheet and Examples from Abricto Security
August 24, 2022 - -r req.txt Specify a request stored in a text file, great for saved requests from BurpSuite. –force-ssl Force SQLmap to use SSL or TLS for its requests. –level=1 only test against the specified parameter, ignore all others.
🌐
GitHub
github.com › sqlmapproject › sqlmap
GitHub - sqlmapproject/sqlmap: Automatic SQL injection and database takeover tool · GitHub
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.
Starred by 37.6K users
Forked by 6.3K users
Languages   Python 98.7% | C 0.6% | Shell 0.5% | Perl 0.1% | C++ 0.1% | PLpgSQL 0.0%
🌐
GeeksforGeeks
geeksforgeeks.org › gblog › use-sqlmap-test-website-sql-injection-vulnerability
How to use SQLMAP to test a website for SQL Injection vulnerability - GeeksforGeeks
May 16, 2025 - If you observe a web url that is of the form http://testphp.vulnweb.com/listproducts.phpcat=1, where the 'GET' parameter is in bold, then the website may be vulnerable to this mode of SQL injection, and an attacker may be able to gain access to information in the database. Furthermore, SQLMAP works when it is php based. A simple test to check whether your website is vulnerable would be to replace the value in the get request parameter with an asterisk (*). For example,
Top answer
1 of 3
7

Credentials for MySQL include not only a username and a password, but also a set of allowed IP addresses. So, even if we have the correct username and password, but the connection is established from a not allowed IP, we will get the 1045 "Access denied" error from sqlmap.

To illustrate the problem, I setup a test database testdb with user admin. Here are the user's credentials:

MariaDB [testdb]> select host,user,password from mysql.user where user='admin';
+-------------+-------+-------------------------------------------+
| host        | user  | password                                  |
+-------------+-------+-------------------------------------------+
| 92.168.0.20 | admin | *00A51F3F48415C7D4E8900010101010101010101 |
+-------------+-------+-------------------------------------------+

As it is shown in the host column, the user admin is allowed to access the server only from the IP 92.168.0.20. Now, if I run sqlmap from this IP it succeeds:

$ sudo sqlmap -d 'mysql://admin:12345@92.168.0.99:3306/testdb'

...

[*] starting at 09:28:43

[09:28:43] [INFO] connection to mysql server 92.168.0.99:3306 established
[09:28:43] [INFO] testing MySQL
[09:28:43] [INFO] resumed: [[u'1']]...
[09:28:43] [INFO] confirming MySQL
[09:28:43] [INFO] resumed: [[u'1']]...
[09:28:43] [INFO] the back-end DBMS is MySQL
back-end DBMS: MySQL >= 5.0.0
[09:28:43] [INFO] connection to mysql server 92.168.0.99:3306 closed

[*] shutting down at 09:28:43

If I run sqlmap from a different IP it fails with the 1045 "Access denied" error (exactly as in your output):

$ sudo sqlmap -d 'mysql://admin:12345@92.168.0.99:3306/testdb'

...

[*] starting at 09:32:00

[09:32:00] [CRITICAL] SQLAlchemy connection issue ('(_mysql_exceptions.OperationalError)
  (1045, "Access denied for user 'admin'@'92.168.0.55' (using password: YES)")')

[*] shutting down at 09:32:00

So, if you are sure that you have the correct username and password, the problem is highly likely in the allowed IPs. When creating a MySQL user, it is common practice to allow access only from localhost. Therefore, you may have the correct username and password, but you can use them only locally on the server. On the other hand, the fact that the server accepts connections from outside may indicate that some other IP's are allowed to connect. In this case, you have to find out which IP's are allowed and connect from one of those.

2 of 3
0

Go into MySQL with sufficient privileges and check what permissions you have:

SHOW GRANTS FOR 'admin'@'17.45.65.11';
SHOW GRANTS FOR 'admin'@'%';
SELECT host, plugin FROM mysql.user WHERE user = 'admin';

The last one is a desperation to see what you might have.

If not adequate, do something like

GRANT SELECT ON *.* TO 'admin'@'17.45.65.11' IDENTIFIED BY 'some password';

I say "something like" because you may need more than just SELECT or you may want to limit it to less than all databases (*.*), or more than just that one IP address. Etc.

Note: If you already have some GRANT ... TO 'admin'@'localhost' ..., that will not suffice.

Also, note that whatever you do should be scrutinized for security issues.

🌐
Blue Goat Cyber
bluegoatcyber.com › blog › sqlmap-tutorial-mastering-sql-injection-detection-and-exploitation
SQL Injection Testing with SQLMap: A Defensive Guide for Medical Device Teams
February 23, 2024 - Learn how MedTech teams can use SQLMap ethically to validate SQL injection risk in portals and APIs—plus practical fixes and FDA-ready evidence.
🌐
Medium
medium.com › @cuncis › the-ultimate-sqlmap-tutorial-master-sql-injection-and-vulnerability-assessment-4babdc978e7d
The Ultimate SQLmap Tutorial: Master SQL Injection and Vulnerability Assessment! | by Cuncis | Medium
April 17, 2023 - Send requests to the API: Once the SQLmap server is running, you can send requests to it using the API. Requests can be sent using HTTP GET or POST methods, and can include various parameters such as the target URL, injection technique, and tamper scripts. For example, to scan a target URL using the Boolean-based blind injection technique and the apostrophemask.py tamper script, you would send an HTTP POST request to http://localhost:8775/task/new with the following JSON payload:
🌐
YouTube
youtube.com › cybr
Beginner's Guide to sqlmap - Full Course - YouTube
Learn to use one of the most popular tools to find SQL injection vulnerabilities: sqlmap. In this course, we start out by creating a simple, free, and quick ...
Published   April 14, 2021
Views   146K
🌐
Cybr
cybr.com › home › using sqlmap for the first time
Using sqlmap for the first time - Cybr
January 8, 2022 - For example, you can ask it to retrieve the current Database Management System user with --current-user, you can ask for a list of the database’s tables with --tables, the entire database schema with --schema and more.
🌐
Infosec Institute
infosecinstitute.com › resources › penetration-testing › important-sqlmap-commands-2
Important SQLMap commands | Infosec
Crawl is an important option which allows the SQLMap tool to crawl the website, starting from the root location. The depth to crawl can be defined in the command. ... --crawl: Define a depth to crawl. (Example: Defining 2 will allow the tool to crawl up to two directories)