Saturday, January 12, 2008

Vulnerability Series: [.]htaccess Disclosure

A file exists within the apache server environment which controls access to sensitive information including user information, directories and/or files. Generally, this issue occurs with the permissions being set to the httpd.conf file incorrectly. With the apache server, they provide a way to make configuration changes on a per-directory basis.

How to apply this attack

The application of attack will allow for directory access. Simply providing the direct link in the URL to access an otherwise unprotected directory. Meaning, in the URL bar, you may access:


which should be assigned access controls.


The fix for the dot_htaccess file is relatively simple. First, it is important for developers to assign correct permissions to the directory structure, application settings and all files within the web application. The second portion of the fix for dot_htaccess is to edit the httpd.conf file adding the following lines to the configuration.

For additional information on how to configure the apache server environment, I recommend you refer to the Apache htaccess Information site.