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

3.1 Test Transmission of Data Via <strong>the</strong> Client<br />

3.1.1 Locate all instances within <strong>the</strong> <strong>application</strong> where hidden form fields,<br />

cookies, and URL parameters are apparently being used to transmit<br />

data via <strong>the</strong> client.<br />

3.1.2 Attempt to determine <strong>the</strong> purpose that <strong>the</strong> item plays in <strong>the</strong> <strong>application</strong>’s<br />

logic, based on <strong>the</strong> context in which it appears and on its name<br />

and value.<br />

3.1.3 Modify <strong>the</strong> item’s value in ways that are relevant to its role in <strong>the</strong><br />

<strong>application</strong>’s functionality. Determine whe<strong>the</strong>r <strong>the</strong> <strong>application</strong> processes<br />

arbitrary values submitted in <strong>the</strong> field and whe<strong>the</strong>r this fact<br />

can be exploited to interfere with <strong>the</strong> <strong>application</strong>’s logic or subvert<br />

any security controls.<br />

3.1.4 If <strong>the</strong> <strong>application</strong> transmits opaque data via <strong>the</strong> client, you can attack this<br />

in various ways. If <strong>the</strong> item is obfuscated, you may be able to decipher<br />

<strong>the</strong> obfuscation algorithm and <strong>the</strong>refore submit arbitrary data within <strong>the</strong><br />

opaque item. Even if it is securely encrypted, you may be able to replay<br />

<strong>the</strong> item in o<strong>the</strong>r contexts to interfere with <strong>the</strong> <strong>application</strong>’s logic. See<br />

Chapter 5 for more details on <strong>the</strong>se and o<strong>the</strong>r attacks.<br />

3.1.5 If <strong>the</strong> <strong>application</strong> uses <strong>the</strong> ASP.NET ViewState, test to confirm whe<strong>the</strong>r<br />

this can be tampered with or whe<strong>the</strong>r it contains any sensitive information.<br />

Note that <strong>the</strong> ViewState may be used differently on different<br />

<strong>application</strong> pages.<br />

3.1.5.1 Use <strong>the</strong> ViewState analyzer in Burp Suite to confirm whe<strong>the</strong>r<br />

<strong>the</strong> EnableViewStateMac option has been enabled, meaning<br />

that <strong>the</strong> ViewState’s contents cannot be modified.<br />

3.1.5.2 Review <strong>the</strong> decoded ViewState to identify any sensitive data it<br />

contains.<br />

3.1.5.3 Modify one of <strong>the</strong> decoded parameter values and reencode and<br />

submit <strong>the</strong> ViewState. If <strong>the</strong> <strong>application</strong> accepts <strong>the</strong> modified<br />

value, you should treat <strong>the</strong> ViewState as an input channel for<br />

introducing arbitrary data into <strong>the</strong> <strong>application</strong>’s processing.<br />

Perform <strong>the</strong> same testing on <strong>the</strong> data it contains as you would<br />

for any o<strong>the</strong>r request parameters.<br />

3.2 Test Client-Side Controls Over User Input<br />

3.2.1 Identify any cases where client-side controls such as length limits and<br />

JavaScript checks are used to validate user input before it is submitted

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

Saved successfully!

Ooh no, something went wrong!