WebAppSec/Web Security Verification
Jump to navigation
Jump to search
Note: This document is currently in draft We should complete this doc and, at a minimum, include all the items from the secure coding guidelines (WebAppSec/Secure Coding Guidelines - MozillaWiki )
Purpose
This document outlines the application security verification process. These actions are the basic verification steps that will generally apply to all applications. This is a base review standard and should be expanded and customized to the unique application.
Authentication
- Does the application support logins?
- TLS - Verify the site is entirely HTTPS
- TLS - Verify that requests for HTTP URLs redirect to the equivalent HTTPS URL
- TLS - Verify that the Http Strict Transport Security flag is set
- Error Message - Verify that the error message displayed for an invalid username is the same message displayed for an invalid password
- Brute Force - Verify that a captcha is displayed after multiple (standard is 5) failed login attempts
- Does the application manage its own set of user credentials?
- Verify that the application enforces the appropriate password complexity
- Verify a password blacklist is implemented
- If possible, verify that passwords are adequately protected in storage (bcrypt+hmac)
- If possible, verify that old password hashes are removed from the system
- Does the application support administrative logins?
- Verify the admin login page is not publicly available
- Does the application require an email verification before the account is activated?
- Verify that no actions can be taken or stored against the account until the verification link is followed
- Verify that the link only verifies ownership of the email account and does not log the user into the system
- Verify the code within the verification link is random
- Verify that the code within the verification link can not be used for an alternate user id or user account
- Verify that the verification code is invalidated after a single use
- Verify that the verification code is invalided after 8 hours if it is not used
- Does the application provide a forgot password mechanism?
- Verify that no information is provided to indicate if a valid username or email address was entered
- Verify the code within the verification link is random
- Verify that the code within the verification link can not be used for an alternate user id or user account
- Verify that the verification code is invalidated after a single use
- Verify that the verification code is invalided after 24 hours if it is not used
Session Management
- Does the application maintain state via a session identifier?
- Verify this session id is the default implementation and not a custom solution
- Verify the session identifier is 128-bit or larger
- Does the application use cookies for the session identifier?
- Verify the SECURE flag is set for the cookies
- Verify the HTTPOnly flag is set for the cookies
- Verify the PATH and DOMAIN are appropriately set for the cookies
- Does the application support logins?
- Verify a new session identifier is created for the user upon logging into the application
- Verify that upon logout the session id is expired on the client
- Verify that upon logout the session id is invalidated on the server
- Verify that critical applications enforce an inactivity timeout feature
- Is session timeout appropriate for this application?
- Verify that authenticated sessions time out after a determined period of inactivity (15 minutes is recommended)