19.09.2017 Views

the-web-application-hackers-handbook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

678 Chapter 18 n Attacking <strong>the</strong> Application Server<br />

Figure 18-6: A directory listing<br />

In many situations, directory listings do not have any relevance to security. For<br />

example, disclosing <strong>the</strong> index to an images directory may be inconsequential.<br />

Indeed, directory listings are often disclosed intentionally because <strong>the</strong>y provide<br />

a built-in means of navigating around sites containing static content, as in <strong>the</strong><br />

example illustrated. Never<strong>the</strong>less, <strong>the</strong>re are two main reasons why obtaining<br />

directory listings may help you attack an <strong>application</strong>:<br />

n Many <strong>application</strong>s do not enforce proper access control over <strong>the</strong>ir functionality<br />

and resources and rely on an attacker’s ignorance of <strong>the</strong> URLs<br />

used to access sensitive items (see Chapter 8).<br />

n Files and directories are often unintentionally left within <strong>the</strong> <strong>web</strong> root of<br />

servers, such as logs, backup files, and old versions of scripts.<br />

In both of <strong>the</strong>se cases, <strong>the</strong> real vulnerability lies elsewhere, in <strong>the</strong> failure to<br />

control access to sensitive data. But given that <strong>the</strong>se vulnerabilities are extremely<br />

prevalent, and <strong>the</strong> names of <strong>the</strong> insecure resources may be difficult to guess,<br />

<strong>the</strong> availability of directory listings is often of great value to an attacker and<br />

may lead quickly to a complete compromise of an <strong>application</strong>.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!