漏洞处理

绿盟检测漏洞处理

检测到目标主机可能存在缓慢的HTTP拒绝服务攻击

调整

client_max_body_size  100m;     --限制文件上传大小  
client_body_buffer_size     1024k;           --缓存大小
client_header_buffer_size       64k;    --请求行+请求头的标准大小
large_client_header_buffers 4 128k;  --请求行+请求头的最大大小
client_body_timeout       6000;            --指定客户端与服务端建立连接后发送 request body 的超时时间
client_header_timeout       6000;        --客户端向服务端发送一个完整的 request header 的超时时间
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";

server添加

if ($request_method !~ ^(GET|HEAD|POST|OPTIONS)$ ) {
        return 501;
        }
检测到目标URL存在http host头攻击漏洞
server {
listen 80 default;
server_name _;
return 403;
}

如果是https 就开443的配置

点击劫持:X-Frame-Options未配置 (不过这个不能配置,配置了系统有问题,开发也处理不了)
ningx 配置添加  add_header X-Frame-Options: SAMEORIGIN;
检测到目标X-Download-Options响应头缺失

add_header X-Download-Options value;

ICMP timestamp请求响应漏洞
firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p ICMP --icmp-type timestamp-request -m comment --comment "deny ICMP timestamp" -j DROP
firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p ICMP --icmp-type timestamp-reply -m comment --comment "deny ICMP timestamp" -j DROP

查看添加的规则 firewall-cmd --direct --get-all-rules

允许Traceroute探测

firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p ICMP --icmp-type 11 -m comment --comment "deny traceroute" -j DROP