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.

Chapter 4 n Mapping <strong>the</strong> Application 81<br />

to review <strong>the</strong> page source for vulnerabilities that can <strong>the</strong>n be exploited<br />

on <strong>the</strong> live page.<br />

n Backup archives that contain a full snapshot of files within (or indeed<br />

outside) <strong>the</strong> <strong>web</strong> root, possibly enabling you to easily identify all content<br />

and functionality within <strong>the</strong> <strong>application</strong>.<br />

n New functionality that has been deployed to <strong>the</strong> server for testing but not<br />

yet linked from <strong>the</strong> main <strong>application</strong>.<br />

n Default <strong>application</strong> functionality in an off-<strong>the</strong>-shelf <strong>application</strong> that has<br />

been superficially hidden from <strong>the</strong> user but is still present on <strong>the</strong> server.<br />

n Old versions of files that have not been removed from <strong>the</strong> server. In <strong>the</strong><br />

case of dynamic pages, <strong>the</strong>se may contain vulnerabilities that have been<br />

fixed in <strong>the</strong> current version but that can still be exploited in <strong>the</strong> old version.<br />

n Configuration and include files containing sensitive data such as database<br />

credentials.<br />

n Source files from which <strong>the</strong> live <strong>application</strong>’s functionality has been<br />

compiled.<br />

n Comments in source code that in extreme cases may contain information<br />

such as usernames and passwords but that more likely provide information<br />

about <strong>the</strong> state of <strong>the</strong> <strong>application</strong>. Key phrases such as “test this function”<br />

or something similar are strong indicators of where to start hunting for<br />

vulnerabilities.<br />

n Log files that may contain sensitive information such as valid usernames,<br />

session tokens, URLs visited, and actions performed.<br />

Effective discovery of hidden content requires a combination of automated and<br />

manual techniques and often relies on a degree of luck.<br />

Brute-Force Techniques<br />

Chapter 14 describes how automated techniques can be leveraged to speed up<br />

just about any attack against an <strong>application</strong>. In <strong>the</strong> present context of information<br />

ga<strong>the</strong>ring, automation can be used to make huge numbers of requests to <strong>the</strong><br />

<strong>web</strong> server, attempting to guess <strong>the</strong> names or identifiers of hidden functionality.<br />

For example, suppose that your user-directed spidering has identified <strong>the</strong><br />

following <strong>application</strong> content:<br />

http://eis/auth/Login<br />

http://eis/auth/ForgotPassword<br />

http://eis/home/<br />

http://eis/pub/media/100/view<br />

http://eis/images/eis.gif<br />

http://eis/include/eis.css

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

Saved successfully!

Ooh no, something went wrong!