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.

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

Figure 4-6: Burp Intruder showing <strong>the</strong> results of a file brute-force attack<br />

NOTE Do not assume that <strong>the</strong> <strong>application</strong> will respond with 200 OK if a<br />

requested resource exists and 404 Not Found if it does not. Many <strong>application</strong>s<br />

handle requests for nonexistent resources in a customized way, often<br />

returning a bespoke error message and a 200 response code. Fur<strong>the</strong>rmore,<br />

some requests for existent resources may receive a non-200 response. The following<br />

is a rough guide to <strong>the</strong> likely meaning of <strong>the</strong> response codes that you<br />

may encounter during a brute-force exercise looking for hidden content:<br />

n 302 Found — If <strong>the</strong> redirect is to a login page, <strong>the</strong> resource may be<br />

accessible only by au<strong>the</strong>nticated users. If <strong>the</strong> redirect is to an error message,<br />

this may indicate a different reason. If it is to ano<strong>the</strong>r location, <strong>the</strong><br />

redirect may be part of <strong>the</strong> <strong>application</strong>’s intended logic, and this should<br />

be investigated fur<strong>the</strong>r.<br />

n 400 Bad Request — The <strong>application</strong> may use a custom naming scheme<br />

for directories and files within URLs, which a particular request has not<br />

complied with. More likely, however, is that <strong>the</strong> wordlist you are using<br />

contains some whitespace characters or o<strong>the</strong>r invalid syntax.<br />

n 401 Unauthorized or 403 Forbidden — This usually indicates that<br />

<strong>the</strong> requested resource exists but may not be accessed by any user,

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

Saved successfully!

Ooh no, something went wrong!