Skip to content
Misconfiguration Write-up Intermediate

The Phantom Edge A Cloudflare Pastejacking Attack Farros

An attacker deployed a malicious Cloudflare Worker that intercepted requests to the author's static site and injected a fake CAPTCHA overlay. Clicking the overlay copied a command to the clipboard, tricking users into running it via the Windows Run dialog, which attempted to execute a payload using rundll32.exe.

Farros FR Follow

Published on infosecwriteups.com

It was supposed to be a regular day. I opened my browser, navigated to one of my web projects, and was greeted by something that immediately triggered my infosec paranoia: a reCAPTCHA verification prompt.

Farros FR, on infosecwriteups.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the attacker obtained valid Cloudflare API credentials or a hijacked dashboard session, allowing them to deploy a Worker and bind it to the domain's routes.

Impact

Visitors could be tricked into running a malicious command that attempted to download and execute a DLL via rundll32.exe, potentially leading to full system compromise, though the attempt failed with a network error.

What the attacker needed

Compromised Cloudflare credentials; victim visits the site; victim clicks the fake CAPTCHA; victim follows paste-and-run instructions

The fix

The author removed the rogue Worker, unbound its routes, purged the cache, revoked all API tokens, changed the account password, and verified 2FA.

How it was found

  1. The attacker deployed a malicious Cloudflare Worker named worker-white-shadow-3de7.
  2. The Worker was bound to wildcard routes of the author's domains, intercepting all HTTP requests.
  3. The Worker injected a fake CAPTCHA overlay into the HTML served to visitors.
  4. When a user clicked the fake CAPTCHA button, JavaScript copied a command-line payload to the clipboard.
  5. The page then instructed the user to open the Windows Run dialog, paste the payload, and press Enter.
  6. The pasted command attempted to use rundll32.exe to download and execute a malicious DLL, but failed with a network error.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A content delivery network (CDN) like Cloudflare sits between a website's server and its visitors, speeding up loading and adding security. Here, someone gained access to the author's Cloudflare account and added a small program (a Worker) that altered every page before it reached visitors. That program showed a fake 'I'm not a robot' check; clicking it secretly put a harmful command on the visitor's clipboard and then told them to paste and run it, which could infect their computer.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.