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 829<br />

n If you can cause different <strong>application</strong> responses based on a single<br />

arbitrary condition, use Absin<strong>the</strong> to extract arbitrary data one bit<br />

at a time.<br />

n If you can trigger time delays based on a single arbitrary condition,<br />

exploit <strong>the</strong>se to retrieve data one bit at a time.<br />

n If <strong>the</strong> <strong>application</strong> is blocking certain characters or expressions that<br />

you require to perform a particular attack, try <strong>the</strong> various bypass<br />

techniques described in Chapter 9 to circumvent <strong>the</strong> input filter.<br />

n If possible, escalate <strong>the</strong> attack against <strong>the</strong> database and <strong>the</strong> underlying<br />

server by leveraging any vulnerabilities or powerful functions<br />

within <strong>the</strong> database.<br />

7.3 Test for XSS and O<strong>the</strong>r Response Injection<br />

7.3.1 Identify Reflected Request Parameters<br />

7.3.1.1 Sort <strong>the</strong> results of your fuzz testing by clicking <strong>the</strong> Payload Grep column,<br />

and identify any matches corresponding to <strong>the</strong> XSS payloads listed in<br />

step 7.1.3. These are cases where <strong>the</strong> XSS test strings were returned<br />

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

7.3.1.2 For each of <strong>the</strong>se cases, review <strong>the</strong> <strong>application</strong>’s response to find <strong>the</strong> location<br />

of <strong>the</strong> supplied input. If this appears within <strong>the</strong> response body, test<br />

for XSS vulnerabilities. If <strong>the</strong> input appears within any HTTP header, test<br />

for header injection vulnerabilities. If it is used in <strong>the</strong> Location header<br />

of a 302 response, or if it is used to specify a redirect in some o<strong>the</strong>r way,<br />

test for redirection vulnerabilities. Note that <strong>the</strong> same input might be<br />

copied into multiple locations within <strong>the</strong> response, and that more than<br />

one type of reflected vulnerability might be present.<br />

7.3.2 Test for Reflected XSS<br />

7.3.2.1 For each place within <strong>the</strong> response body where <strong>the</strong> value of <strong>the</strong> request<br />

parameter appears, review <strong>the</strong> surrounding HTML to identify possible<br />

ways of crafting your input to cause execution of arbitrary JavaScript.<br />

For example, you can inject tags, inject into an existing script,<br />

or place a crafted value into a tag attribute.<br />

7.3.2.2 Use <strong>the</strong> different methods of beating signature-based filters described in<br />

Chapter 12 as a reference for <strong>the</strong> different ways in which crafted input<br />

can be used to cause execution of JavaScript.<br />

7.3.2.3 Try submitting various possible exploits to <strong>the</strong> <strong>application</strong>, and monitor<br />

its responses to determine whe<strong>the</strong>r any filtering or sanitization of input

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

Saved successfully!

Ooh no, something went wrong!