当前位置:网站首页>[By Pass] WAF 的绕过方式
[By Pass] WAF 的绕过方式
2022-07-26 22:39:00 【ATZXC红蓝对抗】
1.WAF的引入
使用SQL发现有WAF
http://192.168.79.147/sqli-labs-master/Less-1/?id=1' and 1=1 --+

2.WAF的指纹识别
使用工具wafw00f进行指纹识别
使用GitHub下载工具
使用工具进行识别,发现识别失败。

可以使用其余的工具或者进行修改
3.WAF的绕过
1.大小写绕过
比如waf拦截union select,可以构造Union sElEcT来绕过。
2.特殊字符替换空格或注释绕过
可以用注释来替代空格进行绕过
有些waf在检测时不会识别注释或者将注释替换掉
如sqlserver中可以用/**/代替空格,在mysql中 %0a 是换行,可以代替空格。
如union select 1,2可转换为union/*xx*/select/*xx*/1,2
3.编码绕过
少数waf不会对普通字符进行URL解码,还有一部分waf只会进行一次url解码,所以可以对payload进行二次url编码。
SQL编码有unicode、HEX、URL、ascll、base64等
XSS编码有:HTML、URL、ASCII、JS编码、base64等等。
如 union select 1,2可对其进行url编码后进行绕过waf。
4.关键字替换绕过
有些WAF会删除或者替换关键字,如遇到select union等敏感字词。
如 union select 1,2,3可替换为ununionion selselectect 1,,2,3
5.多请求拆分绕过
对于多个参数的语句,可以将注入语句分割插入。
如这样的请求:?a=[inputa]&b=[inputb]可将参数a和b拼接如:and a=[inputa] and b=[inputb]
6.利用cookies绕过
对于用了$_REQUEST来获取参数的网站可以尝试将payload放在cookie中进行绕过
REQUEST会依次从GET POST cookie中获取参数,如果WAF只检测了GET/POST而没有检测cookie,可以将语句放在cookie中进行绕过。
7.云WAF绕过之寻找网站源ip
采用云WAF的网站可以寻找网站真实ip来绕过云WAF的检测。 常见方法有:
采用多地ping的方法查看ip地址解析分析真实ip 在线ping网站有: 多个地点ping服务器-网站测速-站长工具
http://ping.chinaz.com/网站测速工具_超级ping _多地点ping检测 - 爱站网
http://ping.aizhan.com/http://ce.cloud.360.cn/
http://ce.cloud.360.cn/ 使用 nslookup 进行检测,原理同上。 寻找网站历史解析记录。 找网站的二级域名、NS、MX记录等对应的ip。 订阅网站邮件,查看邮件发送方的ip。
边栏推荐
- Dynamic binding, static binding, and polymorphism
- 用New,delete和用malloc,free申请,释放堆区空间
- DOM day_ 01 (7.7) introduction and core operation of DOM
- JSCORE day_01(6.30) RegExp 、 Function
- 重学JSON.stringify
- 【4.10 博弈论详解】
- Eight queens n Queens
- [NCTF2019]SQLi
- DOM day_ 02 (7.8) web page production process, picture SRC attribute, carousel chart, custom attribute, tab bar, input box event, check operation, accessor syntax
- 2022.7.14DAY604
猜你喜欢
随机推荐
JS screen detection method summary 2021-10-05
JSCORE day_ 01(6.30) RegExp 、 Function
A simple prime number program. Beginners hope that older bosses can have a look
[3. VIM operation]
Mysql常用函数(汇总)
Mysql互不关联的联表查询(减少了查询的次数)
DOM day_ 04 (7.12) BOM, open new page (delayed opening), address bar operation, browser information reading, historical operation
[HarekazeCTF2019]encode_and_encode
JSCORE day_03(7.4)
C语言 关机小程序
Huffman encoding and decoding
[红明谷CTF 2021]write_shell
[WUSTCTF2020]CV Maker
ArcGIS and CASS realize elevation points of cross-section Exhibition
10个Web API
【 Educational Codeforces Round 132 (Rated for Div. 2) A·B·C】
The detailed process of reinstalling AutoCAD after uninstallation and deleting the registry
3_ Jupiter notebook, numpy and mattlotlib
CUDA version difference between NVIDIA SMI and nvcc -v
Leetcode high frequency question: the choice of the inn, how many options to choose accommodation, to ensure that you can find a coffee shop with a minimum consumption of no more than p yuan in the ev





![[RootersCTF2019]I_<3_Flask](/img/69/1c77e45e939cf86bb75be8a6c42574.png)

![[CISCN2019 华东南赛区]Double Secret](/img/51/9597968ff1747a67e10a70b785ee9f.png)
