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:
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.
The only way to access the actual phishing page is by passing the malicious URL as an argument to the referring site. For these phishing campaigns observed, both the referrer and the malicious site are hosted on Cloudflare R2.
Using Fingerprint BotD for evasion
The phishing site also uses the free and open-source bot detection library Fingerprint BotD to identify phishing pages crawled by bot. It sends a custom error message (ERROR CODE 102 or 99) when it detects a bot accessing the page.
R2 was one of 162 cloud apps being abused to host malicious content in July 2022. The phishing pages hosted there use multiple techniques to evade analysis, including using Cloudflare Turnstile for CAPTCHAs, Fingerprint BotD for bot detection, and URL parameter checks. All URLs associated with this campaign have been reported to Cloudflare. To block these types of phishing attempts, Netskope uses ML-based inline, out-of-band phishing detection engines, and threat intelligence systems. Users can also spot similar phishing pages hosted on R2 by inspecting the URL for the pattern pub-*.r2.dev.
The scams and phishing pages described in the post are easily recognisable by the domain pattern pub-*.r2.dev. Users can avoid becoming victims of the types of attacks described in this post by checking the URL. Users should always access important pages, such as their banking portal or webmail, by typing the URL directly into the web browser instead of using search engines or clicking any other links.
Netskope Threat Labs recommends that organizations review their security policies to ensure that they are adequately protected against these and similar phishing pages and scams:
- Inspect all HTTP and HTTPS traffic, including all web and cloud traffic, to prevent users from visiting malicious websites. Netskope customers can configure their Netskope NG-SWG with a URL filtering policy to block known phishing and scam sites, and a threat protection policy to inspect all web content to identify unknown phishing and scam sites using a combination of signatures, threat intelligence, and machine learning.
- Use Remote Browser Isolation (RBI) technology to provide additional protection when there is a need to visit websites that fall in categories that can present higher risk, like Newly Observed and Newly Registered Domains.
Below are the IOCs related to the web pages analyzed in this blog post.