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

<strong>the</strong>se is by definition impossible, avoid using /etc/passwd or /windows/<br />

system32/config/sam as payloads for file retrieval. Also avoid using<br />

terms such as in an XSS attack and using alert() or xss as<br />

XSS payloads.<br />

11.7.5 If a particular request is blocked, try submitting <strong>the</strong> same parameter in a<br />

different location or context. For instance, submit <strong>the</strong> same parameter in<br />

<strong>the</strong> URL in a GET request, within <strong>the</strong> body of a POST request, and within<br />

<strong>the</strong> URL in a POST request.<br />

11.7.6 On ASP.NET, also try submitting <strong>the</strong> parameter as a cookie. The API<br />

Request.Params[“foo”] will retrieve <strong>the</strong> value of a cookie named foo<br />

if <strong>the</strong> parameter foo is not found in <strong>the</strong> query string or message body.<br />

11.7.7 Review all <strong>the</strong> o<strong>the</strong>r methods of introducing user input provided in<br />

Chapter 4, picking any that are not protected.<br />

11.7.8 Determine locations where user input is (or can be) submitted in a nonstandard<br />

format such as serialization or encoding. If none is available,<br />

build <strong>the</strong> attack string by concatenation and/or by spanning it across<br />

multiple variables. (Note that if <strong>the</strong> target is ASP.NET, you may be able<br />

to use HPP to concatenate <strong>the</strong> attack using multiple specifications of <strong>the</strong><br />

same variable.)<br />

12 Miscellaneous Checks<br />

12.1. Test for DOM-based attacks<br />

12.2. Test for local privacy vulnerabilities<br />

12.3. Test for weak SSL ciphers<br />

12.4. Check same-orgin policy configuration<br />

Figure 21-13: Miscellaneous checks<br />

12.1 Check for DOM-Based Attacks<br />

12.1.1 Perform a brief code review of every piece of JavaScript received from<br />

<strong>the</strong> <strong>application</strong>. Identify any XSS or redirection vulnerabilities that can<br />

be triggered by using a crafted URL to introduce malicious data into<br />

<strong>the</strong> DOM of <strong>the</strong> relevant page. Include all standalone JavaScript files

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

Saved successfully!

Ooh no, something went wrong!