Session Management Cheat Sheet - OWASP - 0 views
-
Session Management Cheat Sheet
- ...50 more annotations...
-
meaning and business or application logic associated to the session ID must be stored on the server side
-
create cryptographically strong session IDs through the usage of cryptographic hash functions such as SHA1 (160 bits).
-
defines the exchange mechanism that will be used between the user and the web application to share and continuously exchange the session ID
-
This is one of the reasons why cookies (RFCs 2109 & 2965 & 6265 [1]) are one of the most extensively used session ID exchange mechanisms, offering advanced capabilities not available in other methods
-
should not mix encrypted and unencrypted contents (HTML pages, images, CSS, Javascript files, etc) on the same host (or even domain - see the “domain” cookie attribute)
-
secure.example.com over HTTPS (encrypted) for the private and sensitive contents (where sessions exist)
-
instructs web browsers not to allow scripts (e.g. JavaScript or VBscript) an ability to access the cookies via the DOM document.cookie object
-
instructs web browsers to only send the cookie to the specified directory or subdirectories (or paths or resources) within the web application
-
vulnerabilities in www.example.com might allow an attacker to get access to the session IDs from secure.example.com
-
use non-persistent cookies for session management purposes, so that the session ID does not remain on the web client cache for long periods of time, from where an attacker can obtain it.