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

9<br />

Attacking Data Stores<br />

Nearly all <strong>application</strong>s rely on a data store to manage data that is processed<br />

within <strong>the</strong> <strong>application</strong>. In many cases this data drives <strong>the</strong> core <strong>application</strong> logic,<br />

holding user accounts, permissions, <strong>application</strong> configuration settings, and more.<br />

Data stores have evolved to become significantly more than passive containers<br />

for data. Most hold data in a structured format, accessed using a predefined<br />

query format or language, and contain internal logic to help manage that data.<br />

Typically, <strong>application</strong>s use a common privilege level for all types of access<br />

to <strong>the</strong> data store and when processing data belonging to different <strong>application</strong><br />

users. If an attacker can interfere with <strong>the</strong> <strong>application</strong>’s interaction with <strong>the</strong> data<br />

store, to make it retrieve or modify different data, he can usually bypass any<br />

controls over data access that are imposed at <strong>the</strong> <strong>application</strong> layer.<br />

The principle just described can be applied to any kind of data store technology.<br />

Because this is a practical <strong>handbook</strong>, we will focus on <strong>the</strong> knowledge<br />

and techniques you need to exploit <strong>the</strong> vulnerabilities that exist in real-world<br />

<strong>application</strong>s. By far <strong>the</strong> most common data stores are SQL databases, XMLbased<br />

repositories, and LDAP directories. Practical examples seen elsewhere<br />

are also covered.<br />

In covering <strong>the</strong>se key examples, we will describe <strong>the</strong> practical steps that you<br />

can take to identify and exploit <strong>the</strong>se defects. There is a conceptual synergy in<br />

<strong>the</strong> process of understanding each new type of injection. Having grasped <strong>the</strong><br />

essentials of exploiting <strong>the</strong>se manifestations of <strong>the</strong> flaw, you should be confident<br />

that you can draw on this understanding when you encounter a new category<br />

287

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

Saved successfully!

Ooh no, something went wrong!