Skip to content

In-depth lesson · Crypto

Typical fixes

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

Back to the lesson 1 to 50 of 97
  1. Disable deprecated protocols such as SSLv2, SSLv3 and TLS 1.0 and enable only modern TLS versions.

    Seen in 10 reports
  2. Use a constant-time comparison function for API token and HMAC verification.

    Seen in 8 reports
  3. Disable 64-bit block ciphers such as 3DES.

    Seen in 6 reports
  4. Verify the certificate hostname in all TLS clients.

    Seen in 6 reports
  5. Use an authenticated encryption mode and return uniform error messages for decryption failures.

    Seen in 5 reports
  6. Set a Strict-Transport-Security header with a sufficiently long max-age on all HTTPS responses.

    Seen in 5 reports
  7. Use a cryptographically secure random number generator for authentication tokens.

    Seen in 5 reports
  8. Use short nonces or ensure nonces are never reused with ChaCha20-Poly1305.

    Seen in 4 reports
  9. Raise an exception when the server's response to STARTTLS is unexpected and do not fall back to cleartext.

    Seen in 4 reports
  10. Check the actual certificate status inside an OCSP response, not merely that a response is present, and enforce it on every backend and trust path.

    Seen in 4 reports
  11. Normalise host names before deciding whether they are IP addresses, and always set the hostname for verification even for IP endpoints.

    Seen in 4 reports
  12. Serve the login form over HTTPS and redirect HTTP requests to HTTPS.

    Seen in 3 reports
  13. Publish an SPF record that covers all sending hosts.

    Seen in 3 reports
  14. Disable HTTP compression on responses that reflect user input or use a mitigation against BREACH.

    Seen in 3 reports
  15. Verify that the device's private key matches the previously stored public key when adding a device.

    Seen in 3 reports
  16. Use a unique nonce for each ECDSA signature.

    Seen in 3 reports
  17. Include the full connection identity (signature algorithms, CA store, SSL context callback) in the session cache key.

    Seen in 3 reports
  18. Implement a host key verification callback and known hosts handling in every SSH backend.

    Seen in 3 reports
  19. Publish a Certificate Authority Authorization rule for the domain.

    Seen in 2 reports
  20. Implement certificate pinning in mobile and desktop apps.

    Seen in 2 reports
  21. Implement rate limiting, account lockout or delays on the login page.

    Seen in 2 reports
  22. Replace MD5 with a strong hash or HMAC for key-auth signatures.

    Seen in 2 reports
  23. Use an authenticated encryption mode or add an HMAC to verify ciphertext integrity.

    Seen in 2 reports
  24. Replace SHA-1 with a stronger signature algorithm.

    Seen in 2 reports
  25. Do not reuse TLS sessions across different hostnames.

    Seen in 2 reports
  26. Validate the IMAP and SMTP server certificate.

    Seen in 2 reports
  27. Verify SSH signatures correctly.

    Seen in 2 reports
  28. Use CONNECT and validate upstream HTTPS certificates when using a proxy.

    Seen in 2 reports
  29. Do not read openssl.cnf from an unexpected path on startup.

    Seen in 2 reports
  30. Normalise the hostname before applying HSTS so trailing dots and IDN variants are covered.

    Seen in 1 report
  31. Encrypt stored passwords with a key that is not recoverable by an attacker.

    Seen in 1 report
  32. Use a secure TLS configuration with modern protocols and ciphers.

    Seen in 1 report
  33. Apply HSTS on every request, not just the first.

    Seen in 1 report
  34. Include an anti-CSRF token in all state-changing HTML forms and validate it on the server.

    Seen in 1 report
  35. Disable TLS-level compression to prevent the CRIME attack.

    Seen in 1 report
  36. Use an RSA key of at least 2048 bits.

    Seen in 1 report
  37. Use a secure HMAC instead of a naive hash construction for redirect signatures.

    Seen in 1 report
  38. Set cache-control headers that prevent caching of sensitive HTTPS pages.

    Seen in 1 report
  39. Require email verification before activating an account.

    Seen in 1 report
  40. Disable vulnerable or deprecated SSH algorithms.

    Seen in 1 report
  41. Use consistent tar entry selection logic for verification and extraction.

    Seen in 1 report
  42. Generate TOTP secrets of at least 128 bits as recommended by RFC 4226.

    Seen in 1 report
  43. Include the request payload in the signature and ensure the replay cache outlives the accepted timestamp window.

    Seen in 1 report
  44. Include the endpoint and the full payload in the signed data.

    Seen in 1 report
  45. Use a DKIM key of adequate size.

    Seen in 1 report
  46. Do not send request data over an unencrypted connection when the CONNECT request fails.

    Seen in 1 report
  47. Validate elliptic curve points in JWE implementations.

    Seen in 1 report
  48. Require proof that the sender can decrypt an encrypted acknowledgement before accepting a new public key.

    Seen in 1 report
  49. Generate a unique DTLS certificate and private key instead of reusing a public one.

    Seen in 1 report
  50. Generate unpredictable download cookies and validate them on the server.

    Seen in 1 report