nayaread
HomeFavouritesTopicsSources
HomeFavouritesTopicsSources
NayaRead links to original engineering blogs. All copyright belongs to the respective authors.
The Cloudflare Blog·27 days ago·20 min read·Juan Miguel Cejuela69

When scanners miss the attack: how Cloudflare Client-Side Security protects storefronts

A modern storefront can look healthy while malicious JavaScript quietly siphons revenue, hijacks clicks, or rewrites analytics. See how Cloudflare's machine learning models surface evasive client-side attacks for analyst investigation.

Security
AI summarygenerated from the source article

Public security scanners missed 100% of the active attack campaigns, but Cloudflare's client-side ML caught all eight live payloads—including a malicious script that sat unclassified on URLScan for two and a half years. 👇

E-commerce storefronts can look completely normal while rogue JavaScript quietly runs in the shopper's browser. These scripts steal affiliate commissions, suppress analytics, and open live remote backdoors. Traditional scanners miss them because the code uses strict cloaking rules—waking up only for targeted mobile devices, specific campaign links, or narrow time windows, while staying dormant for security crawlers.

Cloudflare built Page Shield ML to analyze hostile JavaScript at runtime. Instead of relying on static file hashes or known bad URLs, the system judges what the code actually tries to do inside live browser sessions.

The detection flow moves through a multi-stage pipeline: Graph Neural Network → Workers AI LLM → Frontier Model Cohort.

It starts with a Graph Neural Network (GNN). Rather than scanning flat text, the GNN turns JavaScript into a syntax tree that links symbols, function calls, and network requests. This lets it spot hostile patterns even across minification, variable renaming, and obfuscation.

Because the GNN flags less than 0.3% of analyzed traffic, Cloudflare routes those edge cases to a lightweight LLM on Workers AI for a fast second opinion.

For the trickiest scripts, an ensemble of frontier AI models steps in as automated agents. Each model runs in an independent session with access to a restricted JavaScript evaluator to unpack concealed snippets. If the models disagree on the script's intent, their votes are weighted to create a probability distribution across four labels: benign, payment skimming, cryptomining, or malware. Humans only review scripts that lack a clear two-thirds majority.

This continuous inspection caught four sophisticated operations in the wild. One payload hid behind a maze of conditions: it verified the viewport was under 477 pixels, checked for specific ad campaign tags, filtered out an explicit list of 325 IP addresses, and then deleted nine third-party analytics scripts from the page to blind the store's monitoring. Another used a `MutationObserver` to intercept taps on late-loading product tiles, launching a dual-tab detour that silently stole attribution cookies.

Cloudflare surfaced all eight live payloads across the four campaigns without relying on static signatures. Seven of those payloads were completely absent from VirusTotal, and URLScan failed to flag a single one as malicious.

Read original on blog.cloudflare.com

Discussion around the web

  • Hacker News2 · 0 💬

Score breakdown

  • Technical depth86
  • Practical value75
  • Originality85
  • Writing quality100
  • Source reputation0
  • Recency98
  • External engagement4
  • On-site engagement0

NayaRead shows a summary and links to the original article. The full article is hosted on blog.cloudflare.com.

More like this

The Cloudflare Blog

Enforce positive security with Cloudflare Application Profiles

Daniele Molteni·14 days ago·9 min read
The Cloudflare Blog

The Four Critical Security Flaws that Resulted in Last Friday's Hack

Jun 4, 2012·10 min read
The Cloudflare Blog

Adaptive application security for the AI era: how Cloudflare connects code, traffic, and intelligence to stop attacks

Daniele Molteni·14 days ago·12 min read
The Cloudflare Blog

Introducing CloudFlare Registrar: Designed for Security, Not the Masses

Feb 24, 2016·13 min read