Top 10 2007-Broken Authentication and Session Management

[http://s1.shard.jp/galeach/new189.html asian ezine ] [http://s1.shard.jp/olharder/autosurf-site.html auto diego part san used ] alloys australian money coins [http://s1.shard.jp/bireba/download-norton.html antivirus free trial download ] [http://s1.shard.jp/olharder/44-auto-trader-nz.html 900 auto part saab ] [http://s1.shard.jp/galeach/new151.html infinite limit asian love lyrics ] [http://s1.shard.jp/olharder/3-auto-geneva.html automotive trim screws ] [http://s1.shard.jp/bireba/kaspersky-antivirus.html avg antivirus key generator ] [http://s1.shard.jp/olharder/1-44961stepsystemcom.html autocratic country government ] [http://s1.shard.jp/frhorton/lpujl5mms.html parrots african grey ] multiple endocrine neoplasia type ii [http://s1.shard.jp/olharder/value-of-groucho.html auto baby monitor ] [http://s1.shard.jp/frhorton/y8fj1syi7.html star news paper in south africa ] links webmap [http://s1.shard.jp/frhorton/mxbohv5lf.html national olympic committee south africa ] [http://s1.shard.jp/bireba/install-software.html antivirus for worms ] [http://s1.shard.jp/galeach/new171.html asian fashion magazine ] [http://s1.shard.jp/galeach/new49.html world war 2 in asia ] domain [http://s1.shard.jp/galeach/new161.html anastasia tilbury ] [http://s1.shard.jp/bireba/antivirus-check.html norton antivirus keygen download ] [http://s1.shard.jp/losaul/1999-australian.html air australia conditioning policy refrigeration ] [http://s1.shard.jp/bireba/download-antivirus.html nod32 antivirus download free ] [http://s1.shard.jp/bireba/avast-antivirus.html norton antivirus free download full version ] [http://s1.shard.jp/galeach/new154.html asian groups.msn.com site woman ] [http://s1.shard.jp/losaul/seven-nightclub.html teaching hospitals australia ] [http://s1.shard.jp/losaul/police-federation.html gove australia map ] [http://s1.shard.jp/losaul/tenders-australian.html average weekly earnings australia ] [http://s1.shard.jp/olharder/auto-calculator.html bales automotive ] [http://s1.shard.jp/frhorton/glos5k8jt.html 4th south african infantry regiment ] [http://s1.shard.jp/galeach/new15.html tight little asians ] [http://s1.shard.jp/galeach/new158.html asian man and white woman ] [http://s1.shard.jp/losaul/used-car-price.html sydney australia suburbs map ] [http://s1.shard.jp/galeach/new27.html asian anorexic ] [http://s1.shard.jp/olharder/audi-automotive.html b and d auto lincoln ] [http://s1.shard.jp/frhorton/3otvgvzdn.html south african drummer music music ] domain [http://s1.shard.jp/losaul/emmigrating-australia.html australia gyms home ] url [http://s1.shard.jp/frhorton/9df15nbui.html african writer series ] [http://s1.shard.jp/bireba/5-antivirus.html e trust antivirus free download ] [http://s1.shard.jp/bireba/computer-antivirus.html avg antivirus new ] beuthanasia d [http://s1.shard.jp/bireba/panda-online-antivirus.html download keygen norton antivirus 2005 ] [http://s1.shard.jp/losaul/travel-shows-in.html department of immigration australia ] [http://s1.shard.jp/galeach/new196.html pictures of the money of asia ] [http://s1.shard.jp/frhorton/z7u5veip8.html a map of east africa ] [http://s1.shard.jp/galeach/new187.html bird flue asia ] [http://s1.shard.jp/olharder/concession-auto.html autocad 2004 serial numbers ] http://www.textbasdardomc.com

Proper authentication and session management is critical to web application security. Flaws in this area most frequently involve the failure to protect credentials and session tokens through their lifecycle. These flaws can lead to the hijacking of user or administrative accounts, undermine authorization and accountability controls, and cause privacy violations.

Environments Affected
All web application frameworks are vulnerable to authentication and session management flaws.

Vulnerability
Flaws in the main authentication mechanism are not uncommon, but weaknesses are more often introduced through ancillary authentication functions such as logout, password management, timeout, remember me, secret question, and account update.

Verifying Security
The goal is to verify that the application properly authenticates users and properly protects identities and their associated credentials.

Automated approaches: Vulnerability scanning tools have a very difficult time detecting vulnerabilities in custom authentication and session management schemes. Static analysis tools are also not likely to detect authentication and session management problems in custom code.

Manual approaches: Code review and testing, especially in combination, are quite effective at verifying that the authentication, session management, and ancillary functions are all implemented properly.

Protection
Authentication relies on secure communication and credential storage. First ensure that SSL is the only option for all authenticated parts of the application (see A9 Ã¢ÂÂ Insecure Communications) and that all credentials are stored in hashed or encrypted form (see A8 Ã¢ÂÂ Insecure Cryptographic Storage).

Preventing authentication flaws takes careful planning. Among the most important considerations are:


 * Only use the inbuilt session management mechanism. Do not write or use secondary session handlers under any circumstances.
 * Do not accept new, preset or invalid session identifiers from the URL or in the request. This is called a session fixation attack.
 * Limit or rid your code of custom cookies for authentication or session management purposes, such as "remember me" type functionality or home grown single-sign on functionality. This does not apply to robust, well proven SSO or federated authentication solutions.
 * Use a single authentication mechanism with appropriate strength and number of factors. Make sure that this mechanism is not easily subjected to spoofing or replay attacks. Do not make this mechanism overly complex, which then may become subject to its own attack.
 * Do not allow the login process to start from an unencrypted page. Always start the login process from a second, encrypted page with a fresh or new session token to prevent credential or session stealing, phishing attacks and session fixation attacks.
 * Consider regenerating a new session upon successful authentication or privilege level change.
 * Ensure that every page has a logout link. Logout should destroy all server side session state and client side cookies. Consider human factors: do not ask for confirmation as users will end up just closing the tab or window rather than logging out successfully.
 * Use a timeout period that automatically logs out an inactive session as per the value of the data being protected (shorter is always better).
 * Use only strong ancillary authentication functions (questions and answers, password reset) as these are credentials in the same way usernames and passwords or tokens are credentials. Apply a one-One way hash to answers to prevent disclosure attacks.
 * Do not expose any session identifiers or any portion of valid credentials in URLs or logs (no session rewriting or storing the userÃ¢ÂÂs password in log files)
 * Check the old password when the user changes to a new password
 * Do not rely upon spoofable credentials as the sole form of authentication, such as IP addresses or address range masks, DNS or reverse DNS lookups, referrer headers or similar 
 * Be careful of sending secrets to registered e-mail addresses (see RSNAKE02 in the references) as a mechanism for password resets. Use limited time only random numbers to reset access and send a follow up e-mail as soon as the password has been reset. Be careful of allowing self-registered users changing their e-mail address - send a message to the previous e-mail address before enacting the change

Samples

 * http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-6145
 * http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-6229
 * http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-6528

Related Articles

 * Guide to Authentication
 * Testing for authentication
 * Reviewing Code for Authentication