News for hackers. Stuff that matters.
Re:The Great Cannon has been deployed again by upofadown on Friday December 06, 2019 @12:01PM (#21723676)
Browsers really have to be a lot more skeptical about the code they run. Running code should not be able to randomly attack any IP address on the internet. Code from non-TLS pages should not be able to run at all. Perhaps that should also apply to code loaded from 3rd party sites.

Connecting to a web page should not be consent to allow the operators of that web page to make my computer/phone do whatever they want on the net. It certainly should not be consent to delegate that power to others, either via a embedded link or a MITM attack.

Re:The Great Cannon has been deployed again by TheRealPomax on Friday December 06, 2019 @12:55PM (#21724293)
This sounds like a knee-jerk reaction that doesn't take into consideration the ramifactions of the suggested policy. It won't stop DDoS attacks, because those exist _because the internet exists_ and unless you dismantle the very concept of interconnected "everyone can reach everyone" networking, all you're doing is locking down access to more and more people until only technical experts or the people with enough money to hire those experts get to use it.

Advocate the other direction: more freedom, including the freedom to say "thank you, browser, for being locked down by default, but I trust this website and I am okay with everything it wants to do".

Instead of locking the web down, let's give users the freedom to put on or remove as many locks as they want to live with. And letting make mistakes with that, too: you don't make things better by taking away important life lessons, either.

Re:The Great Cannon has been deployed again by jstummbillig on Friday December 06, 2019 @01:08PM (#21724421)
This, on the other end of the spectrum, seems overly and naively liberal, when not being paired with a workable solution to the massive body of education required to provide adequate technical sophistication to (what has to be most of) 8 billion people.
Re:The Great Cannon has been deployed again by chachachoney on Sunday December 08, 2019 @03:37PM (#21738121)
>> a workable solution to the massive body of education required to provide adequate technical sophistication

The problem doesn't have to be one of education if it is tackled as a legitimate UI/UX problem and served by a WC3 that supports the needs of end users over corporate partners.

Re:The Great Cannon has been deployed again by thyrsus on Friday December 06, 2019 @10:51PM (#21728345)
I have NoScript installed on FireFox, and when I visit sites, I individually grant temporary permission to anywhere from one to more than twenty javascript sources. I suspect that I am among the 1% of those willing to make that effort.

I haven't noticed NoScript distinguish between http and https sources for javascript, but perhaps I don't visit sites that pull in javascript via http.

Re:The Great Cannon has been deployed again by spurgu on Monday December 09, 2019 @05:44PM (#21747466)
I did this last summer and managed maybe 1-1.5 months until it drove me crazy having to fiddle to get (way too many) sites to work with a minimal amount of accepted JS. Which is a shame, because it's quite a fool proof method of rendering most malicious actors helpless.
Re:The Great Cannon has been deployed again by lonelappde on Friday December 06, 2019 @01:23PM (#21724570)
That requires allowing web servers to blacklist all browsers known to allow http and therefore ddos....which is equivalent to banning http code.
Re:The Great Cannon has been deployed again by jrockway on Saturday December 07, 2019 @12:28AM (#21728676)
TLS should be required, but it seems likely to me that the Chinese government can issue TLS certificates for MITM purposes that their browsers will trust.

As for the DoS aspect, maybe it's time to do a CORS preflight on ALL cross-origin requests, including images. (Webfonts, for whatever reason, already require a CORS preflight. Probably because Adobe is on the W3C and they sell a service where certain origins can legally use certain fonts from their servers. I hate it when user security features get turned into subsidies for large corporations, but here we are.)

Of course, if you have broken TLS I guess you can just forge the CORS response.

Edit to add: I have read more comments and better understand the attack now. China is modifying the Javascript on Chinese websites that are being viewed from outside China. Making TLS mandatory would be a big help here. China could say "all Chinese companies must buy certificates from the Great Chinese CA" and they could still do the MITM. But with evidence of the CA issuing fake certificates to DoS websites, browsers would probably stop trusting that CA entirely. I imagine China would like to avoid that, so I feel like this would have stopped the attack.

Re:The Great Cannon has been deployed again by netsharc on Saturday December 07, 2019 @05:35AM (#21729528)
> But with evidence of the CA issuing fake certificates to DoS websites, browsers would probably stop trusting that CA entirely.

"Hey Tim Apple/Microsoft/Google, if you want to do business in China you have to put our CA on your devices/software...".

At least Firefox would still be free from that. And Apple already has China-specific iOS, so they'd just activate the bad CA on Chinese devices...

Re:The Great Cannon has been deployed again by jrockway on Saturday December 07, 2019 @05:21PM (#21732956)
My guess is that Firefox and Chrome would push back. Apple probably has too much to lose, though.
Re:The Great Cannon has been deployed again by paulddraper on Friday December 06, 2019 @05:58PM (#21726867)
> Connecting to a web page should not be consent to allow the operators of that web page to make my computer/phone do whatever they want on the net.

But that is literally what web users want.

Everything you named is a fine opinion, but runs contrary to the wishes of the vast majority of millions and millions and millions and millions of web users.

EDIT: That said, browsers have features for users such as yourself to disable JavaScript, and there are third party extensions for finer-grained control. Again, adding these limitations is unpopular among web users.

Re:The Great Cannon has been deployed again by threeseed on Friday December 06, 2019 @08:27PM (#21727816)
> But that is literally what web users want.

No it absolutely does not.

Just because a user doesn't understand what Javascript is or how to diagnose why their computer is slow (is it an app, website, update, virus etc) does not imply consent.

Pretty sure that most people just want to be able to visit a website without it causing problems to their computer or to others.

Re:The Great Cannon has been deployed again by taneq on Friday December 06, 2019 @09:46PM (#21728126)
But a “website” isn’t an HTML page any more. It’s a network-deployed application. Most people want to run these applications.
Re:The Great Cannon has been deployed again by Zanneth on Friday December 06, 2019 @11:11PM (#21728416)
To reiterate threeseed’s point: the user wants the website to work well and work efficiently. They don’t care if it’s HTML or an interactive app. In a lot of cases, the web works better when pages are served as plain static HTML.
Re:The Great Cannon has been deployed again by prirun on Saturday December 07, 2019 @11:13AM (#21730979)
Websites also work better, IMO, when every page doesn't use remote resources on 10 different domain names hosted by 3rd-party vendors. This is one of the reasons I use Vultr instead of Digital Ocean: instead of locally hosting their own JS pages, DO uses 3rd-party services. (Maybe they don't have a choice if the 3rd party requires it.) Whereas with Vultr, I only had to enable one or 2 domain names and the whole site worked. It's a much better experience for the user IMO.
Re:The Great Cannon has been deployed again by andykx on Saturday December 07, 2019 @12:12AM (#21728611)
Sure, a simple marketing site for a local restaurant can work with only HTML and CSS, but practically all of the top 20 most popular sites would cease to function without JS.
Re:The Great Cannon has been deployed again by geofft on Friday December 06, 2019 @07:36PM (#21727578)
I think you'll need some evidence for that. Silence is not consent, and it's certainly not enthusiastic consent.

And even if you do want to take silence for consent, the fact that the vast majority of millions of millions of web users do not install an extension to route around Google AMP indicates that they do not want the operators of the web page to do whatever they want, they want to run a restricted subset of what the web designer might imagine. AMP is extremely popular among web users; approximately 100% of Google users use it. (The more defensible argument, of course, is that users don't really want AMP, at which point the question of what users really do want gets back on the table.)

Also, users did vote with their feet against downloading EXEs from the internet - which can actually do whatever the developer wants - and using JS on the web platform, which can make unrestricted GET requests (even if it can't see the responses), sure, but can't do anything near "whatever." It stands to reason that users would gladly accept even more restrictions on the execution platform.

Re:The Great Cannon has been deployed again by paulddraper on Friday December 06, 2019 @08:01PM (#21727709)
> they want to run a restricted subset of what the web designer might imagine

For the kinds of places that AMP is used, I would suspect so.

> Also, users did vote with their feet against downloading EXEs from the internet

So....this CAN happen???

> users would gladly accept even more restrictions on the execution platform.

The recent popularity of clipboard permissions, geolocation permissions, notification permissions, etc. would suggest otherwise.

What makes you so sure that web users care so much about the uptime of lihkg.com ?

Re:The Great Cannon has been deployed again by geofft on Friday December 06, 2019 @08:09PM (#21727747)
> The recent popularity of clipboard permissions, geolocation permissions, notification permissions, etc. would suggest otherwise.

What popularity? Do you have data that users tend to click "yes" on such permission prompts?

> What makes you so sure that web users care so much about the uptime of lihkg.com ?

I'm not sure I understand what you're asking or what you're responding to.

Re:The Great Cannon has been deployed again by paulddraper on Saturday December 07, 2019 @10:12AM (#21730646)
> I'm not sure I understand what you're asking or what you're responding to.

lihkg.com being down is the negative consequence of this code running, right?

Re:The Great Cannon has been deployed again by geofft on Saturday December 07, 2019 @02:42PM (#21732148)
That's one of the negative consequences. If you phrase it as "In order for you to use the web as you're used to it, lihkg.com will go down, do you care" then sure, users may say "no." But if you phrase it as "When you visit this website, a portion of your bandwidth and battery life will be used to suppress dissident communications in Hong Kong, would you like to use your bandwidth and battery life on it," do you expect users to say yes?
Re:The Great Cannon has been deployed again by anoncake on Friday December 06, 2019 @07:37PM (#21727589)
No, that is not what web users want. No one asked them and they probably don't even have an opinion on that. It's what web developers and browser makers want.
Re:The Great Cannon has been deployed again by geofft on Friday December 06, 2019 @07:45PM (#21727633)
It's certainly not what browser makers want, since the browser makers dropped native extensions and Flash and Java, and it's not what many web developers want, given the popularity of Content-Security-Policy.
Re:The Great Cannon has been deployed again by nitwit005 on Friday December 06, 2019 @01:45PM (#21724768)
You don't need to inject scripts to make this sort of thing work. Just add img or style tags with the source set to the target you want to attack. The browser will happily go try to fetch the files from the server, adding to the request load.

You can see unintentional examples of this happening. Small sites get taken down occasionally when larger sites directly link to images or videos hosted there.

Re:The Great Cannon has been deployed again by ehsankia on Friday December 06, 2019 @01:33PM (#21724666)
Each individual user isn't doing that much, just loading an asset from another site, which is fairly inconspicuous. It's when billions of users start doing it that it becomes a problem (the first D in DDoS), but any individual person isn't doing anything out of the ordinary.
Re:The Great Cannon has been deployed again by greggman2 on Friday December 06, 2019 @12:24PM (#21723929)
Unfortunately there's a giant category of devices that can't serve TLS. Like pretty much every consumer router in existence that you connect to through a webpage. Someone needs to come up with a solution for that. Ideally one that works with free and open source projects and not just well funded companies.
Re:The Great Cannon has been deployed again by greggman2 on Monday December 09, 2019 @01:10AM (#21740739)
Found out there's a w3 working group trying to come up with solutions

https://www.w3.org/community/httpslocal/

Re:The Great Cannon has been deployed again by jMyles on Friday December 06, 2019 @12:54PM (#21724278)
> Unfortunately there's a giant category of devices that can't serve TLS. Like pretty much every consumer router in existence that you connect to through a webpage.

Come on now. Of course those devices can use TLS - they just can't do so in the capricious constraints imposed by the system of "certificate authorities". It's not a fundamental limitation of the technology.

If we were using something like noise protocol, nobody would be saying that tiny devices are incapable of proper security at the transport layer. There's just no clear way to assess the validity of a self-signed cert in the browser given today's political constraints.

Re:The Great Cannon has been deployed again by geofft on Friday December 06, 2019 @07:43PM (#21727622)
Why do they have to use self-signed certs? Ship the device with a valid cert for $last_three_octets_of_mac_address.$vendor.com to the device, and print it clearly on the setup instructions. Typing in something like d63d15.ui.com isn't onerous.

The CA/Browser Forum allows certs up to 27 months - do routers sit on store shelves for 27 months before being configured? Do they even sit for 12 months? (Once they're online, they can renew their cert, possibly with the help of the vendor who can track the private key or something.)

Re:The Great Cannon has been deployed again by jeroenhd on Saturday December 07, 2019 @08:42AM (#21730226)
That would require significant effort for the vendor to set up and most internet devices such as routers are an absolutely minimal cost device. Literally every cent counts in production and vendors rather remove some features than shell out the 2 cents extra to add another 64mb of storage.

Furthermore, this would require either not being able to change the IP for your device (bad) or sending information about the layout of your network to the vendor (I wouldn't trust them with that info).

Very few people care about this and the effort of maintaining a custom DNS and a CA certificate system (which, by the way, would need to be subjected to rigorous security testing) just isn't worth it.

Lastly, what's the point? Adding a little padlock isn't worth it if anyone can get a certificate for the router ip anyway. How do you ensure that the router connecting to your IP really has the mac address it claims? It only takes one person to get root on their router to invalidate the entire security system and given how somehow router vendors are still shipping command injection vulnerabilities, I wouldn't assume that they can prevent that as much as they'd like.

What I want is the option to give a router my own security certificate instead of the self signed one. Let me use my own CA or let me mess around with letsencrypt, split-horizon DNS and Selenium scripts if that's what I need. Consumers don't care about TLS on their router and this would be the cheapest option to solve it for prosumers.

Re:The Great Cannon has been deployed again by therealjumbo on Saturday December 07, 2019 @05:54PM (#21733148)
We sell industrial equipment which will live its entire life (20+ years) off the internet.

Browsers and the people who sit on these committees are understandably more focused on their own use cases, but there really does need to be a viable certificate solution for small embedded devices, preferably works with mDNS too. I'm not going to hold my breath, but until this happens any/all IOT devices will remain largely insecure. Big co's (like my employer) can develop and deploy a custom solution, most companies cannot.

Re:The Great Cannon has been deployed again by geofft on Saturday December 07, 2019 @06:52PM (#21733449)
That's a little bit of a different problem, since the client end of the connection isn't the general public. (At least for industrial equipment.) The router problem is that you need a normal, unconfigured web browser to be able to access the router's config page.

The immediate solution that occurs to me is installing a private CA, possibly one with name constraints for the vendor, because private CAs aren't held to the same rules about validity. I'm curious why this doesn't work - is it just that the tooling needed to make it happen isn't polished enough for small vendors?

I'm guessing that internet of things devices are, by their name, on the internet and can talk to a CA. Yes, this will require some way to give them a real domain name, but you could either give them names on the vendor's site or encourage people to get a domain name for themselves.

Re:The Great Cannon has been deployed again by londons_explore on Saturday December 07, 2019 @02:14AM (#21728951)
No need for even that. TLS should have an extension which says "I don't know how to verify my identity, but send this data to vendor.com and then they'll verify my identity".

Vendor.com can then look at the opaque blob forwarded from their hardware and decide if they want to deligate trust to it.

Re:The Great Cannon has been deployed again by geofft on Saturday December 07, 2019 @10:10AM (#21730637)
That doesn't quite work, because the premise of accessing a router setup page is that your internet connection doesn't work yet. So your router has to be able to prove its identity to the client entirely offline.

(You cannot special-case "This server is untraceable", else a repressive government could blackhole that server and trigger the relaxed validation rules.)

Re:The Great Cannon has been deployed again by smabie on Friday December 06, 2019 @01:03PM (#21724381)
I'm not familiar with this problem, could someone explain? Thanks!
Re:The Great Cannon has been deployed again by lonelappde on Friday December 06, 2019 @01:24PM (#21724578)
There is no problem. Routers can use a self signed cert.
Re:The Great Cannon has been deployed again by zeven7 on Friday December 06, 2019 @02:46PM (#21725303)
Could you expand on that a little? What do you mean? Won't my browser complain if the cert if self signed?
Re:The Great Cannon has been deployed again by etatoby on Friday December 06, 2019 @03:04PM (#21725444)
Yes, it will complain and for good reason: it has no way of knowing whether the kid next door is spoofing your router's IP or Mac address and presenting their own self-signed certificate.

I wouldn't go as far as calling it «capricious constraints imposed by the system of "certificate authorities"» but at the same time, I agree that it's not a fundamental limitation of the technology.

Better protocols could be developed to allow a browser to trust a server without (all) the limitations of the current system.

Re:The Great Cannon has been deployed again by therealjumbo on Saturday December 07, 2019 @06:04PM (#21733213)
My harebrained idea for this:

- let companies register a wild card domain in the .local (or a newlocal) namespace: .acme.local

- designate the acme company with the ability to issue certs that never expire for any name in ".acme.local" but the browser will refuse to use certs signed with that key for anything outside "*.acme.local"

pros:

- the acme company can now make equipment that the users browser can connect to over an encrypted channel with zero config on the user's part

- the equipment can live off the internet indefinitely

- if the acme company is breached, and their signing key is stolen, the attackers can only use that key to impersonate acme company, it doesn't allow them to impersonate any other domains

cons:

- the browser manufacturers don't care about this use case so its never gonna happen

- the cert on the device never expires... and can never be replaced automatically somehow. I think the only workaround is acme could enable users to load their own certs if they are so inclined, but that shouldn't be required.

Re:The Great Cannon has been deployed again by thw0rted on Wednesday December 11, 2019 @06:41AM (#21761569)
You should only have to store the self-signed cert exception once, at least on a given device. Now, if you're being targeted by a state-sponsored actor they might somehow be able to get you onto a honeypot network within the 2-minute window between plugging in your router and making your first connection to its web interface, but for everybody else a self-signed cert that you accept once during initial setup should be plenty good enough.
Re:The Great Cannon has been deployed again by saagarjha on Friday December 06, 2019 @12:11PM (#21723774)
> Running code should not be able to randomly attack any IP address on the internet.

How would you prevent this? What constitutes an "attack", and how would you make sure you're not interfering with non-malicious use cases?

Re:The Great Cannon has been deployed again by Despegar on Friday December 06, 2019 @12:52PM (#21724259)
JavaScript was a mistake
Re:The Great Cannon has been deployed again by hombre_fatal on Friday December 06, 2019 @01:42PM (#21724750)
This is just another kneejerk. They could have just injected an <img> tag with randomized src="" directly.
Re:The Great Cannon has been deployed again by xorcist on Saturday December 07, 2019 @07:33AM (#21729940)
That would not consitute such a problem. The script is what provides the amplification factor here.
Re:The Great Cannon has been deployed again by lonelappde on Friday December 06, 2019 @01:25PM (#21724588)
This is a network protocol flaw not a language flaw
Re:The Great Cannon has been deployed again by ngcc_hk on Friday December 06, 2019 @09:47PM (#21728133)
Can there be a list that come up so user who want control can see what pages the link they have selected to link implicitly. Just on the side perhaps. They can explicitly block or AI learn etc. It may have to a feature as deny or enable all is too rough to be useful.

For china need some way to handle that whole commerical-military-party all one entity.

Re:The Great Cannon has been deployed again by zzo38computer on Friday December 06, 2019 @07:41PM (#21727613)
> Browsers really have to be a lot more skeptical about the code they run.

I absolutely believe you, and wrote a document how to make improvement.

> Code from non-TLS pages should not be able to run at all.

Whether or not it is TLS is irrelevant. Either way the user may wish to put their own code, and either way the server operator can change things whether or not is what the user intends. (TLS does prevent spies from adding code, but not all unwanted code is from spies.)

> Instead of locking the web down, let's give users the freedom to put on or remove as many locks as they want to live with.

I agree. Furthermore, allow the user to override any behaviour they want to do, too.

Allow the user to examine and copy the script (possibly with modifications); if the script changes (whether due to MITM or due to the author altering it or due to some other company purchasing them), it no longer runs unless the user approves the new one, too. Extensions that only allow free software to run don't help either; just because it is free software does not necessarily mean it is a program the user wants their computer to execute. Or, maybe the user wants to execute a modified version instead!

Re:The Great Cannon has been deployed again by kerng on Friday December 06, 2019 @06:02PM (#21726905)
It's called hyperlink and doesnt require any code or javascript to run. Maybe excessive requests to same IP could be throttled by a user agent.

An outbound browser firewall could helps also.

Re:The Great Cannon has been deployed again by thaumasiotes on Friday December 06, 2019 @06:10PM (#21726962)
> It's called hyperlink and doesnt require any code or javascript to run.

Hyperlinks generally don't open themselves. There is an obvious exception -- img tags[1] -- and I think it's worth considering whether they should be allowed to have the behavior they do. As far as I see, img tags load themselves so that, if you're editing HTML by hand, you don't have to deal with binary image data in the middle of what was supposed to be a clean text file. That may not be the right tradeoff.

[1] The img model got extended to other external resource loads, like script and css. But both of those frequently do appear as part of the same HTML that uses them. Image data can, but usually doesn't.

Also, external script loads are such an obvious problem that we got the Content-Security-Policy just to deal with it.

Re:The Great Cannon has been deployed again by sonofhans on Friday December 06, 2019 @06:50PM (#21727289)
HTML was initially intended as, and still largely is, a markup language. An HTML file provides a container and presentation for other types of content. If you saved all those types of content into the same file you'd have many of the problems HTML was specifically designed to avoid, like bloat, vendor lock-in, format incompatibility, and editing difficulty.
Re:The Great Cannon has been deployed again by kerng on Friday December 06, 2019 @07:19PM (#21727483)
Iframes are popular for these things - also, dont require javascript to run.
Re:The Great Cannon has been deployed again by Ayesh on Saturday December 07, 2019 @02:17AM (#21728959)
Sites embedding said JS "analytics" files could have implemented HSTS and CSP with SRI, and this attack wouldn't exist.
Re:The Great Cannon has been deployed again by kortilla on Friday December 06, 2019 @12:19PM (#21723867)
You do know you’re suggesting that sites not be able to load assets from other sites right?
Re:The Great Cannon has been deployed again by sli on Friday December 06, 2019 @01:39PM (#21724719)
They are specifically suggesting that HTTP-only sites not be able to load from third party sites, which is quite a bit different than your interpretation of generally preventing any site from loading any external content. HTTPS ought to be the default and browsers can, and should, move towards that.

But to answer your question more directly, yes they clearly know what they are suggesting.

Re:The Great Cannon has been deployed again by thaumasiotes on Friday December 06, 2019 @06:56PM (#21727326)
I note this language in the writeup:

> These attacks would not be successful if the following resources were served over HTTPS instead of HTTP:

> http://push.zhanzhang.baidu.com/push.js; or

> http://js.passport.qihucdn.com/11.0.1.js

This seems overly generous. I personally would not assume that the government of China couldn't persuade Baidu or qihucdn.com to serve government-provided JavaScript.

It also assumes that the end users ("victims") here don't trust any Chinese certificate authority.

Re:The Great Cannon has been deployed again by thyrsus on Friday December 06, 2019 @11:03PM (#21728384)
I'll speculate that there are sufficient locations failing to use https that they haven't felt a need to use https. I further speculate that China is sufficiently entangled with the international internet that they would prefer not to have their certificate authorities de-listed by the major browser vendors.
Re:The Great Cannon has been deployed again by kortilla on Friday December 06, 2019 @10:47PM (#21728338)
> But to answer your question more directly, yes they clearly know what they are suggesting.

Highly unlikely, or else the suggestion would be to just ban http all-together. Http without the ability to load resources from other domains would break the majority of sites.

Re:The Great Cannon has been deployed again by collsni on Friday December 06, 2019 @07:49PM (#21727653)
Tls sadly won't make a difference.