Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Cloudflare Anti-DDoS bypassed using Cloudflare
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Cloudflare Anti-DDoS bypassed using Cloudflare

tentortentor Member, Patron Provider

Cloudflare's Firewall and DDoS prevention can be bypassed through a specific attack process that leverages logic flaws in cross-tenant security controls.

To make matters worse, the only requirement for the attack is for the hackers to create a free Cloudflare account, which is used as part of the attack.

However, it should be noted that the attackers must know a targeted web server's IP address to abuse these flaws.

Certitude's researcher Stefan Proksch discovered that the source of the issue is Cloudflare's strategy to use shared infrastructure that accepts connections from all tenants.

Researchers Florian Schweitzer and Stefan Proksch, who discovered the logic flaws, reported it to Cloudflare via HackerOne on March 16, 2023, but the issue was closed as "informative."

https://www.bleepingcomputer.com/news/security/cloudflare-ddos-protections-ironically-bypassed-using-cloudflare/

Thanked by 1khalequzzaman
«1

Comments

  • Cloudflare has categorized this report as “Informative” and closed it;

    They are right to categorize it this way, nothing new. I have used this trick to scrape most of the internet.

  • tentortentor Member, Patron Provider

    @loay said: nothing new. I have used this trick to scrape most of the internet.

    Then it looks like a backdoor they are unwilling to fix

  • @tentor said:

    @loay said: nothing new. I have used this trick to scrape most of the internet.

    Then it looks like a backdoor they are unwilling to fix

    They won't fix it if it is not exploited widespread. When this problem will become real (impact X amount of users) than it will be worth to allocate dev time to solve it.

    Everything runs on slime and buggers, the one and single thing matters only - profit. That's how business work.

  • So the victim's origin server would just emit its data as long as the request comes from CF servers with CF's client cert, without first checking the requested hostname?

    Thanked by 1yoursunny
  • tentortentor Member, Patron Provider
    edited October 2023

    @allnetstore said:
    So the victim's origin server would just emit its data as long as the request comes from CF servers with CF's client cert, without first checking the requested hostname?

    I often see misconfigured web servers replying to https://IPaddress/ with a first website hosted at the server.

  • @tentor said:

    @allnetstore said:
    So the victim's origin server would just emit its data as long as the request comes from CF servers with CF's client cert, without first checking the requested hostname?

    I often see misconfigured web servers replying to https://IPaddress/ with a first website hosted at the server.

    That's not CF's fault.

    Thanked by 2homelabber dystopia
  • @loay said:

    Cloudflare has categorized this report as “Informative” and closed it;

    They are right to categorize it this way, nothing new. I have used this trick to scrape most of the internet.

    How did you get the website IP though?

  • Chad.

    Thanked by 1sh97
  • stefemanstefeman Member
    edited October 2023

    @Thundas said:

    @loay said:

    Cloudflare has categorized this report as “Informative” and closed it;

    They are right to categorize it this way, nothing new. I have used this trick to scrape most of the internet.

    How did you get the website IP though?

    Multiple ways..

    Mailservers, non-proxied subdomains, shared cert (flexible mode), DNS history, javascript leak, shodan.io, censys.io, dnsdumpster, etc.

    Thanked by 1loay
  • @Thundas said: How did you get the website IP though?

    https://github.com/zidansec/CloudPeler

    Thanked by 1loay
  • "attackers must know a targeted web server's IP"

    and we call this a anti-ddos bypass? :D

    Thanked by 1dev077
  • @stefeman said:

    @Thundas said:

    @loay said:

    Cloudflare has categorized this report as “Informative” and closed it;

    They are right to categorize it this way, nothing new. I have used this trick to scrape most of the internet.

    How did you get the website IP though?

    Multiple ways..

    Mailservers, non-proxied subdomains, shared cert (flexible mode), DNS history, javascript leak, shodan.io, censys.io, dnsdumpster, etc.

    @LTniger said:

    @Thundas said: How did you get the website IP though?

    https://github.com/zidansec/CloudPeler

    However, if done correctly, a good owner will keep the site protected & change their IP if they leak by mistake and host their mail server separately to prevent IP leaks. Nevertheless, I understand that most sites out there don't do it correctly.

  • This attack has been known for at least 3 years.

  • stefemanstefeman Member
    edited October 2023

    @theraw said:
    "attackers must know a targeted web server's IP"

    and we call this a anti-ddos bypass? :D

    Its easier to overload the website via cloudflare using L7 methods than L4 on DDoS Protected host even if you know the webserver IP. Hence its a valid security issue.

  • yoursunnyyoursunny Member, IPv6 Advocate
    edited October 2023

    Mentally strong webmasters do not rely on Cloudflare to prevent DDoS.
    We reveal our IP (ping yoursunny.com to see IP) and do not fear.
    We (wo)man up and face the attackers, pistols water cannons at dawn.
    We only use Cloudflare for technical reasons (e.g. Workers).

    Thanked by 1tentor
  • @stefeman said:

    @theraw said:
    "attackers must know a targeted web server's IP"

    and we call this a anti-ddos bypass? :D

    Its easier to overload the website via cloudflare using L7 methods than L4 on DDoS Protected host even if you know the webserver IP. Hence its a valid security issue.

    whole point is you're not supposed to know ip they have reverse proxy for a reason. if someone is careless to leak ip then thats not cloudflares problem

    Thanked by 1Thundas
  • emghemgh Member
    edited October 2023

    @tentor said: However, it should be noted that the attackers must know a targeted web server's IP address to abuse these flaws.

    :)

  • @tentor said:

    @allnetstore said:
    So the victim's origin server would just emit its data as long as the request comes from CF servers with CF's client cert, without first checking the requested hostname?

    I often see misconfigured web servers replying to https://IPaddress/ with a first website hosted at the server.

    Most WP installation scripts as well as paid SaaS server tools don't actually create a default server block and so this is the result

  • It's documented in Cloudflare developer docs - Authenticated Origin Pull https://developers.cloudflare.com/ssl/origin-configuration/authenticated-origin-pull/ and https://developers.cloudflare.com/ssl/origin-configuration/authenticated-origin-pull/set-up/. You can use their certs or for more security use your own for Authenticated Origin Pull.

    Authenticated Origin Pulls helps ensure requests to your origin server come from the Cloudflare network, which provides an additional layer of security on top of Full or Full (strict) encryption modes.

    This authentication becomes particularly important with the Cloudflare Web Application Firewall (WAF). Together with the WAF, you can make sure that all traffic is evaluated before receiving a response from your origin server.

    Although Cloudflare provides you a certificate to easily configure zone-level authentication, if you want more strict security, you should upload your own certificate. Using a custom certificate is possible with both zone-level and per-hostname authenticated origin pulls and is required if you need your domain to be FIPS compliant

    But you'd want to use custom Authenticated Origin Pull certs using your own custom CA cert and signed and uploaded client SSL certs at zone and custom hostname levels (quoted text links) instead of Cloudflare's default provided Authenticated Origin Pull cert

    To apply different client certificates simultaneously at both the zone and hostname level, you can combine zone-level and per-hostname custom certificates.

    First set up zone-level pulls using a certificate. Then, upload multiple, specialized certificates for individual hostnames

    You can see Authenticated Origin Pull with custom hostname certs example I posted using Cloudflare API and creating my own custom CA certs and signed client certs using Cloudflare cfssl tool I posted at https://github.com/centminmod/cfssl-ca-ssl

    Jumping to client SSL cert and Cloudflare API uploading of custom certs https://github.com/centminmod/cfssl-ca-ssl#client-ssl-certificate and sub sections

    If you're OK trusting Cloudflare provided Authenticated Origin Pull certs instead of your own custom uploaded certs, you can obtain those Via Cloudflare domain zone dashboard or VIA Cloudflare API. I posted an example also at https://github.com/centminmod/cfssl-ca-ssl#create-cloudflare-origin-ca-certificate

    Ultimately if your real server IP is leaked, you'd still have problems. Cloudflare Tunnels might be better.

    Thanked by 3Thundas AXYZE martheen
  • So is it worth to keep websites proxied through Cloudflare or not?

  • tentortentor Member, Patron Provider

    @COLBYLICIOUS said:
    So is it worth to keep websites proxied through Cloudflare or not?

    Cloudflare is still a decent anti-ddos protection for free*

  • NeoonNeoon Community Contributor, Veteran

    @COLBYLICIOUS said:
    So is it worth to keep websites proxied through Cloudflare or not?

    No, CF sucks.
    Despite cloudflares size they are unable to negotiate or unwilling to get peering from certain ISP's.

    Which makes everyone that uses that ISP, everything that is behind CF is going to suck and be slow.

    Thanked by 1OhJohn
  • tentortentor Member, Patron Provider

    @Neoon said: Despite cloudflares size they are unable to negotiate or unwilling to get peering from certain ISP's.

    Can you name a few? Haven't heard of such issues.

    Which makes everyone that uses that ISP, everything that is behind CF is going to suck and be slow.

    Haven't had such issues

  • @tentor said:

    @Neoon said: Despite cloudflares size they are unable to negotiate or unwilling to get peering from certain ISP's.

    Can you name a few? Haven't heard of such issues.

    Which makes everyone that uses that ISP, everything that is behind CF is going to suck and be slow.

    Haven't had such issues

    It’s obviously a personal issue he’s having and therefore extremely important to everyone

    Tl;dr: Yes, CF is worth it, if worth it equals spending 0 and getting a great DNS with WAF and a ton of features

  • NeoonNeoon Community Contributor, Veteran
    edited October 2023

    @tentor said:

    @Neoon said: Despite cloudflares size they are unable to negotiate or unwilling to get peering from certain ISP's.

    Can you name a few? Haven't heard of such issues.

    You can google: cloudflare peering issues or cloudflare routing issues
    There have been a few.

    If there is such a issue, you report it, cloudflare is doing fuck all.

    Thanked by 1OhJohn
  • tentortentor Member, Patron Provider

    @Neoon said:

    @tentor said:

    @Neoon said: Despite cloudflares size they are unable to negotiate or unwilling to get peering from certain ISP's.

    Can you name a few? Haven't heard of such issues.

    You can google: cloudflare peering issues or cloudflare routing issues
    There have been a few.

    If there is such a issue, you report it, cloudflare is doing fuck all.

    So you mean something like this one? BGP anycast is really complicated and I don't think it is reasonable to doing harder than CF currently do.

  • NeoonNeoon Community Contributor, Veteran
    edited October 2023

    @emgh said:

    @tentor said:

    @Neoon said: Despite cloudflares size they are unable to negotiate or unwilling to get peering from certain ISP's.

    Can you name a few? Haven't heard of such issues.

    Which makes everyone that uses that ISP, everything that is behind CF is going to suck and be slow.

    Haven't had such issues

    It’s obviously a personal issue he’s having and therefore extremely important to everyone

    No, I use cloudflare for a few things, however as of right now, without VPN, not really usable.

  • @Neoon said:

    @emgh said:

    @tentor said:

    @Neoon said: Despite cloudflares size they are unable to negotiate or unwilling to get peering from certain ISP's.

    Can you name a few? Haven't heard of such issues.

    Which makes everyone that uses that ISP, everything that is behind CF is going to suck and be slow.

    Haven't had such issues

    It’s obviously a personal issue he’s having and therefore extremely important to everyone

    No, I use cloudflare for a few things, however as of right now, without VPN, not really usable.

    So I was right; you’re having connection issues

    How many % of people do you think have serious connection issues to CF protected websites as of now?

  • NeoonNeoon Community Contributor, Veteran

    @emgh said:

    @Neoon said:

    @emgh said:

    @tentor said:

    @Neoon said: Despite cloudflares size they are unable to negotiate or unwilling to get peering from certain ISP's.

    Can you name a few? Haven't heard of such issues.

    Which makes everyone that uses that ISP, everything that is behind CF is going to suck and be slow.

    Haven't had such issues

    It’s obviously a personal issue he’s having and therefore extremely important to everyone

    No, I use cloudflare for a few things, however as of right now, without VPN, not really usable.

    So I was right; you’re having connection issues

    How many % of people do you think have serious connection issues to CF protected websites as of now?

    Given the ISP's size, a few million.
    That is just one ISP.

    However, not everything might be congested at once.
    You might be lucky in a certain location or cloudflare might reroute you, into other countries, what they do right now.

    Thanked by 2emgh OhJohn
Sign In or Register to comment.