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.

424 Chapter 11 n Attacking Application Logic<br />

wahh consulting “Press Release 08-03-2011” takeover ngs announced<br />

>> 0 matches<br />

wahh consulting “Press Release 08-03-2011” takeover ngs cancelled<br />

>> 0 matches<br />

wahh consulting “Press Release 08-03-2011” takeover ngs completed<br />

>> 1 match<br />

Although <strong>the</strong> user cannot view <strong>the</strong> document itself, with sufficient imagination<br />

and use of scripted requests, he may be able to build a fairly accurate<br />

understanding of its contents.<br />

TIP In certain situations, being able to leach information via a search<br />

function in this way may be critical to <strong>the</strong> security of <strong>the</strong> <strong>application</strong> itself,<br />

effectively disclosing details of administrative functions, passwords, and technologies<br />

in use.<br />

TIP This technique has proven to be an effective attack against internal<br />

document man agement software. The authors have used this technique to<br />

brute-force a key password from a configuration file that was stored in a wiki.<br />

Because <strong>the</strong> wiki returned a hit if <strong>the</strong> search string appeared anywhere in <strong>the</strong><br />

page (instead of matching on whole words), it was possible to brute-force <strong>the</strong><br />

password letter by letter, searching for <strong>the</strong> following:<br />

Password=A<br />

Password=B<br />

Password=BA<br />

...<br />

Example 11: Snarfing Debug Messages<br />

The authors encountered this logic flaw in a <strong>web</strong> <strong>application</strong> used by a financial<br />

services company.<br />

The Functionality<br />

The <strong>application</strong> was only recently deployed. Like much new software, it still contained<br />

a number of functionality-related bugs. Intermittently, various operations<br />

would fail in an unpredictable way, and users would receive an error message.<br />

To facilitate <strong>the</strong> investigation of errors, developers decided to include detailed,<br />

verbose information in <strong>the</strong>se messages, including <strong>the</strong> following details:<br />

n The user’s identity<br />

n The token for <strong>the</strong> current session<br />

n The URL being accessed<br />

n All <strong>the</strong> parameters supplied with <strong>the</strong> request that generated <strong>the</strong> error

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

Saved successfully!

Ooh no, something went wrong!