11.07.2015 Views

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

118 Part II:Designing Secure <strong>Web</strong> <strong>Application</strong>sUse the following questions to help validate the h<strong>and</strong>ling of sensitive data by yourapplication:● How are session identifiers exchanged?● Do you restrict session lifetime?● How is the session state store secured?How Are Session Identifiers Exchanged?Examine the session identifier that your application uses to manage user sessions <strong>and</strong>how these session identifiers are exchanged. Consider the following:● Do you pass session identifiers over unencrypted channels?If you track session state with session identifiers — for example, tokens containedin cookies — examine whether or not the identifier or cookie is only passed over anencrypted channel, such as SSL.● Do you encrypt session cookies?If you use Forms authentication, make sure your application encrypts theauthentication cookies using the protection=“All” attribute on the element. This practice is recommended in addition to SSL to mitigate the risk of anXSS attack that manages to steal the authentication cookie of a user.●Do you pass session identifiers in query strings?Make sure that your application does not pass session identifiers in query strings.These strings can be easily modified at the client, which would allow a user toaccess the application as another user, access the private data of other users, <strong>and</strong>potentially elevate privileges.Do You Restrict Session Lifetime?Examine how long your application considers a session identifier valid. Theapplication should limit this time to mitigate the threat of session hijacking <strong>and</strong>replay attacks.How Is the Session State Store Secured?Examine how your application stores session state. Session state can be stored in the<strong>Web</strong> application process, the ASP.NET session state service, or a SQL Server statestore. If you use a remote state store, make sure that the link from the <strong>Web</strong> server tothe remote store is encrypted with IPSec or SSL to protect data over the wire.For more information about securing ASP.NET session state, see “Session State” inChapter 19, “Securing Your ASP.NET <strong>Application</strong> <strong>and</strong> <strong>Web</strong> Services.”

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

Saved successfully!

Ooh no, something went wrong!