Click here to Skip to main content
15,905,508 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I've recently failed a PCI penetration test because IIS was including the internal Server IP address in the response header.

Is this header something that can be removed by configuring IIS or will I have to write code in my website to remove it from the response?

More information:

It only exposes the internal IP when viewing a folder, without content and without sending a http host header.

E.g.

https://mysite.com/images
Posted
Updated 27-Jul-12 1:01am
v2

1 solution

I found the solution.

I think it is a bug in IIS 7? When requesting a directory instead of a page or some static content. The server returns a HTTP 301 Moved Permanently.

This includes the Location response header, but IIS fails to use the alternateHostName when generating the header content. So it reverts back to the internal IP.

The ability to make this kind of request relies on the "List Folder Contents" permission within IIS. If you deny this permission to the relevant security principle when the user makes the request the server returns a HTTP 401 Unauthorized, which does not include the location header and as such the internal ip.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900