Check: WG360 A24
Apache Site 2.4 Unix:
WG360 A24
(in version v1 r1)
Title
Symbolic links must not be used in the web content directory tree. (Cat I impact)
Discussion
A symbolic link allows a file or a directory to be referenced using a symbolic name raising a potential hazard if symbolic linkage is made to a sensitive area. When web scripts are executed and symbolic links are allowed, the web user could be allowed to access locations on the web server that are outside the scope of the web document root or home directory.
Check Content
Locate the directories containing the web content (DocumentRoot). To view the DocumentRoot value enter the following command: find / -name httpd.conf -exec awk '{print $1,$2,$3}' {} \; | grep -v '^#' | grep -i DocumentRoot Note each location following the DocumentRoot string, this is the configured path(s) to the document root directory(s). To view a list of the directories and sub-directories, from each stated DocumentRoot location enter the following commands: ls -alR Review the results for each document root directory and its subdirectories for symbolic links. An entry such as the following would indicate the presence and use of symbolic links: lr-xr--r-- 4000 wwwusr wwwgrp 2345 Apr 15 data -> /usr/local/apache/htdocs Such a result found in a web document directory is a finding. Additional Apache config check in the httpd.conf file: <Directory /[website root dir]> Options FollowSymLinks AllowOverride None </Directory> The above configuration is incorrect and is a finding. The correct configuration is: <Directory /[website root dir]> Options SymLinksIfOwnerMatch AllowOverride None </Directory> Finally, the target file or directory must be owned by the same owner as the link, which should be a privileged account with access to the web content.
Fix Text
Disable/remove symbolic links.
Additional Identifiers
Rule ID:
Vulnerability ID: V-2227
Group Title:
Expert Comments
CCIs
Number | Definition |
---|---|
No CCIs are assigned to this check |
Controls
Number | Title |
---|---|
No controls are assigned to this check |