Difference between revisions of "Top 10 2013-A2-Broken Authentication and Session Management"

From OWASP
Jump to: navigation, search
(5 intermediate revisions by one user not shown)
Line 10: Line 10:
 
}}
 
}}
  
{{Top_10_2010:SummaryTableHeaderBeginTemplate}}
+
{{Top_10_2010:SummaryTableHeaderBeginTemplate|year=2013}}
{{Top_10_2010:SummaryTableValue-2-Template|Exploitability|AVERAGE}}
+
{{Top_10_2010:SummaryTableValue-2-Template|Exploitability|AVERAGE|year=2013}}
{{Top_10_2010:SummaryTableValue-1-Template|Prevalence|WIDESPREAD}}
+
{{Top_10_2010:SummaryTableValue-1-Template|Prevalence|WIDESPREAD|year=2013}}
{{Top_10_2010:SummaryTableValue-2-Template|Detectability|AVERAGE}}
+
{{Top_10_2010:SummaryTableValue-2-Template|Detectability|AVERAGE|year=2013}}
{{Top_10_2010:SummaryTableValue-1-Template|Impact|SEVERE}}
+
{{Top_10_2010:SummaryTableValue-1-Template|Impact|SEVERE|year=2013}}
{{Top_10_2010:SummaryTableHeaderEndTemplate}}
+
{{Top_10_2010:SummaryTableHeaderEndTemplate|year=2013}}
     <td {{Template:Top 10 2010:SummaryTableRowStyleTemplate}}>Consider anonymous external attackers, as well as users with their own accounts, who may attempt to steal accounts from others. Also consider insiders wanting to disguise their actions.
+
     <td {{Template:Top 10 2010:SummaryTableRowStyleTemplate|year=2013}}>Consider anonymous external attackers, as well as users with their own accounts, who may attempt to steal accounts from others. Also consider insiders wanting to disguise their actions.
 
</td>
 
</td>
     <td {{Template:Top 10 2010:SummaryTableRowStyleTemplate}}>Attacker uses leaks or flaws in the authentication or session management functions (e.g., exposed accounts, passwords, session IDs) to impersonate users.
+
     <td {{Template:Top 10 2010:SummaryTableRowStyleTemplate|year=2013}}>Attacker uses leaks or flaws in the authentication or session management functions (e.g., exposed accounts, passwords, session IDs) to impersonate users.
 
</td>
 
</td>
     <td colspan=2  {{Template:Top 10 2010:SummaryTableRowStyleTemplate}}>Developers frequently build custom authentication and session management schemes, but building these correctly is hard. As a result, these custom schemes frequently have flaws in areas such as logout, password management, timeouts, remember me, secret question, account update, etc. Finding such flaws can sometimes be difficult, as each implementation is unique.
+
     <td colspan=2  {{Template:Top 10 2010:SummaryTableRowStyleTemplate|year=2013}}>Developers frequently build custom authentication and session management schemes, but building these correctly is hard. As a result, these custom schemes frequently have flaws in areas such as logout, password management, timeouts, remember me, secret question, account update, etc. Finding such flaws can sometimes be difficult, as each implementation is unique.
 
</td>
 
</td>
     <td {{Template:Top 10 2010:SummaryTableRowStyleTemplate}}>Such flaws may allow some or even <u>all</u> accounts to be attacked. Once successful, the attacker can do anything the victim could do. Privileged accounts are frequently targeted.
+
     <td {{Template:Top 10 2010:SummaryTableRowStyleTemplate|year=2013}}>Such flaws may allow some or even <u>all</u> accounts to be attacked. Once successful, the attacker can do anything the victim could do. Privileged accounts are frequently targeted.
 
</td>
 
</td>
     <td {{Template:Top 10 2010:SummaryTableRowStyleTemplate}}>Consider the business value of the affected data or application functions.
+
     <td {{Template:Top 10 2010:SummaryTableRowStyleTemplate|year=2013}}>Consider the business value of the affected data or application functions.
 
Also consider the business impact of public exposure of the vulnerability.
 
Also consider the business impact of public exposure of the vulnerability.
 
</td>
 
</td>
{{Top_10_2010:SummaryTableEndTemplate}}
+
{{Top_10_2010:SummaryTableEndTemplate|year=2013}}
 +
 
 +
{{Top_10_2010:SubsectionAdvancedTemplate|type={{Top_10_2010:StyleTemplate}}|number=1|risk=2|year=2013}}
 
The primary assets to protect are credentials and session IDs.
 
The primary assets to protect are credentials and session IDs.
 
# Are credentials always protected when stored using hashing or encryption? See A6.
 
# Are credentials always protected when stored using hashing or encryption? See A6.
Line 35: Line 37:
 
# Do session IDs timeout and can users log out?
 
# Do session IDs timeout and can users log out?
 
# Are session IDs rotated after successful login?
 
# Are session IDs rotated after successful login?
# Are passwords, session IDs, and other credentials sent only over TLS connections? See [[Top_10_2013-A6 | A6]].
+
# Are passwords, session IDs, and other credentials sent only over TLS connections? See [[Top 10 2013-A6 | A6]].
 
See the [https://www.owasp.org/index.php/ASVS ASVS] requirement areas V2 and V3 for more details.
 
See the [https://www.owasp.org/index.php/ASVS ASVS] requirement areas V2 and V3 for more details.
 
{{Top_10_2010:SubsectionAdvancedTemplate|type={{Top_10_2010:StyleTemplate}}|number=1|risk=2|year=2013}}
 
  
 
{{Top_10_2010:SubsectionAdvancedTemplate|type={{Top_10_2010:StyleTemplate}}|number=2|risk=2|year=2013}}
 
{{Top_10_2010:SubsectionAdvancedTemplate|type={{Top_10_2010:StyleTemplate}}|number=2|risk=2|year=2013}}
blank
+
The primary recommendation for an organization is to make available to developers:
 +
# '''A single set of strong authentication and session management controls.''' Such controls should strive to:
 +
## meet all the authentication and session management requirements defined in OWASP’s [https://www.owasp.org/index.php/ASVS Application Security Verification Standard] (ASVS) areas V2 (Authentication) and V3 (Session Management).
 +
## have a simple interface for developers. Consider the [http://owasp-esapi-java.googlecode.com/svn/trunk_doc/latest/org/owasp/esapi/Authenticator.html ESAPI Authenticator and User APIs] as good examples to emulate, use, or build upon.
 +
# Strong efforts should also be made to avoid XSS flaws which can be used to steal session IDs. See A3.
 
#blankBullet1
 
#blankBullet1
 
#blankBullet2
 
#blankBullet2
Line 68: Line 72:
 
               |1
 
               |1
 
               |year=2013}}}}
 
               |year=2013}}}}
 
[[Category:OWASP Top Ten Project]]
 

Revision as of 14:47, 23 February 2013

[[Top 10 {{{year}}}-Injection|← Injection]]
2013 Table of Contents

2013 Top 10 List

[[Top 10 {{{year}}}-Cross-Site Scripting (XSS)|Cross-Site Scripting (XSS) →]]
Threat Agents Attack Vectors Security Weakness Technical Impacts Business Impacts
Application Specific Exploitability
AVERAGE
Prevalence
WIDESPREAD
Detectability
AVERAGE
Impact
SEVERE
Application / Business Specific
Consider anonymous external attackers, as well as users with their own accounts, who may attempt to steal accounts from others. Also consider insiders wanting to disguise their actions. Attacker uses leaks or flaws in the authentication or session management functions (e.g., exposed accounts, passwords, session IDs) to impersonate users. Developers frequently build custom authentication and session management schemes, but building these correctly is hard. As a result, these custom schemes frequently have flaws in areas such as logout, password management, timeouts, remember me, secret question, account update, etc. Finding such flaws can sometimes be difficult, as each implementation is unique. Such flaws may allow some or even all accounts to be attacked. Once successful, the attacker can do anything the victim could do. Privileged accounts are frequently targeted. Consider the business value of the affected data or application functions.

Also consider the business impact of public exposure of the vulnerability.

Am I Vulnerable To 'Broken Authentication and Session Management'?

The primary assets to protect are credentials and session IDs.

  1. Are credentials always protected when stored using hashing or encryption? See A6.
  2. Can credentials be guessed or overwritten through weak account management functions (e.g., account creation, change password, recover password, weak session IDs)?
  3. Are session IDs exposed in the URL (e.g., URL rewriting)?
  4. Are session IDs vulnerable to session fixation attacks?
  5. Do session IDs timeout and can users log out?
  6. Are session IDs rotated after successful login?
  7. Are passwords, session IDs, and other credentials sent only over TLS connections? See A6.

See the ASVS requirement areas V2 and V3 for more details.

How Do I Prevent 'Broken Authentication and Session Management'?

The primary recommendation for an organization is to make available to developers:

  1. A single set of strong authentication and session management controls. Such controls should strive to:
    1. meet all the authentication and session management requirements defined in OWASP’s Application Security Verification Standard (ASVS) areas V2 (Authentication) and V3 (Session Management).
    2. have a simple interface for developers. Consider the ESAPI Authenticator and User APIs as good examples to emulate, use, or build upon.
  2. Strong efforts should also be made to avoid XSS flaws which can be used to steal session IDs. See A3.
  3. blankBullet1
  4. blankBullet2
Example Attack Scenarios

blank

blank code

blank

http://example.com/app/accountView?id=' or '1'='1

blank

References

OWASP

External

[[Top 10 {{{year}}}-Injection|← Injection]]
2013 Table of Contents

2013 Top 10 List

[[Top 10 {{{year}}}-Cross-Site Scripting (XSS)|Cross-Site Scripting (XSS) →]]

© 2002-2013 OWASP Foundation This document is licensed under the Creative Commons Attribution-ShareAlike 3.0 license. Some rights reserved. CC-by-sa-3 0-88x31.png
[[Category:OWASP Top Ten {{{year}}} Project]]