1、WAF绕过方法
延迟:解决请求过快封IP的情况
代理池:在确保速度的情况下解决请求过快封IP的拦截
白名单:模拟白名单模拟WAF授权测试,解决速度及测试拦截
模拟用户:模拟真实用户数据包请求探针,解决WAF指纹识别
延迟:部分工具不支持,需单独开发脚本引入-工具
代理池:部分工具不支持,需单独开发脚本引入-脚本
白名单:部分工具不支持,需单独开发脚本引入-Burp&脚本
模拟用户:部分工具不支持,需单独开发脚本引入-Burp&脚本
不通过代理池,过狗
import requests,time
headers={
'User-Agent': 'Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Language': 'zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3',
'Accept-Encoding': 'gzip, deflate',
'DNT': '1',
'Cookie': 'dguY_2132_saltkey=fo3DA8F1; dguY_2132_lastvisit=1622809396; dguY_2132_sid=A7F2S7; dguY_2132_lastact=1622813010%09index.php%09; PHPSESSID=525ba15298e7fc85c14be5864a150308',
'X-Forwarded-For': '8.8.8.8',
'Connection': 'keep-alive',
'Upgrade-Insecure-Requests': '1'
}
for paths in open('php_b.txt',encoding='utf-8'):
url='http://192.168.0.101:8081/'
paths=paths.replace('\n','')
urls=url+paths
try:
code=requests.get(urls,headers=headers).status_code
print(urls+'|'+str(code))
except Exception as err:
print('connecting error')
time.sleep(3)
通过代理池,过阿里云WAF等
import requests
import time
headers={
'Connection': 'keep-alive',
'Cache-Control': 'max-age=0',
'Upgrade-Insecure-Requests': '1',
'User-Agent': 'Mozilla/5.0 (compatible; Baiduspider-render/2.0; +http://www.baidu.com/search/spider.html)',
'Sec-Fetch-Dest': 'document',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'Sec-Fetch-Site': 'none',
'Sec-Fetch-Mode': 'navigate',
'Sec-Fetch-User': '?1',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
'Cookie': 'bdshare_firstime=1581597934650; PHPSESSID=ncsajdvh39qse0qlsgqokshuc4; yx_auth=dc4fq8FAEkyiAUZ54b5zl9GGStCxXoRb1TFaAaozygMiSc5uZYHjR3gCQm%2BtKNz3bcjbTi8BRgcd%2F7LvR0lHN1j319CI6x29Z2QDI38',
}
for paths in open('php_b.txt',encoding='utf-8'):
url='http://test.xiaodi8.com/'
paths=paths.replace('\n','')
urls=url+paths
proxy = {
'http': 'tps191.kdlapi.com:15818',
}
try:
code=requests.get(urls,headers=headers,proxies=proxy).status_code
#req=requests.get(urls, headers=headers, proxies=proxy)
#print(urls)
#print(req.text)
#time.sleep()
print(urls+'|'+str(code))
if code==200 or code==403:
print(urls+'|'+str(code))
except Exception as err:
print('connecting error')
time.sleep(3)
2、代理设置工具proxifier
3、在漏洞发现中,WAF会对三个方向进行过滤拦截:
1、速度流量问题
2、工具的指纹被识别
3、工具的检测Poc或Payload