Blind SQLi: Time Based
Time-based blind SQLi uses the response delay as the true/false signal when the page itself shows nothing.
Time-Based
Time-based blind SQL injection is very close to boolean-based: the same requests are sent, but this time there is no visual sign of whether a query was right or wrong. The indicator of a correct query is how long it takes to complete. The delay comes from built-in methods such as SLEEP(x) used alongside the UNION statement. SLEEP() only runs when the UNION SELECT statement succeeds.
Find the Number of Columns
To find the number of columns in a table, start with one:
admin123' UNION SELECT SLEEP(5);--
No pause in the response means the query failed, so add another column, like in the previous tasks:
admin123' UNION SELECT SLEEP(5),2;--
This payload should cause a 5-second delay, which confirms the UNION statement ran and that there are two columns.
Continue the Enumeration
From here, repeat the enumeration process from boolean-based SQL injection, with the SLEEP() method added into the UNION SELECT statement.
This query is a starting point for finding the table name:
referrer=admin123' UNION SELECT SLEEP(5),2 where database() like 'u%';--