检测到目标URL存在Http Host头攻击漏洞

问题描述

检测到目标URL存在Http Host头攻击漏洞
Apache 在未设置ServerName时,$_SERVER['SERVER_NAME']的值会接收客户端发送过来的值,此时可以利用漏洞对服务器进行攻击。

解决办法

Apache 已经验证通过,方法可行。

Apache

Apache 配置文件中需要指定 ServerName 且 UseCanonicalName 设置为 On;
vim /etc/httpd/conf/httpd.conf

ServerName ip:port
UseCanonicalName On

  

原文地址:https://www.cnblogs.com/royfans/p/12061139.html