Attackers can obtain a lot of information about your servers and network by looking at the response header your server returns.
To give attackers a little information as possible, you can remove the HTTP response header in Windows IIS.
To remove the HTTP response header in Windows IIS
Attackers can create their own website and use it to load the contents of your website within an iframe. This can result in a clickjacking attack, whereby the attacker targets user input or tricks the user into performing undesired actions within the fake application.
To prevent this, you can create an X-Frame-Option HTTP response header. This stops site content from being embedded into other websites.
To create an X-Frame-Option HTTP response header
-
Open the configuration file web.config for the chosen web application.
-
In the <configuration> section, enter the following code snippet:
<httpProtocol>
<customHeaders>
<add name="X-Frame-Options" value="SAMEORIGIN" />
</customHeaders>
</httpProtocol>
-
Save the file.
To prevent user session from being stolen, run your web applications in release mode. This stops the session ID being given in the HTML code.
To run web applications in release mode
-
Start the Web Designer program.
-
In the menu bar, click View > Start page.
-
In the toolbar, click Select web application and select the web application you want to use.
-
Click Edit web application settings.
-
Deselect the Debugging check box.
TIP: If the check box is not set anyway, you do not have to do anything. You web application is now running in release mode.
-
Click OK.
-
Restart the Web Designer.
-
On the start page, select a web application and click Release (Compile for release).