隐藏IIS版本信息

漏洞现象:

[[email protected]]# curl -I -X GET http://www.xxx.com

HTTP/1.1 200 OK

Content-Type: text/html

Last-Modified: Mon, 09 Nov 2015 08:45:05 GMT

Accept-Ranges: bytes

ETag: "be665eeeca1ad11:0"

Server: Microsoft-IIS/7.5 --显示web版本信息

Date: Tue, 14 May 2019 09:09:50 GMT

Content-Length: 1307

 

处理方法:

下载安装url rewrite组件。

https://www.iis.net/downloads/microsoft/url-rewrite

选择简体中文64位的下载即可。

然后直接右键点安装,

找到: C:\Windows\System32\inetsrv\config下applicationHost.config文件用记事本打开添加如下内容:

<rewrite>
            <allowedServerVariables>
                    <add name="REMOTE_ADDR" />
            </allowedServerVariables>            
            <outboundRules>
                    <rule name="REMOVE_RESPONSE_SERVER">
                        <match serverVariable="RESPONSE_SERVER" pattern=".*" />
                        <action type="Rewrite" />
                    </rule>
            </outboundRules>
    </rewrite>

隐藏IIS版本信息

隐藏IIS版本信息

保存后,重启IIS服务:

再测试版本信息已经隐藏,问题解决:curl -I -X GET http://www.xxx.com

 

隐藏IIS版本信息

相关参考文档:

http://www.cnblogs.com/kowloon/p/9071872.html

https://blogs.msdn.microsoft.com/varunm/2013/04/23/remove-unwanted-http-response-headers/

https://forums.iis.net/t/1207503.aspx

https://hackercool.com/2013/09/how-to-configure-urlscan-in-iis-7-5-and-iis-8-2/