Skip to content

In-depth lesson · Account takeover

Typical fixes

Every point the Account takeover reports back under this heading, best-backed first, each with the reports it is seen in.

Back to the lesson 101 to 150 of 270
  1. Rate-limit code generation as well as verification attempts.

    Seen in 1 report
  2. Return uniform responses for correct and incorrect codes and rate-limit per target email.

    Seen in 1 report
  3. Re-validate the OTP on the server instead of trusting the client response.

    Seen in 1 report
  4. Do not return the OTP in responses and derive identifiers from the session.

    Seen in 1 report
  5. Do not hardcode keys in client JavaScript and decide authentication server-side.

    Seen in 1 report
  6. Invalidate the activation code once 2FA is enabled.

    Seen in 1 report
  7. Require the current TOTP code before changing the 2FA secret or backup codes.

    Seen in 1 report
  8. Store 2FA enforcement state server-side, not in a swappable cookie value.

    Seen in 1 report
  9. Check that the 2FA step was completed on every subdomain.

    Seen in 1 report
  10. Request user verification and check the user verification flag server-side.

    Seen in 1 report
  11. Do not allow MFA self-enrolment for existing accounts without an out-of-band check.

    Seen in 1 report
  12. Notify the old address when the account email changes.

    Seen in 1 report
  13. Generate verification tokens from long random values, not sequential numbers.

    Seen in 1 report
  14. Re-check the new address when it is changed during verification.

    Seen in 1 report
  15. Make the disavow action actually disable the account or remove the email association.

    Seen in 1 report
  16. Check that the clicking account's email matches the invited address.

    Seen in 1 report
  17. Do not return the invite key or link to the inviter.

    Seen in 1 report
  18. Verify ownership of an email address before showing tickets sent to it.

    Seen in 1 report
  19. Generate the auth secret server-side and bind it to a server session.

    Seen in 1 report
  20. Normalise whitespace consistently when validating and matching entity IDs.

    Seen in 1 report
  21. Check the Origin header on WebSocket connections and only trust configured OAuth providers.

    Seen in 1 report
  22. Verify the password confirmation on the server.

    Seen in 1 report
  23. Apply the reauthentication check to email add, confirm and make-primary actions.

    Seen in 1 report
  24. Require authentication and authorisation on the admin endpoint.

    Seen in 1 report
  25. Protect session cookies against theft and reuse.

    Seen in 1 report
  26. Invalidate the token server-side on logout.

    Seen in 1 report
  27. Rotate the session identifier when a guest authenticates to the room.

    Seen in 1 report
  28. Protect federated shares with a password stored encrypted in the database.

    Seen in 1 report
  29. Authenticate deletion requests beyond the email From header.

    Seen in 1 report
  30. Require authentication for dashboard viewers.

    Seen in 1 report
  31. Do not expose staging webmail interfaces that receive reset emails.

    Seen in 1 report
  32. Parameterise queries that use stored user-supplied names.

    Seen in 1 report
  33. Apply filename filtering recursively or use an allowlist.

    Seen in 1 report
  34. Sanitise user input before inserting it into templates.

    Seen in 1 report
  35. Require the current password and email verification for account state and email changes.

    Seen in 1 report
  36. Disable network selection from the lock screen and avoid MSCHAPv2 for computer authentication.

    Seen in 1 report
  37. Add CSRF protection, expire tokens after use, restrict referrers and block scripted SVG uploads.

    Seen in 1 report
  38. Check that the account still belongs to the organisation before issuing a reset.

    Seen in 1 report
  39. Compare origins in the correct direction and reject null origins outright.

    Seen in 1 report
  40. Stop returning the shared secret once enrolment is complete.

    Seen in 1 report
  41. Return a single generic error for failed logins and add rate limiting.

    Seen in 1 report
  42. Rate-limit the confirmation endpoint and return indistinguishable responses.

    Seen in 1 report
  43. Rate-limit Basic authentication attempts on WebDAV endpoints.

    Seen in 1 report
  44. Verify that the requester owns the account and phone number before sending codes or confirming identifiers.

    Seen in 1 report
  45. Restrict owners from changing member email addresses.

    Seen in 1 report
  46. Apply consistent Unicode normalisation when storing and comparing email addresses.

    Seen in 1 report
  47. Verify JWT signatures properly and handle the expiry claim correctly.

    Seen in 1 report
  48. Generate a unique application secret per instance instead of shipping a fixed default.

    Seen in 1 report
  49. Reject empty identity identifiers.

    Seen in 1 report
  50. Use random session identifiers and add a second authentication factor.

    Seen in 1 report