Skip to content
Crypto Disclosed report Intermediate

Web protection component in Anti-Virus products family ignores HSTS security policy

Kaspersky Internet Security's HTTPS scanning component ignores the HSTS policy, allowing users to override certificate errors for sites that should be protected. An attacker could perform a man-in-the-middle attack by presenting an invalid certificate and relying on the user to click through the warning.

palant Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 4 months
  • Disclosed after 9 months

Summary Kaspersky Internet Security seems to ignore the Strict-Transport-Security HTTP header. This allows Man-in-the-Middle attacks on websites that would normally be immune to them. The only requirement is the user confirming the certificate override, something that can be achieved by social engineering.

Description When a browser encounters an SSL certificate error, it will usually allow users to override it and continue to the site. This is meant mostly for intranet devices that use self-signed SSL certificates. However, for websites using Strict-Transport-Security HTTP header there is no such override possibility - these websites declared that they will always have a valid certificate, so a certificate error is a certain sign of a Man-in-the-Middle attack. It is known that users will often disregard warnings (see https://adrifelt.github.io/sslinterstitial-chi.pdf for example), so the decision isn't left to the user here. Browsers (at least Chrome 71 and Firefox 63) just don't give users a choice, proceeding to the site isn't possible.

Kaspersky Internet Security breaks up HTTPS connections in order to scan them. This means in particular that it takes over certificate validation and overrides. There seems to be no special handling of websites on Google's HSTS preload list (https://hstspreload.org/) or websites sending Strict-Transport-Security HTTP header. Overriding a certificate error is always possible with merely two clicks. This puts users at risk in case of Man-in-the-Middle attacks.

Environment

  • Scope: Application
  • Product name: Kaspersky Internet Security
  • Product version: 19.0.0.1088
  • OS name and version (incl SP): Windows 10.0.17134
  • Attack type: MitM
  • Maximum user privileges needed to reproduce your issue: no privileges

Steps to reproduce

  1. Open your browser (I tested in Firefox 63) and go to https://www.google.com/. The regular Google Search page appears.
  2. Edit the file %WINDIR%\sysnative\drivers\etc\hosts as administrator and add the following line: 93.184.216.34 www.google.com (that's the IP address of example.com to simulate a MitM attack).
  3. Reload www.google.com in the browser.

While Kaspersky Internet Security will warn you about a wrong SSL certificate, users can still click "I understand the risks" to ignore the error. That's despite www.google.com being on the HSTS preload list and despite Kaspersky Internet Security seeing it send Strict-Transport-Security HTTP header before. The MitM protection is considerably weakened compared to the security level provided by the browsers.

Note that the presence of Kaspersky Internet Security is easy to detect, so attackers might decide to execute this attack only if it is present.

Impact

Attackers on public WiFi networks might redirect SSL-encrypted traffic of Kaspersky users to their server in a bet that users will override the certificate warning - which they often will. State-level attackers could do the same when targeting dissidents. They will even be able to attack high-profile websites such as Google which are normally immune to MitM due to their use of HSTS.

The original report as published on HackerOne, by palant. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

Attackers on public Wi-Fi or state-level actors could redirect encrypted traffic and intercept it if users override the certificate warning, even for high-profile sites like Google that use HSTS.

What the attacker needed

Kaspersky Internet Security installed; victim uses the affected browser; attacker can intercept network traffic; victim clicks through certificate warning

How it was found

  1. Open a browser and go to https://www.google.com/.
  2. Edit the hosts file as administrator to point www.google.com to the IP address of example.com.
  3. Reload www.google.com in the browser.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

HSTS is a security rule that tells browsers to always use a secure connection to a website and never allow bypassing certificate warnings. Kaspersky's antivirus scans encrypted traffic by acting as a middleman, but it fails to enforce HSTS, so users can still click through certificate errors. This means an attacker on the same network could trick the user into accepting a fake certificate and intercept their traffic.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More by palant

View all

12 more disclosed reports, best first.

More from Kaspersky

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.