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.

822 Chapter 21 n A Web Application Hacker’s Methodology<br />

6.2 Test with Multiple Accounts<br />

6.2.1 If <strong>the</strong> <strong>application</strong> enforces vertical privilege segregation, first use a<br />

powerful account to locate all <strong>the</strong> functionality it can access. Then<br />

use a less-privileged account and attempt to access each item of this<br />

functionality.<br />

6.2.1.1 Using Burp, browse all <strong>the</strong> <strong>application</strong>’s content within one user<br />

context.<br />

6.2.1.2 Review <strong>the</strong> contents of Burp’s site map to ensure you have<br />

identified all <strong>the</strong> functionality you want to test. Then, log out<br />

of <strong>the</strong> <strong>application</strong> and log back in using a different user context.<br />

Use <strong>the</strong> context menu to select <strong>the</strong> “compare site maps” feature<br />

to determine which high-privileged requests may be accessible to<br />

<strong>the</strong> lower-privileged user. See Chapter 8 for more details on<br />

this technique.<br />

6.2.2 If <strong>the</strong> <strong>application</strong> enforces horizontal privilege segregation, perform<br />

<strong>the</strong> equivalent test using two different accounts at <strong>the</strong> same privilege<br />

level, attempting to use one account to access data belonging to <strong>the</strong><br />

o<strong>the</strong>r account. This typically involves replacing an identifier (such as<br />

a document ID) within a request to specify a resource belonging to <strong>the</strong><br />

o<strong>the</strong>r user.<br />

6.2.3 Perform manual checking of key access control logic.<br />

6.2.3.1 For each user privilege, review resources available to a user.<br />

Attempt to access those resources from an unauthorized user<br />

account by replaying <strong>the</strong> request using <strong>the</strong> unauthorized user’s<br />

session token.<br />

6.2.4 When you perform any kind of access control test, be sure to test every step<br />

of multistage functions individually to confirm whe<strong>the</strong>r access controls<br />

have been properly implemented at each stage, or whe<strong>the</strong>r <strong>the</strong> <strong>application</strong><br />

assumes that users who access a later stage must have passed security<br />

checks implemented at <strong>the</strong> earlier stages. For example, if an administrative<br />

page containing a form is properly protected, check whe<strong>the</strong>r <strong>the</strong> actual<br />

form submission is also subjected to proper access controls.<br />

6.3 Test with Limited Access<br />

6.3.1 If you do not have prior access to accounts at different privilege levels, or<br />

to multiple accounts with access to different data, testing for broken access<br />

controls is not quite as straightforward. Many common vulnerabilities will<br />

be much harder to locate, because you do not know <strong>the</strong> names of <strong>the</strong> URLs,<br />

identifiers, and parameters that are needed to exploit <strong>the</strong> weaknesses.

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

Saved successfully!

Ooh no, something went wrong!