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.

Chapter 8 n Attacking Access Controls 269<br />

Figure 8-1: A site map comparison showing <strong>the</strong> differences between content that<br />

was accessed in different user contexts<br />

Figure 8-2 shows <strong>the</strong> response returned when each user requests <strong>the</strong> top-level<br />

admin page. Here, <strong>the</strong> administrative user sees a menu of available options, while<br />

<strong>the</strong> ordinary user sees a “not authorized” message. These differences indicate<br />

that access controls are being applied correctly. Figure 8-3 shows <strong>the</strong> response<br />

returned when each user requests <strong>the</strong> “list users” admin function. Here, <strong>the</strong><br />

responses are identical, indicating that <strong>the</strong> <strong>application</strong> is vulnerable, since <strong>the</strong><br />

ordinary user should not have access to this function and does not have any<br />

link to it in his or her user interface.<br />

Simply exploring <strong>the</strong> site map tree and looking at <strong>the</strong> number of differences<br />

between items is insufficient to evaluate <strong>the</strong> effectiveness of <strong>the</strong> <strong>application</strong>’s<br />

access controls. Two identical responses may indicate a vulnerability (for example,<br />

in an administrative function that discloses sensitive information) or may be<br />

harmless (for example, in an unprotected search function). Conversely, two different<br />

responses may still mean that a vulnerability exists (for example, in an<br />

administrative function that returns different content each time it is accessed)<br />

or may be harmless (for example, in a page showing profile information about<br />

<strong>the</strong> currently logged-in user). For <strong>the</strong>se reasons, fully automated tools generally<br />

are ineffective at identifying access control vulnerabilities. Using Burp’s<br />

functionality to compare site maps, you can automate as much of <strong>the</strong> process<br />

as possible, giving you all <strong>the</strong> information you need in a ready form, and letting<br />

you apply your knowledge of <strong>the</strong> <strong>application</strong>’s functionality to identify any<br />

actual vulnerabilities.

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

Saved successfully!

Ooh no, something went wrong!