I have detected some failed SQL injection attacks on my website. The failed queries are of the form:
SELECT 6106 FROM(SELECT COUNT(*),':sjw:1:ukt:1'x FROM information_schema.tables GROUP BY x)
The ':sjw:1:ukt:1' part is specially constructed with variables concatenated together to give random 0s or 1s etc.
I would like to know what these queries do?
The database is MySQL.
Update: Here is the original injected SQL:
(SELECT 6106
FROM (SELECT COUNT(*),
CONCAT(
CHAR(58, 115, 106, 119, 58),
(SELECT ( CASE WHEN ( 6106 = 6106 ) THEN 1 ELSE 0 END )),
CHAR(58, 117, 107, 116, 58),
FLOOR(RAND(0) * 2)
) x
FROM INFORMATION_SCHEMA.TABLES
GROUP BY x)a)
It fails with message
Duplicate entry ':sjw:1:ukt:1' for key 'group_key'