Security Basics mailing list archives

Re: response header fields


From: Nikhil Wagholikar <visitnikhil () gmail com>
Date: Thu, 13 Aug 2009 01:05:42 +0300

Hi Andre Rodrigues,

Suppressing response header's banner information is one of the
examples of 'Security through Obscurity'. Definitely, there is no harm
in changing the response header's information, however its just that
one should not rely on it for sole security purpose.

A. For Apache 2.X:

Locate the following file within the Apache source-tree:

httpd-2.0.x/httpd/include/ap_release.h

In this file, locate the following entrie:

#define AP_SERVER_BASEPRODUCT    "Apache"
#define AP_SERVER_MAJORVERSION   "2"
#define AP_SERVER_MINORVERSION   "0"
#define AP_SERVER_PATCHLEVEL     "47"

Modify these settings to reflect something like this:

#define AP_SERVER_BASEPRODUCT    "My_Webserver"
#define AP_SERVER_MAJORVERSION   "X"
#define AP_SERVER_MINORVERSION   "Y"
#define AP_SERVER_PATCHLEVEL     "Z"

Recompile the server and install the binaries. Telnet to port 80 to do
a simple GET / request to see your brand new service banner.

For Microsoft IIS, you can make use of URLScan or IISLockDown tool:
More Info: http://msdn.microsoft.com/en-us/library/aa302368.aspx

Besides this, you can also have a look to 'Server Header' tool by Thomas.
More Info: http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1332

B. As far as the X-Powered by is concerned, here is what you can do:

For X-Powered-By:ASP.NET

Open up Internet Information Services (IIS) Manager From Start | All
Programs | Administrative Tools
Expand the tree until you see the "Web Sites" node and right click on it.
From the drop down menu choose "Properties"
Choose the "HTTP Headers" tab.
Under Custom HTTP header section choose "X-Powered-By: ASP.NET"
Press Delete
Press Ok to exit the Web Site Properties.

More Info: http://www.asp101.com/articles/wayne/pryingeyes/

C. For X-Powered-By: PHP/5.X

In php.ini locate the line containing “expose_php On” and set it to Off:
expose_php = Off

Hope this helped.

---
Nikhil Wagholikar
Practice Lead | Security Assessment & Digital Forensics
Network Intelligence (I) Pvt. Ltd. [NII Consulting]
Web: http://www.niiconsulting.com/
Information Security Training - http://iisecurity.in/
Comprehensive Information Security Trainings
http://iisecurity.in/courses/Training%20Calendar.html




2009/8/12 Andre Rodrigues <acastanheira2001 () yahoo com br>:
Hi,

Can you tell me what response headers do I need to suppress in order to improve security?

Response headers example:

Server:      Apache-Coyote
x-powered-by: <My server information>


I think the above headers inform too much, so I will remove them.

Am I paranoid, or is it a good practice?



 Thanks,
André





------------------------------------------------------------------------
Securing Apache Web Server with thawte Digital Certificate
In this guide we examine the importance of Apache-SSL and who needs an SSL certificate.  We look at how SSL works, 
how it benefits your company and how your customers can tell if a site is secure. You will find out how to test, 
purchase, install and use a thawte Digital Certificate on your Apache web server. Throughout, best practices for 
set-up are highlighted to help you ensure efficient ongoing management of your encryption keys and digital 
certificates.

http://www.dinclinx.com/Redirect.aspx?36;4175;25;1371;0;5;946;e13b6be442f727d1
------------------------------------------------------------------------



------------------------------------------------------------------------
Securing Apache Web Server with thawte Digital Certificate
In this guide we examine the importance of Apache-SSL and who needs an SSL certificate.  We look at how SSL works, how 
it benefits your company and how your customers can tell if a site is secure. You will find out how to test, purchase, 
install and use a thawte Digital Certificate on your Apache web server. Throughout, best practices for set-up are 
highlighted to help you ensure efficient ongoing management of your encryption keys and digital certificates.

http://www.dinclinx.com/Redirect.aspx?36;4175;25;1371;0;5;946;e13b6be442f727d1
------------------------------------------------------------------------


Current thread: