Hoppa till innehållet

SSL-certifikat, TLS och webbsäkerhet

Om HTTPS används, certifikat, protokollversioner och chiffer, omdirigeringar, säkerhetsheaders och cookieflaggor.

Senast granskad

Vikt i poängen

20 %

En av sex moduler, poängpolicy v2.1.0

Källor

  • TLS
  • HTTP
  • abuse.ch SSLBL

Besökare, kunder och partner möter era webbtjänster först. Om de är krypterade, och hur väl, syns för alla som ansluter till dem.

Många säger fortfarande SSL-certifikat. Protokollet som används i dag heter TLS; SSL är den äldre föregångaren och ska inte längre användas. Certifikatet är detsamma oavsett vad man kallar det.

Vi kontrollerar först om HTTPS används över huvud taget. Port 443 testas för sig, så en webbplats helt utan HTTPS bedöms som just det och får inte bara färre fynd. Sedan tittar vi på certifikatet (om det är giltigt, när det löper ut, om det är självsignerat eller finns på en svartlista för skadlig kod), vilka TLS-versioner och chiffersviter som erbjuds, om vanlig HTTP omdirigeras till HTTPS och vilka säkerhetsheaders och cookieflaggor webbplatsen skickar.

De flesta åtgärderna är konfigurationsändringar i en webbserver eller en lastbalanserare. Varje fynd anger vilken.

Fynd som modulen kan ge

Varje fynd i en rapport beskriver vad som testades, varför det spelar roll, vilken konsekvens det kan få och hur ni åtgärdar det. Här är alla fynd modulen kan ge, de allvarligaste först. Begreppen förklaras i ordlistan. Fynden står på engelska, så som TrustSek rapporterar dem i dag.

Kritiskallvarlighetsgrad 90 till 100

  • 95

    No HTTPS: website served without encryption

    Without HTTPS every request and response, including form submissions, session cookies and credentials, travels in cleartext across every network between the visitor and the server.

    Så åtgärdar ni det: Issue a certificate, Let's Encrypt is free and automatable, and serve the site over 443. Once HTTPS works, redirect all HTTP traffic to it permanently and add an HSTS header so browsers stop attempting the insecure scheme.

    Vad som testades och konsekvensen
    Vad som testades
    HTTPS availability on port 443, and an independent probe of port 80
    Konsekvens
    Anyone on the path (public Wi-Fi, a compromised router, an ISP) can read or alter the traffic. Browsers mark the site "Not secure", and modern features such as service workers and geolocation are unavailable.
  • 95

    TLS certificate on malware blacklist

    SSLBL lists certificates observed terminating botnet command-and-control or malware-distribution traffic. A fingerprint match is exact: it is the same certificate, not a similar one.

    Så åtgärdar ni det: Treat the host as potentially compromised. Revoke and reissue the certificate with a fresh key pair, audit the server for unauthorised services, then request delisting from abuse.ch once the malicious activity has stopped.

    Vad som testades och konsekvensen
    Vad som testades
    The site's leaf certificate SHA1 fingerprint, checked against abuse.ch SSL Blacklist
    Konsekvens
    Browsers and security proxies that consume this feed may block the site outright. A listed certificate usually means the host was compromised, or the certificate was reused from infrastructure that was.

Högallvarlighetsgrad 70 till 89

  • 80

    HTTPS not available

    Without HTTPS every request and response, including form submissions, session cookies and credentials, travels in cleartext across every network between the visitor and the server.

    Så åtgärdar ni det: Issue a certificate, Let's Encrypt is free and automatable, and serve the site over 443. Once HTTPS works, redirect all HTTP traffic to it permanently and add an HSTS header so browsers stop attempting the insecure scheme.

    Vad som testades och konsekvensen
    Vad som testades
    HTTPS availability on port 443, and an independent probe of port 80
    Konsekvens
    Anyone on the path (public Wi-Fi, a compromised router, an ISP) can read or alter the traffic. Browsers mark the site "Not secure", and modern features such as service workers and geolocation are unavailable.
  • 75

    SSL certificate expired

    The certificate presented by this site has passed its expiry date. Certificates expire deliberately, to bound the damage from a key compromise nobody noticed.

    Så åtgärdar ni det: Renew now. If this is a host you had forgotten, that is the more important finding: decide whether it should still be running at all. Automate renewal (certbot, or your platform's managed certificates) and alert on certificates within 30 days of expiry, because manual renewal reliably fails eventually.

    Vad som testades och konsekvensen
    Vad som testades
    The certificate's notAfter date against the current time
    Konsekvens
    Every visitor gets a full-page browser interstitial warning them the site is unsafe. Most will leave. API clients and mobile apps typically fail outright rather than prompting, so integrations break silently. Expired certificates are also a common symptom of an abandoned or forgotten host.
  • 75

    SSL certificate expiring soon

    Expired certificates cause browser warnings and break secure connections

    Så åtgärdar ni det: Renew at least 14 days before expiry. If you are not already on auto-renewal, switch now: certbot, AWS Certificate Manager, and Cloudflare Universal SSL all handle renewal without operator action. Add a calendar alert or monitoring check for any certificate that cannot be auto-renewed.

    Vad som testades och konsekvensen
    Vad som testades
    SSL certificate validity dates
    Konsekvens
    Users will see security warnings and may not trust your site
  • 70

    TLS handshake failed

    Something is listening on the HTTPS port, but the TLS negotiation does not complete. This is a broken configuration rather than an absent one.

    Så åtgärdar ni det: Test with openssl s_client -connect host:443 -servername host. The usual causes are an incomplete certificate chain (missing intermediates), a protocol floor above what clients offer, or SNI misconfiguration on a shared address.

    Vad som testades och konsekvensen
    Vad som testades
    TLS handshake against port 443
    Konsekvens
    Visitors get a connection error, not a warning they can click through, so the site is effectively unreachable over HTTPS. Monitoring that only checks port reachability will not notice.
  • 70

    Self-Signed certificate

    The certificate is self-signed or issued by an authority no browser trusts. Nothing independent vouches for the identity of this server, which is the entire purpose of a certificate.

    Så åtgärdar ni det: Replace it with a certificate from a publicly trusted CA: Let's Encrypt is free and automatable. If this host is genuinely internal-only, it should not be reachable from the public internet; restrict it at the firewall rather than leaving a warning-generating service exposed.

    Vad som testades och konsekvensen
    Vad som testades
    Whether the certificate chain terminates at a trusted public root
    Konsekvens
    Browsers show a warning that users must actively bypass, which trains them to click through exactly the warning that would otherwise stop a real interception attack. An attacker can substitute their own self-signed certificate and the experience is indistinguishable.
  • 70

    Weak cipher suites detected

    Weak ciphers are vulnerable to cryptographic attacks

    Så åtgärdar ni det: Restrict your server to TLS 1.2 and 1.3 with modern AEAD cipher suites (e.g. ECDHE-ECDSA-AES128-GCM-SHA256, TLS_AES_128_GCM_SHA256). Use the Mozilla SSL Configuration Generator on the intermediate profile, and disable RC4, 3DES, and MD5-based suites entirely.

    Vad som testades och konsekvensen
    Vad som testades
    SSL/TLS cipher suite analysis
    Konsekvens
    Encrypted connections can be decrypted by attackers

Medelallvarlighetsgrad 40 till 69

  • 65

    Weak TLS version

    TLS 1.0 and 1.1 have known cryptographic weaknesses and were deprecated by the IETF in 2021. Their continued presence usually means the configuration has not been reviewed in years.

    Så åtgärdar ni det: Set a minimum of TLS 1.2 and enable 1.3: ssl_protocols TLSv1.2 TLSv1.3; on nginx. Check your traffic first if you serve very old clients, but in practice anything that cannot do 1.2 also cannot be secured. Verify afterwards with SSL Labs or testssl.sh.

    Vad som testades och konsekvensen
    Vad som testades
    The lowest TLS protocol version the server will negotiate
    Konsekvens
    Attacks such as BEAST and POODLE target these versions, and an attacker able to influence the handshake can attempt to force a client down onto them. Both PCI DSS and most enterprise security reviews fail a site that still offers them.
  • 60

    Cookies missing httponly flag

    HttpOnly makes a cookie invisible to JavaScript. Session cookies without it can be read by any script running on the page, including one injected through an XSS flaw or loaded from a compromised third-party dependency.

    Så åtgärdar ni det: Set HttpOnly on every cookie that JavaScript does not genuinely need to read: session identifiers above all. Combine with Secure and SameSite=Lax (or Strict). If a script currently reads the session cookie, move that data to a separate non-sensitive cookie rather than weakening the session one.

    Vad som testades och konsekvensen
    Vad som testades
    The HttpOnly attribute on cookies set in the response
    Konsekvens
    An attacker who achieves script execution can copy the session cookie and impersonate the user directly, with no need for their password and no trace in your authentication logs. It turns a contained XSS into full account takeover.
  • 55

    HTTP not redirecting to HTTPS

    HTTPS is available on this site, but plain HTTP requests are still served rather than redirected. Visitors who type the domain, follow an old link, or use a bookmark stay on the unencrypted version.

    Så åtgärdar ni det: Issue a permanent redirect from HTTP to HTTPS for every path: return 301 https://$host$request_uri; on nginx, or Redirect permanent on Apache. Once that is reliable, add HSTS so browsers stop making the insecure request in the first place.

    Vad som testades och konsekvensen
    Vad som testades
    Whether a request to http:// is redirected to https://
    Konsekvens
    Traffic that could have been protected is not. Search engines may index the insecure URLs, and a user who lands there submits forms and carries session cookies in cleartext, even though a secure version exists a redirect away.
  • 50

    HSTS header missing

    HSTS tells a browser to only ever reach this site over HTTPS, and to refuse to let the user click through a certificate warning. Without it, the very first request a visitor makes, typing the domain, or following an http:// link, happens in cleartext before any redirect can protect it.

    Så åtgärdar ni det: Add Strict-Transport-Security: max-age=31536000; includeSubDomains once every subdomain reliably serves HTTPS. Start with a short max-age (a few hours) to confirm nothing breaks, then raise it: the header is hard to undo, because browsers honour the cached value. Consider preload and submission to hstspreload.org only after the long max-age has run without incident.

    Vad som testades och konsekvensen
    Vad som testades
    The Strict-Transport-Security response header on the HTTPS response
    Konsekvens
    That first unprotected request is where SSL-stripping attacks live: an attacker on the same network intercepts it and keeps the victim on plain HTTP indefinitely, while your server still sees ordinary traffic. A redirect alone does not prevent this; HSTS is what closes the window.
  • 50

    X-XSS-Protection header missing

    This header enables browser XSS protection

    Så åtgärdar ni det: Modern browsers have deprecated X-XSS-Protection in favor of Content-Security-Policy. Set X-XSS-Protection: 0 and invest in a strong CSP (default-src 'self', no unsafe-inline, no unsafe-eval). CSP is the load-bearing mitigation; the legacy header is informational.

    Vad som testades och konsekvensen
    Vad som testades
    X-XSS-Protection header check
    Konsekvens
    Users are more vulnerable to cross-site scripting attacks
  • 45

    Apex does not serve HTTPS directly

    The hostname does not answer on HTTPS itself, but sends visitors to one that does. Traffic is protected after the redirect; the initial request is not.

    Så åtgärdar ni det: Serve a certificate on the apex as well and redirect at the HTTPS layer rather than from plain HTTP. Most CDNs and load balancers will issue an apex certificate automatically.

    Vad som testades och konsekvensen
    Vad som testades
    HTTPS on this exact hostname, plus where its HTTP traffic redirects
    Konsekvens
    The first request is made in cleartext and can be intercepted or redirected before the browser ever reaches the secure host. It also breaks HSTS preloading for the apex.
  • 40

    Security headers missing

    CSP tells the browser which sources of script, style and content are legitimate for your site. It is the single most effective defence against cross-site scripting, because it stops injected script from executing even when the injection itself succeeds.

    Så åtgärdar ni det: Start in report-only mode: Content-Security-Policy-Report-Only: default-src 'self'; report-uri /csp-report. Collect violations for a week to find what legitimately loads from elsewhere, tighten from there, then switch to the enforcing header. Do not begin with a permissive policy containing unsafe-inline: that defeats the point.

    Vad som testades och konsekvensen
    Vad som testades
    Presence of the Content-Security-Policy response header
    Konsekvens
    Without CSP, any XSS flaw anywhere in the application, including in a third-party script you do not control, becomes fully exploitable: session theft, keylogging of form input, or silent redirection of your users.

Lågallvarlighetsgrad 0 till 39

  • 35

    No web service detected

    Neither port answered. Many domains exist only for email or DNS and are never meant to serve a website.

    Så åtgärdar ni det: Confirm whether this hostname is supposed to serve web content. If it is not, no action is needed: consider a null MX and an explicit DNS record set to make the intent clear. If it is, check that the service is running and not firewalled.

    Vad som testades och konsekvensen
    Vad som testades
    Both port 80 and port 443
    Konsekvens
    Informational. If no website is intended here, nothing is wrong. If one is, it is currently unreachable and no visitor can load it.

De andra modulerna

Källor