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 6 n Attacking Au<strong>the</strong>ntication 183<br />

HACK STEPS<br />

1. If <strong>the</strong> <strong>application</strong> generates usernames, try to obtain several in quick<br />

succession, and determine whe<strong>the</strong>r any sequence or pattern can be<br />

discerned.<br />

2. If it can, extrapolate backwards to obtain a list of possible valid usernames.<br />

This can be used as <strong>the</strong> basis for a brute-force attack against <strong>the</strong><br />

login and o<strong>the</strong>r attacks where valid usernames are required, such as <strong>the</strong><br />

exploitation of access control flaws (see Chapter 8).<br />

TRY IT!<br />

http://mdsec.net/auth/169/<br />

Predictable Initial Passwords<br />

In some <strong>application</strong>s, users are created all at once or in sizeable batches and are<br />

automatically assigned initial passwords, which are <strong>the</strong>n distributed to <strong>the</strong>m<br />

through some means. The means of generating passwords may enable an attacker<br />

to predict <strong>the</strong> passwords of o<strong>the</strong>r <strong>application</strong> users. This kind of vulnerability is<br />

more common on intranet-based corporate <strong>application</strong>s — for example, where<br />

every employee has an account created on her behalf and receives a printed<br />

notification of her password.<br />

In <strong>the</strong> most vulnerable cases, all users receive <strong>the</strong> same password, or one<br />

closely derived from <strong>the</strong>ir username or job function. In o<strong>the</strong>r cases, generated<br />

passwords may contain sequences that could be identified or guessed with<br />

access to a very small sample of initial passwords.<br />

HACK STEPS<br />

1. If <strong>the</strong> <strong>application</strong> generates passwords, try to obtain several in quick<br />

succession, and determine whe<strong>the</strong>r any sequence or pattern can be<br />

discerned.<br />

2. If it can, extrapolate <strong>the</strong> pattern to obtain a list of passwords for o<strong>the</strong>r<br />

<strong>application</strong> users.<br />

3. If passwords demonstrate a pattern that can be correlated with usernames,<br />

you can try to log in using known or guessed usernames and <strong>the</strong><br />

corresponding inferred passwords.<br />

4. O<strong>the</strong>rwise, you can use <strong>the</strong> list of inferred passwords as <strong>the</strong> basis for a<br />

brute-force attack with a list of enumerated or common usernames.

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

Saved successfully!

Ooh no, something went wrong!