65
edits
Line 20: | Line 20: | ||
==Authentication== | ==Authentication== | ||
'''Attacks of Concern''' | '''Attacks of Concern''' | ||
* brute force password guessing | * online & offline brute force password guessing | ||
* user enumeration | * user enumeration | ||
* mass account lockout | * mass account lockout (Account DoS) | ||
* time trade-off | * offline hash cracking (time trade-off) | ||
* lost passwords | * lost passwords | ||
Line 31: | Line 31: | ||
* Passwords must be 8 characters or greater | * Passwords must be 8 characters or greater | ||
* Passwords must require letters and numbers | * Passwords must require letters and numbers | ||
* Blacklisted passwords should be implemented (contact infrasec for the list) | |||
====Critical Sites ==== | ====Critical Sites ==== | ||
Line 38: | Line 39: | ||
Critical sites should add the following requirements to the password policy: | Critical sites should add the following requirements to the password policy: | ||
* Besides the base policy, passwords should also require at least one or more special characters. | * Besides the base policy, passwords should also require at least one or more special characters. | ||
===Password Rotation=== | ===Password Rotation=== | ||
Password rotations have proven to be a little tricky and this should only be used if there is lack of monitoring with-in the applications and there is a mitigating reason to use rotations. Reasons being short password, or lack of password controls. | Password rotations have proven to be a little tricky and this should only be used if there is lack of monitoring with-in the applications and there is a mitigating reason to use rotations. Reasons being short password, or lack of password controls. | ||
* Privileged accounts - Password for privileged accounts should be rotated every: 90 days. | * Privileged accounts - Password for privileged accounts should be rotated every: 90 to 120 days. | ||
* General User Account - It is also recommended to implement password rotations for general users if possible. | * General User Account - It is also recommended to implement password rotations for general users if possible. | ||
* Log Entry - an application log entry for this event should be generated. | * Log Entry - an application log entry for this event should be generated. | ||
===Account Lockout and Failed Login=== | ===Account Lockout and Failed Login=== | ||
Account Lockouts vs login failures should be evaluated based on the application. In | Account Lockouts vs login failures should be evaluated based on the application. In either case, the application should be able to determine if the password being used is the same one over and over, or a different password being used which would indicate an attack. | ||
The error message for both cases should be generic such as: | The error message for both cases should be generic such as: | ||
Line 60: | Line 54: | ||
The username or password you entered is not valid | The username or password you entered is not valid | ||
Logging will be critical for these events as they will feed up into our security event system and we can then take action based on these events. The application should also take action. Example would be in the case that the user is being attacked, the application should stop and/or slow down that user progress by either presenting a captcha or by doing a time delay for that IP address. | Logging will be critical for these events as they will feed up into our security event system and we can then take action based on these events. The application should also take action. Example would be in the case that the user is being attacked, the application should stop and/or slow down that user progress by either presenting a captcha or by doing a time delay for that IP address. Captcha's should be used in all cases when a limit of failed attempts has been reached. | ||
=== Password Reset Functions === | === Password Reset Functions === | ||
Line 74: | Line 68: | ||
===Password Storage=== | ===Password Storage=== | ||
Separate from the password policy, we should have the following standards when it comes to storing passwords | Separate from the password policy, we should have the following standards when it comes to storing passwords | ||
* Passwords stored in a database should | * Passwords stored in a database should using the hmac+bcrypt function. This combination provides protection against a technical weakness with bcrypt but also provides a site wide key which increases the time and computing required to brute force password hashes. | ||
A sample of this code is here: https://github.com/fwenzel/django-sha2 | |||
==== | ==== Old Password Hashes ==== | ||
* Password hashes older than a year should be deleted from the system. | |||
* After a password hash migration, old hashes should be removed within 3 months if user has yet to login for the conversion process. | |||
====Migration==== | ====Migration==== | ||
Line 135: | Line 104: | ||
- The user may already be on the New Hash. Attempt to directly authenticate using the new hash. If this fails, then the password provided by the user is wrong. | - The user may already be on the New Hash. Attempt to directly authenticate using the new hash. If this fails, then the password provided by the user is wrong. | ||
==Session Management== | ==Session Management== |
edits