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.

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

5 Test <strong>the</strong> Session Management Mechanism<br />

5.1. Understand <strong>the</strong> mechanism<br />

Token generation<br />

Token handling<br />

5.2. Test for meaning 5.4. Check for insecure transmission<br />

5.3. Test for predictability<br />

5.5. Check for disclosure in logs<br />

5.6. Test mapping of tokens to sessions<br />

5.7. Test session termination<br />

5.8. Test for session fixation<br />

5.9. Check for CSRF<br />

5.10. Check cookie scope<br />

Figure 21-6: Testing <strong>the</strong> session management mechanism<br />

5.1 Understand <strong>the</strong> Mechanism<br />

5.1.1 Analyze <strong>the</strong> mechanism used to manage sessions and state. Establish<br />

whe<strong>the</strong>r <strong>the</strong> <strong>application</strong> uses session tokens or some o<strong>the</strong>r method of<br />

handling <strong>the</strong> series of requests received from each user. Note that some<br />

au<strong>the</strong>ntication technologies (such as HTTP au<strong>the</strong>ntication) may not<br />

require a full session mechanism to reidentify users post-au<strong>the</strong>ntication.<br />

Also, some <strong>application</strong>s use a sessionless state mechanism in which all<br />

state information is transmitted via <strong>the</strong> client, usually in an encrypted<br />

or obfuscated form.<br />

5.1.2 If <strong>the</strong> <strong>application</strong> uses session tokens, confirm precisely which pieces<br />

of data are actually used to reidentify users. Items that may be used to<br />

transmit tokens include HTTP cookies, query string parameters, and<br />

hidden form fields. Several different pieces of data may be used collectively<br />

to reidentify <strong>the</strong> user, and different items may be used by different<br />

back-end components. Often, items that look like session tokens may<br />

not actually be employed as such by <strong>the</strong> <strong>application</strong>, such as <strong>the</strong> default<br />

cookie generated by <strong>the</strong> <strong>web</strong> server.

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

Saved successfully!

Ooh no, something went wrong!