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.

554 Chapter 13 n Attacking Users: O<strong>the</strong>r Techniques<br />

Internet Explorer userData<br />

Internet Explorer implements its own custom local storage mechanism called<br />

userData.<br />

HACK STEPS<br />

You can review <strong>the</strong> contents of <strong>the</strong> raw data stored in IE’s userData directly on<br />

disk. For recent versions of Internet Explorer, this data resides within <strong>the</strong> following<br />

folder structure:<br />

C:\Users\user\AppData\Roaming\Microsoft\Internet Explorer\<br />

UserData\Low\{random}<br />

TRY IT!<br />

http://mdsec.net/auth/232/<br />

HTML5 Local Storage Mechanisms<br />

HTML5 is introducing a range of new local storage mechanisms, including:<br />

n Session storage<br />

n Local storage<br />

n Database storage<br />

The specifications and usage of <strong>the</strong>se mechanisms are still evolving. They are<br />

not fully implemented in all browsers, and details of how to test for <strong>the</strong>ir usage<br />

and review any persisted data are likely to be browser-dependent.<br />

Preventing Local Privacy Attacks<br />

Applications should avoid storing anything sensitive in a persistent cookie.<br />

Even if this data is encrypted, it can potentially be resubmitted by an attacker<br />

who captures it.<br />

Applications should use suitable cache directives to prevent sensitive data<br />

from being stored by browsers. In ASP <strong>application</strong>s, <strong>the</strong> following instructions<br />

cause <strong>the</strong> server to include <strong>the</strong> required directives:<br />

<br />

<br />

<br />

In Java <strong>application</strong>s, <strong>the</strong> following commands should achieve <strong>the</strong> same result:

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

Saved successfully!

Ooh no, something went wrong!