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 21 n A Web Application Hacker’s Methodology 823<br />

6.3.2 In your <strong>application</strong> mapping exercises that use a low-privileged account,<br />

you may have identified <strong>the</strong> URLs for privileged functions such as<br />

administrative interfaces. If <strong>the</strong>se are not adequately protected, you will<br />

probably already know about this.<br />

6.3.3 Decompile all compiled clients that are present, and extract any references<br />

to server-side functionality.<br />

6.3.4 Most data that is subject to horizontal access controls is accessed using<br />

an identifier, such as an account number or order reference. To test<br />

whe<strong>the</strong>r access controls are effective using only a single account, you<br />

must try to guess or discover <strong>the</strong> identifiers associated with o<strong>the</strong>r users’<br />

data. If possible, generate a series of identifiers in quick succession<br />

(for example, by creating several new orders). Attempt to identify any<br />

patterns that may enable you to predict <strong>the</strong> identifiers issued to o<strong>the</strong>r<br />

users. If <strong>the</strong>re is no way to generate new identifiers, you are probably<br />

restricted to analyzing those you already have and guessing on that<br />

basis.<br />

6.3.5 If you find a way to predict <strong>the</strong> identifiers issued to o<strong>the</strong>r users, use <strong>the</strong><br />

techniques described in Chapter 14 to mount an automated attack to<br />

harvest interesting data belonging to o<strong>the</strong>r users. Use <strong>the</strong> Extract Grep<br />

function in Burp Intruder to capture <strong>the</strong> relevant information from within<br />

<strong>the</strong> <strong>application</strong>’s responses.<br />

6.4 Test for Insecure Access Control Methods<br />

6.4.1 Some <strong>application</strong>s implement access controls based on request<br />

parameters in an inherently unsafe way. Look for parameters such<br />

as edit=false or access=read in any key requests, and modify <strong>the</strong>se<br />

in line with <strong>the</strong>ir apparent role to try to interfere with <strong>the</strong> <strong>application</strong>’s<br />

access control logic.<br />

6.4.2 Some <strong>application</strong>s base access control decisions on <strong>the</strong> HTTP Referer<br />

header. For example, an <strong>application</strong> may properly control access to<br />

/admin.jsp and accept any request showing this as its Referer. To test<br />

for this behavior, attempt to perform some privileged actions to which<br />

you are authorized, and submit a missing or modified Referer header.<br />

If this change causes <strong>the</strong> <strong>application</strong> to block your request, it may be<br />

using <strong>the</strong> Referer header in an unsafe way. Try performing <strong>the</strong> same<br />

action as an unauthorized user, but supply <strong>the</strong> original Referer header<br />

and see whe<strong>the</strong>r <strong>the</strong> action succeeds.<br />

6.4.3 If HEAD is an allowed method on <strong>the</strong> site, test for insecure containermanaged<br />

access control to URLs. Make a request using <strong>the</strong> HEAD method<br />

to determine whe<strong>the</strong>r <strong>the</strong> <strong>application</strong> permits it.

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

Saved successfully!

Ooh no, something went wrong!