Two Factor Authentication Checklist
Check whether 2FA code can be bruteforced.
Check whether 2FA code is unique for each user & other user code cannot be used.
Check whether 2FA code be reused & doesn't have a specific expiry time.
Response manipulation by modifying success status in place of failure, even though wrong 2FA is entered.
Check where the secret QR code used for TOTP is stored, is it accessible publicly ? Can you access other user QR Code ? Is it stored in a file system, check it's permissions/acl. (similarly check for recovery codes)
Check whether 2FA implemented in all the platforms (web/mobile/desktop), subdomains & products relying on same authentication mechanism.
Check whether after reset password flow, 2FA is disabled.
If remember me cookie is set, to login automatically in a frequently used device, Check if cookie is long, random & unique for each device & user.
Check that disabling 2FA required confirmation like entering 2FA password, profile/user password etc otherwise, attacker might use CSRF, XSS or other attacks to disable 2FA.
Check that enabling 2FA expires previously active sessions, otherwise attacker can use previously logged in session, if there is no session expiry.
If application sets cookie with some privilege before 2FA, Try to access other API endpoints/pages of the application with this cookie.
Check whether 2FA code is leaked in any of the previous responses which triggered 2FA codes.
Check session cookie or javascript variables for 2fa related param, if it's checking whether 2fa is complete by assigning simple yes/no, change the value & check whether 2fa can be bypassed.
Check whether resend 2FA code feature resets the rate limit of previous bruteforce attempt of 2FA code.
Check whether default 2FA codes such as 000000, empty/null string are accepted.
Last updated