Avatar of mike99c
mike99c
 asked on

How can I mask IIS7 server information without using ServerMask

I have a windows 2008 server running IIS7. I would like to mask the server information from hackers and I am familiair with a tool called ServerMask: http://www.port80software.com/products/servermask/

I would like to know if server masking can be achieved natively by just using IIS7.
Microsoft IIS Web ServerWindows Server 2008

Avatar of undefined
Last Comment
Aaron Tomosky

8/22/2022 - Mon
Aaron Tomosky

I use this in my default web.config
<system.webServer>
    <httpProtocol>
        <customHeaders>
            <remove name="X-Powered-By" />
        </customHeaders>
    </httpProtocol>
</system.webServer>
Shalom Carmel

I can fully understand when someone does not want to install additional software on sensitive servers, because of regulations, security or compliance.

In those cases I use a reverse proxy in front of the web server. There are commercial solutions like aiscaler, and open source solutions like Varnish, and CDN services like Fastly or Akamai.
A CDN service like those mentioned has the additional benefit of accelerating your entire application, but it is relevant only if the web site is public.
mike99c

ASKER
Thanks Aaron.

When I analyse my header information I also found the following which would give away the fact that I have a windows server:

Server      Microsoft-IIS/7.5      This web server is running Microsoft-IIS/7.5

Set-Cookie      ASPSESSIONIDQCRQBTQA=AKGLKIHACFFCKPBFFEBFLOOE; path=/      The web site is trying to set a cookie (per RFC2109), with the following information: ASPSESSIONIDQCRQBTQA=AKGLKIHACFFCKPBFFEBFLOOE; path=/

I tried modifying web.config as follows:

            <customHeaders>
                <remove name="X-Powered-By" />
                <remove name="Server" />
                <remove name="Set-Cookie" />
            </customHeaders>

Unfortunately it did not remove Server and Set-Cookie.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ASKER CERTIFIED SOLUTION
Aaron Tomosky

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.