From February to July 2023, Netskope Threat Labs has been tracking a staggering 61-fold increase in traffic to phishing pages hosted in Cloudflare R2. The majority of the phishing campaigns target Microsoft login credentials, although there are some pages targeting Adobe, Dropbox, and other cloud apps. The attacks have been targeting victims mainly in North America and Asia, across different segments, led by the technology, financial services, and banking sectors.
These phishing campaigns abuse the free hosting service Cloudflare R2 to distribute static phishing pages. To evade detection, they are using two noteworthy techniques to prevent scanners and URL analyzers from detecting the phishing pages. First, they are using Cloudflare Turnstile to protect the pages with a CAPTCHA. This technique prevents scanners and analyzers from visiting the URLs and observing their contents while allowing victims easy access to the pages. Second, many of the pages only load the malicious content if it was passed by another malicious referring site. This helps ensure that only the intended targets are served the phishing content.
Let’s take a closer look at how these campaigns function.
Cloudflare R2 hosting phishing pages
Cloudflare R2 is a fairly new cloud storage service which opened for beta in May 2022 and was made publicly available in August 2022, offering static hosting at little-to-no cost. Similar to Amazon S3, Google GCS, or Azure Blob Storage, objects hosted on Cloudflare R2 can optionally be granted public access. Users can either connect the storage to their own domain, or Cloudflare R2 will provide a unique subdomain for each bucket. Cloud services that offer free or low-cost object storage are commonly abused by attackers to host malicious content. R2 is one of the latest apps to join a long list of cloud apps being abused. In July, R2 was one of 167 different cloud apps being abused to deliver malicious content.
Over the past six months, Netskope Threat Labs has observed a staggering increase of traffic to phishing pages hosted on Cloudflare R2. The phishing pages are primarily targeting Microsoft credentials.
The attackers take advantage of the free subdomain provided by Cloudflare, which makes the URLs relatively easy to identify. Users should look for URLs with the following pattern:
https://pub-<32_alphanumeric_string>.r2.dev/webpage.htm
Using Cloudflare Turnstile for evasion
Cloudflare Turnstile is a free service, designed to protect websites from bots and other malicious traffic, and a smart CAPTCHA alternative that can be embedded into any website without sending traffic through Cloudflare. It has the option to hide the CAPTCHA to visitors, but can also show a traditional verification page as well.
Some of the phishing campaigns we observed abusing Cloudflare R2 are also abusing Turnstile to both convince their target that the phishing site is legitimate and to hide the actual phishing page from security scanners. Submitting the phishing pages to online scanners like urlscan.io doesn’t reach the actual phishing site, as it fails the CAPTCHA test.
Attackers used explicit rendering of Cloudflare Turnstile so they could modify the CAPTCHA page to appear as if it were actually requested by the service users were about to log on to. This can easily be done by modifying the site-name to any legitimate service, which is “Microsoft Security” in this case pictured above.
Using redirects and URL parameters for evasion
Apart from abusing Cloudflare Turnstile, some phishing pages perform additional detection evasion by hiding the phishing page until certain conditions are met. The malicious website requires a referring site to include a timestamp after a hash symbol in the URL to display the actual phishing page. On the other hand, the referring site requires a phishing site passed on to it as a parameter. So, if no URL parameter is passed to the referring site, the visitor will be redirected to google.com. This is a clever technique as accessing both the referring site and the effective page by itself will hide the actual phishing page, making it look benign. This both helps prevent URL scanners and bots from visiting the page and helps ensure that only the intended victims can see the phishing content.
The malicious site also requires a timestamp passed on the URL from the referrer for it to display the actual phishing page. If a user accessed the malicious site directly, they would be shown a custom error message.