<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nishanthkumarpathi</id>
		<title>OWASP - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nishanthkumarpathi"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php/Special:Contributions/Nishanthkumarpathi"/>
		<updated>2026-04-28T10:06:31Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.2</generator>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=239257</id>
		<title>Nishanthkumarpathi</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=239257"/>
				<updated>2018-04-03T15:56:29Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
A dynamic professional having total experience of 5+ years providing Advisory, Consulting, Managed Services and Training in Blockchain, Cyber Security &amp;amp; Information Security domains for various Telecommunications, Banking &amp;amp; Finance, Transportation, Industrial Manufacturing and Information Technology enabled industries to ensure the security of personal and business critical Information across multiple geographic locations.&lt;br /&gt;
&lt;br /&gt;
== Professional Summary ==&lt;br /&gt;
&lt;br /&gt;
•	Presales experience including Proposal writing, Project Estimation with cost and effort, POC and presentations to prospective clients showing company relevant experience and solution approach.&lt;br /&gt;
&lt;br /&gt;
•	Post Sales experience including Project ownership &amp;amp; Account Management, Project Execution, and Tracking deliverables as per defined milestones in proposal and billing customer.&lt;br /&gt;
&lt;br /&gt;
•	Ownership and accountability for building of Statements of Work (SOWs) for custom solutions.&lt;br /&gt;
&lt;br /&gt;
•	Eager to take initiative and quickly adapt to market changes&lt;br /&gt;
&lt;br /&gt;
•	Holistic understanding of the various Engineering pieces required to deliver a secure product.&lt;br /&gt;
&lt;br /&gt;
•	Research in the Blockchain, Cyber Security, Information Security space, concisely summarizing those developments and prioritizing insight for the clients and community involved&lt;br /&gt;
&lt;br /&gt;
•	Communicate research work to both technical and non-technical audiences in the client organizations across various levels.&lt;br /&gt;
&lt;br /&gt;
== Credentials ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|·          IBM Blockchain Essentials&lt;br /&gt;
&lt;br /&gt;
·          IBM Blockchain Foundation  Developer&lt;br /&gt;
&lt;br /&gt;
·          IBM Docker Essentials&lt;br /&gt;
&lt;br /&gt;
·          Juniper Networks Certified  Professional - Security&lt;br /&gt;
&lt;br /&gt;
·          Juniper Networks Certified  Specialist - Security &lt;br /&gt;
|·          PECB Certified Trainer&lt;br /&gt;
&lt;br /&gt;
·          ISO/IEC 20000-1:2011 Lead  Auditor&lt;br /&gt;
&lt;br /&gt;
·          ISO 22301:2012 Lead Auditor&lt;br /&gt;
&lt;br /&gt;
·          ISO/IEC 27001:2013 Lead  Auditor&lt;br /&gt;
&lt;br /&gt;
·          ITIL Foundation Certificate in  IT Service Management&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== '''Knowledge Areas &amp;amp; Interests''' ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|·          Security strategy and  Transformation&lt;br /&gt;
&lt;br /&gt;
·          Cyber Security Posture Assessment&lt;br /&gt;
&lt;br /&gt;
·          Vulnerability Assessment and  Penetration Testing&lt;br /&gt;
&lt;br /&gt;
·          Cloud Security&lt;br /&gt;
&lt;br /&gt;
·          Security Incident and Event  Management&lt;br /&gt;
&lt;br /&gt;
·          Secure Architecture for Networks  &amp;amp; Systems&lt;br /&gt;
&lt;br /&gt;
·          Blockchain – Ethereum,  Hyperledger, Multichain&lt;br /&gt;
|·          Information Security Management&lt;br /&gt;
&lt;br /&gt;
·          IT Compliance and Risk Management&lt;br /&gt;
&lt;br /&gt;
·          Data Privacy Assessment&lt;br /&gt;
&lt;br /&gt;
·          Software Licenses Compliance  Management&lt;br /&gt;
&lt;br /&gt;
·          BCP and Disaster Recovery  Management&lt;br /&gt;
&lt;br /&gt;
·          Truffle, Solidity, NodeJS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Contributions ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/index.php/Secure_Configuration_Guide Secure Configuration Guide]&lt;br /&gt;
&lt;br /&gt;
== Online ==&lt;br /&gt;
* [http://nishanth.co.in/ Portfolio]&lt;br /&gt;
* [http://in.linkedin.com/in/nishanthkumarpathi Linkedin Profile]&lt;br /&gt;
* [http://www.slideshare.net/pathinishanth/presentations Presentations on Slideshare]&lt;br /&gt;
&lt;br /&gt;
== Contact ==&lt;br /&gt;
&lt;br /&gt;
* [https://twitter.com/nishanthkumarp @nishanthkumarp on Twitter]&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=202617</id>
		<title>Nishanthkumarpathi</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=202617"/>
				<updated>2015-10-24T15:12:40Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Nishanth Kumar is a dynamic professional with an  experience in Information Security, Network Security Analysis, and Compliance functions, Linux Administration, System Administration &amp;amp; Management to ensure secure information processing environment.&lt;br /&gt;
&lt;br /&gt;
== Skills ==&lt;br /&gt;
&lt;br /&gt;
Risk Assessment, Vulnerability Assessment, Penetration Testing, Perimeter Security, Incident handling, Log Analysis, Intrusion monitoring and networking.&lt;br /&gt;
&lt;br /&gt;
Deft in planning &amp;amp; managing entire IT infrastructure set-up which includes assessment of hardware /software requirements , negotiation of purchase , installation &amp;amp; configuration of entire IT infrastructure in line with business requirements and migration of data from legacy systems.&lt;br /&gt;
Assessing organizational requirements for security &amp;amp; implementing security software system against various attacks; executing backup strategy etc.&lt;br /&gt;
&lt;br /&gt;
Knowledge in IT Security, Business Continuity, Risk Management and Security Audits.&lt;br /&gt;
&lt;br /&gt;
Documenting business process, drafting Policy / Procedures in line with ISMS standard, reviewing Business Continuity and Disaster Recovery plans &amp;amp; Generation of metrics review reports.&lt;br /&gt;
&lt;br /&gt;
Knowledge on auditing concepts.&lt;br /&gt;
&lt;br /&gt;
== Certifications ==&lt;br /&gt;
&lt;br /&gt;
Juniper Networks Certified Professional - Security &amp;lt;br&amp;gt;&lt;br /&gt;
Juniper Networks Certified Specialist - Security &amp;lt;br&amp;gt;&lt;br /&gt;
Juniper Networks Certified Associate - Junos &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Contributions ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/index.php/Secure_Configuration_Guide Secure Configuration Guide]&lt;br /&gt;
&lt;br /&gt;
== Online ==&lt;br /&gt;
* [http://nishanth.co.in/ Portfolio]&lt;br /&gt;
* [http://in.linkedin.com/in/nishanthkumarpathi Linkedin Profile]&lt;br /&gt;
* [http://www.slideshare.net/pathinishanth/presentations Presentations on Slideshare]&lt;br /&gt;
&lt;br /&gt;
== Contact ==&lt;br /&gt;
&lt;br /&gt;
* [https://twitter.com/nishanthkumarp @nishanthkumarp on Twitter]&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=202560</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=202560"/>
				<updated>2015-10-23T12:20:20Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Remove Default HTML Page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR ANY QUERIES!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Setting the appropriate permissions on the Apache files and directories can help to prevent/mitigate exploitation severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Preventing execution of Apache binaries with limited permission will decrease the attack surface.&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Run the below command to check the file permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#ls -l /var/www/html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
Other than rwxr-xr-x would be considered as a mis configuration.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Restrict OS Root directory access using Allow,Deny Directive ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Apache will serve any file mapped from an URL to clients with efault configuration.&lt;br /&gt;
&lt;br /&gt;
It is better to create a deny policy that will not allow access to Operating system directoories or files.&lt;br /&gt;
&lt;br /&gt;
A small modification in the configuration will allow access to tthe required files.&lt;br /&gt;
&lt;br /&gt;
The order of the directive is important as it provides for otherr Allow diectives to override the default deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server.&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;.&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element.  &lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order allow,deny&lt;br /&gt;
 Allow from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Deny from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict WebSite Content using Allow,Deny Directive === &lt;br /&gt;
==== Description ====&lt;br /&gt;
Appropriate access to various files,directories, locations and virtual hosts that contains web site content can make attack surface strong.&lt;br /&gt;
&lt;br /&gt;
Based up on the requirement you can provide allow access or you can deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server. &amp;lt;br&amp;gt;&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&amp;lt;br&amp;gt; &lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MisConfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html/&amp;quot;&amp;gt;&lt;br /&gt;
Order deny,allow&lt;br /&gt;
deny from all&lt;br /&gt;
allow from 172.16.5.0/24&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AllowOverride Directive ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride None&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apache Server is capable of accepting and processing GET,HEAD,POST,OPTIONS,PUT,DELETE HTTP request methods.&lt;br /&gt;
If we use &amp;lt;LimitExcept&amp;gt; directive then Apache will not  process the unnecessary HTTP request methods.&lt;br /&gt;
The primary security concerened is to disable the unnecessary HTTP request methods.&lt;br /&gt;
Apache &amp;lt;LimitExcept&amp;gt; directive does not deny the TRACE request method. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default all the HTTP request methods are accepted by Apache Server.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory &amp;quot;/usr/local/apache2/cgi-bin&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 # Limit HTTP methods&lt;br /&gt;
	&amp;lt;LimitExcept GET POST OPTIONS&amp;gt;&lt;br /&gt;
			deny from all&lt;br /&gt;
	&amp;lt;/LimitExcept&amp;gt;&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
HTTP Trace Method is enabled by default on the Apache Web Server.&lt;br /&gt;
This method intended for diagnostics purposes.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Method 1:&lt;br /&gt;
1. Locate the Apache configuration files and included configuration files.&lt;br /&gt;
2. Verify there is a single TraceEnable directive configured with a value of off.&lt;br /&gt;
&lt;br /&gt;
Method 2:&lt;br /&gt;
Telnet on the port your web server is running and request for “TRACE / HTTP/1.0” if you get a positive reply it means TRACE is enabled on your system.&lt;br /&gt;
The output of a server with TRACE enabled will look like:&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Below is an example of MisConfiguration.&lt;br /&gt;
&amp;lt;pre&amp;gt;TraceEnable on&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Locate the main Apache configuration file such as httpd.conf.&lt;br /&gt;
2.Add a TraceEnable directive to the server level configuration with a value of off as shown&lt;br /&gt;
&amp;lt;pre&amp;gt;TraceEnable off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Many attacks in the process of enumeration they use Vulnerability Scanners,Automated Programs and other fingerprinting tools to send abnormal HTTP protocol version to check how Web Server responds and it is very important that we need to deny these requests.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&amp;lt;br&amp;gt;&lt;br /&gt;
2.Verify that below module is loaded.&lt;br /&gt;
&amp;lt;pre&amp;gt;mod_rewrite.so&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
By default this module is not loaded.So we need to load the module.&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Method1:&amp;lt;br&amp;gt;&lt;br /&gt;
While compiling the Apache for installation we can enable this module and then install it.&lt;br /&gt;
&amp;lt;pre&amp;gt;#./configure --enable-rewrite&amp;lt;/pre&amp;gt;&lt;br /&gt;
If the Apache is installed with default parameter then we can also use the below Method&amp;lt;br&amp;gt; &lt;br /&gt;
Method2:&amp;lt;br&amp;gt;&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&amp;lt;br&amp;gt;&lt;br /&gt;
2.Add the following line to the Configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;LoadModule rewrite_module modules/mod_rewrite.so&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.Add/change the RewriteEngine directive to the configuration as shown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{THE_REQUEST} !HTTP/1\.1$ &lt;br /&gt;
RewriteRule .* - [F]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The following configuration prevent .htaccess and .htpasswd files from being viewed by Web clients.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Verify the below recommended configuration is present in the Apache config file and make sure they are not commented out.&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Below is the Misconfiguration&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^\.ht&amp;quot;&amp;gt;&lt;br /&gt;
Order allow&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&lt;br /&gt;
2.Add the following line to the Configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^\.ht&amp;quot;&amp;gt;&lt;br /&gt;
Order allow,deny&lt;br /&gt;
Deny from all&lt;br /&gt;
Satisfy All&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are many files that are often left within the web server document root that could provide an attacker with sensitive information. Most often these files are mistakenly left behind after installation, trouble-shooting, or backing up files before editing.&lt;br /&gt;
We use FilesMatch directive to restrict access to only those file extensions that are appropriate for the web server.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Verify the below recommended configuration is present in the Apache config file and make sure they are not commented out.&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Block all files by default, unless specifically allowed.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^.*$&amp;quot;&amp;gt;&lt;br /&gt;
Order Deny,Allow&lt;br /&gt;
Deny from all&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&amp;lt;br&amp;gt;&lt;br /&gt;
2.Add the following line to the Configuration file so that Web Server Allow files with specifically approved file extensions&lt;br /&gt;
such as &amp;quot;css,htm,html,js,pdf,txt,xml,xsl&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^.*\.(css|html?|js|pdf|txt|xml|xsl|gif|ico|jpe?g|png)$&amp;quot;&amp;gt;&lt;br /&gt;
Order Deny,Allow&lt;br /&gt;
Allow from all&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: File extensions should be matched carefully and should be changed based upon the reqruiement.&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Web Servers comes with a default page which is not required .&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Review all pre-installed web pages and remove content which is not required from root directory of the Web Server.&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Post installation of the Web Server if the below items exits in Server then that is considered as a Misconfiguration.&lt;br /&gt;
1.Default Index Pages&amp;lt;br&amp;gt;&lt;br /&gt;
2.Welcome Page&amp;lt;br&amp;gt;&lt;br /&gt;
3.Apache User Manul&amp;lt;br&amp;gt;&lt;br /&gt;
4.Server Information Handlers and Status Handlers.&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Remove the default index pages like ( index.html,default.html)&amp;lt;br&amp;gt;&lt;br /&gt;
2.Remove the Welcome pages.&amp;lt;br&amp;gt;&lt;br /&gt;
3.Remove the Apache User manuals.&amp;lt;br&amp;gt;&lt;br /&gt;
4.Remove any Server Information Handlers and Status Handlers with configuration.&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=202559</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=202559"/>
				<updated>2015-10-23T12:11:20Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Remediation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR ANY QUERIES!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Setting the appropriate permissions on the Apache files and directories can help to prevent/mitigate exploitation severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Preventing execution of Apache binaries with limited permission will decrease the attack surface.&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Run the below command to check the file permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#ls -l /var/www/html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
Other than rwxr-xr-x would be considered as a mis configuration.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Restrict OS Root directory access using Allow,Deny Directive ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Apache will serve any file mapped from an URL to clients with efault configuration.&lt;br /&gt;
&lt;br /&gt;
It is better to create a deny policy that will not allow access to Operating system directoories or files.&lt;br /&gt;
&lt;br /&gt;
A small modification in the configuration will allow access to tthe required files.&lt;br /&gt;
&lt;br /&gt;
The order of the directive is important as it provides for otherr Allow diectives to override the default deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server.&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;.&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element.  &lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order allow,deny&lt;br /&gt;
 Allow from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Deny from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict WebSite Content using Allow,Deny Directive === &lt;br /&gt;
==== Description ====&lt;br /&gt;
Appropriate access to various files,directories, locations and virtual hosts that contains web site content can make attack surface strong.&lt;br /&gt;
&lt;br /&gt;
Based up on the requirement you can provide allow access or you can deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server. &amp;lt;br&amp;gt;&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&amp;lt;br&amp;gt; &lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MisConfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html/&amp;quot;&amp;gt;&lt;br /&gt;
Order deny,allow&lt;br /&gt;
deny from all&lt;br /&gt;
allow from 172.16.5.0/24&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AllowOverride Directive ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride None&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apache Server is capable of accepting and processing GET,HEAD,POST,OPTIONS,PUT,DELETE HTTP request methods.&lt;br /&gt;
If we use &amp;lt;LimitExcept&amp;gt; directive then Apache will not  process the unnecessary HTTP request methods.&lt;br /&gt;
The primary security concerened is to disable the unnecessary HTTP request methods.&lt;br /&gt;
Apache &amp;lt;LimitExcept&amp;gt; directive does not deny the TRACE request method. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default all the HTTP request methods are accepted by Apache Server.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory &amp;quot;/usr/local/apache2/cgi-bin&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 # Limit HTTP methods&lt;br /&gt;
	&amp;lt;LimitExcept GET POST OPTIONS&amp;gt;&lt;br /&gt;
			deny from all&lt;br /&gt;
	&amp;lt;/LimitExcept&amp;gt;&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
HTTP Trace Method is enabled by default on the Apache Web Server.&lt;br /&gt;
This method intended for diagnostics purposes.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Method 1:&lt;br /&gt;
1. Locate the Apache configuration files and included configuration files.&lt;br /&gt;
2. Verify there is a single TraceEnable directive configured with a value of off.&lt;br /&gt;
&lt;br /&gt;
Method 2:&lt;br /&gt;
Telnet on the port your web server is running and request for “TRACE / HTTP/1.0” if you get a positive reply it means TRACE is enabled on your system.&lt;br /&gt;
The output of a server with TRACE enabled will look like:&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Below is an example of MisConfiguration.&lt;br /&gt;
&amp;lt;pre&amp;gt;TraceEnable on&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Locate the main Apache configuration file such as httpd.conf.&lt;br /&gt;
2.Add a TraceEnable directive to the server level configuration with a value of off as shown&lt;br /&gt;
&amp;lt;pre&amp;gt;TraceEnable off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Many attacks in the process of enumeration they use Vulnerability Scanners,Automated Programs and other fingerprinting tools to send abnormal HTTP protocol version to check how Web Server responds and it is very important that we need to deny these requests.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&amp;lt;br&amp;gt;&lt;br /&gt;
2.Verify that below module is loaded.&lt;br /&gt;
&amp;lt;pre&amp;gt;mod_rewrite.so&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
By default this module is not loaded.So we need to load the module.&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Method1:&amp;lt;br&amp;gt;&lt;br /&gt;
While compiling the Apache for installation we can enable this module and then install it.&lt;br /&gt;
&amp;lt;pre&amp;gt;#./configure --enable-rewrite&amp;lt;/pre&amp;gt;&lt;br /&gt;
If the Apache is installed with default parameter then we can also use the below Method&amp;lt;br&amp;gt; &lt;br /&gt;
Method2:&amp;lt;br&amp;gt;&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&amp;lt;br&amp;gt;&lt;br /&gt;
2.Add the following line to the Configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;LoadModule rewrite_module modules/mod_rewrite.so&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.Add/change the RewriteEngine directive to the configuration as shown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{THE_REQUEST} !HTTP/1\.1$ &lt;br /&gt;
RewriteRule .* - [F]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The following configuration prevent .htaccess and .htpasswd files from being viewed by Web clients.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Verify the below recommended configuration is present in the Apache config file and make sure they are not commented out.&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Below is the Misconfiguration&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^\.ht&amp;quot;&amp;gt;&lt;br /&gt;
Order allow&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&lt;br /&gt;
2.Add the following line to the Configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^\.ht&amp;quot;&amp;gt;&lt;br /&gt;
Order allow,deny&lt;br /&gt;
Deny from all&lt;br /&gt;
Satisfy All&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are many files that are often left within the web server document root that could provide an attacker with sensitive information. Most often these files are mistakenly left behind after installation, trouble-shooting, or backing up files before editing.&lt;br /&gt;
We use FilesMatch directive to restrict access to only those file extensions that are appropriate for the web server.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Verify the below recommended configuration is present in the Apache config file and make sure they are not commented out.&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Block all files by default, unless specifically allowed.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^.*$&amp;quot;&amp;gt;&lt;br /&gt;
Order Deny,Allow&lt;br /&gt;
Deny from all&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&amp;lt;br&amp;gt;&lt;br /&gt;
2.Add the following line to the Configuration file so that Web Server Allow files with specifically approved file extensions&lt;br /&gt;
such as &amp;quot;css,htm,html,js,pdf,txt,xml,xsl&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^.*\.(css|html?|js|pdf|txt|xml|xsl|gif|ico|jpe?g|png)$&amp;quot;&amp;gt;&lt;br /&gt;
Order Deny,Allow&lt;br /&gt;
Allow from all&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: File extensions should be matched carefully and should be changed based upon the reqruiement.&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=202558</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=202558"/>
				<updated>2015-10-23T12:10:59Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Restrict file extensions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR ANY QUERIES!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Setting the appropriate permissions on the Apache files and directories can help to prevent/mitigate exploitation severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Preventing execution of Apache binaries with limited permission will decrease the attack surface.&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Run the below command to check the file permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#ls -l /var/www/html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
Other than rwxr-xr-x would be considered as a mis configuration.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Restrict OS Root directory access using Allow,Deny Directive ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Apache will serve any file mapped from an URL to clients with efault configuration.&lt;br /&gt;
&lt;br /&gt;
It is better to create a deny policy that will not allow access to Operating system directoories or files.&lt;br /&gt;
&lt;br /&gt;
A small modification in the configuration will allow access to tthe required files.&lt;br /&gt;
&lt;br /&gt;
The order of the directive is important as it provides for otherr Allow diectives to override the default deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server.&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;.&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element.  &lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order allow,deny&lt;br /&gt;
 Allow from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Deny from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict WebSite Content using Allow,Deny Directive === &lt;br /&gt;
==== Description ====&lt;br /&gt;
Appropriate access to various files,directories, locations and virtual hosts that contains web site content can make attack surface strong.&lt;br /&gt;
&lt;br /&gt;
Based up on the requirement you can provide allow access or you can deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server. &amp;lt;br&amp;gt;&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&amp;lt;br&amp;gt; &lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MisConfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html/&amp;quot;&amp;gt;&lt;br /&gt;
Order deny,allow&lt;br /&gt;
deny from all&lt;br /&gt;
allow from 172.16.5.0/24&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AllowOverride Directive ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride None&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apache Server is capable of accepting and processing GET,HEAD,POST,OPTIONS,PUT,DELETE HTTP request methods.&lt;br /&gt;
If we use &amp;lt;LimitExcept&amp;gt; directive then Apache will not  process the unnecessary HTTP request methods.&lt;br /&gt;
The primary security concerened is to disable the unnecessary HTTP request methods.&lt;br /&gt;
Apache &amp;lt;LimitExcept&amp;gt; directive does not deny the TRACE request method. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default all the HTTP request methods are accepted by Apache Server.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory &amp;quot;/usr/local/apache2/cgi-bin&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 # Limit HTTP methods&lt;br /&gt;
	&amp;lt;LimitExcept GET POST OPTIONS&amp;gt;&lt;br /&gt;
			deny from all&lt;br /&gt;
	&amp;lt;/LimitExcept&amp;gt;&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
HTTP Trace Method is enabled by default on the Apache Web Server.&lt;br /&gt;
This method intended for diagnostics purposes.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Method 1:&lt;br /&gt;
1. Locate the Apache configuration files and included configuration files.&lt;br /&gt;
2. Verify there is a single TraceEnable directive configured with a value of off.&lt;br /&gt;
&lt;br /&gt;
Method 2:&lt;br /&gt;
Telnet on the port your web server is running and request for “TRACE / HTTP/1.0” if you get a positive reply it means TRACE is enabled on your system.&lt;br /&gt;
The output of a server with TRACE enabled will look like:&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Below is an example of MisConfiguration.&lt;br /&gt;
&amp;lt;pre&amp;gt;TraceEnable on&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Locate the main Apache configuration file such as httpd.conf.&lt;br /&gt;
2.Add a TraceEnable directive to the server level configuration with a value of off as shown&lt;br /&gt;
&amp;lt;pre&amp;gt;TraceEnable off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Many attacks in the process of enumeration they use Vulnerability Scanners,Automated Programs and other fingerprinting tools to send abnormal HTTP protocol version to check how Web Server responds and it is very important that we need to deny these requests.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&amp;lt;br&amp;gt;&lt;br /&gt;
2.Verify that below module is loaded.&lt;br /&gt;
&amp;lt;pre&amp;gt;mod_rewrite.so&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
By default this module is not loaded.So we need to load the module.&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Method1:&amp;lt;br&amp;gt;&lt;br /&gt;
While compiling the Apache for installation we can enable this module and then install it.&lt;br /&gt;
&amp;lt;pre&amp;gt;#./configure --enable-rewrite&amp;lt;/pre&amp;gt;&lt;br /&gt;
If the Apache is installed with default parameter then we can also use the below Method&amp;lt;br&amp;gt; &lt;br /&gt;
Method2:&amp;lt;br&amp;gt;&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&amp;lt;br&amp;gt;&lt;br /&gt;
2.Add the following line to the Configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;LoadModule rewrite_module modules/mod_rewrite.so&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.Add/change the RewriteEngine directive to the configuration as shown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{THE_REQUEST} !HTTP/1\.1$ &lt;br /&gt;
RewriteRule .* - [F]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The following configuration prevent .htaccess and .htpasswd files from being viewed by Web clients.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Verify the below recommended configuration is present in the Apache config file and make sure they are not commented out.&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Below is the Misconfiguration&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^\.ht&amp;quot;&amp;gt;&lt;br /&gt;
Order allow&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&lt;br /&gt;
2.Add the following line to the Configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^\.ht&amp;quot;&amp;gt;&lt;br /&gt;
Order allow,deny&lt;br /&gt;
Deny from all&lt;br /&gt;
Satisfy All&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are many files that are often left within the web server document root that could provide an attacker with sensitive information. Most often these files are mistakenly left behind after installation, trouble-shooting, or backing up files before editing.&lt;br /&gt;
We use FilesMatch directive to restrict access to only those file extensions that are appropriate for the web server.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Verify the below recommended configuration is present in the Apache config file and make sure they are not commented out.&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Block all files by default, unless specifically allowed.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^.*$&amp;quot;&amp;gt;&lt;br /&gt;
Order Deny,Allow&lt;br /&gt;
Deny from all&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&lt;br /&gt;
2.Add the following line to the Configuration file so that Web Server Allow files with specifically approved file extensions&lt;br /&gt;
such as &amp;quot;css,htm,html,js,pdf,txt,xml,xsl&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^.*\.(css|html?|js|pdf|txt|xml|xsl|gif|ico|jpe?g|png)$&amp;quot;&amp;gt;&lt;br /&gt;
Order Deny,Allow&lt;br /&gt;
Allow from all&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: File extensions should be matched carefully and should be changed based upon the reqruiement.&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=202557</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=202557"/>
				<updated>2015-10-23T12:10:26Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Restrict file extensions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR ANY QUERIES!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Setting the appropriate permissions on the Apache files and directories can help to prevent/mitigate exploitation severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Preventing execution of Apache binaries with limited permission will decrease the attack surface.&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Run the below command to check the file permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#ls -l /var/www/html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
Other than rwxr-xr-x would be considered as a mis configuration.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Restrict OS Root directory access using Allow,Deny Directive ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Apache will serve any file mapped from an URL to clients with efault configuration.&lt;br /&gt;
&lt;br /&gt;
It is better to create a deny policy that will not allow access to Operating system directoories or files.&lt;br /&gt;
&lt;br /&gt;
A small modification in the configuration will allow access to tthe required files.&lt;br /&gt;
&lt;br /&gt;
The order of the directive is important as it provides for otherr Allow diectives to override the default deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server.&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;.&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element.  &lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order allow,deny&lt;br /&gt;
 Allow from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Deny from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict WebSite Content using Allow,Deny Directive === &lt;br /&gt;
==== Description ====&lt;br /&gt;
Appropriate access to various files,directories, locations and virtual hosts that contains web site content can make attack surface strong.&lt;br /&gt;
&lt;br /&gt;
Based up on the requirement you can provide allow access or you can deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server. &amp;lt;br&amp;gt;&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&amp;lt;br&amp;gt; &lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MisConfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html/&amp;quot;&amp;gt;&lt;br /&gt;
Order deny,allow&lt;br /&gt;
deny from all&lt;br /&gt;
allow from 172.16.5.0/24&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AllowOverride Directive ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride None&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apache Server is capable of accepting and processing GET,HEAD,POST,OPTIONS,PUT,DELETE HTTP request methods.&lt;br /&gt;
If we use &amp;lt;LimitExcept&amp;gt; directive then Apache will not  process the unnecessary HTTP request methods.&lt;br /&gt;
The primary security concerened is to disable the unnecessary HTTP request methods.&lt;br /&gt;
Apache &amp;lt;LimitExcept&amp;gt; directive does not deny the TRACE request method. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default all the HTTP request methods are accepted by Apache Server.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory &amp;quot;/usr/local/apache2/cgi-bin&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 # Limit HTTP methods&lt;br /&gt;
	&amp;lt;LimitExcept GET POST OPTIONS&amp;gt;&lt;br /&gt;
			deny from all&lt;br /&gt;
	&amp;lt;/LimitExcept&amp;gt;&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
HTTP Trace Method is enabled by default on the Apache Web Server.&lt;br /&gt;
This method intended for diagnostics purposes.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Method 1:&lt;br /&gt;
1. Locate the Apache configuration files and included configuration files.&lt;br /&gt;
2. Verify there is a single TraceEnable directive configured with a value of off.&lt;br /&gt;
&lt;br /&gt;
Method 2:&lt;br /&gt;
Telnet on the port your web server is running and request for “TRACE / HTTP/1.0” if you get a positive reply it means TRACE is enabled on your system.&lt;br /&gt;
The output of a server with TRACE enabled will look like:&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Below is an example of MisConfiguration.&lt;br /&gt;
&amp;lt;pre&amp;gt;TraceEnable on&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Locate the main Apache configuration file such as httpd.conf.&lt;br /&gt;
2.Add a TraceEnable directive to the server level configuration with a value of off as shown&lt;br /&gt;
&amp;lt;pre&amp;gt;TraceEnable off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Many attacks in the process of enumeration they use Vulnerability Scanners,Automated Programs and other fingerprinting tools to send abnormal HTTP protocol version to check how Web Server responds and it is very important that we need to deny these requests.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&amp;lt;br&amp;gt;&lt;br /&gt;
2.Verify that below module is loaded.&lt;br /&gt;
&amp;lt;pre&amp;gt;mod_rewrite.so&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
By default this module is not loaded.So we need to load the module.&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Method1:&amp;lt;br&amp;gt;&lt;br /&gt;
While compiling the Apache for installation we can enable this module and then install it.&lt;br /&gt;
&amp;lt;pre&amp;gt;#./configure --enable-rewrite&amp;lt;/pre&amp;gt;&lt;br /&gt;
If the Apache is installed with default parameter then we can also use the below Method&amp;lt;br&amp;gt; &lt;br /&gt;
Method2:&amp;lt;br&amp;gt;&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&amp;lt;br&amp;gt;&lt;br /&gt;
2.Add the following line to the Configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;LoadModule rewrite_module modules/mod_rewrite.so&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.Add/change the RewriteEngine directive to the configuration as shown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{THE_REQUEST} !HTTP/1\.1$ &lt;br /&gt;
RewriteRule .* - [F]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The following configuration prevent .htaccess and .htpasswd files from being viewed by Web clients.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Verify the below recommended configuration is present in the Apache config file and make sure they are not commented out.&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Below is the Misconfiguration&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^\.ht&amp;quot;&amp;gt;&lt;br /&gt;
Order allow&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&lt;br /&gt;
2.Add the following line to the Configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^\.ht&amp;quot;&amp;gt;&lt;br /&gt;
Order allow,deny&lt;br /&gt;
Deny from all&lt;br /&gt;
Satisfy All&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
There are many files that are often left within the web server document root that could provide an attacker with sensitive information. Most often these files are mistakenly left behind after installation, trouble-shooting, or backing up files before editing.&lt;br /&gt;
We use FilesMatch directive to restrict access to only those file extensions that are appropriate for the web server.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Verify the below recommended configuration is present in the Apache config file and make sure they are not commented out.&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Block all files by default, unless specifically allowed.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^.*$&amp;quot;&amp;gt;&lt;br /&gt;
Order Deny,Allow&lt;br /&gt;
Deny from all&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&lt;br /&gt;
2.Add the following line to the Configuration file so that Web Server Allow files with specifically approved file extensions&lt;br /&gt;
such as &amp;quot;css,htm,html,js,pdf,txt,xml,xsl&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^.*\.(css|html?|js|pdf|txt|xml|xsl|gif|ico|jpe?g|png)$&amp;quot;&amp;gt;&lt;br /&gt;
Order Deny,Allow&lt;br /&gt;
Allow from all&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: File extensions should be matched carefully and should be changed based upon the reqruiement.&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=202556</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=202556"/>
				<updated>2015-10-23T12:01:17Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Restrict access to .htaccess files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR ANY QUERIES!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Setting the appropriate permissions on the Apache files and directories can help to prevent/mitigate exploitation severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Preventing execution of Apache binaries with limited permission will decrease the attack surface.&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Run the below command to check the file permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#ls -l /var/www/html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
Other than rwxr-xr-x would be considered as a mis configuration.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Restrict OS Root directory access using Allow,Deny Directive ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Apache will serve any file mapped from an URL to clients with efault configuration.&lt;br /&gt;
&lt;br /&gt;
It is better to create a deny policy that will not allow access to Operating system directoories or files.&lt;br /&gt;
&lt;br /&gt;
A small modification in the configuration will allow access to tthe required files.&lt;br /&gt;
&lt;br /&gt;
The order of the directive is important as it provides for otherr Allow diectives to override the default deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server.&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;.&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element.  &lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order allow,deny&lt;br /&gt;
 Allow from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Deny from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict WebSite Content using Allow,Deny Directive === &lt;br /&gt;
==== Description ====&lt;br /&gt;
Appropriate access to various files,directories, locations and virtual hosts that contains web site content can make attack surface strong.&lt;br /&gt;
&lt;br /&gt;
Based up on the requirement you can provide allow access or you can deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server. &amp;lt;br&amp;gt;&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&amp;lt;br&amp;gt; &lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MisConfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html/&amp;quot;&amp;gt;&lt;br /&gt;
Order deny,allow&lt;br /&gt;
deny from all&lt;br /&gt;
allow from 172.16.5.0/24&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AllowOverride Directive ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride None&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apache Server is capable of accepting and processing GET,HEAD,POST,OPTIONS,PUT,DELETE HTTP request methods.&lt;br /&gt;
If we use &amp;lt;LimitExcept&amp;gt; directive then Apache will not  process the unnecessary HTTP request methods.&lt;br /&gt;
The primary security concerened is to disable the unnecessary HTTP request methods.&lt;br /&gt;
Apache &amp;lt;LimitExcept&amp;gt; directive does not deny the TRACE request method. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default all the HTTP request methods are accepted by Apache Server.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory &amp;quot;/usr/local/apache2/cgi-bin&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 # Limit HTTP methods&lt;br /&gt;
	&amp;lt;LimitExcept GET POST OPTIONS&amp;gt;&lt;br /&gt;
			deny from all&lt;br /&gt;
	&amp;lt;/LimitExcept&amp;gt;&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
HTTP Trace Method is enabled by default on the Apache Web Server.&lt;br /&gt;
This method intended for diagnostics purposes.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Method 1:&lt;br /&gt;
1. Locate the Apache configuration files and included configuration files.&lt;br /&gt;
2. Verify there is a single TraceEnable directive configured with a value of off.&lt;br /&gt;
&lt;br /&gt;
Method 2:&lt;br /&gt;
Telnet on the port your web server is running and request for “TRACE / HTTP/1.0” if you get a positive reply it means TRACE is enabled on your system.&lt;br /&gt;
The output of a server with TRACE enabled will look like:&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Below is an example of MisConfiguration.&lt;br /&gt;
&amp;lt;pre&amp;gt;TraceEnable on&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Locate the main Apache configuration file such as httpd.conf.&lt;br /&gt;
2.Add a TraceEnable directive to the server level configuration with a value of off as shown&lt;br /&gt;
&amp;lt;pre&amp;gt;TraceEnable off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Many attacks in the process of enumeration they use Vulnerability Scanners,Automated Programs and other fingerprinting tools to send abnormal HTTP protocol version to check how Web Server responds and it is very important that we need to deny these requests.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&amp;lt;br&amp;gt;&lt;br /&gt;
2.Verify that below module is loaded.&lt;br /&gt;
&amp;lt;pre&amp;gt;mod_rewrite.so&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
By default this module is not loaded.So we need to load the module.&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Method1:&amp;lt;br&amp;gt;&lt;br /&gt;
While compiling the Apache for installation we can enable this module and then install it.&lt;br /&gt;
&amp;lt;pre&amp;gt;#./configure --enable-rewrite&amp;lt;/pre&amp;gt;&lt;br /&gt;
If the Apache is installed with default parameter then we can also use the below Method&amp;lt;br&amp;gt; &lt;br /&gt;
Method2:&amp;lt;br&amp;gt;&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&amp;lt;br&amp;gt;&lt;br /&gt;
2.Add the following line to the Configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;LoadModule rewrite_module modules/mod_rewrite.so&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.Add/change the RewriteEngine directive to the configuration as shown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{THE_REQUEST} !HTTP/1\.1$ &lt;br /&gt;
RewriteRule .* - [F]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The following configuration prevent .htaccess and .htpasswd files from being viewed by Web clients.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Verify the below recommended configuration is present in the Apache config file and make sure they are not commented out.&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Below is the Misconfiguration&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^\.ht&amp;quot;&amp;gt;&lt;br /&gt;
Order allow&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&lt;br /&gt;
2.Add the following line to the Configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;FilesMatch &amp;quot;^\.ht&amp;quot;&amp;gt;&lt;br /&gt;
Order allow,deny&lt;br /&gt;
Deny from all&lt;br /&gt;
Satisfy All&lt;br /&gt;
&amp;lt;/FilesMatch&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=202555</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=202555"/>
				<updated>2015-10-23T11:52:07Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Remediation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR ANY QUERIES!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Setting the appropriate permissions on the Apache files and directories can help to prevent/mitigate exploitation severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Preventing execution of Apache binaries with limited permission will decrease the attack surface.&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Run the below command to check the file permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#ls -l /var/www/html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
Other than rwxr-xr-x would be considered as a mis configuration.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Restrict OS Root directory access using Allow,Deny Directive ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Apache will serve any file mapped from an URL to clients with efault configuration.&lt;br /&gt;
&lt;br /&gt;
It is better to create a deny policy that will not allow access to Operating system directoories or files.&lt;br /&gt;
&lt;br /&gt;
A small modification in the configuration will allow access to tthe required files.&lt;br /&gt;
&lt;br /&gt;
The order of the directive is important as it provides for otherr Allow diectives to override the default deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server.&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;.&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element.  &lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order allow,deny&lt;br /&gt;
 Allow from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Deny from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict WebSite Content using Allow,Deny Directive === &lt;br /&gt;
==== Description ====&lt;br /&gt;
Appropriate access to various files,directories, locations and virtual hosts that contains web site content can make attack surface strong.&lt;br /&gt;
&lt;br /&gt;
Based up on the requirement you can provide allow access or you can deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server. &amp;lt;br&amp;gt;&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&amp;lt;br&amp;gt; &lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MisConfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html/&amp;quot;&amp;gt;&lt;br /&gt;
Order deny,allow&lt;br /&gt;
deny from all&lt;br /&gt;
allow from 172.16.5.0/24&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AllowOverride Directive ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride None&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apache Server is capable of accepting and processing GET,HEAD,POST,OPTIONS,PUT,DELETE HTTP request methods.&lt;br /&gt;
If we use &amp;lt;LimitExcept&amp;gt; directive then Apache will not  process the unnecessary HTTP request methods.&lt;br /&gt;
The primary security concerened is to disable the unnecessary HTTP request methods.&lt;br /&gt;
Apache &amp;lt;LimitExcept&amp;gt; directive does not deny the TRACE request method. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default all the HTTP request methods are accepted by Apache Server.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory &amp;quot;/usr/local/apache2/cgi-bin&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 # Limit HTTP methods&lt;br /&gt;
	&amp;lt;LimitExcept GET POST OPTIONS&amp;gt;&lt;br /&gt;
			deny from all&lt;br /&gt;
	&amp;lt;/LimitExcept&amp;gt;&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
HTTP Trace Method is enabled by default on the Apache Web Server.&lt;br /&gt;
This method intended for diagnostics purposes.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Method 1:&lt;br /&gt;
1. Locate the Apache configuration files and included configuration files.&lt;br /&gt;
2. Verify there is a single TraceEnable directive configured with a value of off.&lt;br /&gt;
&lt;br /&gt;
Method 2:&lt;br /&gt;
Telnet on the port your web server is running and request for “TRACE / HTTP/1.0” if you get a positive reply it means TRACE is enabled on your system.&lt;br /&gt;
The output of a server with TRACE enabled will look like:&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Below is an example of MisConfiguration.&lt;br /&gt;
&amp;lt;pre&amp;gt;TraceEnable on&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Locate the main Apache configuration file such as httpd.conf.&lt;br /&gt;
2.Add a TraceEnable directive to the server level configuration with a value of off as shown&lt;br /&gt;
&amp;lt;pre&amp;gt;TraceEnable off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Many attacks in the process of enumeration they use Vulnerability Scanners,Automated Programs and other fingerprinting tools to send abnormal HTTP protocol version to check how Web Server responds and it is very important that we need to deny these requests.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&amp;lt;br&amp;gt;&lt;br /&gt;
2.Verify that below module is loaded.&lt;br /&gt;
&amp;lt;pre&amp;gt;mod_rewrite.so&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
By default this module is not loaded.So we need to load the module.&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Method1:&amp;lt;br&amp;gt;&lt;br /&gt;
While compiling the Apache for installation we can enable this module and then install it.&lt;br /&gt;
&amp;lt;pre&amp;gt;#./configure --enable-rewrite&amp;lt;/pre&amp;gt;&lt;br /&gt;
If the Apache is installed with default parameter then we can also use the below Method&amp;lt;br&amp;gt; &lt;br /&gt;
Method2:&amp;lt;br&amp;gt;&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&amp;lt;br&amp;gt;&lt;br /&gt;
2.Add the following line to the Configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;LoadModule rewrite_module modules/mod_rewrite.so&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.Add/change the RewriteEngine directive to the configuration as shown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{THE_REQUEST} !HTTP/1\.1$ &lt;br /&gt;
RewriteRule .* - [F]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=202554</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=202554"/>
				<updated>2015-10-23T11:47:09Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* HTTP Protocol Version */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR ANY QUERIES!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Setting the appropriate permissions on the Apache files and directories can help to prevent/mitigate exploitation severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Preventing execution of Apache binaries with limited permission will decrease the attack surface.&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Run the below command to check the file permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#ls -l /var/www/html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
Other than rwxr-xr-x would be considered as a mis configuration.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Restrict OS Root directory access using Allow,Deny Directive ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Apache will serve any file mapped from an URL to clients with efault configuration.&lt;br /&gt;
&lt;br /&gt;
It is better to create a deny policy that will not allow access to Operating system directoories or files.&lt;br /&gt;
&lt;br /&gt;
A small modification in the configuration will allow access to tthe required files.&lt;br /&gt;
&lt;br /&gt;
The order of the directive is important as it provides for otherr Allow diectives to override the default deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server.&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;.&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element.  &lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order allow,deny&lt;br /&gt;
 Allow from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Deny from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict WebSite Content using Allow,Deny Directive === &lt;br /&gt;
==== Description ====&lt;br /&gt;
Appropriate access to various files,directories, locations and virtual hosts that contains web site content can make attack surface strong.&lt;br /&gt;
&lt;br /&gt;
Based up on the requirement you can provide allow access or you can deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server. &amp;lt;br&amp;gt;&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&amp;lt;br&amp;gt; &lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MisConfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html/&amp;quot;&amp;gt;&lt;br /&gt;
Order deny,allow&lt;br /&gt;
deny from all&lt;br /&gt;
allow from 172.16.5.0/24&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AllowOverride Directive ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride None&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apache Server is capable of accepting and processing GET,HEAD,POST,OPTIONS,PUT,DELETE HTTP request methods.&lt;br /&gt;
If we use &amp;lt;LimitExcept&amp;gt; directive then Apache will not  process the unnecessary HTTP request methods.&lt;br /&gt;
The primary security concerened is to disable the unnecessary HTTP request methods.&lt;br /&gt;
Apache &amp;lt;LimitExcept&amp;gt; directive does not deny the TRACE request method. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default all the HTTP request methods are accepted by Apache Server.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory &amp;quot;/usr/local/apache2/cgi-bin&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 # Limit HTTP methods&lt;br /&gt;
	&amp;lt;LimitExcept GET POST OPTIONS&amp;gt;&lt;br /&gt;
			deny from all&lt;br /&gt;
	&amp;lt;/LimitExcept&amp;gt;&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
HTTP Trace Method is enabled by default on the Apache Web Server.&lt;br /&gt;
This method intended for diagnostics purposes.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Method 1:&lt;br /&gt;
1. Locate the Apache configuration files and included configuration files.&lt;br /&gt;
2. Verify there is a single TraceEnable directive configured with a value of off.&lt;br /&gt;
&lt;br /&gt;
Method 2:&lt;br /&gt;
Telnet on the port your web server is running and request for “TRACE / HTTP/1.0” if you get a positive reply it means TRACE is enabled on your system.&lt;br /&gt;
The output of a server with TRACE enabled will look like:&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Below is an example of MisConfiguration.&lt;br /&gt;
&amp;lt;pre&amp;gt;TraceEnable on&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Locate the main Apache configuration file such as httpd.conf.&lt;br /&gt;
2.Add a TraceEnable directive to the server level configuration with a value of off as shown&lt;br /&gt;
&amp;lt;pre&amp;gt;TraceEnable off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Many attacks in the process of enumeration they use Vulnerability Scanners,Automated Programs and other fingerprinting tools to send abnormal HTTP protocol version to check how Web Server responds and it is very important that we need to deny these requests.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&amp;lt;br&amp;gt;&lt;br /&gt;
2.Verify that below module is loaded.&lt;br /&gt;
&amp;lt;pre&amp;gt;mod_rewrite.so&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
By default this module is not loaded.So we need to load the module.&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Method1:&amp;lt;br&amp;gt;&lt;br /&gt;
While compiling the Apache for installation we can enable this module and then install it.&lt;br /&gt;
&amp;lt;pre&amp;gt;#./configure --enable-rewrite&amp;lt;/pre&amp;gt;&lt;br /&gt;
If the Apache is installed with default parameter then we can also use the below Method&amp;lt;br&amp;gt; &lt;br /&gt;
Method2:&amp;lt;br&amp;gt;&lt;br /&gt;
1.Locate the Apache configuration files and included configuration files.&amp;lt;br&amp;gt;&lt;br /&gt;
2.Add the following line to the Configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;LoadModule rewrite_module modules/mod_rewrite.so&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.Add/change the RewriteEngine directive to the configuration as shown.&lt;br /&gt;
&amp;lt;pre&amp;gt;RewriteEngine On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=202553</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=202553"/>
				<updated>2015-10-23T11:30:00Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Disable HTTP Trace Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR ANY QUERIES!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Setting the appropriate permissions on the Apache files and directories can help to prevent/mitigate exploitation severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Preventing execution of Apache binaries with limited permission will decrease the attack surface.&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Run the below command to check the file permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#ls -l /var/www/html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
Other than rwxr-xr-x would be considered as a mis configuration.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Restrict OS Root directory access using Allow,Deny Directive ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Apache will serve any file mapped from an URL to clients with efault configuration.&lt;br /&gt;
&lt;br /&gt;
It is better to create a deny policy that will not allow access to Operating system directoories or files.&lt;br /&gt;
&lt;br /&gt;
A small modification in the configuration will allow access to tthe required files.&lt;br /&gt;
&lt;br /&gt;
The order of the directive is important as it provides for otherr Allow diectives to override the default deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server.&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;.&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element.  &lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order allow,deny&lt;br /&gt;
 Allow from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Deny from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict WebSite Content using Allow,Deny Directive === &lt;br /&gt;
==== Description ====&lt;br /&gt;
Appropriate access to various files,directories, locations and virtual hosts that contains web site content can make attack surface strong.&lt;br /&gt;
&lt;br /&gt;
Based up on the requirement you can provide allow access or you can deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server. &amp;lt;br&amp;gt;&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&amp;lt;br&amp;gt; &lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MisConfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html/&amp;quot;&amp;gt;&lt;br /&gt;
Order deny,allow&lt;br /&gt;
deny from all&lt;br /&gt;
allow from 172.16.5.0/24&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AllowOverride Directive ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride None&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apache Server is capable of accepting and processing GET,HEAD,POST,OPTIONS,PUT,DELETE HTTP request methods.&lt;br /&gt;
If we use &amp;lt;LimitExcept&amp;gt; directive then Apache will not  process the unnecessary HTTP request methods.&lt;br /&gt;
The primary security concerened is to disable the unnecessary HTTP request methods.&lt;br /&gt;
Apache &amp;lt;LimitExcept&amp;gt; directive does not deny the TRACE request method. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default all the HTTP request methods are accepted by Apache Server.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory &amp;quot;/usr/local/apache2/cgi-bin&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 # Limit HTTP methods&lt;br /&gt;
	&amp;lt;LimitExcept GET POST OPTIONS&amp;gt;&lt;br /&gt;
			deny from all&lt;br /&gt;
	&amp;lt;/LimitExcept&amp;gt;&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
HTTP Trace Method is enabled by default on the Apache Web Server.&lt;br /&gt;
This method intended for diagnostics purposes.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Method 1:&lt;br /&gt;
1. Locate the Apache configuration files and included configuration files.&lt;br /&gt;
2. Verify there is a single TraceEnable directive configured with a value of off.&lt;br /&gt;
&lt;br /&gt;
Method 2:&lt;br /&gt;
Telnet on the port your web server is running and request for “TRACE / HTTP/1.0” if you get a positive reply it means TRACE is enabled on your system.&lt;br /&gt;
The output of a server with TRACE enabled will look like:&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Below is an example of MisConfiguration.&lt;br /&gt;
&amp;lt;pre&amp;gt;TraceEnable on&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
1.Locate the main Apache configuration file such as httpd.conf.&lt;br /&gt;
2.Add a TraceEnable directive to the server level configuration with a value of off as shown&lt;br /&gt;
&amp;lt;pre&amp;gt;TraceEnable off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=202552</id>
		<title>Nishanthkumarpathi</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=202552"/>
				<updated>2015-10-23T11:12:05Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Over Internet */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Nishanth Kumar is a dynamic professional with an  experience in Information Security, Network Security Analysis, and Compliance functions, Linux Administration, System Administration &amp;amp; Management to ensure secure information processing environment.&lt;br /&gt;
&lt;br /&gt;
== Skills ==&lt;br /&gt;
&lt;br /&gt;
Risk Assessment, Vulnerability Assessment, Penetration Testing, Perimeter Security, Incident handling, Log Analysis, Intrusion monitoring and networking.&lt;br /&gt;
&lt;br /&gt;
Deft in planning &amp;amp; managing entire IT infrastructure setup which includes assessment of hardware /software requirements , negotiation of purchase , installation &amp;amp; configuration of entire IT infrastructure in line with business requirements and migration of data from legacy systems.&lt;br /&gt;
Assessing organizational requirements for security &amp;amp; implementing security software system against various attacks; executing backup strategy etc.&lt;br /&gt;
&lt;br /&gt;
Knowledge in IT Security, Business Continuity, Risk Management and Security Audits.&lt;br /&gt;
&lt;br /&gt;
Documenting business process, drafting Policy / Procedures in line with ISMS standard, reviewing Business Continuity and Disaster Recovery plans &amp;amp; Generation of metrics review reports.&lt;br /&gt;
&lt;br /&gt;
Knowledge on auditing concepts.&lt;br /&gt;
&lt;br /&gt;
== Certifications ==&lt;br /&gt;
&lt;br /&gt;
Juniper Networks Certified Professional - Security &amp;lt;br&amp;gt;&lt;br /&gt;
Juniper Networks Certified Specialist - Security &amp;lt;br&amp;gt;&lt;br /&gt;
Juniper Networks Certified Associate - Junos &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Over Internet ==&lt;br /&gt;
* [http://nishanth.co.in/ Portfolio]&lt;br /&gt;
* [http://in.linkedin.com/in/nishanthkumarpathi Linkedin Profile]&lt;br /&gt;
* [https://twitter.com/nishanthkumarp @nishanthkumarp on Twitter]&lt;br /&gt;
* [http://www.slideshare.net/pathinishanth/presentations Presentations on Slideshare]&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=202551</id>
		<title>Nishanthkumarpathi</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=202551"/>
				<updated>2015-10-23T11:10:29Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Over Internet */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Nishanth Kumar is a dynamic professional with an  experience in Information Security, Network Security Analysis, and Compliance functions, Linux Administration, System Administration &amp;amp; Management to ensure secure information processing environment.&lt;br /&gt;
&lt;br /&gt;
== Skills ==&lt;br /&gt;
&lt;br /&gt;
Risk Assessment, Vulnerability Assessment, Penetration Testing, Perimeter Security, Incident handling, Log Analysis, Intrusion monitoring and networking.&lt;br /&gt;
&lt;br /&gt;
Deft in planning &amp;amp; managing entire IT infrastructure setup which includes assessment of hardware /software requirements , negotiation of purchase , installation &amp;amp; configuration of entire IT infrastructure in line with business requirements and migration of data from legacy systems.&lt;br /&gt;
Assessing organizational requirements for security &amp;amp; implementing security software system against various attacks; executing backup strategy etc.&lt;br /&gt;
&lt;br /&gt;
Knowledge in IT Security, Business Continuity, Risk Management and Security Audits.&lt;br /&gt;
&lt;br /&gt;
Documenting business process, drafting Policy / Procedures in line with ISMS standard, reviewing Business Continuity and Disaster Recovery plans &amp;amp; Generation of metrics review reports.&lt;br /&gt;
&lt;br /&gt;
Knowledge on auditing concepts.&lt;br /&gt;
&lt;br /&gt;
== Certifications ==&lt;br /&gt;
&lt;br /&gt;
Juniper Networks Certified Professional - Security &amp;lt;br&amp;gt;&lt;br /&gt;
Juniper Networks Certified Specialist - Security &amp;lt;br&amp;gt;&lt;br /&gt;
Juniper Networks Certified Associate - Junos &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Over Internet ==&lt;br /&gt;
* [http://in.linkedin.com/in/nishanthkumarpathi Linkedin Profile]&lt;br /&gt;
* [https://twitter.com/nishanthkumarp @nishanthkumarp on Twitter]&lt;br /&gt;
* [http://www.slideshare.net/pathinishanth/presentations Presentations on Slideshare]&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=202500</id>
		<title>Nishanthkumarpathi</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=202500"/>
				<updated>2015-10-22T05:39:03Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Certifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Nishanth Kumar is a dynamic professional with an  experience in Information Security, Network Security Analysis, and Compliance functions, Linux Administration, System Administration &amp;amp; Management to ensure secure information processing environment.&lt;br /&gt;
&lt;br /&gt;
== Skills ==&lt;br /&gt;
&lt;br /&gt;
Risk Assessment, Vulnerability Assessment, Penetration Testing, Perimeter Security, Incident handling, Log Analysis, Intrusion monitoring and networking.&lt;br /&gt;
&lt;br /&gt;
Deft in planning &amp;amp; managing entire IT infrastructure setup which includes assessment of hardware /software requirements , negotiation of purchase , installation &amp;amp; configuration of entire IT infrastructure in line with business requirements and migration of data from legacy systems.&lt;br /&gt;
Assessing organizational requirements for security &amp;amp; implementing security software system against various attacks; executing backup strategy etc.&lt;br /&gt;
&lt;br /&gt;
Knowledge in IT Security, Business Continuity, Risk Management and Security Audits.&lt;br /&gt;
&lt;br /&gt;
Documenting business process, drafting Policy / Procedures in line with ISMS standard, reviewing Business Continuity and Disaster Recovery plans &amp;amp; Generation of metrics review reports.&lt;br /&gt;
&lt;br /&gt;
Knowledge on auditing concepts.&lt;br /&gt;
&lt;br /&gt;
== Certifications ==&lt;br /&gt;
&lt;br /&gt;
Juniper Networks Certified Professional - Security &amp;lt;br&amp;gt;&lt;br /&gt;
Juniper Networks Certified Specialist - Security &amp;lt;br&amp;gt;&lt;br /&gt;
Juniper Networks Certified Associate - Junos &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Over Internet ==&lt;br /&gt;
* [http://linkd.in/webappsecguy Linkedin Profile]&lt;br /&gt;
* [https://twitter.com/nishanthkumarp @nishanthkumarp on Twitter]&lt;br /&gt;
* [http://www.slideshare.net/pathinishanth/presentations Presentations on Slideshare]&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=202499</id>
		<title>Nishanthkumarpathi</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=202499"/>
				<updated>2015-10-22T05:38:31Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Certifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Nishanth Kumar is a dynamic professional with an  experience in Information Security, Network Security Analysis, and Compliance functions, Linux Administration, System Administration &amp;amp; Management to ensure secure information processing environment.&lt;br /&gt;
&lt;br /&gt;
== Skills ==&lt;br /&gt;
&lt;br /&gt;
Risk Assessment, Vulnerability Assessment, Penetration Testing, Perimeter Security, Incident handling, Log Analysis, Intrusion monitoring and networking.&lt;br /&gt;
&lt;br /&gt;
Deft in planning &amp;amp; managing entire IT infrastructure setup which includes assessment of hardware /software requirements , negotiation of purchase , installation &amp;amp; configuration of entire IT infrastructure in line with business requirements and migration of data from legacy systems.&lt;br /&gt;
Assessing organizational requirements for security &amp;amp; implementing security software system against various attacks; executing backup strategy etc.&lt;br /&gt;
&lt;br /&gt;
Knowledge in IT Security, Business Continuity, Risk Management and Security Audits.&lt;br /&gt;
&lt;br /&gt;
Documenting business process, drafting Policy / Procedures in line with ISMS standard, reviewing Business Continuity and Disaster Recovery plans &amp;amp; Generation of metrics review reports.&lt;br /&gt;
&lt;br /&gt;
Knowledge on auditing concepts.&lt;br /&gt;
&lt;br /&gt;
== Certifications ==&lt;br /&gt;
&lt;br /&gt;
Juniper Networks Certified Professional - SECURITY&amp;lt;br&amp;gt;&lt;br /&gt;
Juniper Networks Certified Specialist - SECURITY&amp;lt;br&amp;gt;&lt;br /&gt;
Juniper Networks Certified Associate - JUNOS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Over Internet ==&lt;br /&gt;
* [http://linkd.in/webappsecguy Linkedin Profile]&lt;br /&gt;
* [https://twitter.com/nishanthkumarp @nishanthkumarp on Twitter]&lt;br /&gt;
* [http://www.slideshare.net/pathinishanth/presentations Presentations on Slideshare]&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=202498</id>
		<title>Nishanthkumarpathi</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=202498"/>
				<updated>2015-10-22T05:35:05Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Over Internet */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Nishanth Kumar is a dynamic professional with an  experience in Information Security, Network Security Analysis, and Compliance functions, Linux Administration, System Administration &amp;amp; Management to ensure secure information processing environment.&lt;br /&gt;
&lt;br /&gt;
== Skills ==&lt;br /&gt;
&lt;br /&gt;
Risk Assessment, Vulnerability Assessment, Penetration Testing, Perimeter Security, Incident handling, Log Analysis, Intrusion monitoring and networking.&lt;br /&gt;
&lt;br /&gt;
Deft in planning &amp;amp; managing entire IT infrastructure setup which includes assessment of hardware /software requirements , negotiation of purchase , installation &amp;amp; configuration of entire IT infrastructure in line with business requirements and migration of data from legacy systems.&lt;br /&gt;
Assessing organizational requirements for security &amp;amp; implementing security software system against various attacks; executing backup strategy etc.&lt;br /&gt;
&lt;br /&gt;
Knowledge in IT Security, Business Continuity, Risk Management and Security Audits.&lt;br /&gt;
&lt;br /&gt;
Documenting business process, drafting Policy / Procedures in line with ISMS standard, reviewing Business Continuity and Disaster Recovery plans &amp;amp; Generation of metrics review reports.&lt;br /&gt;
&lt;br /&gt;
Knowledge on auditing concepts.&lt;br /&gt;
&lt;br /&gt;
== Certifications ==&lt;br /&gt;
&lt;br /&gt;
JUNIPER NETWORKS CERTIFIED PROFESSIONAL - SECURITY&amp;lt;br&amp;gt;&lt;br /&gt;
JUNIPER NETWORKS CERTIFIED SPECIALIST - SECURITY&amp;lt;br&amp;gt;&lt;br /&gt;
JUNIPER NETWORKS CERTIFIED ASSOCIATE - JUNOS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Over Internet ==&lt;br /&gt;
* [http://linkd.in/webappsecguy Linkedin Profile]&lt;br /&gt;
* [https://twitter.com/nishanthkumarp @nishanthkumarp on Twitter]&lt;br /&gt;
* [http://www.slideshare.net/pathinishanth/presentations Presentations on Slideshare]&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User:Makash&amp;diff=202497</id>
		<title>User:Makash</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User:Makash&amp;diff=202497"/>
				<updated>2015-10-22T05:34:12Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Online */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Akash Mahajan = &lt;br /&gt;
Akash is '''That Web Application Security Guy'''. A Certified Ethical Hacker with more than 10 years of experience in Application and Network Security. Before starting his own company he was a technical lead for one of the leading American commercial security software companies specialising in end point security. He started in security working on web infrastructure for the government of India.&lt;br /&gt;
&lt;br /&gt;
Akash is the founder and community Manager at ''null – The Open Security Group'' and ''Chapter Lead'' at [https://www.owasp.org/index.php/Bangalore OWASP Bangalore] while founding The AppSec Lab a company focussed on Application Security.&lt;br /&gt;
&lt;br /&gt;
He used to be actively involved with the Bangalore Barcamp Planners group, has done events like AppJam and MobileCamps all over India where he evangelized security to Small and Medium Enterprises. He is also the co-founder of Headstart Network Foundation a Section 25 Non-Profit company.&lt;br /&gt;
&lt;br /&gt;
== Online ==&lt;br /&gt;
* [http://linkd.in/webappsecguy Linkedin Profile]&lt;br /&gt;
* [http://www.slideshare.net/akashm/presentations Presentations on Slideshare]&lt;br /&gt;
* [https://twitter.com/makash @makash on Twitter]&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User:Makash&amp;diff=202495</id>
		<title>User:Makash</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User:Makash&amp;diff=202495"/>
				<updated>2015-10-22T05:32:58Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Online */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Akash Mahajan = &lt;br /&gt;
Akash is '''That Web Application Security Guy'''. A Certified Ethical Hacker with more than 10 years of experience in Application and Network Security. Before starting his own company he was a technical lead for one of the leading American commercial security software companies specialising in end point security. He started in security working on web infrastructure for the government of India.&lt;br /&gt;
&lt;br /&gt;
Akash is the founder and community Manager at ''null – The Open Security Group'' and ''Chapter Lead'' at [https://www.owasp.org/index.php/Bangalore OWASP Bangalore] while founding The AppSec Lab a company focussed on Application Security.&lt;br /&gt;
&lt;br /&gt;
He used to be actively involved with the Bangalore Barcamp Planners group, has done events like AppJam and MobileCamps all over India where he evangelized security to Small and Medium Enterprises. He is also the co-founder of Headstart Network Foundation a Section 25 Non-Profit company.&lt;br /&gt;
&lt;br /&gt;
== Online ==&lt;br /&gt;
* [https://www.linkedin.com/in/akashm Linkedin Profile]&lt;br /&gt;
* [http://www.slideshare.net/akashm/presentations Presentations on Slideshare]&lt;br /&gt;
* [https://twitter.com/makash @makash on Twitter]&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User:Makash&amp;diff=202494</id>
		<title>User:Makash</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User:Makash&amp;diff=202494"/>
				<updated>2015-10-22T05:30:29Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Online */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Akash Mahajan = &lt;br /&gt;
Akash is '''That Web Application Security Guy'''. A Certified Ethical Hacker with more than 10 years of experience in Application and Network Security. Before starting his own company he was a technical lead for one of the leading American commercial security software companies specialising in end point security. He started in security working on web infrastructure for the government of India.&lt;br /&gt;
&lt;br /&gt;
Akash is the founder and community Manager at ''null – The Open Security Group'' and ''Chapter Lead'' at [https://www.owasp.org/index.php/Bangalore OWASP Bangalore] while founding The AppSec Lab a company focussed on Application Security.&lt;br /&gt;
&lt;br /&gt;
He used to be actively involved with the Bangalore Barcamp Planners group, has done events like AppJam and MobileCamps all over India where he evangelized security to Small and Medium Enterprises. He is also the co-founder of Headstart Network Foundation a Section 25 Non-Profit company.&lt;br /&gt;
&lt;br /&gt;
== Online ==&lt;br /&gt;
* [https://in.linkedin.com/in/nishanthkumarpathi Linkedin Profile]&lt;br /&gt;
* [http://www.slideshare.net/pathinishanth/presentations Presentations on Slideshare]&lt;br /&gt;
* [https://twitter.com/makash @makash on Twitter]&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=202493</id>
		<title>Nishanthkumarpathi</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=202493"/>
				<updated>2015-10-22T05:27:23Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Nishanth Kumar is a dynamic professional with an  experience in Information Security, Network Security Analysis, and Compliance functions, Linux Administration, System Administration &amp;amp; Management to ensure secure information processing environment.&lt;br /&gt;
&lt;br /&gt;
== Skills ==&lt;br /&gt;
&lt;br /&gt;
Risk Assessment, Vulnerability Assessment, Penetration Testing, Perimeter Security, Incident handling, Log Analysis, Intrusion monitoring and networking.&lt;br /&gt;
&lt;br /&gt;
Deft in planning &amp;amp; managing entire IT infrastructure setup which includes assessment of hardware /software requirements , negotiation of purchase , installation &amp;amp; configuration of entire IT infrastructure in line with business requirements and migration of data from legacy systems.&lt;br /&gt;
Assessing organizational requirements for security &amp;amp; implementing security software system against various attacks; executing backup strategy etc.&lt;br /&gt;
&lt;br /&gt;
Knowledge in IT Security, Business Continuity, Risk Management and Security Audits.&lt;br /&gt;
&lt;br /&gt;
Documenting business process, drafting Policy / Procedures in line with ISMS standard, reviewing Business Continuity and Disaster Recovery plans &amp;amp; Generation of metrics review reports.&lt;br /&gt;
&lt;br /&gt;
Knowledge on auditing concepts.&lt;br /&gt;
&lt;br /&gt;
== Certifications ==&lt;br /&gt;
&lt;br /&gt;
JUNIPER NETWORKS CERTIFIED PROFESSIONAL - SECURITY&amp;lt;br&amp;gt;&lt;br /&gt;
JUNIPER NETWORKS CERTIFIED SPECIALIST - SECURITY&amp;lt;br&amp;gt;&lt;br /&gt;
JUNIPER NETWORKS CERTIFIED ASSOCIATE - JUNOS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Over Internet ==&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=202478</id>
		<title>Nishanthkumarpathi</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=202478"/>
				<updated>2015-10-21T20:17:01Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Nishanth Kumar is a dynamic professional with an  experience in Information Security, Network Security Analysis, and Compliance functions, Linux Administration, System Administration &amp;amp; Management to ensure secure information processing environment.&lt;br /&gt;
&lt;br /&gt;
Certifications :&lt;br /&gt;
&lt;br /&gt;
JUNIPER NETWORKS CERTIFIED PROFESSIONAL - SECURITY&amp;lt;br&amp;gt;&lt;br /&gt;
JUNIPER NETWORKS CERTIFIED SPECIALIST - SECURITY&amp;lt;br&amp;gt;&lt;br /&gt;
JUNIPER NETWORKS CERTIFIED ASSOCIATE - JUNOS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Skills :&lt;br /&gt;
&lt;br /&gt;
Risk Assessment, Vulnerability Assessment, Penetration Testing, Perimeter Security, Incident handling, Log Analysis, Intrusion monitoring and networking.&lt;br /&gt;
&lt;br /&gt;
Deft in planning &amp;amp; managing entire IT infrastructure setup which includes assessment of hardware /software requirements , negotiation of purchase , installation &amp;amp; configuration of entire IT infrastructure in line with business requirements and migration of data from legacy systems.&lt;br /&gt;
Assessing organizational requirements for security &amp;amp; implementing security software system against various attacks; executing backup strategy etc.&lt;br /&gt;
&lt;br /&gt;
Knowledge in IT Security, Business Continuity, Risk Management and Security Audits.&lt;br /&gt;
&lt;br /&gt;
Documenting business process, drafting Policy / Procedures in line with ISMS standard, reviewing Business Continuity and Disaster Recovery plans &amp;amp; Generation of metrics review reports.&lt;br /&gt;
&lt;br /&gt;
Knowledge on auditing concepts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Over Internet ==&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Secure_Configuration_Guide&amp;diff=202477</id>
		<title>OWASP Secure Configuration Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Secure_Configuration_Guide&amp;diff=202477"/>
				<updated>2015-10-21T20:03:11Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&amp;lt;!-- DO NOT ALTER OR REMOVE THE TEXT ON NEXT LINE --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_Project_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- DO NOT ALTER OR REMOVE THE TEXT ON NEXT LINE --&amp;gt;&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The OWASP Secure Configuration Guide==&lt;br /&gt;
&lt;br /&gt;
There are small unclassified parts of info of configuration issues on OWASP currently; this project is to create unified document of issues and solutions to avoid common misconfigurations in popular frameworks, web servers, network devices and more.&lt;br /&gt;
&lt;br /&gt;
The latest version of wiki is accessible here:&lt;br /&gt;
https://www.owasp.org/index.php/Secure_Configuration_Guide&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
All of us know such situations when robust and secure solution makes your defense even weaker if misconfigured.&lt;br /&gt;
Nearly in every penetration testing report exists a chapter &amp;quot;Server/Framework/Service misconfiguration&amp;quot;. &lt;br /&gt;
Whereas using standard up-to-date impenetrable(*) software is certainly a good thing, one should consider proper configuration in order to verify its soundness.&lt;br /&gt;
&lt;br /&gt;
This project is useful for both defenders, who can learn the proper way of configuring rapidly growing number of different popular software, and attackers, as a good complement to Testing Guide.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(*) Saying &amp;quot;impenetrable&amp;quot; we mean all public vulnerabilities are patched in the most recent version. 0-days are still a threat but it's a different talk.&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
The OWASP Secure Configuration Guide is free to use. It is licensed under the [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribution-ShareAlike 3.0 license], so you can copy, distribute and transmit the work, and you can adapt it, and use it commercially, but all provided that you attribute the work and if you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- DO NOT ALTER OR REMOVE THE TEXT ON NEXT LINE --&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Leaders ==&lt;br /&gt;
&lt;br /&gt;
* [mailto:alexander.antukh@owasp.org Alexander Antukh]&lt;br /&gt;
* [[User:Dvvord|Eduard Kovalets]]&lt;br /&gt;
&lt;br /&gt;
== Presentation ==&lt;br /&gt;
&lt;br /&gt;
[https://www.owasp.org/images/9/92/OWASP_Secure_Configuration.pptx Introduction to OWASP Secure Configuration Project.pptx]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related Pages ==&lt;br /&gt;
&lt;br /&gt;
* [https://www.owasp.org/index.php/Secure_Configuration_Guide Table of Contents]&lt;br /&gt;
* [https://www.owasp.org/index.php/Configuration  OWASP Development Guide: Chapter on Configuration]&lt;br /&gt;
* [https://www.owasp.org/index.php/Testing_for_configuration_management  OWASP Testing Guide: Configuration Management]&lt;br /&gt;
* [https://www.owasp.org/index.php/Insecure_Configuration_Management  Insecure Configuration Management page ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- DO NOT ALTER OR REMOVE THE TEXT ON NEXT LINE --&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
== News and Events ==&lt;br /&gt;
&lt;br /&gt;
* [20 Dec 2014] Mailing list created&lt;br /&gt;
* [19 Dec 2014] First article released&lt;br /&gt;
* [25 Nov 2014] Project initiated&lt;br /&gt;
&lt;br /&gt;
== In Print ==&lt;br /&gt;
&lt;br /&gt;
This project can be purchased as a print on demand book from Lulu.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot; rowspan=&amp;quot;2&amp;quot;| [[File:New projects.png|100px|link=https://www.owasp.org/index.php/OWASP_Project_Stages#tab=Incubator_Projects]]&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=]]  &lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;top&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-defenders-small.png|link=]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Cc-button-y-sa-small.png|link=http://creativecommons.org/licenses/by-sa/3.0/]] &lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_DOC.jpg|link=]]   &lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
==How can I participate in your project?==&lt;br /&gt;
All you have to do is make the Project Leader's aware of your available time to contribute to the project. It is also important to let the Leader's know how you would like to contribute and pitch in to help the project meet it's goals and milestones. There are many different ways you can contribute to an OWASP Project, but communication with the leads is key. &lt;br /&gt;
&lt;br /&gt;
==If I am not a programmer can I participate in your project?==&lt;br /&gt;
Yes, you can certainly participate in the project if you are not a programmer or technical. The project needs different skills and expertise and different times during its development. Currently, we are looking for researchers, writers, reviewers, translators, and a project administrator. &lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
&lt;br /&gt;
* [[User:Alexander_Antukh|Alexander Antukh]]&lt;br /&gt;
* [[User:Dnkolegov|Denis Kolegov]]&lt;br /&gt;
* [[User:Makash|Akash Mahajan]]&lt;br /&gt;
* [[User:Anant_Shrivastava|Anant Shrivastava]]&lt;br /&gt;
* [[User:Dvvord|Eduard Kovalets]]&lt;br /&gt;
* [[User:Nishanthkumarpathi|Nishanth Kumar Pathi]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We hope you find the information in the OWASP Secure Configuration Guide useful. Please contribute back to the project by sending your comments, questions, and suggestions to the OWASP SCG mailing list. Thanks!&lt;br /&gt;
&lt;br /&gt;
= Road Map and Getting Involved =&lt;br /&gt;
&lt;br /&gt;
Project will help those looking for configuration issues when facing a new web application / framework, and at the same time let developers have all information of correct configuration settings (which are not always perfect by default) for common systems. Cases may vary from how to configure Drupal in order not to let unauthorized attacker to enumerate current users to how to protect your config files from being downloaded to how to forbid unauthorized firmware upload for your device.&lt;br /&gt;
&lt;br /&gt;
The idea is to create the unified source of knowledge (like Testing Guide), where all information will be accessible in one place. As new systems appear and new features are being added, the project will be continuously developed. Any penetration tester/administrator/security consultant can contribute when meeting new (yet undocumented) system.&lt;br /&gt;
&lt;br /&gt;
Initially planned chapters:&lt;br /&gt;
- Web servers&lt;br /&gt;
- Frameworks&lt;br /&gt;
- Network devices / web panels&lt;br /&gt;
- ... more to come&lt;br /&gt;
&lt;br /&gt;
=Project About=&lt;br /&gt;
&lt;br /&gt;
{{:Projects/OWASP__Secure_Configuration_Guide}} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- DO NOT ALTER OR REMOVE THE TEXT ON NEXT LINE --&amp;gt;&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Breakers]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Document]]&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201824</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201824"/>
				<updated>2015-10-08T12:12:32Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Limit HTTP Request Methods */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR ANY QUERIES!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Setting the appropriate permissions on the Apache files and directories can help to prevent/mitigate exploitation severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Preventing execution of Apache binaries with limited permission will decrease the attack surface.&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Run the below command to check the file permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#ls -l /var/www/html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
Other than rwxr-xr-x would be considered as a mis configuration.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Restrict OS Root directory access using Allow,Deny Directive ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Apache will serve any file mapped from an URL to clients with efault configuration.&lt;br /&gt;
&lt;br /&gt;
It is better to create a deny policy that will not allow access to Operating system directoories or files.&lt;br /&gt;
&lt;br /&gt;
A small modification in the configuration will allow access to tthe required files.&lt;br /&gt;
&lt;br /&gt;
The order of the directive is important as it provides for otherr Allow diectives to override the default deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server.&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;.&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element.  &lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order allow,deny&lt;br /&gt;
 Allow from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Deny from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict WebSite Content using Allow,Deny Directive === &lt;br /&gt;
==== Description ====&lt;br /&gt;
Appropriate access to various files,directories, locations and virtual hosts that contains web site content can make attack surface strong.&lt;br /&gt;
&lt;br /&gt;
Based up on the requirement you can provide allow access or you can deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server. &amp;lt;br&amp;gt;&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&amp;lt;br&amp;gt; &lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MisConfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html/&amp;quot;&amp;gt;&lt;br /&gt;
Order deny,allow&lt;br /&gt;
deny from all&lt;br /&gt;
allow from 172.16.5.0/24&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AllowOverride Directive ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride None&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apache Server is capable of accepting and processing GET,HEAD,POST,OPTIONS,PUT,DELETE HTTP request methods.&lt;br /&gt;
If we use &amp;lt;LimitExcept&amp;gt; directive then Apache will not  process the unnecessary HTTP request methods.&lt;br /&gt;
The primary security concerened is to disable the unnecessary HTTP request methods.&lt;br /&gt;
Apache &amp;lt;LimitExcept&amp;gt; directive does not deny the TRACE request method. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default all the HTTP request methods are accepted by Apache Server.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory &amp;quot;/usr/local/apache2/cgi-bin&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 # Limit HTTP methods&lt;br /&gt;
	&amp;lt;LimitExcept GET POST OPTIONS&amp;gt;&lt;br /&gt;
			deny from all&lt;br /&gt;
	&amp;lt;/LimitExcept&amp;gt;&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201823</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201823"/>
				<updated>2015-10-08T11:59:41Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Operating System  Root directory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR ANY QUERIES!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Setting the appropriate permissions on the Apache files and directories can help to prevent/mitigate exploitation severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Preventing execution of Apache binaries with limited permission will decrease the attack surface.&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Run the below command to check the file permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#ls -l /var/www/html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
Other than rwxr-xr-x would be considered as a mis configuration.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Restrict OS Root directory access using Allow,Deny Directive ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Apache will serve any file mapped from an URL to clients with efault configuration.&lt;br /&gt;
&lt;br /&gt;
It is better to create a deny policy that will not allow access to Operating system directoories or files.&lt;br /&gt;
&lt;br /&gt;
A small modification in the configuration will allow access to tthe required files.&lt;br /&gt;
&lt;br /&gt;
The order of the directive is important as it provides for otherr Allow diectives to override the default deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server.&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;.&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element.  &lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order allow,deny&lt;br /&gt;
 Allow from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Deny from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict WebSite Content using Allow,Deny Directive === &lt;br /&gt;
==== Description ====&lt;br /&gt;
Appropriate access to various files,directories, locations and virtual hosts that contains web site content can make attack surface strong.&lt;br /&gt;
&lt;br /&gt;
Based up on the requirement you can provide allow access or you can deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server. &amp;lt;br&amp;gt;&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&amp;lt;br&amp;gt; &lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MisConfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html/&amp;quot;&amp;gt;&lt;br /&gt;
Order deny,allow&lt;br /&gt;
deny from all&lt;br /&gt;
allow from 172.16.5.0/24&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AllowOverride Directive ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride None&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201822</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201822"/>
				<updated>2015-10-08T11:58:13Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Improper access to web content */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR ANY QUERIES!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Setting the appropriate permissions on the Apache files and directories can help to prevent/mitigate exploitation severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Preventing execution of Apache binaries with limited permission will decrease the attack surface.&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Run the below command to check the file permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#ls -l /var/www/html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
Other than rwxr-xr-x would be considered as a mis configuration.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Apache will serve any file mapped from an URL to clients with efault configuration.&lt;br /&gt;
&lt;br /&gt;
It is better to create a deny policy that will not allow access to Operating system directoories or files.&lt;br /&gt;
&lt;br /&gt;
A small modification in the configuration will allow access to tthe required files.&lt;br /&gt;
&lt;br /&gt;
The order of the directive is important as it provides for otherr Allow diectives to override the default deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server.&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;.&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element.  &lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order allow,deny&lt;br /&gt;
 Allow from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Deny from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict WebSite Content using Allow,Deny Directive === &lt;br /&gt;
==== Description ====&lt;br /&gt;
Appropriate access to various files,directories, locations and virtual hosts that contains web site content can make attack surface strong.&lt;br /&gt;
&lt;br /&gt;
Based up on the requirement you can provide allow access or you can deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server. &amp;lt;br&amp;gt;&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&amp;lt;br&amp;gt; &lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MisConfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html/&amp;quot;&amp;gt;&lt;br /&gt;
Order deny,allow&lt;br /&gt;
deny from all&lt;br /&gt;
allow from 172.16.5.0/24&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AllowOverride Directive ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride None&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201821</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201821"/>
				<updated>2015-10-08T11:55:29Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Restrict OverRide for All Directories */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR ANY QUERIES!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Setting the appropriate permissions on the Apache files and directories can help to prevent/mitigate exploitation severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Preventing execution of Apache binaries with limited permission will decrease the attack surface.&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Run the below command to check the file permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#ls -l /var/www/html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
Other than rwxr-xr-x would be considered as a mis configuration.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Apache will serve any file mapped from an URL to clients with efault configuration.&lt;br /&gt;
&lt;br /&gt;
It is better to create a deny policy that will not allow access to Operating system directoories or files.&lt;br /&gt;
&lt;br /&gt;
A small modification in the configuration will allow access to tthe required files.&lt;br /&gt;
&lt;br /&gt;
The order of the directive is important as it provides for otherr Allow diectives to override the default deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server.&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;.&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element.  &lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order allow,deny&lt;br /&gt;
 Allow from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Deny from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
Appropriate access to various files,directories, locations and virtual hosts that contains web site content can make attack surface strong.&lt;br /&gt;
&lt;br /&gt;
Based up on the requirement you can prvode allow access or you can deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server. &amp;lt;br&amp;gt;&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&amp;lt;br&amp;gt; &lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html/&amp;quot;&amp;gt;&lt;br /&gt;
Order deny,allow&lt;br /&gt;
deny from all&lt;br /&gt;
allow from 172.16.5.0/24&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AllowOverride Directive ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /var/www/html&amp;gt;&lt;br /&gt;
AllowOverride None&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201820</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201820"/>
				<updated>2015-10-08T11:46:53Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Improper access to web content */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR ANY QUERIES!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Setting the appropriate permissions on the Apache files and directories can help to prevent/mitigate exploitation severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Preventing execution of Apache binaries with limited permission will decrease the attack surface.&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Run the below command to check the file permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#ls -l /var/www/html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
Other than rwxr-xr-x would be considered as a mis configuration.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Apache will serve any file mapped from an URL to clients with efault configuration.&lt;br /&gt;
&lt;br /&gt;
It is better to create a deny policy that will not allow access to Operating system directoories or files.&lt;br /&gt;
&lt;br /&gt;
A small modification in the configuration will allow access to tthe required files.&lt;br /&gt;
&lt;br /&gt;
The order of the directive is important as it provides for otherr Allow diectives to override the default deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server.&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;.&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element.  &lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order allow,deny&lt;br /&gt;
 Allow from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Deny from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
Appropriate access to various files,directories, locations and virtual hosts that contains web site content can make attack surface strong.&lt;br /&gt;
&lt;br /&gt;
Based up on the requirement you can prvode allow access or you can deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server. &amp;lt;br&amp;gt;&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&amp;lt;br&amp;gt; &lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html&amp;quot;&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html/&amp;quot;&amp;gt;&lt;br /&gt;
Order deny,allow&lt;br /&gt;
deny from all&lt;br /&gt;
allow from 172.16.5.0/24&lt;br /&gt;
&amp;lt;/Directory&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201819</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201819"/>
				<updated>2015-10-08T11:39:44Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Operating System  Root directory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR ANY QUERIES!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Setting the appropriate permissions on the Apache files and directories can help to prevent/mitigate exploitation severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Preventing execution of Apache binaries with limited permission will decrease the attack surface.&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Run the below command to check the file permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#ls -l /var/www/html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
Other than rwxr-xr-x would be considered as a mis configuration.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Apache will serve any file mapped from an URL to clients with efault configuration.&lt;br /&gt;
&lt;br /&gt;
It is better to create a deny policy that will not allow access to Operating system directoories or files.&lt;br /&gt;
&lt;br /&gt;
A small modification in the configuration will allow access to tthe required files.&lt;br /&gt;
&lt;br /&gt;
The order of the directive is important as it provides for otherr Allow diectives to override the default deny.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
1. Find the appropriate Apache configuration file in your Server.&lt;br /&gt;
2. Ensure there is a single Order directive and set the value to deny, allow&lt;br /&gt;
3. Ensure there is a Deny directive, and set the value to &amp;quot;from all&amp;quot;.&lt;br /&gt;
4. Remove any Allow directives from the root &amp;lt;Directory&amp;gt; element.  &lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order allow,deny&lt;br /&gt;
 Allow from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;Directory /&amp;gt;&lt;br /&gt;
 . . .&lt;br /&gt;
 Order deny,allow&lt;br /&gt;
 Deny from all&lt;br /&gt;
 . . .&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201818</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201818"/>
				<updated>2015-10-08T11:22:57Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Apache File Ownership and Permissions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR ANY QUERIES!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
Setting the appropriate permissions on the Apache files and directories can help to prevent/mitigate exploitation severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Preventing execution of Apache binaries with limited permission will decrease the attack surface.&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Run the below command to check the file permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#ls -l /var/www/html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
Other than rwxr-xr-x would be considered as a mis configuration.&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Permission of the Apache directories and files should be  rwxr-xr-x and they can change if it is Apache binary or executable file.&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201732</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201732"/>
				<updated>2015-10-06T05:12:52Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR ANY QUERIES!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201731</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201731"/>
				<updated>2015-10-06T05:11:55Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR A GOOD MATERIAL!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201730</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201730"/>
				<updated>2015-10-06T05:04:31Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Lock Apache user account */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should have a valid password, but should be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
The below is the misconfiguration for an Apache user.&lt;br /&gt;
&lt;br /&gt;
Command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache P 09/07/2015 0 99999 7 -1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Configuration using the below command in Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -S apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2015-09-09 0 99999 7 -1 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201729</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201729"/>
				<updated>2015-10-06T04:58:27Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Restrict Shell Access for Apache User */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
Expected Output:&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should not have a valid password, but should&lt;br /&gt;
be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Coonfiguration using the below command in linux.&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -s apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2010-01-28 0 99999 7 -1 (Password locked.) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201728</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201728"/>
				<updated>2015-10-06T04:57:45Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Remediation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#chsh -s /usr/sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expected Output&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Command to chec:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#cat/etc/passwd&lt;br /&gt;
&lt;br /&gt;
Expected Output:&lt;br /&gt;
&lt;br /&gt;
apache:x:48:48:Apache:/var/www:usr/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should not have a valid password, but should&lt;br /&gt;
be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Coonfiguration using the below command in linux.&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -s apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2010-01-28 0 99999 7 -1 (Password locked.) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201727</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201727"/>
				<updated>2015-10-06T04:53:34Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Apache Directory Ownership and Permissions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;chsh -s /sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/passwd:apache:x:48:48:Apache:/var/www:/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should not have a valid password, but should&lt;br /&gt;
be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Coonfiguration using the below command in linux.&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -s apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2010-01-28 0 99999 7 -1 (Password locked.) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /usr/share/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#chown –R root:root /usr/local/apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201726</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201726"/>
				<updated>2015-10-06T04:52:02Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Apache Directory Ownership and Permissions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;chsh -s /sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/passwd:apache:x:48:48:Apache:/var/www:/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should not have a valid password, but should&lt;br /&gt;
be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Coonfiguration using the below command in linux.&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -s apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2010-01-28 0 99999 7 -1 (Password locked.) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
All of the Apache Software directories and files installed should be owned by root user and root group.This will help in mitigate &lt;br /&gt;
exploration severity and information disclosure.&lt;br /&gt;
&lt;br /&gt;
Apache Web Document folders like &amp;quot;/var/www/html&amp;quot; need a designated group to allow web content to be updated.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
Type the below command to check the User and Group associated with a file.The file varies in Between Debian,RHEL/CentOS/Fedora,FreeBSD.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# ls -l /usr/share/apache2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
 In the Below example the apache2 folder is owned by a user name &amp;quot;alice&amp;quot; and group &amp;quot;sysadmin&amp;quot; which can be considered as a misconfiguration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x    6 alice sysadmin 4096 Sep  7 13:20 apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will set a Directory named &amp;quot;apache2&amp;quot; with root user and root group recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#chown –R root:root /usr/local/apache2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201697</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201697"/>
				<updated>2015-10-05T18:28:14Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Lock Apache user account */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;chsh -s /sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/passwd:apache:x:48:48:Apache:/var/www:/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The user account under which Apache runs, should not have a valid password, but should&lt;br /&gt;
be locked. &lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&amp;lt;pre&amp;gt;# passwd -l apache &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Validate the Coonfiguration using the below command in linux.&lt;br /&gt;
&amp;lt;pre&amp;gt;#passwd -s apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;apache LK 2010-01-28 0 99999 7 -1 (Password locked.) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201694</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201694"/>
				<updated>2015-10-05T18:25:28Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Restrict Shell Access for Apache User */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
The Apache account must not be used as a regular login account, and should be assigned an&lt;br /&gt;
invalid or nologin shell to ensure that the account cannot be used to login.&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
Check the apache login shell in the /etc/password file for Linux Systems.&lt;br /&gt;
&amp;lt;pre&amp;gt;# grep apache /etc/passwd&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
The below command will configure the apache user with &amp;quot;nologin&amp;quot; restrictions.&lt;br /&gt;
&amp;lt;pre&amp;gt;chsh -s /sbin/nologin apache&amp;lt;/pre&amp;gt;&lt;br /&gt;
Expected Output&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/passwd:apache:x:48:48:Apache:/var/www:/sbin/nologin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201690</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201690"/>
				<updated>2015-10-05T18:18:29Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Run Apache with least privilege user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Apache typically is started with root privileges in order to listen on port 80 and 443.&lt;br /&gt;
One of the best ways to reduce your exposure to attack when running a web server is to create a unique, unprivileged userid and group for the web daemon to execute.&lt;br /&gt;
The “nobody” or “daemon” userid &amp;amp; group that come default on Unix variants should NOT be used to run the web server as these principals are commonly used by other daemon services. &lt;br /&gt;
Instead, create a user and group that are exclusively used by the web service so as to not give unnecessary access to other services.&lt;br /&gt;
The userid used for the apache user should be a unique value between 1 and 499 as these lower values are reserved for the special system accounts.&lt;br /&gt;
A more secure alternative is to bind Apache web service to an unprivileged port so it is not&lt;br /&gt;
necessary to start Apache as root.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
Ensure the apache account is unique and has been created with a UID between1-499 with the apache group and configured in the Apache Configuration File.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
If the Apache user and group does exist, create the account and group as a unique system account.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# groupadd –r apache&lt;br /&gt;
# useradd apache -r -g apache -d /var/www -s /sbin/nologin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure the Apache user and group in the Apache configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
User apache&lt;br /&gt;
Group apache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201689</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201689"/>
				<updated>2015-10-05T18:04:13Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Important Files of Apache Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201688</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201688"/>
				<updated>2015-10-05T18:03:11Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Apache Server Information Leakage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Apache Error Files - Windows===&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201686</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201686"/>
				<updated>2015-10-05T17:59:31Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Server Signature */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Apache Error Files - Windows===&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Apache directive allows the configuration of a trailing footer line under server-generated documents. &lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerSignature configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;ServerSignature Off&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
Configure the ServerSingature directive in the Apache configuration to value of &amp;quot;Off&amp;quot;.&lt;br /&gt;
This tell Apache not to display the server version on error pages, or other pages it generates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ServerSignature On&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Info Leakage via default Apache configuration ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201684</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201684"/>
				<updated>2015-10-05T17:57:48Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Apache Server Information Leakage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Apache Error Files - Windows===&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response field is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Info Leakage via default Apache configuration ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201683</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201683"/>
				<updated>2015-10-05T17:53:44Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Server Token */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Apache Error Files - Windows===&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token Directive===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
This Directive Controls wheather Server response filed is sent back to clients includes a description of Generic OS Type of the Server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly.&lt;br /&gt;
This tells Apache to only return &amp;quot;Apache&amp;quot; in the Server header, returned on every page request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Info Leakage via default Apache configuration ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201681</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201681"/>
				<updated>2015-10-05T17:50:06Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Apache Global Server Configuration Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2X/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:X represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Apache Error Files - Windows===&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
By Default Apache ServerToken directive reveals the below information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Info Leakage via default Apache configuration ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201680</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201680"/>
				<updated>2015-10-05T17:49:26Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Apache Global Server Configuration Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2&amp;lt;b&amp;gt;X&amp;lt;/b&amp;gt;/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:x represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Apache Error Files - Windows===&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
By Default Apache ServerToken directive reveals the below information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Info Leakage via default Apache configuration ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201679</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=201679"/>
				<updated>2015-10-05T17:48:50Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: /* Apache Global Server Configuration Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
== Important Files of Apache Server ==&lt;br /&gt;
=== Apache Global Server Configuration Files ===&lt;br /&gt;
&lt;br /&gt;
Debian&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/httpd/conf/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/etc/apache2'''x'''/httpd.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:x represents the version number&lt;br /&gt;
&lt;br /&gt;
=== Apache Module Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/mods-enabled&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Port Configuration File ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/etc/apache2/ports.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;/etc/httpd/conf/conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apache Error Files ===&lt;br /&gt;
Debian&amp;lt;pre&amp;gt;/var/log/apache2/error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
RHEL / Red Hat / CentOS / Fedora Linux&amp;lt;pre&amp;gt;var/log/httpd/error_log&amp;lt;/pre&amp;gt;&lt;br /&gt;
FreeBSD&amp;lt;pre&amp;gt;/var/log/httpd-error.log&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Apache Error Files - Windows===&lt;br /&gt;
&lt;br /&gt;
== Apache Server Information Leakage ==&lt;br /&gt;
&lt;br /&gt;
=== Server Token ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
By Default Apache ServerToken directive reveals the below information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows attackers to identify web servers details greatly and increases the efficiency of any attack,as security vulnerabilities&lt;br /&gt;
are dependent upon specific software versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
In order to test for ServerToken configuration, one should check the Apache configuration file.&lt;br /&gt;
&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Full&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configure the ServerTokens directive in the Apache configuration to value of Prod or ProductOnly&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ServerTokens Prod&lt;br /&gt;
or&lt;br /&gt;
ServerTokens ProductOnly&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Server Signature ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Info Leakage via default Apache configuration ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Privileges for Apache ==&lt;br /&gt;
&lt;br /&gt;
=== Run Apache with least privilege user ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Restrict Shell Access for Apache User=== &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Lock Apache user account===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache Directory Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Apache File Ownership and Permissions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Access Control List in Apache == &lt;br /&gt;
=== Operating System  Root directory ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=== Improper access to web content === &lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===	Restrict OverRide for All Directories ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== Apache Features ==&lt;br /&gt;
&lt;br /&gt;
=== Limit HTTP Request Methods ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable HTTP Trace Method ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== HTTP Protocol Version ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict access to .htaccess files ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restrict file extensions ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Remove Default HTML Page ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apache Module Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Status and Info Modules ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== AutoIndex Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Proxy Module ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User Directory Moudule ===&lt;br /&gt;
&lt;br /&gt;
== SSL / TLS Configuration ==&lt;br /&gt;
=== Install a valid certificate ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Restric weak SSL Protocols and Ciphers ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install mod_ssl Module === &lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Avoid Insecure SSL Renogitation ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
== Attack Migigation ==&lt;br /&gt;
=== DOS ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
=== Buffer Overflow ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
==== How to test ====&lt;br /&gt;
==== Misconfiguration ====&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;br /&gt;
&lt;br /&gt;
https://wiki.apache.org/httpd/CommonMisconfigurations&lt;br /&gt;
&lt;br /&gt;
http://projects.webappsec.org/w/page/13246959/Server%20Misconfiguration&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Talk:Nishanthkumarpathi&amp;diff=201676</id>
		<title>Talk:Nishanthkumarpathi</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Talk:Nishanthkumarpathi&amp;diff=201676"/>
				<updated>2015-10-05T17:44:04Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: Nishanthkumarpathi moved page User talk:Nishanthkumarpathi to Talk:Nishanthkumarpathi&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Welcome to ''OWASP''!'''&lt;br /&gt;
We hope you will contribute much and well.&lt;br /&gt;
You will probably want to read the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents help pages].&lt;br /&gt;
Again, welcome and have fun! [[User:KateHartmann|KateHartmann]] ([[User talk:KateHartmann|talk]]) 09:43, 30 September 2015 (CDT)&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User_talk:Nishanthkumarpathi&amp;diff=201677</id>
		<title>User talk:Nishanthkumarpathi</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User_talk:Nishanthkumarpathi&amp;diff=201677"/>
				<updated>2015-10-05T17:44:04Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: Nishanthkumarpathi moved page User talk:Nishanthkumarpathi to Talk:Nishanthkumarpathi&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Talk:Nishanthkumarpathi]]&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=201674</id>
		<title>Nishanthkumarpathi</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Nishanthkumarpathi&amp;diff=201674"/>
				<updated>2015-10-05T17:44:03Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: Nishanthkumarpathi moved page User:Nishanthkumarpathi to Nishanthkumarpathi&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Nishanth Kumar is a dynamic professional with an  experience in Information Security, Network Security Analysis, and Compliance functions, Linux Administration, System Administration &amp;amp; Management to ensure secure information processing environment.&lt;br /&gt;
&lt;br /&gt;
Certifications :&lt;br /&gt;
&lt;br /&gt;
JUNIPER NETWORKS CERTIFIED PROFESSIONAL - SECURITY&amp;lt;br&amp;gt;&lt;br /&gt;
JUNIPER NETWORKS CERTIFIED SPECIALIST - SECURITY&amp;lt;br&amp;gt;&lt;br /&gt;
JUNIPER NETWORKS CERTIFIED ASSOCIATE - JUNOS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Skills :&lt;br /&gt;
&lt;br /&gt;
Risk Assessment, Vulnerability Assessment, Penetration Testing, Perimeter Security, Incident handling, Log Analysis, Intrusion monitoring and networking.&lt;br /&gt;
&lt;br /&gt;
Deft in planning &amp;amp; managing entire IT infrastructure setup which includes assessment of hardware /software requirements , negotiation of purchase , installation &amp;amp; configuration of entire IT infrastructure in line with business requirements and migration of data from legacy systems.&lt;br /&gt;
Assessing organizational requirements for security &amp;amp; implementing security software system against various attacks; executing backup strategy etc.&lt;br /&gt;
&lt;br /&gt;
Knowledge in IT Security, Business Continuity, Risk Management and Security Audits.&lt;br /&gt;
&lt;br /&gt;
Documenting business process, drafting Policy / Procedures in line with ISMS standard, reviewing Business Continuity and Disaster Recovery plans &amp;amp; Generation of metrics review reports.&lt;br /&gt;
&lt;br /&gt;
Knowledge on auditing concepts.&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User:Nishanthkumarpathi&amp;diff=201675</id>
		<title>User:Nishanthkumarpathi</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User:Nishanthkumarpathi&amp;diff=201675"/>
				<updated>2015-10-05T17:44:03Z</updated>
		
		<summary type="html">&lt;p&gt;Nishanthkumarpathi: Nishanthkumarpathi moved page User:Nishanthkumarpathi to Nishanthkumarpathi&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Nishanthkumarpathi]]&lt;/div&gt;</summary>
		<author><name>Nishanthkumarpathi</name></author>	</entry>

	</feed>