19.09.2017 Views

the-web-application-hackers-handbook

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

an arbitrary redirect to an external <strong>web</strong>site. If so, this behavior can be<br />

exploited to lend credibility to a phishing-style attack.<br />

7.3.4.2 If <strong>the</strong> <strong>application</strong> ordinarily transmits an absolute URL as <strong>the</strong> parameter’s<br />

value, modify <strong>the</strong> domain name within <strong>the</strong> URL, and test whe<strong>the</strong>r <strong>the</strong><br />

<strong>application</strong> redirects you to <strong>the</strong> different domain.<br />

7.3.4.3 If <strong>the</strong> parameter normally contains a relative URL, modify this into an<br />

absolute URL for a different domain, and test whe<strong>the</strong>r <strong>the</strong> <strong>application</strong><br />

redirects you to this domain.<br />

7.3.4.4 If <strong>the</strong> <strong>application</strong> carries out some validation on <strong>the</strong> parameter before<br />

performing <strong>the</strong> redirect, in an effort to prevent external redirection,<br />

this is often vulnerable to bypasses. Try <strong>the</strong> various attacks described<br />

in Chapter 13 to test <strong>the</strong> robustness of <strong>the</strong> filters.<br />

7.3.5 Test for Stored Attacks<br />

7.3.5.1 If <strong>the</strong> <strong>application</strong> stores items of user-supplied input and later displays <strong>the</strong>se<br />

on-screen, after you have fuzzed <strong>the</strong> entire <strong>application</strong> you may observe<br />

some of your attack strings being returned in responses to requests that did<br />

not <strong>the</strong>mselves contain those strings. Note any instances where this occurs,<br />

and identify <strong>the</strong> original entry point for <strong>the</strong> data that is being stored.<br />

7.3.5.2 In some cases, user-supplied data is stored successfully only if you complete<br />

a multistage process, which does not occur in basic fuzz testing. If<br />

your <strong>application</strong> mapping exercises identified any functionality of this<br />

kind, manually walk through <strong>the</strong> relevant process and test <strong>the</strong> stored<br />

data for XSS vulnerabilities.<br />

7.3.5.3 If you have sufficient access to test it, review closely any administrative<br />

functionality in which data originating from low-privileged users is<br />

ultimately rendered on-screen in <strong>the</strong> session of more privileged users.<br />

Any stored XSS vulnerabilities in functionality of this kind typically lead<br />

directly to privilege escalation.<br />

7.3.5.4 Test every instance where user-supplied data is stored and displayed<br />

to users. Probe <strong>the</strong>se for XSS and <strong>the</strong> o<strong>the</strong>r response injection attacks<br />

described previously.<br />

7.3.5.5 If you find a vulnerability in which input supplied by one user is displayed<br />

to o<strong>the</strong>r users, determine <strong>the</strong> most effective attack payload with which<br />

you can achieve your objectives, such as session hijacking or request<br />

forgery. If <strong>the</strong> stored data is displayed only to <strong>the</strong> same user from whom<br />

it originated, try to find ways of chaining any o<strong>the</strong>r vulnerabilities you<br />

have discovered (such as broken access controls) to inject an attack into<br />

o<strong>the</strong>r users’ sessions.

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

Saved successfully!

Ooh no, something went wrong!