首页 > 解决方案 > 可以保护 Web 应用程序免受浏览器扩展的影响吗?

问题描述

似乎有大量浏览器扩展表现出恶意行为。此外,即使是有效的扩展也可能会受到安全漏洞的影响,从而使其表现出恶意。

避免此问题的一种方法是使用 NWJS、Electron 或类似平台打包您的 Web 应用程序。这具有消除扩展生态系统的优势,但也存在许多缺点(安装过程、更多的资源消耗、增加的劳动力等)。

有人辩称,“最终用户受到损害是用户的责任,而不是网站的错”。虽然这是一个很好的观点,但我们这些负责管理敏感数据的软件的人仍然有责任保护。

在编写将访问敏感数据的 Web 应用程序时,是否可以采取任何措施来防止浏览器扩展?


编辑:这个问题的任何创造性解决方案都会很棒。或者,也欢迎确认的否定。从这个问题延伸出来的一些想法:

标签: javascriptsecuritygoogle-chrome-extension

解决方案


There's a (primitive) solution to detect user extensions installed on the browser, from there I guess you can deny the access to your web application until the user uninstalls these extensions. It consists in a small database of assets (icons), if the javascript can find these assets, it means the extension is installed.

CONS: You can't detect if the extensions are running, therefore if the user disables them that won't be detected and you will still get a positive.

The code is in this link:

Can a Website detect what browser extensions are being used?

Post with users feeding this database with more assets:

https://blog.jeremiahgrossman.com/2006/08/i-know-what-youve-got-firefox.html


推荐阅读