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 3 n Web Application Technologies 51<br />

It is relatively rare to encounter <strong>the</strong>se au<strong>the</strong>ntication protocols being used<br />

by <strong>web</strong> <strong>application</strong>s deployed on <strong>the</strong> Internet. They are more commonly used<br />

within organizations to access intranet-based services.<br />

COMMON MYTH<br />

“Basic au<strong>the</strong>ntication is insecure.”<br />

Because basic au<strong>the</strong>ntication places credentials in unencrypted form within<br />

<strong>the</strong> HTTP request, it is frequently stated that <strong>the</strong> protocol is insecure and<br />

should not be used. But forms-based au<strong>the</strong>ntication, as used by numerous<br />

banks, also places credentials in unencrypted form within <strong>the</strong> HTTP request.<br />

Any HTTP message can be protected from eavesdropping attacks by using HTTPS<br />

as a transport mechanism, which should be done by every security-conscious<br />

<strong>application</strong>. In relation to eavesdropping, at least, basic au<strong>the</strong>ntication in itself<br />

is no worse than <strong>the</strong> methods used by <strong>the</strong> majority of today’s <strong>web</strong> <strong>application</strong>s.<br />

Web Functionality<br />

In addition to <strong>the</strong> core communications protocol used to send messages between<br />

client and server, <strong>web</strong> <strong>application</strong>s employ numerous technologies to deliver<br />

<strong>the</strong>ir functionality. Any reasonably functional <strong>application</strong> may employ dozens<br />

of distinct technologies within its server and client components. Before you can<br />

mount a serious attack against a <strong>web</strong> <strong>application</strong>, you need a basic understanding<br />

of how its functionality is implemented, how <strong>the</strong> technologies used are<br />

designed to behave, and where <strong>the</strong>ir weak points are likely to lie.<br />

Server-Side Functionality<br />

The early World Wide Web contained entirely static content. Websites consisted<br />

of various resources such as HTML pages and images, which were<br />

simply loaded onto a <strong>web</strong> server and delivered to any user who requested<br />

<strong>the</strong>m. Each time a particular resource was requested, <strong>the</strong> server responded<br />

with <strong>the</strong> same content.<br />

Today’s <strong>web</strong> <strong>application</strong>s still typically employ a fair number of static resources.<br />

However, a large amount of <strong>the</strong> content that <strong>the</strong>y present to users is generated<br />

dynamically. When a user requests a dynamic resource, <strong>the</strong> server’s response<br />

is created on <strong>the</strong> fly, and each user may receive content that is uniquely customized<br />

for him or her.<br />

Dynamic content is generated by scripts or o<strong>the</strong>r code executing on <strong>the</strong> server.<br />

These scripts are akin to computer programs in <strong>the</strong>ir own right. They have various<br />

inputs, perform processing on <strong>the</strong>se, and return <strong>the</strong>ir outputs to <strong>the</strong> user.

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

Saved successfully!

Ooh no, something went wrong!