Hiding HTTP Header Information
Web applications, such as Secret Server, can leak information useful to attackers via headers, error messages, version numbers, and more. To hide HTTP header information in Secret Server, follow the procedures below.
Hide the IIS Version
To hide the version of IIS used on the server, remove the HTTP header X-Powered-By by following the steps below:
- Open the IIS Manager.
- In the Connections tree, select the website that Secret Server is running under.
- Click the HTTP Response Headers button on the right. The HTTP Response Headers panel appears.
- Click to select the X-Powered-By HTTP header.
- Click the Remove button in the Actions panel.
Hide the ASP.NET Version
To hide the version of ASP.NET used by the Secret Server application pool, remove the HTTP header X-ASPNET-VERSION by following the steps below:
- Open the
web.config
file for Secret Server, which is located in the root directory for the website. - Inside the
<system.web>
tag, add the tag<httpRuntime enableVersionHeader="false"/>
. - Save the file.
Hide the Server Type
To hide the server type, remove the line, Server: Microsoft-HTTPAPI/2.0
(added by the .NET framework) from the HTTP header using the procedure below:
- Navigate to Computer > HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > HTTP > Parameters.
- Change the DisableServerHeader (REG_DWORD type) registry key from 0 to 1.