News for hackers. Stuff that matters.
Re:Mozilla shouldn't copy Chrome's permission prompt for ext... by kalleboo on Sunday July 03, 2016 @02:42AM (#12025048)
It sounds like a case of overly broad permissions. Have they looked at other permissions models?

For one, extensions should be able to include an explanation why they need each permission.

Network access should be a separate permission like it is for iOS keyboards. It's safer for an ad blocker to read and modify a page if it has no method of exfiltrating the content. Blacklist updates can be done through the regular extension update mechanism.

Looking at the list of permissions in the documentation, a lot of these look like they should be asked for at the time of first use (location, clipboard, screenshots, etc). This would avoid the problem of asking for overly broad permissions upfront "just in case". Android had the same problem.

But in the end, not informing the user is the wrong choice, no matter how bullet-proof you think your vetting process is. You'll always have users who are paranoid (as developers of a camera app on iOS, we've had 1-star reviews left because our app "uploads all your photos to the internet" because we need photo library access) and it's their loss mainly, not yours.

Re:Mozilla shouldn't copy Chrome's permission prompt for ext... by ytpete on Sunday July 03, 2016 @03:01AM (#12025077)
> It's safer for an ad blocker to read and modify a page if it has no method of exfiltrating the content.

The problem is that being able to modify the page is a method of exfiltrating information - e.g. you can add an img tag triggering a GET to an arbitrary URL. I suspect it would be surprisingly tricky to try restricting page modification in such a way that information can't be sent anywhere the page wouldn't have sent it originally.

But +1 on deferring permissions prompts until the moment the app actually needs the privilege, though. It's worked pretty well on iOS, and it's finally coming to Android - maybe it'll come to Chrome or Firefox next.

Re:Mozilla shouldn't copy Chrome's permission prompt for ext... by dgoldstein0 on Sunday July 03, 2016 @05:23AM (#12025360)
couldn't we just give adblockers an api for filtering network requests, that they could just decide to allow or deny requests? And then give them no other internet access?

This seems like an API failure that common jobs for extensions can't be done without scary permissions.

Re:Mozilla shouldn't copy Chrome's permission prompt for ext... by DougBTX on Sunday July 03, 2016 @06:17AM (#12025490)
That's close to the content blocker api in Safari: https://webkit.org/blog/3476/content-blockers-first-look/
Re:Mozilla shouldn't copy Chrome's permission prompt for ext... by robryk on Sunday July 03, 2016 @06:53AM (#12025592)
It could still exfilter information if it could share any state between domains: the evil adblocker is associated with a site that many users visit. The site makes a lot of requests when it's loaded and adblocker exfiltrates information by selectively blocking those requests.
Re:Mozilla shouldn't copy Chrome's permission prompt for ext... by roblabla on Sunday July 03, 2016 @05:55AM (#12025424)
The problem is, many adblockers also have a feature to disable certain DOM nodes inside websites, to avoid embedded ads or remove anti-adblockers. So you'd also need an API to filter out certain selectors... And the list of specialized APIs could continue on and on.
Re:Mozilla shouldn't copy Chrome's permission prompt for ext... by madeofpalk on Sunday July 03, 2016 @09:44AM (#12026014)
Apple kind of solved this problem with the Content Blocker API - all of this is defined in a 'static' list which is used by Safari to block certain things.
Re:Mozilla shouldn't copy Chrome's permission prompt for ext... by iancarroll on Sunday July 03, 2016 @10:19AM (#12026127)
Chrome has an API for this, IIRC. They still need to connect to the internet to update their rule lists, though.
Re:Mozilla shouldn't copy Chrome's permission prompt for ext... by kalleboo on Sunday July 03, 2016 @04:09AM (#12025200)
That's a good point about modifying the page. It could probably be done but there are a LOT of edge cases in there that will be easy to overlook and it would become a constant source of security bugs.

edit: since content blockers in particular are so popular, it might even make sense for them to create a security-conscious content blocker specific API like Apple did

Re:Mozilla shouldn't copy Chrome's permission prompt for ext... by deno on Sunday July 03, 2016 @04:31AM (#12025246)
And Opera, which is based on Chromium: https://www.opera.com/computer/features/ad-blocker

Google’s not rushing to implement this for obvious reasons. They will most likely continue to push AMP and at some point decide to block “malicious ads” or whatever, so that in one move they can both cut out the competition (by being the de facto arbiter of acceptable ad technology) and make sure they don’t negatively affect their business.

It’s still a net positive for the user, at least in the short term.

Re:Mozilla shouldn't copy Chrome's permission prompt for ext... by deno on Sunday July 03, 2016 @04:46AM (#12025271)
You could, in theory, filter those sort of things.

Adding, or modifying any DOM node, to the effect that it includes third-party resources could be denied.

If you also deny adding inline <script> blocks and enforce any injected javascript to run in strict CSP mode it could potentially work.

Re:Mozilla shouldn't copy Chrome's permission prompt for ext... by robryk on Sunday July 03, 2016 @06:55AM (#12025594)
The original page's JS might depend on the DOM tree of the page. Thus a change that doesn't obviously cause any information to be emitted to third parties can cause that JS to do that (e.g. if the JS uses attributed of DOM tree nodes as URLs of data sources or data sinks).
Re:Mozilla shouldn't copy Chrome's permission prompt for ext... by deno on Sunday July 03, 2016 @07:11AM (#12025634)
That’s valid. I still feel it would eliminate at least most of the abuse, like injecting ads though. Unless there’s something very widely deployed (say jQuery etc.) that’s vulnerable.
Re:Mozilla shouldn't copy Chrome's permission prompt for ext... by Manishearth on Sunday July 03, 2016 @03:46AM (#12025154)
> Have they looked at other permissions models?

I believe that's the idea. To make the permissions more finer grained. However, that crosses the line of what can be automatically enforced by sandboxing -- chrome's permissions model is defined by what they can restrict via software. To make it more finer-grained, you need a review process, which Firefox has.

Re:Mozilla shouldn't copy Chrome's permission prompt for ext... by jerf on Sunday July 03, 2016 @12:39PM (#12026602)
"For one, extensions should be able to include an explanation why they need each permission."

Do you mean an English description, provided by the plugin? That would be useless. Malware is hardly going to come out and say that it needs permission to modify all requests so that it can hijack your connection.

If you mean a description that tries to read from what the code is doing why it needs the permissions, that's not much different from just "This app needs access to your location Yes/No?" Inferring "reason" from request patterns isn't going to work.