Directory traversal attacks
Normally, all web servers should be configured to reject attempts to access any document that is not under the web server's root directory. For example, if your web server root is /home/www
, then attempting to retrieve /home/joan/.bashrc
should not be possible since this file is not located under the /home/www
web server root. The obvious attempt to access the /home/joan
directory is, of course, easy for the web server to block, however there is a more subtle way to access this directory which still allows the path to start with /home/www
, and that is to make use of the .
. symbolic directory link which links to the parent directory in any given directory.
Even though most web servers are hardened against this sort of attack, web applications that accept input from users may still not be checking it properly, potentially allowing users to get access to files they shouldn't be able to view via simple directory traversal attacks. This alone is reason to implement...