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<br />

12<br />

Attacking Users:<br />

Cross-Site Scripting<br />

All <strong>the</strong> attacks we have considered so far involve directly targeting <strong>the</strong> serverside<br />

<strong>application</strong>. Many of <strong>the</strong>se attacks do, of course, impinge upon o<strong>the</strong>r users,<br />

such as a SQL injection attack that steals o<strong>the</strong>r users’ data. But <strong>the</strong> attacker’s<br />

essential methodology was to interact with <strong>the</strong> server in unexpected ways to<br />

perform unauthorized actions and access unauthorized data.<br />

The attacks described in this chapter and <strong>the</strong> next are in a different category,<br />

because <strong>the</strong> attacker’s primary target is <strong>the</strong> <strong>application</strong>’s o<strong>the</strong>r users. All <strong>the</strong><br />

relevant vulnerabilities still exist within <strong>the</strong> <strong>application</strong> itself. However, <strong>the</strong><br />

attacker leverages some aspect of <strong>the</strong> <strong>application</strong>’s behavior to carry out malicious<br />

actions against ano<strong>the</strong>r end user. These actions may result in some of <strong>the</strong> same<br />

effects that we have already examined, such as session hijacking, unauthorized<br />

actions, and <strong>the</strong> disclosure of personal data. They may also result in o<strong>the</strong>r<br />

undesirable outcomes, such as logging of keystrokes or execution of arbitrary<br />

commands on users’ computers.<br />

O<strong>the</strong>r areas of software security have witnessed a gradual shift in focus from<br />

server-side to client-side attacks in recent years. For example, Microsoft used<br />

to frequently announce serious security vulnerabilities within its server products.<br />

Although numerous client-side flaws were also disclosed, <strong>the</strong>se received<br />

much less attention because servers presented a much more appealing target<br />

for most attackers. In <strong>the</strong> course of just a few years, at <strong>the</strong> start of <strong>the</strong> twentyfirst<br />

century, this situation has changed markedly. At <strong>the</strong> time of this writing,<br />

431

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

Saved successfully!

Ooh no, something went wrong!