How does Avast’s HTTPS scanner work?

0

1

Looks like the latest version of Avast antivirus includes an HTTPS scanner, source. How is this feature implemented? As a browser plugin?

Šime Vidas

Posted 2014-11-03T01:44:19.807

Reputation: 693

Answers

3

Usually, such scanners work the same way as a proxy or a man-in-the-middle attack: they make all connections go through a locally running "proxy" process, which acts as the server as far as your browser is concerned, but also acts as a client when talking to the actual web server, therefore decrypting and re-encrypting all HTTPS connections. That way, connections can be scanned regardless of the browser used.

Such scanners avoid certificate warnings by installing a custom locally-generated CA certificate to your system, and automatically issuing temporary certificates for every website you visit. Your article confirms this by mentioning that Avast breaks Firefox's add-on updating, which implies that Firefox is seeing the certificates come from the wrong issuer than it expects.

Of course this has numerous disadvantages: it breaks security features like CA pinning (as in the Firefox example) or certificate fingerprint pinning; it hides the actual certificate information from the browser (and the user); it relies on Avast to correctly verify the server's certificate (personally I do not trust Avast to do it correctly); it might hide the actual TLS features supported by the peers (such as ALPN), forcing the browser and the server to use the (often outdated) feature set that the Avast proxy also supports...

user1686

Posted 2014-11-03T01:44:19.807

Reputation: 283 655

2So it completely prevents the browser from establishing HTTPS connections with anything but Avast itself? That sounds awful. – Šime Vidas – 2014-11-03T14:20:24.507

1@ŠimeVidas: Some other protocols, like POP3/IMAP/SMTP/FTP, have a STARTTLS feature for enabling TLS after the initial handshake. Some antivirus scanners actually "edit out" any attempts to advertise or enable the STARTTLS feature, e.g. changing it to STARTXXX, so that the peer won't attempt TLS at all. – user1686 – 2014-11-08T19:18:51.117