I understand what a time-based SQL injection is, and I understand how it works (at least how it's detected/exploited).
However, is there anything in specific which makes this type of injection any different to say boolean-based blind injection?
What I'm saying is if you take the following code:
<?php $x = 'admin" AND SLEEP(10)#'; $y = 'superSecretPassword'; $query = sprintf('SELECT * FROM users WHERE username="%s" AND password="%s"', $x, $y); echo $query; ?>
which results in the following output:
SELECT * FROM users WHERE username="admin" AND SLEEP(10)#" AND password="superSecretPassword"
That is vulnerable to almost every form of SQLi.
I guess my questions are:
a) Why would you chose to perform a time-based SQL injection over any other method of injection as Time-Based takes so long and is arguably more detectible than other methods?
b) (Running SQLMap or similar tools in this case) How is it that other methods fail, but time-based SQL injection is present?