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 21 n A Web Application Hacker’s Methodology 807<br />

4.3.4 Check for any o<strong>the</strong>r sources of information leakage within <strong>the</strong> <strong>application</strong><br />

that may enable you to compile a list of valid usernames. Examples<br />

are logging functionality, actual listings of registered users, and direct<br />

mention of names or e-mail addresses in source code comments.<br />

4.3.5 Locate any subsidiary au<strong>the</strong>ntication that accepts a username, and<br />

determine whe<strong>the</strong>r it can be used for username enumeration. Pay<br />

specific attention to a registration page that allows specification of a<br />

username.<br />

4.4 Test Resilience to Password Guessing<br />

4.4.1 Identify every location within <strong>the</strong> <strong>application</strong> where user credentials<br />

are submitted. The two main instances typically are <strong>the</strong> main login<br />

function and <strong>the</strong> password change function. The latter normally is a<br />

valid target for password-guessing attacks only if an arbitrary username<br />

can be supplied.<br />

4.4.2 At each location, using an account that you control, manually send<br />

several requests containing <strong>the</strong> valid username but o<strong>the</strong>r invalid<br />

credentials. Monitor <strong>the</strong> <strong>application</strong>’s responses to identify any differences.<br />

After about 10 failed logins, if <strong>the</strong> <strong>application</strong> has not returned<br />

a message about account lockout, submit a request containing valid<br />

credentials. If this request succeeds, an account lockout policy probably<br />

is not in force.<br />

4.4.3 If you do not control any accounts, attempt to enumerate or guess a<br />

valid username, and make several invalid requests using this guess,<br />

monitoring for any error messages about account lockout. Of course,<br />

you should be aware that this test may have <strong>the</strong> effect of suspending or<br />

disabling an account belonging to ano<strong>the</strong>r user.<br />

4.5 Test Any Account Recovery Function<br />

4.5.1 Identify whe<strong>the</strong>r <strong>the</strong> <strong>application</strong> contains any facility for users to regain<br />

control of <strong>the</strong>ir account if <strong>the</strong>y have forgotten <strong>the</strong>ir credentials. This<br />

is often indicated by a Forgot Your Password link near <strong>the</strong> main login<br />

function.<br />

4.5.2 Establish how <strong>the</strong> account recovery function works by doing a complete<br />

walk-through of <strong>the</strong> recovery process using an account you control.<br />

4.5.3 If <strong>the</strong> function uses a challenge such as a secret question, determine<br />

whe<strong>the</strong>r users can set or select <strong>the</strong>ir own challenge during registration.<br />

If so, use a list of enumerated or common usernames to harvest a list of<br />

challenges, and review this for any that appear to be easily guessable.

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

Saved successfully!

Ooh no, something went wrong!