12 ms·
Ask HN: Does Cloudflare block HN comments if you have code blocks in a reply?
I was going to make a comment about using netcat to send files, and Cloudflare blocks the submission. I have never seen this happen to me on HN.
https://imgur.com/a/Pyhcssl https://imgur.com/a/Pyhcssl
Has anyone run into this before?
- ShadowBanThis01 3y ago[flagged]
- DonHopkins 3y ago[flagged]
- bhaney 3y agoAny code including netcat (for it's tendency to be used in reverse shells) or SQL (for it's tendency to be used in SQL injections) tends to be blocked across the entire cloudflare-net these days.
- zikduruqe 3y agoInteresting. That's the first time I have run across this. Makes sense.
- Jabrov 3y agoHow does that make sense?
- kevindamm 3y agoI think they meant "corresponds with behavior observed" not "sounds rational."
- crotchfire 3y agoThat does not make sense at all; it is batshit-crazy broken.
- r1ch 3y agoWelcome to the world of WAFs. Pattern matching scary strings is big business.
- cubefox 3y agoFor the uninitiated: https://www.cloudflare.com/application-services/products/waf/ https://www.cloudflare.com/application-services/products/waf...
- wslh 3y agoBelieve me you can find them present in popular sites you use everyday ;-) I caught one of them and reported it.
- rrr_oh_man 3y agoThanks. For me WAF is https://en.wikipedia.org/wiki/Wife_acceptance_factor https://en.wikipedia.org/wiki/Wife_acceptance_factor since the 2000's era of German audio enthusiast forums
- refulgentis 3y agowhat dark magic is this? do you put it in front of all POSTs or something?
- Uvix 3y agoNot just POSTs, but any HTTP request - headers & query strings get inspected too.
- josephcsible 3y agoIndeed. WAFs need to die; they're basically all just doing <https://thedailywtf.com/articles/Injection_Rejection https://thedailywtf.com/articles/Injection_Rejection>.
- bandergirl 3y ago
- tambourine_man 3y agoIn a site like HN, that’s ridiculous.
- goles 3y agoSee: https://news.ycombinator.com/item?id=38939668 https://news.ycombinator.com/item?id=38939668
- Dylan16807 3y agoI see it. It explains why cloudflare is involved at all. But I don't see how this is related to the comment you replied to, which is saying that the text filter is ridiculous.
- renonce 3y agoSites like HN could have disabled WAF. It's entirely configurable on HN's side. Let's just wait until dang wakes up and implement the required changes.
- cwillu 3y ago“Thanks for the heads-up! We'll probably be off Cloudflare fairly soon - I think that's more likely the better fix. But if we end up being forced to stay on it, we'll look into configuring those rules.” --reply to an email I sent
- creatonez 3y agoAFAIK most of these filters are disabled by default when setting up your website on Cloudflare, so most websites using the Cloudflare network likely have this turned off.
- stingraycharles 3y agoThis is correct, it’s part of their WAF offering where there is rule-based blocking of content.
- deleted 3y ago[deleted]
- dvh 3y agodrop table users where id=id
- kristianp 3y agoSelect id, email from users; Works. Any sql thats actually blocked?
- gus_massa 3y agoTo get a fast answer, it's beter to send an email to the mods hn@ycombinator.com
- LeoPanthera 3y agoIn this case, I appreciate that OP made a public post, in case others encounter the same problem.
- gus_massa 3y agodang is not reading every single post in real tieme, so posts may get unoticed and the guidelines ask to send an email instead. In this case, it looks like some comments are giving good advice about the tradeoff and how to fix it, so I have to agree with you.
- kaimac 3y agoCloudflare has access to everyone's cleartext? I was unaware of this. NSA must love that
- strombofulous 3y agoYes, although it requires configuration https://developers.cloudflare.com/ssl/get-started/ https://developers.cloudflare.com/ssl/get-started/
- arch-choot 3y agoI'm pretty sure the default is they can see all the cleartext, since their product is based on TLS interception, for example to evaluate page rules. This is also how they insert extra headers in both the request and response.
- creatonez 3y agoWhen you add a DNS rule, it's configured as proxied by default. Here is what it looks like in the UI: https://i.imgur.com/TO2Tfk3.png https://i.imgur.com/TO2Tfk3.png https://i.imgur.com/jVW5db4.png https://i.imgur.com/jVW5db4.png
- midasuni 3y agoIf cloudflare have thr certificate’s private key and are advertising the A record they have access to everything you send, from emails to credit card numbers.
- ytch 3y agoIt's a TLS termination proxy that decrypt and re-encrypt your TLS packet. Technically Cloudflare can read anything unless you add your own crypt layer on top of TLS.
- deleted 3y ago[deleted]
- judge2020 3y agoSame for Akamai, Cloudfront, Fastly, etc. Pretty much every business that wants to offload DDOS protection, caching,and some level of frontline security uses a proxying CDN. An alternative is to keep all of your CDN assets on a CDN bucket on its own hostname, with your main secret-containing business apps on your own servers, but it costs a lot to manage this level of separation and the payoff is only protection against the theoretical attack of "NSA can't attack our users/spy on them". If the NSA ever did do this on a large enough scale or to target a particularly notable person, it's very unlikely it would be kept a secret for long, and the end-business that used Cloudflare et al. wouldn't be implicated whatsoever since every business uses one of the big CDN providers.
- crotchfire 3y ago[flagged]
- throwaway14356 3y agofinally a way out
- ShadowBanThis01 3y ago[flagged]
- Dylan16807 3y agoI hope you figure out that annoying people doesn't make you right. We can only dream of a world where it's difficult to be annoying, and requires putting in some effort to be right first. > stealing from users What a weird definition of stealing. And it's as much an issue with your browser if hitting back doesn't return the text. There are extensions to improve that behavior. But what I find really interesting is that you seem to think being mad about an issue is a reason to break a completely unrelated rule?
- ShadowBanThis01 3y ago[flagged]
- Dylan16807 3y agoI didn't say to avoid jokes. Joking and being antagonistic are different things! And I still don't think stealing is the right word for that kind of technical issue, especially when it's still half your browser's fault. > which you didn’t manage to specify Why would I need to specify something you brought up? "OH NOES comparing HN to Reddit violates "policy."" > and being “mad…” Is "aggressive griping about" better? People usually simplify that to "mad about". > One of them has gone through and downvoted all my posts now Almost every post you made inside that 24 hour downvote window deserves it, so depending on how literal that "all" is, they're probably helping and not a bad actor.
- furyofantares 3y agoHuh. Just tried submitting the same comment with the same result. Minimal test, if I try to edit this post removing the asterisk, I get the "banned" page nc* 192.168.2.100
- deleted 3y ago[deleted]
- neilv 3y agoProbably not related, but I've been getting lots of throttling-like huge page load delays on HN the last couple days, only when logged in. Any idea whether that's just an overloaded application server, or something Cloudflare is doing?
- deleted 3y ago[deleted]
- pixelesque 3y agoThat's often the case with HN I think from past experience when there are large threads on HN, and dang has in the past said that's due to the application server.
- keepamovin 3y agoSingle core application server no less
- diggan 3y agoCrafted by first creating a language, then a framework and then the "news" application. The holy grail of NIH :)
- keepamovin 3y agoDo things that don't scale! haha
- djha-skin 3y agoRelated: https://news.ycombinator.com/item?id=38966035 https://news.ycombinator.com/item?id=38966035
- deleted 3y ago[deleted]
- hyperhello 3y agoWhat if you Base64 encode this? Pretty trivial to add to the form logic.
- dylan604 3y agoyeah, i'd expect dang to just jump right on that. just because you feel it is trivial does not mean that it should be done.
- kevincox 3y agoThat's how one of my past employers resolved this. Basically base64 encoded every field in the JSON as someone reported a bug where the WAF blocked it. Not only was this done inconsistently and was super tedious but completely defeated the purpose of the WAF. (Except of course to check the checkbox that we had a WAF.)
- usr1106 3y agoSo HN uses Cloudflare? That surprises me because typically I notice sites using Cloudflare because my mobile running GNU Linux cannot pass their dreaded Turnstyle. Luckily that does not happen for HN.
- judge2020 3y agoThey used to run it but stopped (I want to say) around 2016 or 2017. Another poster here linked[0] to how dang confirmed it is to protect against a DDOS attack. 0: https://news.ycombinator.com/item?id=38939668 https://news.ycombinator.com/item?id=38939668
- usr1106 3y agoThe cert is Cloudflare today.
- judge2020 3y agoI meant to imply that Dang only re-added CF recently due to the attacks. They haven't used CF in many years to my knowledge.
- redcobra762 3y agoCert was issued over 9 months ago.
- ffpip 3y agoThe certificate is for *.ycombinator.com. The main YCombinator site might have been using Cloudflare seen years, and now HN might have been added to the same account to protect from a DOS attack. So might be the same cert?
- nuker 3y agoIt also means Cloudflare sees HN traffic in plaintext, including login/passwords
- zaik 3y ago[flagged]
- nneonneo 3y agoI ran into this when trying to post a comment with ../ ../ ../ etc/ passwd (remove the spaces)
- M4v3R 3y agoYep, confirmed on my side too that it does indeed get blocked.
- deleted 3y ago[deleted]
- jrockway 3y agoThis line works: nc -l -p 1234 -q 1 > testfile.txt < /dev/null The other one doesn't. alias foobar=nc cat testfile.txt | foobar 192.168.2.100 1234 I was hoping that it was a "useless use of cat" filter, but nope. It just doesn't like the bytes nc next to an IPv4 address. This is also fine, but blocked if you change the slash to a dot: nc 192/168.2.100 1234 This works too: nc \ 192.168.2.100 1234 OK, that's all for now. Can you believe people pay money for "web application firewalls"?
- david_draco 3y agoGood that there are open source alternatives: socat - TCP4:192.168.2.100:1234 socat TCP4-LISTEN:1234,fork,reuseaddr - https://www.redhat.com/sysadmin/getting-started-socat https://www.redhat.com/sysadmin/getting-started-socat
- deleted 3y ago[deleted]
- gnfargbl 3y ago> Can you believe people pay money for "web application firewalls"? I think it's like a lot of things in computer security, in that system owners just don't want to be the slowest gazelle in the herd. If an attacker is mass-exploiting some new remote vulnerability, then maybe the WAF means that you're one of the lucky ones who doesn't get hit. And yes, that's a very big maybe there. WAFs don't do much to prevent targeted attacks except to require the attacker to craft a WAF bypass. As you've shown.
- H8crilA 3y agoThey also have an organizational purpose. Once an attack happens you can shift the blame onto the WAF. And the WAF provider can, if needed, claim this to be a novel attack against which they have prepared for the future. Even issue an emergency patch that detects and blocks the novel backslash-newline line break technique. (I'm exaggerating here, but only a bit)
- Jamie9912 3y agoI don't remember HN being on Cloudflare. Have they recently added it?
- ignoramous 3y agoYes, I see news.yc proxied through Cloudflare. Also: https://www.nslookup.io/domains/news.ycombinator.com/dns-records/ https://www.nslookup.io/domains/news.ycombinator.com/dns-rec... / https://archive.is/R9BE8 https://archive.is/R9BE8
- sixhobbits 3y agoTest `nc 192.168.2.100`
- rstuart4133 3y agoThere is no need to do that here. Putting the text into the 'About:' box of your HN profile works just as well while not cluttering up the thread.
- buro9 3y agoProbably, the WAF, specifically Cloudflare specials, matches a number of things. And as a lot of it is just regex matching the context of where the match occurs isn't precise. Additionally cloudflare doesn't know what is safe for a given site, so it has to be a little conservative. The sites that can handle malicious input, or are tech sites that expect things that are SQL or commands that may contain directory traversal, these are in the minority. Essentially these are false positives, which are typically viewed as more acceptable than false negatives as those would allow attacks through. These things are configurable by the site owners, but the issue here is that the site owners are not shown the code of the rules, so have to guess from the names and descriptions whether something is safe to disable, meaning everyone just leaves everything enabled. Usually reporting this to a site owner with the cloudflare trace id is sufficient to enable the site owner to disable a rule that is causing false positives, as the site owner can use the cloudflare dashboard to search the trace id. I do not work there any longer (left 3 years ago), but did write significant parts of the firewall and also manage the firewall, WAF, and DDoS protection teams.
- kxrm 3y agoApparently you can get around it using other white-space characters, here I am using a horizontal tab between nc and the IP. nc 192.168.1.100 8000
- cwillu 3y agoFor reference, the id in the block message is “Cloudflare Ray ID: 845543eb88d461ee”
- ifeja 3y agonc domain.com
- 6865 3y agoaoeaoe
- kevincox 3y agoI'm sure that there is a huge chart on their Cloudflare dashboard about how many attacks were blocked! This is one thing that gets me, all of the reporting Cloudflare provides treats every block as a huge success. Nothing to help identify actually attacks vs false positives. Let also false positives that would have actually has a negative effect on the application behind the WAF.
- deno 3y agoCloudflare is just dumb, they block XHR requests randomly in the same session they’ve already challenged breaking websites in not quite obvious ways and have been doing that for as long as I can remember. Trying to do anything on for example Montana's SOS BIZ portal takes a lot of patience. They’re like TSA of the Internet but at least with TSA you can pay for a fast pass.
- ForestCritter 3y agocloudflare blocked me from signing in to my petflow account to buy cat food. It was in an endless verification loop. Awhile back it did the same with my paid crunchyroll subscription. I don't code, I have a very ordinary setup with a well known browser. Apparently cloudflare now owns our access to the internet and can block whom it pleases, when it pleases, no recourse. The internet is soon to be available only to those who fit cloudflare's criteria, whatever that may be, as long as companies keep buying in to the third party control.
- deleted 3y ago[deleted]
- 1vuio0pswjnm7 3y ago"If you're seeing this message, that means JavaScript has been disabled on your browser, please enable JS to make Imgur work." Well, it's a client that has no Javascript engine. There is no need to use Javascript. This works for me just fine: https://i.imgur.com/YtepoDbh.jpg https://i.imgur.com/YtepoDbh.jpg
- EasyMark 3y agoever since imgur started hating VPN users, I hate it back.
- flexagoon 3y agoYou can use Rimgo, an alternative frontend for Imgur Just replace "i.imgur.com" with one of the Rimgo instances: https://rimgo.codeberg.page/ https://rimgo.codeberg.page/ (The most popular ones are usually rate-limited though)
- deleted 3y ago[deleted]
- Am4TIfIsER0ppos 3y agoHow can Cloudflare be reading anything you send? Your connection is encrypted to HN's server, is it not? They don't MITM everyone's connection.
- deleted 3y ago[deleted]