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 13 n Attacking Users: O<strong>the</strong>r Techniques 559<br />

input. Safer alternatives are usually available with minimal extra effort.<br />

For example, if it is considered necessary to launch external processes,<br />

compile a list of all <strong>the</strong> external processes that may legitimately and safely<br />

be launched. Then ei<strong>the</strong>r create a separate method to call each one or use<br />

a single method that takes an index number into this list.<br />

As an additional defense-in-depth precaution, some ActiveX controls<br />

validate <strong>the</strong> domain name that issued <strong>the</strong> HTML page from which <strong>the</strong>y<br />

are being invoked. Microsoft’s SiteLock Active Template Library template<br />

allows developers to restrict <strong>the</strong> use of an ActiveX control to a specific list<br />

of domain names.<br />

Some controls go even fur<strong>the</strong>r by requiring that all parameters passed to <strong>the</strong><br />

control must be cryptographically signed. If <strong>the</strong> signature passed is invalid, <strong>the</strong><br />

control does not carry out <strong>the</strong> requested action. You should be aware that some<br />

defenses of this kind can be circumvented if <strong>the</strong> <strong>web</strong>site that is permitted to<br />

invoke <strong>the</strong> control contains any XSS vulnerabilities.<br />

Attacking <strong>the</strong> Browser<br />

The attacks described so far in this and <strong>the</strong> preceding chapter involve exploiting<br />

some feature of an <strong>application</strong>’s behavior to compromise users of <strong>the</strong> <strong>application</strong>.<br />

Attacks such as cross-site scripting, cross-site request forgery, and JavaScript<br />

hijacking all arise from vulnerabilities within specific <strong>web</strong> <strong>application</strong>s, even<br />

though <strong>the</strong> details of some exploit techniques may leverage quirks within specific<br />

browsers.<br />

A fur<strong>the</strong>r category of attacks against users does not depend on <strong>the</strong> behavior<br />

of specific <strong>application</strong>s. Ra<strong>the</strong>r, <strong>the</strong>se attacks rely solely on features of<br />

<strong>the</strong> browser’s behavior, or on <strong>the</strong> design of core <strong>web</strong> technologies <strong>the</strong>mselves.<br />

These attacks can be delivered by any malicious <strong>web</strong>site or by any<br />

benign site that has itself been compromised. As such, <strong>the</strong>y lie at <strong>the</strong> edge<br />

of <strong>the</strong> scope of a book about hacking <strong>web</strong> <strong>application</strong>s. Never<strong>the</strong>less, <strong>the</strong>y<br />

are worthy of brief consideration partly because <strong>the</strong>y share some features<br />

with attacks that exploit <strong>application</strong>-specific functions. They also provide<br />

context for understanding <strong>the</strong> impact of various <strong>application</strong> behaviors by<br />

showing what is possible for an attacker to achieve even in <strong>the</strong> absence of<br />

any <strong>application</strong>-specific flaws.<br />

The discussion in <strong>the</strong> following sections is necessarily concise. There is certainly<br />

room for an entire book to be written on this subject. Would-be authors<br />

with a significant amount of spare time are encouraged to submit a proposal<br />

to Wiley for The Browser Hacker’s Handbook.

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

Saved successfully!

Ooh no, something went wrong!