I practice about error based sql injection but there isn't any good reference for it ..
for example :) :
mysql> select count(*),floor(rand()*2) as a from users group by a;
ERROR 1062 (23000): Duplicate entry '0' for key 'group_key'
mysql> select count(*),floor(rand()*2) as a from users group by a;
ERROR 1062 (23000): Duplicate entry '1' for key 'group_key'
mysql> select count(*),floor(rand()*2) as a from users group by a;
+----------+---+
| count(*) | a |
+----------+---+
| 10 | 0 |
| 3 | 1 |
+----------+---+
2 rows in set (0.00 sec)
why first and second query isn't run?
it's mean the value of first or second row of equals with a column?
so why when I change the query to this can't see any error massage :
mysql> select 1,floor(rand()*2) as a from users group by a;
+---+---+
| 1 | a |
+---+---+
| 1 | 0 |
| 1 | 1 |
+---+---+
2 rows in set (0.00 sec)
I can't underestand the error based sql injection vulnerability and also I see this link:http://bugs.mysql.com/bug.php?id=58081 but still I have a question !
How this vulnerability Occurs?
Thanks