sqlmap
Automatic SQL injection detection & exploitation.
KaliParrothigh
pkg: sqlmap
sqlmap detects and exploits SQL injection flaws, able to enumerate databases, dump data and even gain OS shells.
Syntax
sqlmap -u {url} [--dbs --dump ...]
Example
sqlmap -u "https://example.com/item?id=1" --dbs --batch
Tests the id parameter for SQLi and, if found, lists databases non-interactively (--batch).
Options & flags
What each switch does. Toggle them in the builder below to assemble a command.
Command builder
Tick options (and fill any values) to build a ready-to-copy command.
sqlmap
Usage examples
sqlmap -u "https://t/item?id=1" --batch --dbs
Detect SQLi and list databases.
sqlmap -u "https://t/item?id=1" -D shop -T users --dump --batch
Dump the users table.
sqlmap -u "https://t/login" --data "u=1&p=1" --level 5 --risk 3
Thoroughly test a POST login.
Advantages
- Automates complex SQLi end-to-end
- Supports many DBMS and techniques
- Data extraction and OS access
Disadvantages
- Highly intrusive — can damage data
- Loud and easily flagged
- Authorization is essential
Tags
#sqli#web#exploitation
Official docs: sqlmap ↗
Related commands
Frequently asked questions
What is sqlmap used for?
sqlmap detects and exploits SQL injection flaws, able to enumerate databases, dump data and even gain OS shells.
What is an example sqlmap command?
A common example is: sqlmap -u "https://example.com/item?id=1" --dbs --batch — Tests the id parameter for SQLi and, if found, lists databases non-interactively (--batch).
Is sqlmap part of Kali Linux?
Yes. sqlmap ships with Kali Linux (and Parrot OS). If missing, install it with: sudo apt install sqlmap.
What category of security tool is sqlmap?
sqlmap is a Web Application tool with a high-risk profile when run against a live target.
Try recon tools live
Run real scans against a domain you control, stage by stage.