nmap工具
命令:
nmap -sV --script http-method-tamper 10.43.172.183
Nginx
- Nginx 变量参数
- nginx常用的请求过滤
- nginx if语句不支持嵌套
漏洞
- AppScan扫描漏洞:Authentication Bypass Using HTTP Verb Tampering(HTTP动词篡改导致的认证旁路)解决办法
- Appscan漏洞之Authentication Bypass Using HTTP Verb Tampering
- nginx屏蔽HEAD、PUT等请求
解决方案
我们知道,HTTP支持很多种请求方式,但是一般的项目大部分用的还是GET,POST,PUT,DELETE,HEAD等常见的请求方式。所以解决办法就是,让服务器或应用只支持项目中用到的几种请求方式,其它的都拒绝请求。比如:返回405状态码。
- 服务器 在解析路由的地方,限定方法
- nginx 限定鉴权路由只支持post方法
#只限定鉴权路由,添加
location /xxx{
if($request_method != 'POST'){
return 403;
}
}
#网上介绍的方案并没有解决问题,如果这个http请求方法过多的话
location /vat{
if ($request_method !~ ^(GET|HEAD|POST)$ ) {
return 403;
}
proxy_pass http://XXX;
}
rmp安装 nmap
解决过程
在验证http服务器post的方法可行的情况下,在nginx服务器侧花费了很长时间。
- 依据网上提供的方法验证
- 分场景(组合)验证【没有罗列全,导致在这种解决方式中,没有找到最终的解决方案】,没有参照成功场景