The Black Friday Skimmer Left Through WebRTC: How to Test Your Checkout for It
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
The Black Friday Skimmer Left Through WebRTC: How to Test Your Checkout for It
该窃取程序并不需要你的 connect-src 规则。它通过 Cookie 横幅、营销像素或 CDN 文件进入,并利用浏览器用于视频通话的同类通道窃取了银行卡数据。2026 年 11 月 27 日,安全公司 InfoHawk 发布了一份报告,披露了一个在“黑色星期五”前一周于 Lascana、Samsonite、American Tourister、Revolve 和 FWRD 在线商店中发现的银行卡窃取脚本。该 Hacker News 帖子在约 12 小时内获得了超过 440 个积分和 230 条评论。有两个细节使得此事件比通常的“第三方脚本故障”故事更值得深究:该脚本通过 WebRTC 数据通道加载其实际代码并发送窃取的数据,而大多数内容安全策略 (CSP) 设置并不对此进行控制;此外,它仅在手机和触摸屏上运行,因此在桌面端检查结账页面时将一无所获。本文梳理了 InfoHawk 的报告内容、CSP 中仍能阻止此类工具的部分,以及一个可用于测试暂存结账页面的小型移动端模拟测试。本文基于 InfoHawk 的报告、W3C CSP 草案、MDN 文档和一个本地测试页面编写,除报告所述内容外,不涉及任何真实商店的设置。
What InfoHawk found
InfoHawk 的发现
From the report: The script was planted on five stores and delivered in three different ways: an altered Quorum ad-attribution pixel (Lascana), an edited Seers cookie-banner setting (Samsonite and American Tourister), and an altered file on Revolve’s own CDN (Revolve and FWRD). InfoHawk notified the named parties on November 24. All five stores had the script removed on November 24 or 25, ahead of Black Friday. Revolve said it “resolved the same day” an issue “impacting mobile and tablet versions of our websites.”
根据报告:该脚本被植入五家商店,并通过三种不同方式传播:篡改的 Quorum 广告归因像素(Lascana)、编辑过的 Seers Cookie 横幅设置(Samsonite 和 American Tourister),以及 Revolve 自身 CDN 上的篡改文件(Revolve 和 FWRD)。InfoHawk 于 11 月 24 日通知了相关方。所有五家商店均在 11 月 24 日或 25 日(即黑色星期五之前)移除了该脚本。Revolve 表示,他们“在当天解决”了一个“影响我们网站移动版和平板电脑版”的问题。
How the kit works, step by step
该工具的工作原理(分步说明)
InfoHawk describes seven steps. In short: A loader gets onto the page through a consent-banner setting, a retailer CDN file, a shared marketing pixel or the store’s own HTML. The loader pulls Insds.js or gtage.js from an Amazon S3 bucket with a brand-style name (
InfoHawk 描述了七个步骤。简而言之:加载器通过同意横幅设置、零售商 CDN 文件、共享营销像素或商店自身的 HTML 进入页面。加载器从一个带有品牌风格名称(
Why connect-src does not see it
为什么 connect-src 无法检测到它
MDN’s page on connect-src lists the APIs the directive controls: fetch(), XMLHttpRequest, WebSocket, EventSource, navigator.sendBeacon(), fetchLater() and the ping attribute on links. RTCPeerConnection is not on the list. The CSP Level 3 editor’s draft does define a separate directive for this: webrtc ‘block’. Under that directive, the draft says, no local ICE candidates will be surfaced and no STUN checks will be made, so no peer connection can form. (ICE is the process WebRTC uses to find a network path. STUN is the small request a browser sends to learn its public address.) The problem is support. MDN has no reference page for the webrtc directive, and MDN’s browser compatibility data for CSP has no entry for it either.
MDN 关于 connect-src 的页面列出了该指令控制的 API:fetch()、XMLHttpRequest、WebSocket、EventSource、navigator.sendBeacon()、fetchLater() 以及链接上的 ping 属性。RTCPeerConnection 不在列表中。CSP Level 3 编辑草案确实为此定义了一个单独的指令:webrtc 'block'。草案称,在该指令下,不会显示本地 ICE 候选者,也不会进行 STUN 检查,因此无法形成对等连接。(ICE 是 WebRTC 用于寻找网络路径的过程。STUN 是浏览器为获知其公网地址而发送的小型请求。)问题在于支持情况。MDN 没有关于 webrtc 指令的参考页面,其 CSP 浏览器兼容性数据中也没有相关条目。