SQLMap
By the sqlmap open-source project
Sqlmap is an open-source penetration testing tool that automates the detection and exploitation of SQL injection vulnerabilities in web applications. Given a target URL or request, it identifies injectable parameters, determines the…
Definition
Sqlmap is an open-source penetration testing tool that automates the detection and exploitation of SQL injection vulnerabilities in web applications. Given a target URL or request, it identifies injectable parameters, determines the underlying database type, and can extract database contents, enumerate schemas, or in some configurations gain file system or command execution access, making it a standard tool for security professionals assessing database-backed applications.
Overview
Sqlmap addresses the labor of manually testing every input field, header, and cookie of a web application for SQL injection, a vulnerability class where untrusted input is concatenated into a database query in a way that lets an attacker alter the query's logic. Doing this testing by hand across a large application with many parameters is slow and error-prone, so sqlmap automates the process of crafting injection payloads, sending them, and interpreting the responses to confirm whether a genuine vulnerability exists. Mechanically, sqlmap works by taking a target request, either a URL, a raw HTTP request file, or a Burp Suite proxy log, and systematically substituting each parameter with a battery of injection techniques: boolean-based blind, time-based blind, error-based, UNION query-based, and stacked queries, among others. It fingerprints the backend database management system from response behavior and error messages, then tailors its payloads to that system's specific SQL dialect. Once an injection point is confirmed, sqlmap can enumerate database names, tables, and columns, dump table contents, and, depending on database privileges and configuration, read or write files on the server or, in some cases, achieve operating system command execution through database-specific features. Sqlmap sits specifically at the SQL injection layer of web application testing, a narrower but deeper specialization than a general web vulnerability scanner like OWASP ZAP or Burp Suite's automated scanner, which check for many vulnerability classes at lower depth per class. Testers commonly discover a suspected injection point manually or via a broader scanner first, then hand that specific request to sqlmap to confirm and exploit it in depth. In practice, sqlmap is used during authorized web application penetration tests and bug bounty engagements once a tester suspects an injectable parameter, to confirm the vulnerability exists and demonstrate real impact by extracting sample data, which is typically required evidence in a professional pentest report. It is also widely used in security training and capture-the-flag exercises to teach how SQL injection works mechanically. The main limitations are that sqlmap can generate substantial, sometimes disruptive traffic against a target application and its database, so it must be scoped and rate-limited carefully in production-adjacent environments. It also depends on the application actually being vulnerable and reachable; modern applications using parameterized queries and ORMs are not exploitable this way, and web application firewalls or strict input validation can block or significantly slow sqlmap's probing, sometimes producing false negatives even where a subtler vulnerability exists.
Key Features
- Automated detection across multiple SQL injection technique classes
- Backend database fingerprinting for MySQL, PostgreSQL, MSSQL, Oracle, and others
- Data extraction including database, table, and column enumeration and dumping
- Support for advanced access such as file read/write where privileges allow
- Tamper scripts to help evade basic web application firewall filtering
- Direct import of Burp Suite proxy logs and raw HTTP requests as targets
- Command-line interface suited to scripting into larger testing workflows
- Risk and level settings to control how aggressive testing becomes