CloudFlair: Bypassing CloudFlare using Internet-wide scan data
blog.christophetd.fr
blog.christophetd.fr
Currently on the free tier for my personal projects and would love to play with this on my personal k8s cluster.
We have an open source tool called wormhole that works similarly. You can run it yourself, or use it on fly.io (including the free tier): https://github.com/superfly/wormhole
> A few minutes before publishing this article, someone brought to my attention that a similar piece had been written a few months ago
This can be demotivating. I've been trying to remember that I should write for myself, to collect my thoughts and not to satisfy the interwebs.
If one is concerned about DDoS, one should work with their ISPs on the plan of action for various scenarios. Finding out their procedures when ones' hair is on fire is not fun.
Just change your IP address, and tell CloudFlare the new one.
Sure the DDOSers could find your new IP, but it's not like changing your public DNS, it would be difficult for them to find it.
I don't think your SSL certs would show the new IP on the website in the blogpost very quickly if you changed IP.
(disclaimer: I work on DNSTrails) Another way to find the origin is to use trails left by DNS using a tool like https://www.DNSTrails.com.
You can see a sample with a site that moved to Cloudflare like this: https://dnstrails.com/domain/haveibeenpwned.com
https://www.cloudflare.com/ips/
IPv4 space is far too small not to use this. Often times if an attacker has determined your provider in the past, they may be able to leverage that information and scan only nearby ranges.
Other common anti-DDoS proxy bypass tactics:
- direct.* subdomain used to be used by default on CloudFlare for a direct route to the server
- Check headers in outgoing emails for an origin IP (this one gets way too many sites)
- CloudFlare only recently got websocket support - check if their websocket servers are secured or not
- Check for an MX record
- Use DNS bruteforcing tools to attempt to find other services
Are there any workarounds for this, other than running mail servers on a separate network and IP range?
I only seem to find out when people complain that the site is down from certain parts of the world
We don't change the IPs often and we always update the list well before they are ever used (typically months before). The last update was two years ago. I'm sorry if you had a problem.
https://www.changedetection.com/log/cloudflare/ips-v4_log.ht...
EDIT: I was rude in the previous version of this comment. Sorry for being a jerk. And thanks to dang for letting me edit.
Another way to get IPs is reading e-mail headers (register account on target website to get e-mail etc), so many sites behind CloudFlare expose their webservers IPs there.
Im not too encumbered by JS encapsulation at the moment, but a warrant canary might put my mind at ease assuming the internet still does those https://en.wikipedia.org/wiki/Warrant_canary
In the transparency report there's a warrant canary:
Some things we have never done
Cloudflare has never turned over our SSL keys or our customers' SSL keys to anyone.
Cloudflare has never installed any law enforcement software or equipment anywhere on our network.
Cloudflare has never terminated a customer or taken down content due to political pressure.
Cloudflare has never provided any law enforcement organization a feed of our customers' content transiting our network.
[0] https://www.cloudflare.com/transparency/[0] https://web.archive.org/web/20170114100401/https://www.cloud...
[1] https://web.archive.org/web/20170708164222/https://www.cloud...
So far, Cloudflare's most notorious content on the other side of the line has been Daily Stormer back in August of 2017.
>The tipping point for us making this decision was that the team behind Daily Stormer made the claim that we were secretly supporters of their ideology