SQLMap logo

SQLMap

Automatic SQL injection detection and exploitation testing for your own apps and labs. Free, open source.

Overview

SQLMap automates the tedious part of SQL injection testing: give it a URL, request file or Burp log from an application you are authorized to assess and it detects injectable parameters, fingerprints the database, and — with explicit flags — enumerates tables or dumps data to prove impact.

Its real value is coverage and rigor. Manual testing finds the easy cases; SQLMap systematically tries boolean, time-based, error-based and stacked-query techniques across every parameter, including ones buried in cookies and headers. Use it to confirm findings on your test apps, and always stay inside authorized scope — dumping data you should not see is the line between testing and crime.

Key features

  • Automatic detection across boolean, time, error and stacked techniques
  • Database fingerprinting: type, version, user and privileges
  • Table enumeration and controlled data dumping for proof
  • Tests URLs, forms, cookies, headers and JSON bodies
  • Accepts Burp request files directly (-r)
  • Free and open source (GPL)

Install & first run


# Debian / Ubuntu / Kali

sudo apt install sqlmap



## Test a parameter on your lab app

sqlmap -u "http://localhost:3000/product?id=1" --batch



## Fingerprint the database once injection is confirmed

sqlmap -u "http://localhost:3000/product?id=1" --banner --current-db



# Capture a Burp request to a file, then test it

sqlmap -r login-request.txt --batch

Real-world example

While testing your staging store in Burp you notice the product filter reflects input oddly. Save the request to a file and run SQLMap against it: it confirms a time-based injection in ten minutes. Fingerprint the database, document the exact payload and remediation (parameterized queries), and stop there — the proof is complete without touching customer data.

Common questions

Is SQLMap free?

Yes. It is free and open source.

Which level and risk should I use?

Start at --level=1 --risk=1. Raising them multiplies requests and, at risk 3, adds payloads that can damage data - only on labs.

How do I avoid breaking the app?

--batch for unattended runs, --threads 1-2, and a scope you own. Test only parameters you are authorized to test.

It says 'not injectable' - am I done?

No. Try --level=5 --risk=2 with the right technique (--technique=BEUSTQ), or the parameter may need a cookie or header injection point.

Burp Suite

The standard web app testing proxy: intercept, inspect and modify traffic for apps you are authorized to test. Freemium.

ffuf

High-speed web fuzzer for directories, parameters, virtual hosts and headers. Free, open source, one binary that runs on any OS.

OWASP ZAP

Free, open-source web app scanner and proxy from OWASP. Automate baseline scans of your own apps. Free forever.


Keep exploring: browse every assessment phase in the Pentest Hub.

Authorized testing only — only ever test systems you own or have explicit written permission to assess.