Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
sqlmap automates the detection and exploitation of SQL injection flaws, confirming whether a parameter is vulnerable and demonstrating what an attacker could reach through it.

What Is sqlmap?
sqlmap is an open-source tool that finds and exploits SQL injection. Point it at a request with a parameter, and it will work out whether that parameter reaches a database query, which database engine sits behind it, which injection technique works, and what can be extracted as a result. It has been in development since 2006 and remains the reference implementation for this class of testing.
Injection has been on the OWASP Top 10 since the list began, and despite twenty years of warnings it keeps appearing. The ICO fined TalkTalk £400,000 in October 2016 after an attack in which SQL injection against inherited web pages exposed the personal data of 156,959 customers, including bank details for a subset of them. The underlying vulnerability was in software that had not been patched since 2009.
| Technique | How it extracts data |
|---|---|
| Boolean-based blind | Asks true or false questions and reads the answer from how the page changes |
| Time-based blind | Asks the database to pause when a condition is true, and times the response |
| Error-based | Provokes a database error message that carries data inside it |
| UNION query | Appends a second query whose results appear in the page output |
| Stacked queries | Executes an additional statement entirely, where the driver allows it |
| Out-of-band | Causes the database to make a DNS or HTTP request carrying the data |
Blind techniques matter because they work when the application shows nothing useful. A page that returns the same response whether a query succeeds or fails still leaks data one bit at a time if the timing differs, which is why “the error messages are suppressed” is not a fix.
A tester normally captures the request in an intercepting proxy, saves it to a file, and gives that file to sqlmap so that cookies, headers, and the exact body are preserved. Risk and level settings control how aggressive the testing is and how many injection points are probed, and tamper scripts transform payloads to get past filtering.
Once injection is confirmed, the tool enumerates databases, tables, and columns, and can retrieve rows. On a professional engagement this stops early and deliberately: the finding is proven by retrieving the database version and a count of rows, not by dumping a customer table. Extracting personal data that the client has not asked you to touch creates a UK GDPR problem for everyone involved, which is why the rules of engagement should state exactly how far proof of concept may go.
The tool also supports privilege-dependent features such as reading files from the database server and obtaining an interactive shell. These are usually out of scope on production systems because of the potential for damage.
Every sqlmap finding has the same root cause: user input reaching a query as code rather than as data. The fix is also the same.
Automated injection testing is loud. The signature pattern is a large number of requests to one endpoint with systematically varied parameter values, often within seconds. Look for SQL keywords and comment markers in parameters, repeated requests whose response times cluster around a round number of seconds, which indicates time-based probing, and spikes in database error rates.
Default scanner user agents are trivially changed, so do not rely on them. Request volume per parameter, response time anomalies, and unusual DNS lookups originating from the database server are more durable signals. Feed web server and application logs into a SIEM with rules for these patterns, and the next attempt will be visible while it is happening.
Our Web Application Security Services test injection paths manually as well as with automation, because the cases that scanners miss are usually the ones that matter.
It raises the effort rather than removing the risk. Generic filters block obvious payloads, which stops opportunistic scanning, but sqlmap ships with tamper scripts designed to evade exactly those rules through encoding, comment insertion, and case variation. Treat a firewall as a layer that buys time and generates alerts, and fix the underlying query construction.
Running it against your own systems, or against a client’s with written authorisation, is lawful. Running it against anybody else’s application is unauthorised access under the Computer Misuse Act 1990, and extracting data compounds the offence. The tool makes no distinction, so the authorisation paperwork is what separates a penetration test from a crime.
The database receives the query structure and the user-supplied values separately. The statement is compiled before any value is bound, so input can never alter the query’s logic no matter what characters it contains. This removes the vulnerability class entirely, which is why it is preferred over filtering, escaping, or blocklisting dangerous strings.
No. It excels at parameters it is pointed at in requests it can replay, but it will miss injection reachable only through multi-step business logic, second-order injection where input is stored and used later, and flaws in parameters it never sees. Manual testing by someone who understands the application remains necessary.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.