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.

CHAPTER<br />

8<br />

Attacking Access Controls<br />

Within <strong>the</strong> <strong>application</strong>’s core security mechanisms, access controls are logically<br />

built on au<strong>the</strong>ntication and session management. So far, you have seen how an<br />

<strong>application</strong> can first verify a user’s identity and <strong>the</strong>n confirm that a particular<br />

sequence of requests that it receives originated from <strong>the</strong> same user. The primary<br />

reason that <strong>the</strong> <strong>application</strong> needs to do <strong>the</strong>se things — in terms of security, at<br />

least — is because it needs a way to decide whe<strong>the</strong>r it should permit a given<br />

request to perform its attempted action or access <strong>the</strong> resources it is requesting.<br />

Access controls are a critical defense mechanism within <strong>the</strong> <strong>application</strong> because<br />

<strong>the</strong>y are responsible for making <strong>the</strong>se key decisions. When <strong>the</strong>y are defective, an<br />

attacker can often compromise <strong>the</strong> entire <strong>application</strong>, taking control of administrative<br />

functionality and accessing sensitive data belonging to every o<strong>the</strong>r user.<br />

As noted in Chapter 1, broken access controls are among <strong>the</strong> most commonly<br />

encountered categories of <strong>web</strong> <strong>application</strong> vulnerability, affecting a massive 71<br />

percent of <strong>the</strong> <strong>application</strong>s recently tested by <strong>the</strong> authors. It is extremely common<br />

to encounter <strong>application</strong>s that go to all <strong>the</strong> trouble of implementing robust<br />

mechanisms for au<strong>the</strong>ntication and session management, only to squander that<br />

investment by neglecting to build effective access controls on <strong>the</strong>m. One reason<br />

that <strong>the</strong>se weaknesses are so prevalent is that access control checks need to be<br />

performed for every request and every operation on a resource that particular<br />

user attempts to perform, at a specific time. And unlike many o<strong>the</strong>r classes of<br />

control, this is a design decision that needs to be made by a human; it cannot<br />

be resolved by employing technology.<br />

257

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

Saved successfully!

Ooh no, something went wrong!