4.1 Ensure Access to OS Root Directory Is Denied By Default - 'httpd.conf Order = Deny,Allow

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

Information

The Apache 'Directory' directive allows for directory-specific configuration of access controls and many other features and options. One important usage is to create a default deny policy that does not allow access to OS directories and files, except for those specifically allowed. This is done by denying access to the OS root directory.

Rationale:

One aspect of Apache that is occasionally misunderstood is the feature of default access. That is, unless you take steps to change it, if the server can find its way to a file through normal URL mapping rules, it can and will serve it to clients. Having a default deny helps prevent unintended access. The Order directive is important as it provides for other Allow directives to override the default deny.

Solution

Perform the following to implement the recommended state:

1. Search the Apache configuration files ('httpd.conf' and any included configuration files) to find a root '<Directory>' element.
2. Have a single 'Order' directive and set its value to 'deny, allow'.
3. Have a 'Deny' directive and set its value to 'from all'.
4. Remove all 'Allow' directives from the root '<Directory>' element.

. . .
Order deny,allow
Deny from all
. . .

See Also

https://workbench.cisecurity.org/files/2020

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-3, CSCv6|14.4

Plugin: Unix

Control ID: 3659f2c71d994866d2b7a31b4ee8984ea32a8e260446de58f91d90cf90e96c42