19.09.2017 Views

the-web-application-hackers-handbook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

806 Chapter 21 n A Web Application Hacker’s Methodology<br />

4.2 Test Password Quality<br />

4.2.1 Review <strong>the</strong> <strong>application</strong> for any description of <strong>the</strong> minimum quality rules<br />

enforced on user passwords.<br />

4.2.2 Attempt to set various kinds of weak passwords, using any self-registration<br />

or password change functions to establish <strong>the</strong> rules actually enforced.<br />

Try short passwords, alphabetic characters only, single-case characters<br />

only, dictionary words, and <strong>the</strong> current username.<br />

4.2.3 Test for incomplete validation of credentials. Set a strong and complex<br />

password (for example, 12 characters with mixed-case letters, numerals,<br />

and typographic characters). Attempt to log in using different variations<br />

on this password, by removing <strong>the</strong> last character, by changing a<br />

character’s case, and by removing any special characters. If any of <strong>the</strong>se<br />

login attempts is successful, continue experimenting systematically to<br />

identify what validation is actually being performed.<br />

4.2.4 Having established <strong>the</strong> minimum password quality rules, and <strong>the</strong> extent<br />

of password validation, identify <strong>the</strong> range of values that a passwordguessing<br />

attack would need to employ to have a good probability of<br />

success. Attempt to locate any built-in accounts that may not have been<br />

subject to <strong>the</strong> standard password complexity requirements.<br />

4.3 Test for Username Enumeration<br />

4.3.1 Identify every location within <strong>the</strong> various au<strong>the</strong>ntication functions<br />

where a username is submitted, including via an on-screen input field,<br />

a hidden form field, or a cookie. Common locations include <strong>the</strong> primary<br />

login, self-registration, password change, logout, and account recovery.<br />

4.3.2 For each location, submit two requests, containing a valid and an invalid<br />

username. Review every detail of <strong>the</strong> server’s responses to each pair of<br />

requests, including <strong>the</strong> HTTP status code, any redirects, information<br />

displayed on-screen, any differences hidden in <strong>the</strong> HTML page source,<br />

and <strong>the</strong> time taken for <strong>the</strong> server to respond. Note that some differences<br />

may be subtle (for example, <strong>the</strong> same error message may contain minor<br />

typographical differences). You can use <strong>the</strong> history function of your<br />

intercepting proxy to review all traffic to and from <strong>the</strong> server. WebScarab<br />

has a function to compare two responses to quickly highlight any differences<br />

between <strong>the</strong>m.<br />

4.3.3 If you observe any differences between <strong>the</strong> responses where a valid and<br />

invalid username is submitted, repeat <strong>the</strong> test with a different pair of<br />

values and confirm that a systematic difference exists that can provide<br />

a basis for automated username enumeration.

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

Saved successfully!

Ooh no, something went wrong!