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.

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

o<strong>the</strong>r users, particularly administrative users, which may enable you<br />

escalate privileges.<br />

4.7.3 If you perform any automated password-guessing attacks against o<strong>the</strong>r<br />

user accounts, look for any accounts that appear to have more than one<br />

valid password, or multiple accounts that appear to have <strong>the</strong> same password.<br />

This may indicate <strong>the</strong> presence of a backdoor password, which<br />

administrators can use to access <strong>the</strong> <strong>application</strong> as any user.<br />

4.8 Test Username Uniqueness<br />

4.8.1 If <strong>the</strong> <strong>application</strong> has a self-registration function that lets you specify<br />

a desired username, attempt to register <strong>the</strong> same username twice with<br />

different passwords.<br />

4.8.2 If <strong>the</strong> <strong>application</strong> blocks <strong>the</strong> second registration attempt, you can exploit<br />

this behavior to enumerate registered usernames.<br />

4.8.3 If <strong>the</strong> <strong>application</strong> registers both accounts, probe fur<strong>the</strong>r to determine its<br />

behavior when a collision of username and password occurs. Attempt<br />

to change <strong>the</strong> password of one of <strong>the</strong> accounts to match that of <strong>the</strong><br />

o<strong>the</strong>r. Also, attempt to register two accounts with identical usernames<br />

and passwords.<br />

4.8.4 If <strong>the</strong> <strong>application</strong> alerts you or generates an error when a collision of<br />

username and password occurs, you can probably exploit this to perform<br />

an automated guessing attack to discover ano<strong>the</strong>r user’s password. Target<br />

an enumerated or guessed username, and attempt to create accounts<br />

that have this username and different passwords. When <strong>the</strong> <strong>application</strong><br />

rejects a specific password, you have probably found <strong>the</strong> existing<br />

password for <strong>the</strong> targeted account.<br />

4.8.5 If <strong>the</strong> <strong>application</strong> appears to tolerate a collision of username and password<br />

without an error, log in using <strong>the</strong> colliding credentials. Determine<br />

what happens and whe<strong>the</strong>r <strong>the</strong> <strong>application</strong>’s behavior can be leveraged<br />

to gain unauthorized access to o<strong>the</strong>r users’ accounts.<br />

4.9 Test Predictability of Autogenerated Credentials<br />

4.9.1 If <strong>the</strong> <strong>application</strong> automatically generates usernames or passwords, try<br />

to obtain several values in quick succession and identify any detectable<br />

sequences or patterns.<br />

4.9.2 If usernames are generated in a predictable way, extrapolate backwards<br />

to obtain a list of possible valid usernames. You can use this as <strong>the</strong> basis<br />

for automated password-guessing and o<strong>the</strong>r attacks.

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

Saved successfully!

Ooh no, something went wrong!