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.

662 Chapter 17 n Attacking Application Architecture<br />

customizations to core <strong>application</strong> functionality, a vulnerability introduced by<br />

one customer may enable users of a customized <strong>application</strong> to attack <strong>the</strong> main<br />

shared <strong>application</strong>, <strong>the</strong>reby compromising <strong>the</strong> data of all <strong>the</strong> ASP’s customers.<br />

In addition to <strong>the</strong>se attacks, <strong>the</strong> ASP scenario introduces fur<strong>the</strong>r possibilities<br />

for malicious customers or users to compromise <strong>the</strong> wider shared <strong>application</strong>,<br />

because of how different components of <strong>the</strong> shared <strong>application</strong> must interoperate.<br />

For example:<br />

n Data generated by different <strong>application</strong>s is often collated in a common<br />

location and viewed by ASP-level users with powerful privileges within<br />

<strong>the</strong> shared <strong>application</strong>. This means that an XSS-type attack within a customized<br />

<strong>application</strong> may result in compromise of <strong>the</strong> shared <strong>application</strong>.<br />

For example, if an attacker can inject JavaScript code into log file entries,<br />

payment records, or personal contact information, this may enable him<br />

to hijack <strong>the</strong> session of an ASP-level user and <strong>the</strong>refore gain access to<br />

sensitive administrative functionality.<br />

n ASPs often employ a shared database to hold data belonging to all customers.<br />

Strict segregation of data access may or may not be enforced at<br />

<strong>the</strong> <strong>application</strong> and database layers. However, in ei<strong>the</strong>r case some shared<br />

components typically exist, such as database stored procedures, that are<br />

responsible for processing data belonging to multiple customers. Defective<br />

trust relationships or vulnerabilities within <strong>the</strong>se components may allow<br />

malicious customers or users to gain access to data in o<strong>the</strong>r <strong>application</strong>s.<br />

For example, a SQL injection vulnerability in a shared stored procedure<br />

that runs with definer privileges may result in <strong>the</strong> compromise of <strong>the</strong><br />

entire shared database.<br />

HACK STEPS<br />

1. Examine <strong>the</strong> access mechanisms provided for customers of <strong>the</strong> shared<br />

environment to update and manage <strong>the</strong>ir content and functionality.<br />

Consider questions such as <strong>the</strong> following:<br />

n<br />

n<br />

n<br />

Does <strong>the</strong> remote access facility use a secure protocol and suitably<br />

hardened infrastructure?<br />

Can customers access files, data, and o<strong>the</strong>r resources that <strong>the</strong>y do not<br />

legitimately need to access?<br />

Can customers gain an interactive shell within <strong>the</strong> hosting environment<br />

and perform arbitrary commands?<br />

2. If a proprietary <strong>application</strong> is used to allow customers to configure and<br />

customize a shared environment, consider targeting this <strong>application</strong> as a<br />

means of compromising <strong>the</strong> environment itself and individual <strong>application</strong>s<br />

running within it.

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

Saved successfully!

Ooh no, something went wrong!