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.

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

from any o<strong>the</strong>r site can perform two-way interaction, riding on <strong>the</strong> sessions<br />

of <strong>application</strong> users. This would allow all data to be retrieved, and<br />

any user actions to be performed, by any o<strong>the</strong>r domain.<br />

12.4.2 Check for <strong>the</strong> /clientaccesspolicy.xml file. Similar to Flash, if <strong>the</strong><br />

configuration is too permissive, o<strong>the</strong>r sites<br />

can perform two-way interaction with <strong>the</strong> site under assessment.<br />

12.4.3 Test an <strong>application</strong>’s handling of cross-domain requests using<br />

XMLHttpRequest by adding an Origin header specifying a different<br />

domain and examining any Access-Control headers that are returned.<br />

The security implications of allowing two-way access from any domain,<br />

or from specified o<strong>the</strong>r domains, are <strong>the</strong> same as those described for <strong>the</strong><br />

Flash cross-domain policy.<br />

13 Follow Up Any Information Leakage<br />

13.1 In all your probing of <strong>the</strong> target <strong>application</strong>, monitor its responses for<br />

error messages that may contain useful information about <strong>the</strong> error’s<br />

cause, <strong>the</strong> technologies in use, and <strong>the</strong> <strong>application</strong>’s internal structure<br />

and functionality.<br />

13.2 If you receive any unusual error messages, investigate <strong>the</strong>se using standard<br />

search engines. You can use various advanced search features to<br />

narrow down your results. For example:<br />

“unable to retrieve” filetype:php<br />

13.3 Review <strong>the</strong> search results, looking both for any discussion about <strong>the</strong><br />

error message and for any o<strong>the</strong>r <strong>web</strong>sites in which <strong>the</strong> same message has<br />

appeared. O<strong>the</strong>r <strong>application</strong>s may produce <strong>the</strong> same message in a more<br />

verbose context, enabling you to better understand what kind of conditions<br />

give rise to <strong>the</strong> error. Use <strong>the</strong> search engine cache to retrieve examples<br />

of error messages that no longer appear within <strong>the</strong> live <strong>application</strong>.<br />

13.4 Use Google code search to locate any publicly available code that may<br />

be responsible for a particular error message. Search for snippets of error<br />

messages that may be hard-coded into <strong>the</strong> <strong>application</strong>’s source code.<br />

You can also use various advanced search features to specify <strong>the</strong> code<br />

language and o<strong>the</strong>r details, if <strong>the</strong>se are known. For example:<br />

unable\ to\ retrieve lang:php package:mail<br />

13.5 If you receive error messages with stack traces containing <strong>the</strong> names<br />

of library and third-party code components, search for <strong>the</strong>se names on<br />

both types of search engine.

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

Saved successfully!

Ooh no, something went wrong!