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.

160 Chapter 6 n Attacking Au<strong>the</strong>ntication<br />

Many of <strong>the</strong> most common au<strong>the</strong>ntication vulnerabilities are no-brainers.<br />

Anyone can type dictionary words into a login form in an attempt to guess<br />

valid passwords. In o<strong>the</strong>r cases, subtle defects may lurk deep within <strong>the</strong> <strong>application</strong>’s<br />

processing that can be uncovered and exploited only after painstaking<br />

analysis of a complex multistage login mechanism. We will describe <strong>the</strong> full<br />

spectrum of <strong>the</strong>se attacks, including techniques that have succeeded in breaking<br />

<strong>the</strong> au<strong>the</strong>ntication of some of <strong>the</strong> most security-critical and robustly defended<br />

<strong>web</strong> <strong>application</strong>s on <strong>the</strong> planet.<br />

Au<strong>the</strong>ntication Technologies<br />

A wide range of technologies are available to <strong>web</strong> <strong>application</strong> developers when<br />

implementing au<strong>the</strong>ntication mechanisms:<br />

n HTML forms-based au<strong>the</strong>ntication<br />

n Multifactor mechanisms, such as those combining passwords and physical<br />

tokens<br />

n Client SSL certificates and/or smartcards<br />

n HTTP basic and digest au<strong>the</strong>ntication<br />

n Windows-integrated au<strong>the</strong>ntication using NTLM or Kerberos<br />

n Au<strong>the</strong>ntication services<br />

By far <strong>the</strong> most common au<strong>the</strong>ntication mechanism employed by <strong>web</strong> <strong>application</strong>s<br />

uses HTML forms to capture a username and password and submit <strong>the</strong>se<br />

to <strong>the</strong> <strong>application</strong>. This mechanism accounts for well over 90% of <strong>application</strong>s<br />

you are likely to encounter on <strong>the</strong> Internet.<br />

In more security-critical Internet <strong>application</strong>s, such as online banking, this<br />

basic mechanism is often expanded into multiple stages, requiring <strong>the</strong> user to<br />

submit additional credentials, such as a PIN or selected characters from a secret<br />

word. HTML forms are still typically used to capture relevant data.<br />

In <strong>the</strong> most security-critical <strong>application</strong>s, such as private banking for high-worth<br />

individuals, it is common to encounter multifactor mechanisms using physical<br />

tokens. These tokens typically produce a stream of one-time passcodes or perform<br />

a challenge-response function based on input specified by <strong>the</strong> <strong>application</strong>.<br />

As <strong>the</strong> cost of this technology falls over time, it is likely that more <strong>application</strong>s<br />

will employ this kind of mechanism. However, many of <strong>the</strong>se solutions do not<br />

actually address <strong>the</strong> threats for which <strong>the</strong>y were devised — primarily phishing<br />

attacks and those employing client-side Trojans.<br />

Some <strong>web</strong> <strong>application</strong>s employ client-side SSL certificates or cryptographic<br />

mechanisms implemented within smartcards. Because of <strong>the</strong> overhead of administering<br />

and distributing <strong>the</strong>se items, <strong>the</strong>y are typically used only in security-critical

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

Saved successfully!

Ooh no, something went wrong!