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.

134 Chapter 5 n Bypassing Client-Side Controls<br />

machine is intriguing. If any aspect of <strong>the</strong> game play is controlled within <strong>the</strong><br />

client instead of by <strong>the</strong> server, an attacker could manipulate <strong>the</strong> game with<br />

precision to improve <strong>the</strong> odds, change <strong>the</strong> rules, or alter <strong>the</strong> scores submitted<br />

to <strong>the</strong> server. Several kinds of attacks could occur in this scenario:<br />

n The client component could be trusted to maintain <strong>the</strong> game state. In this<br />

instance, local tampering with <strong>the</strong> game state would give an attacker an<br />

advantage in <strong>the</strong> game.<br />

n An attacker could bypass a client-side control and perform an illegal action<br />

designed to give himself an advantage within <strong>the</strong> game.<br />

n An attacker could find a hidden function, parameter, or resource that,<br />

when invoked, allows illegitimate access to a server-side resource.<br />

n If <strong>the</strong> game involves any peers, or a house player, <strong>the</strong> client component<br />

could be receiving and processing information about o<strong>the</strong>r players that,<br />

if known, could be used to <strong>the</strong> attacker’s advantage.<br />

Common Browser Extension Technologies<br />

The browser extension technologies you are most likely to encounter are Java<br />

applets, Flash, and Silverlight. Because <strong>the</strong>se are competing to achieve similar<br />

goals, <strong>the</strong>y have similar properties in <strong>the</strong>ir architecture that are relevant to<br />

security:<br />

n They are compiled to an intermediate bytecode.<br />

n They execute within a virtual machine that provides a sandbox environment<br />

for execution.<br />

n They may use remoting frameworks employing serialization to transmit<br />

complex data structures or objects over HTTP.<br />

Java<br />

Java applets run in <strong>the</strong> Java Virtual Machine (JVM) and are subject to <strong>the</strong> sandboxing<br />

applied by <strong>the</strong> Java Security Policy. Because Java has existed since early<br />

in <strong>the</strong> <strong>web</strong>’s history, and because its core concepts have remained relatively<br />

unchanged, a large body of knowledge and tools are available for attacking and<br />

defending Java applets, as described later in this chapter.<br />

Flash<br />

Flash objects run in <strong>the</strong> Flash virtual machine, and, like Java applets, are sandboxed<br />

from <strong>the</strong> host computer. Once used largely as a method of delivering<br />

animated content, Flash has moved on. With newer versions of ActionScript,

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

Saved successfully!

Ooh no, something went wrong!