Irony in Cybersecurity: Cloudflare's Protections Bypassed Using Its Own System

Explore the recent discovery of how attackers can bypass Cloudflare’s DDoS protections using Cloudflare itself, and learn about effective defense measures against this vulnerability.

Irony in Cybersecurity: Cloudflare's Protections Bypassed Using Its Own System

A notable irony in cybersecurity has emerged with Cloudflare's own DDoS prevention and Firewall mechanisms being susceptible to exploitation using Cloudflare's infrastructure. Researchers from Certitude discovered a method that bypasses Cloudflare’s security measures, potentially imposing a significant burden on its clients.

Technical Details of the Vulnerability

The vulnerability affects two critical aspects of Cloudflare's system: "Authenticated Origin Pulls" and "Allowlist Cloudflare IP Addresses."

Authenticated Origin Pulls

Cloudflare's "Authenticated Origin Pulls" is a security feature designed to validate HTTP(s) requests to an origin server. The SSL/TLS certificate used for authentication between Cloudflare's reverse proxies and a customer's origin server is critical in preventing unauthorized access. However, Cloudflare utilizes a shared certificate for all customers, not tenant-specific ones, which allows connections from Cloudflare to be universally accepted. Attackers can exploit this by creating a custom domain on Cloudflare, pointing its DNS A record to the victim's IP address, disabling certain protection features, and launching attacks through Cloudflare’s infrastructure.

Allowlist Cloudflare IP Addresses

This feature permits traffic only from Cloudflare's IP range to reach clients' origin servers. Attackers can set up a domain with Cloudflare, point the domain's DNS A record to the target victim’s server IP, disable protection features, and route malicious traffic through Cloudflare. As a result, the traffic appears legitimate from the victim’s perspective.

Recommendations for Defense

Certitude suggests the following measures against these vulnerabilities:

  1. Use a Custom SSL/TLS Certificate: Instead of relying on Cloudflare's shared certificate, customers should configure the "Authenticated Origin Pulls" feature using their own custom SSL/TLS certificates. This approach ensures domain-specific authentication, thus reducing the risk of impersonation and bypassing security protections.
  2. Utilize Cloudflare Aegis for Specific Egress IP Ranges: If available, customers should use Cloudflare Aegis to define a more specific egress IP address range tailored to their needs. This can help in enhancing security by limiting the IP addresses allowed to connect to the customer's origin servers.

Conclusion

The discovery of logic flaws in Cloudflare's security measures highlights the complexities of cybersecurity and the need for continuous vigilance and adaptation. While Cloudflare's infrastructure provides robust security in many aspects, attackers’ ability to exploit shared components for malicious purposes necessitates additional defensive strategies.

Vishal
· Developer

Vishal writes Trickyworld's tutorials and interview-preparation guides on programming, databases, cyber security and AI. Vishal has been shipping production software long enough to have firm opinions about Python, PHP, Node.js, and JavaScript, and to have been wrong about each of them at least once. The work has run the whole stack: Drupal and Laravel applications, React front ends, MySQL and MongoDB underneath, Redis and Memcached for the things that had to be fast, Apache Solr for the things that had to be findable. That last part turned out to matter more than anyone expected. Tune a Solr index for a season, then watch a language model confidently retrieve the wrong document, and you recognise an old problem wearing new clothes. Most of what is hard about AI systems is not the model. It is retrieval, caching, latency budgets, and deciding what the system does when the answer comes back wrong — which is work he has been doing since well before anyone called it AI engineering. He plays a lot of games, which is less a hobby disclosure than an admission of where a good share of his engineering instinct came from. Real-time systems with a frame budget. State that has to stay coherent while a player does something no designer anticipated. The permanent question of what happens when the frame cannot finish in time. Those habits carry over more directly than they have any right to. He has written several books on programming, all built on the same conviction: most technical writing is unclear because the author never decided what to leave out. More from Vishal → · Editorial policy

More on Computer Tricks.

$ subscribe --weekly

Get the next tutorial in your inbox.

Programming, security and AI — the practical bits, no spam. Unsubscribe any time.