Live data from Hacker News

A proposal to restrict sites from accessing a users’ local network

github.com

81–90 of 392 posts

Re: A proposal to restrict sites from accessing a users’ local network

#81

This seems like a silly solution, considering we are in the middle of IPv6 transition, where local networks use public addresses.

Even IPv6 has local devices. Determining whether that's a /64 or a /56 network may need some work, but the concept isn't all that different. Plus, you have ::1 and fe80::, of course.

Re: A proposal to restrict sites from accessing a users’ local network

#82

Earlier quoted context omitted.

problem is: without allowing it webUIs like synology won't work, since they require your browser to connect to the local network... as it is, it's not great

This proposal is for websites outside your network contacting inside your network. I assume local IPs will still work.

Note that the proposal also covers loopbacks, so domain names for local access would also still work.

Re: A proposal to restrict sites from accessing a users’ local network

#83

This seems like a silly solution, considering we are in the middle of IPv6 transition, where local networks use public addresses.

Even in this case, it could be useful to limit the access websites have to local servers within your subnet (/64, etc), which might be a better way to define the “local” network.

(And then corporate/enterprise managed Chrome installs could have specific subnets added to the allow list)

Re: A proposal to restrict sites from accessing a users’ local network

#84
It's crazy to me that this has always been the default behavior for web browsers. A public website being able to silently access your entire filesystem would be an absurd security hole. Yet all local network services are considered fair game for XHR, and security is left to the server itself. If you are developer and run your company's webapp on your dev machine for testing (with loose or non-existent security defaults), facebook.com or google.com or literally anyone else could be accessing it right now. Heck think of everything people deploy unauthed on their home network because they trust their router's firewall. Does every one of them have the correct CORS configuration?

Re: A proposal to restrict sites from accessing a users’ local network

#85
post #48

This has the potential to break rclone's oauth mechanism as it relies on setting the redirect URL to localhost so when the oauth is done rclone (which is running on your computer) gets called. I guess if the permissions dialog is sensibly worded then the user will allow it. I think this is probably a sensible proposal but I'm sure it will break stuff people are relying on.

IIUC this should not break redirects. This only affects: (1) fetch/xmlhttprequests (2) resources linked to AND loaded on a page (e.g. images, js, css, etc.)

As noted in another comment this doesn't work unless the server responding provides proper CORS headers allowing the content to be loaded by the browser in that context: so for any request to work the server is either wide open (cors: *) or are cooperating with the requesting code (cors: website.co). The changes prevent communication without user authorization.

Re: A proposal to restrict sites from accessing a users’ local network

#86

I like this on the first glance. The idea of a random website probing arbitrary local IPs (or any IPs for that matter) with HTTP requests is insane. I wouldn't care if it breaks some enterprise apps or integrations - enterprises could reenable this "feature" via management tools, normal users could configure it themselves, just show a popup "this website wants to control local devices - allow/deny".

This is a misunderstanding. Local network devices are protected from random websites by CORS, and have been for many years. It's not perfect, but it's generally quite effective. The issue is that CORS gates access only on the consent of the target server. It must return headers that opt into receiving requests from the website. This proposal aims to tighten that, so that even if the website and the network device bot…

I think this can be circumvented by DNS rebinding, though your requests won't have the authentication cookies for the target, so you would still need some kind of exploit (or a completely unprotected target).

Re: A proposal to restrict sites from accessing a users’ local network

#87
post #3

Do note that since the removal of NPAPI plugins years ago, locally-installed software that intends to be used by one or more public websites has to run an HTTP server on localhost. It would be really annoying if this use case was made into an unreasonable hassle or killed entirely. (Alternatively, browser developers could've offered a real alternative, but it's a bit late for that now.)

It would be amazing if that method of communicating with a local app was killed entirely, because it's been a very very common source of security vulnerabilities.

Re: A proposal to restrict sites from accessing a users’ local network

#88

I propose restricting android apps, not websites.

Android apps need UDP port binding to function. You can't do QUIC without UDP. Of course you can (should) restrict localhost bound ports to the namespaces of individual apps, but there is no easy solution to this problem at the moment.

If you rely on users having to click "yes", then you're just making phones harder to use because everyone still using Facebook or Instagram will just click whatever buttons make the app work.

On the other hand, I have yet to come up with a good reason why arbitrary websites need to set up direct connections to devices within the local network.

There's the IPv6 argument against the proposed measures, which requires work to determine if an address is local or global, but that's also much more difficult to enumerate than the IPv4 space that some websites try to scan. That doesn't mean IPv4 address shouldn't be protected at all, either. Even with an IPv6-shaped hole, blocking local networks (both IPv4 and local IPv6) by default makes sense for websites originating from outside.

IE did something very similar to this decades ago. They also had a system for displaying details about websites' privacy policies and data sharing. It's almost disheartening to see we're trying to come up with solutions to these problems again.

Re: A proposal to restrict sites from accessing a users’ local network

#89

What is so hard in blocking apps on android from listening on random ports without permission?

The same thing that makes blocking ports on iOS and macOS so hard: there's barely any firewall on these devices by default, and the ones users may find cause more problems than users will ever think they solve.

Listening on a specific port is one of the most basic things software can possibly do. What's next, blocking apps from reading files?

Plus, this is also about blocking your phone's browser from accessing your printer, your router, or that docker container you're running without a password.

Re: A proposal to restrict sites from accessing a users’ local network

#90
post #72
post #54

Earlier quoted context omitted.

This needs more detail to make it clear what you are wishing for that will not happen. It seems like you're thinking of a specific application, or at least use-case. Can you elaborate? Once you're launching an application, it seems like the application can negotiate with the external site directly if it wants.

#1 use case would be a password manager. It would be best if the browser plugin part can ping say, the 1password native app, which runs locally on your pc, and say "Yo I need a password for google.com" - then the native app springs into action, prompts for biometrics, locates the password or offers the user to choose, then returns it directly to the browser for filling. Sure you can make a fully cloud-reliant PW mana…

Browser extensions play by very different rules than websites already. The proposal is for the latter and I doubt it is going to affect the former, other than MAYBE an extra permanent permission.
Post reply on HN