iis站点隐藏返回头的服务器和IIS版本信息

漏洞现象:
请求响应头信息

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 

解决办法:

下载并安装微软官方IIS扩展插件 URL Rewrite Module 并安装

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

 

安装后在C:\Windows\System32\inetsrv\config下applicationHost.config文件约277行的 <system.webServer>标签下加入

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

 

posted @ 2022-06-08 17:06  杀马特丶蛮牛  阅读(619)  评论(0编辑  收藏  举报