当Chrome扩展变成间谍软件:为什么自己写扩展成了最理性的安全选择
当越来越多的Chrome扩展被"间谍软件公司"收购,用户的每个浏览行为都可能成为被出售的数据时,开发者选择自己写扩展不再是一种偏执,而是最理性的安全策略。
核心观点:Chrome扩展生态正在被恶意收购和数据窃取所侵蚀,开发者自建开源扩展不仅是安全偏好,更是对现有商业扩展模式的根本性批判,这种"自己做"的趋势将在未来几年重塑浏览器扩展市场。
当开发者Pieter Levels宣布他开源了自己的Chrome扩展时,大多数人看到的是一个技术爱好者的个人项目。但仔细看他的理由,你会发现一个正在被广泛忽视的危机:Chrome扩展生态正在经历一场静默的恶性蜕变。越来越多的独立扩展被"间谍软件"和"恶意软件"公司收购,这些公司通过扩展的权限读取用户的cookies、localStorage和session tokens,然后窃取账户数据、加密货币钱包甚至直接盗取资金。Levels的举动不是孤立的技术行为,而是一种对当前扩展生态的尖锐批判,同时预示着一个可能的趋势:当市场供给持续恶化时,用户自建工具将从"小众爱好"变成"刚需选择"。
让我们先看清问题的严重性。Chrome扩展的权限模型本身就存在先天不足。一个扩展在安装时可以请求几乎无限的权限:读取所有网站数据、操作浏览器的cookies、监视用户的网络请求等。用户通常不会仔细阅读这些权限请求,而扩展的审核机制在面对数百万个扩展时也显得力不从心。当扩展被恶意收购时,攻击者直接继承了所有这些权限,而用户往往毫不知情。Levels提到的"你的cookies可能被读取,然后攻击者可以登录你的银行账户"不是危言耸听,而是已经多次发生的现实。
更令人不安的是,这种收购行为正在变得系统化。这不是个别案例,而是形成了一个完整的灰色产业链。先有独立开发者创建一个受欢迎的扩展,积累大量用户。然后有嗅觉灵敏的公司出价收购,这些公司往往以"广告优化"或"数据分析"为名,实际上是在为数据窃取铺路。收购完成后,扩展会在不引人注目的更新中悄悄加入数据收集功能。由于扩展的更新通常不会触发用户的明确同意,整个过程可以持续数月甚至数年而不被察觉。
有观点认为,用户可以通过选择知名开发者的扩展来规避风险。这种建议在理论上合理,但实践中几乎不可行。因为即使一个扩展最初是由知名开发者开发的,它也可能在未来被出售。而且,知名开发者自身也可能面临经济压力,出售扩展对他们来说有时是最合理的选择。此外,扩展的"知名"和"安全"之间并没有必然联系。事实上,一个扩展越受欢迎,它被恶意收购的吸引力就越大。
在这个背景下,Levels的做法提供了一种替代方案:自己写一个扩展,或者至少使用一个开源的、可以自行审计的扩展。他的SuperLevels扩展集合了所有他常用的功能,从标签清理到Cookie编辑,从重定向追踪到暗黑模式,全部集成在一个开源的、可审查的扩展中。用户不需要信任任何第三方,只需要信任自己(或者信任自己能够审计的代码)。这种"不信任任何第三方"的哲学,在安全领域被称为"零信任",而在扩展生态中,它正在成为一种必要的生存策略。
当然,这种"自建"模式有明显的局限性。对于非开发者用户来说,自己写一个扩展是不现实的。Levels的解决方案针对的是一个特定的用户群体:能够理解代码并愿意花时间构建的人。但即使如此,他的做法仍然具有示范意义,因为它指出了扩展生态中长期被忽视的问题:用户对扩展的信任假设正在被系统性地破坏。
更值得关注的是,Levels不是唯一一个这么做的开发者。在Hacker News、Reddit等平台上,越来越多的技术用户开始分享自己"DIY"扩展的经验。一些团队甚至开始构建"扩展管理框架",让用户可以通过简单的配置文件来构建自己的扩展,而无需编写代码。这种趋势如果持续,可能会催生一个"开源扩展生态系统"的替代方案:不再是用户被动地接受市场上的扩展,而是用户可以主动地组装自己的工具集。
从商业角度看,当前的扩展市场模式可能已经走到了尽头。当一款扩展的主要价值不再是为用户提供功能,而是为用户的数据进行"变现"时,整个生态的信任基础就崩溃了。用户将越来越不愿意安装任何扩展,或者至少只安装那些来源完全透明的扩展。这种信任危机可能会倒逼浏览器厂商重新设计扩展的权限模型。例如,Chrome可以引入"动态权限"系统,让扩展只能在用户明确批准的情况下访问敏感数据;或者引入"沙盒"机制,限制扩展之间的数据共享。但这些改进需要时间,而且可能会遭到扩展开发者和广告商的强烈反对。
对于普通用户来说,当前最现实的做法是定期审查自己安装的扩展,删除那些不再使用或来源不明的扩展。同时,关注那些保持高度透明度的扩展开发者和团队,优先选择那些提供完整源代码的开源扩展。对于有技术能力的用户,Levels的"自己做"模式值得认真考虑。虽然需要投入一些初始时间,但长期来看,它提供了无法用金钱衡量的安全保障。
从更深层次看,Levels的开源扩展事件是一个信号,提示我们整个"信任经济"正在AI和互联网的交叉点上发生深刻变化。过去,我们信任平台(Chrome Web Store)来为我们筛选安全的扩展。但这种信任已经被多次辜负。未来,信任将不得不从"平台"转移到"代码"和"社区"。用户可以信任那些经过开源社区审查的代码,可以信任那些有清晰审计轨迹的项目,但不能盲目信任任何一个商业实体的承诺。
Levels的SuperLevels扩展或许不会成为主流——绝大多数用户不会去GitHub下载源代码再自行编译。但它像一面镜子,照出了当前扩展生态的丑陋面貌,并为那些感到窒息的技术用户提供了一个可行的出口。当"自己做"成为对抗"被收割"的唯一选择时,这个生态就到了必须改变的临界点。
参考来源
- ✨ I open sourced my first Chrome extension 🚀 SuperLevels
- https://github.com/levelsio/superlevels
- I vibe coded it to replace all my Chrome extensions that are increasingly being bought up by spyware and malware companies who sell your data or worse hack your accounts and steal your stuff/money/data, which I'd call one of the top security risks right now
- For example: Chrome extensions can read your cookies or localStorage data, including session tokens, then login to your web or email accounts and hack you, they can inject code into any site to pull data form any site you browse, then break into your crypto accounts, drain your wallets, and selling your browsing history to ad companies, but that'd actually be the most favorable thing to happen of all these! Chrome extensions are just very very very unsafe
- So I coded my own, that I can trust because I made it, and I can read the source code: my extension is called 🚀SuperLevels and has all the features that the Chrome extensions I used to use have but all built into one safe one
- The cool thing is it's 100% open source and free, and you can audit the code first with AI yourself before installing it, and then if you do install it, customize it to your liking again with AI
- It has these features that improve my daily workflow while browsing the web:
- 🚮 Tab Cleaner
- Automatically closes inactive tabs after a configurable timeout (default: 5 minutes). Set excluded hosts to keep important tabs alive. View and re-open recently closed tabs.
- 🍪 Cookie Editor
- Full cookie manager for the current site. View, edit, add, and delete cookies. Export cookies as JSON. Expand any cookie to see and modify all fields including domain, path, SameSite, secure, and httpOnly flags.
- 🔀 Redirect Tracer
- See every redirect hop your browser took to reach the current page. Shows status codes (301, 302, 307, etc.) with a visual chain. Copy the full redirect chain to clipboard.
- 🌙 Dark Mode
- Instant dark mode for any website using CSS filter inversion. Adjustable brightness. Toggle per-site or globally. Images and videos are automatically re-inverted so they look normal.
- 𝕏 X Dim Mode
- Custom dim theme for X/Twitter with 7 color palettes: Dim, Slate, Jade, Plum, Dusk, Ember, or a custom hue. Live preview in the popup.
- ⚡ JS Toggle
- Disable JavaScript per-site with one click. Useful for debugging, reading articles without popups, or testing progressive enhancement. Page reloads automatically.
- 🚫 GDPR Cookie Consent Dismisser
- Auto-hides and auto-clicks cookie consent banners. Supports OneTrust, CookieBot, Didomi, Quantcast, GDPR plugins, and dozens more frameworks. Toggle off if a site breaks.
- 🎨 Live CSS Editor
- Write custom CSS for any website, applied in real-time as you type. Saved per-domain. Supports tab key for indentation.
- 📺 YouTube Unhook
- Removes YouTube distractions: no homepage feed, no sidebar suggestions, no end screen overlays, no Shorts. Search still works — just no algorithmic recommendations.
- 🎵 Music Recognizer
- Shazam-like music identification for any tab. Captures 10 seconds of audio and identifies the song via ACRCloud (free signup, bring your own API key). Results link to YouTube. History of recognized songs.
- 🖼 Picture-in-Picture
- Pop the largest video on the current tab into a floating PiP window with one click.
- 🗺 Google Maps Links
- Re-adds clickable Maps links and map preview cards to Google Search results.
- 🖼 View Image
- Adds a "View Image" button back to Google Images, linking directly to the full-size original image.
- {} JSON Formatter
- Auto-detects pure JSON response pages and formats them with syntax highlighting, collapsible sections, and a dark theme. Copy or view raw with one click. Never triggers on regular HTML pages. - https://nitter.net/levelsio/status/2047313968708898999#m
- 【毕导】我预言了一个物理规律,历时100天我证明了它 - https://www.bilibili.com/video/BV1wPoVB7Egv
- Vercel breach wasn't an AI hack. But the blueprint works against every AI coding agent shipping today - https://www.reddit.com/r/AI_Agents/comments/1sub2kl/vercel_breach_wasnt_an_ai_hack_but_the_blueprint/