News for hackers. Stuff that matters.
Re:Browser extensions are underrated: the promise of hackabl... by idoubtit on Monday July 29, 2019 @01:44PM (#20557232)
I believe many people should attempt to create their own web extension, even if they don't publish it.

In my younger years, I used to crack and hack software just for fun. Those were my Softice years. Later, when Opera was not Chromium based, I also had several site customisations, since it was very easy to add my own JS and CSS to any web site.

Nowadays, I have 4 extensions created and tailored for my needs. One that deals with cookies (mostly "delete everything" outside of my white list) and three that add functionalities to specific sites (automating, managing lists, hiding or highlighting content, etc). Building them was fun, though not as much fun as playing against "copy protections" long ago: like going from competitive chess to creative DIY.

The only pain with custom made extensions is that Firefox is very reluctant to load them. I don't want to upload them them on some Mozilla server, so I have to enter some cryptic "about:..." URL, then click and navigate to my extension, for every extension at every browser start. This is one of the main reasons I'm using more Vivaldi than Firefox these past months.

Re:Browser extensions are underrated: the promise of hackabl... by zeta0134 on Monday July 29, 2019 @04:45PM (#20559238)
You can work around this by running Firefox Developer, which is able to disable Mozilla's signing requirements. That edition of the browser actually respects xpinstall.signatures.required, so just toggle that, zip your extension, rename to .xpi, and install. It'll warn you once, proceed, and persist through browser restarts just like any other extension.

Obviously that's no help if you want to distribute the extension (we have to jump through hoops at our organization to push out a manifest) but for personal use I find it to be a good workaround.

Re:Browser extensions are underrated: the promise of hackabl... by mehrdadn on Monday July 29, 2019 @05:52PM (#20559849)
Re:Browser extensions are underrated: the promise of hackabl... by hiccuphippo on Monday July 29, 2019 @04:25PM (#20559008)
I make extensive use of the Tampermonkey (for javascript) and stylus (for css) extensions. I probably don't have access to some of the browser's APIs but it is easier to create and edit scripts with them.
Re:Browser extensions are underrated: the promise of hackabl... by TeMPOraL on Monday July 29, 2019 @05:05PM (#20559454)
Seconded. Both of those plugins are excellent for end-user improvements, because they let you simply add code to be run on a given site or set of sites. No nonsense with packaging and building and programming environments; you can just write the code you need in the browser, as you need it.
Re:Browser extensions are underrated: the promise of hackabl... by nemosaltat on Monday July 29, 2019 @05:21PM (#20559588)
3rded. I use the @updateurl and @version and save my scripts in Google Drive with a public URL. To update, I can just increment the version in the hosted copy, then reload tamper monkey. Has the bonus of quick and dirty revision history.
Re:Browser extensions are underrated: the promise of hackabl... by idoubtit on Tuesday July 30, 2019 @02:12AM (#20562464)
The irony is that I ported two of my old user scripts to web extensions. With old Opera, userJS was native, while TamperMonky is a (big) web extension. I had performance problems with TamperMonkey, so I rewrote my scripts to avoid this layer.

Pros of TamperMonkey/userJS:

- Allows live editing (with syntax highlighting) with immediate refresh, all in the browser. This is handy for minor changes on small files, but slow for big files.

- Direct access to some HTML5 APIs that are restricted in extensions. I don't recall if that was the case with TamperMonkey, but OperaJS allowed plain AJAX and WebStorage usage, just as if the file was included in the web page.

Cons:

- Slower than extensions.

- Less powerful (cannot add a button in a browser bar, etc)

- Painful as code grows. An extension allows simple splitting of code into several files. I found UserJS harder to maintain.

- Cannot load JS _and CSS_ like an extension does. Another extension like Stylus is needed.

Re:Browser extensions are underrated: the promise of hackabl... by dbandstra on Monday July 29, 2019 @04:21PM (#20558954)
I think this is a great idea. I maintain a personal extension as well. I've experimented with a few ideas for augmenting browser experience, but so far I'm mostly just hiding obtrusive elements on various websites (mostly by CSS, with some JS where sites obfuscate class names).

Even that would have taken multiple thirdparty extensions to accomplish - and probably would have required giving very broad permissions to them. Worth noting that Stylish, one of the extensions I might have used, was compromised with spyware a few years ago.

As for publishing, I don't publish mine because it forms a kind of personal fingerprint. The more I add to it the more personal it gets. I rather support the idea of everyone having their own custom extension. You can really improve your online quality of life and with the WebExtension API it's pretty painless.

Re:Browser extensions are underrated: the promise of hackabl... by roryokane on Tuesday July 30, 2019 @11:12PM (#20571433)
Though Stylish was compromised, you can safely use the fork Stylus that was created in response: https://github.com/openstyles/stylus

I use Stylus to add custom CSS to sites and Violentmonkey (https://violentmonkey.github.io/) to add custom JS. They both make it fairly easy to start writing code for a new site. However, there is no easy way to set up both custom CSS and custom JS for a single site – a custom browser extension like you made could potentially support that better.

Re:Browser extensions are underrated: the promise of hackabl... by heavenlyblue on Monday July 29, 2019 @06:30PM (#20560156)
Is Stylish still compromised?
Re:Browser extensions are underrated: the promise of hackabl... by nodja on Monday July 29, 2019 @02:57PM (#20558060)
Aside of your cookie extension, the other 3 could probably have been done with userscripts. I often find a missing feature in a website that I add with userscripts. There's also user created userscripts for several websites, like a webcomic reader that preloads pages from several webcomic websites so you don't have to wait on the slow ones.
Re:Browser extensions are underrated: the promise of hackabl... by danShumway on Monday July 29, 2019 @02:22PM (#20557656)
I believe Firefox Dev edition allows you to disable the signing requirement[0].

I do wish the requirements around signing were less stringent, but I'm fine using Dev Edition as a daily driver for now.

[0]: https://support.mozilla.org/en-US/kb/add-on-signing-in-firef...

Re:Browser extensions are underrated: the promise of hackabl... by Wowfunhappy on Monday July 29, 2019 @02:55PM (#20558045)
But then you're using the beta channel instead of the stable channel. It's great that you're fine with that, but everyone shouldn't have to.

At the absolute least, Mozilla should make Unbranded auto-update.

Re:Browser extensions are underrated: the promise of hackabl... by the_pwner224 on Monday July 29, 2019 @09:28PM (#20561248)
I've been using FF nightly - the most untested version, hot off of git - for two years and have yet to encounter a single bug which I could not reproduce in normal FF (mainly rare crashes on certain sites some of the time).
Re:Browser extensions are underrated: the promise of hackabl... by Wowfunhappy on Tuesday July 30, 2019 @07:37AM (#20563875)
With all respect, I think that Mozilla has a lot more testers than just one person. If the beta channel (or nightly) was truly bug free, it would be turned into the release channel.

In other words, there is presumably a reason the release channel exists. As long as it does, the desire to use the release version alongside unsigned extensions is reasonable, and there should be a supported pathway.

Re:Browser extensions are underrated: the promise of hackabl... by scarface74 on Monday July 29, 2019 @02:18PM (#20557617)
Besides having to do it on every restart, that’s a good thing. It should be convoluted to do unsafe operations to protect the average user but allow the advanced user flexibility.
Re:Browser extensions are underrated: the promise of hackabl... by chipperyman573 on Monday July 29, 2019 @04:30PM (#20559073)
That would be a good argument if using only the approved channels protected users, but a lot of extensions have malware that sell user data, including ones in stores. https://www.inc.com/jason-aten/the-browser-extensions-you-us...
Re:Browser extensions are underrated: the promise of hackabl... by scarface74 on Monday July 29, 2019 @04:31PM (#20559091)
I’m the last person who is going to defend the security architecture of browser plugins.

But, when Google tried to implement an ad blocking architecture that wouldn’t allow third parties access to your browsing history similar to that of Safari, geeks were up in arms.

Re:Browser extensions are underrated: the promise of hackabl... by chipperyman573 on Monday July 29, 2019 @04:42PM (#20559207)
The ad blocking changes also prevented blocking the request to the ad servers, which is what people were upset about (or at least, why I was upset). I don't remember seeing anyone be upset about anything related to browsing history.
Re:Browser extensions are underrated: the promise of hackabl... by scarface74 on Monday July 29, 2019 @05:05PM (#20559451)
No one was upset about a plug in not getting access to your browsing history. People were upset about the declarative ad blocking that took away some of the features that they ad blockers previously had and said Google was doing it to protect their business.

I’m not going to defend Google’s overall business practices, but from what I understand, it’s the same type of architecture that Apple has had for four years and no one said Apple’s intentions were nefarious.

Re:Browser extensions are underrated: the promise of hackabl... by gildas on Monday July 29, 2019 @05:21PM (#20559594)
Some also claim that Google kills innovation. Synchronous interception of requests allows developers to program sophisticated rules to fight malicious resources. In the future, they will only have a regular expressions list to block domains. It will be much easier for malicious actors to bypass this feature.
Re:Browser extensions are underrated: the promise of hackabl... by bradknowles on Monday July 29, 2019 @05:49PM (#20559821)
I want whitelist-only. No blacklists, unless that's something to be applied after the whitelisting step.

So, no -- Google's method is not sufficient.

Re:Browser extensions are underrated: the promise of hackabl... by therealx on Monday July 29, 2019 @10:04PM (#20561468)
Sounds kinda like a firewall would server you better. Not that I don't think you should or shouldn't be able to have this feature.
Re:Browser extensions are underrated: the promise of hackabl... by scarface74 on Monday July 29, 2019 @06:57PM (#20560350)
You really want an extension that limits your ability to access only a certain number of websites?
Re:Browser extensions are underrated: the promise of hackabl... by closeparen on Tuesday July 30, 2019 @12:23AM (#20562127)
It’d be interesting to have one sandbox that can synchronously intercept requests, and one sandbox that can make its own requests, but only a one way communication channel between them. So the interceptor part can have its own stateful logic and access the blacklist, but not exfiltrate your history.
Re:Browser extensions are underrated: the promise of hackabl... by scarface74 on Monday July 29, 2019 @05:48PM (#20559819)
It also allows developers to intercept your entire browsing history. If you care about your privacy, why would you let a random third party intercept all of your browsing history?
Re:Browser extensions are underrated: the promise of hackabl... by gildas on Monday July 29, 2019 @06:05PM (#20559956)
I consider everything to be a matter of risk in terms for example of privacy. By installing an extension like uBlock, I am indeed taking the risk you mentioned. However, I consider that the risk will be much higher when installing an extension that is based only on a list of regular expressions for the reason I mentioned. If uBlock did a bad thing, I'll know very quickly and all I'll have to do is install an alternative extension.

I am also a developer. I would like to continue to have the right to code such extensions for myself.

Re:Browser extensions are underrated: the promise of hackabl... by scarface74 on Monday July 29, 2019 @06:46PM (#20560258)
So how many consumers would know if uBlock did something bad? Should we optimize security for the minority or the majority?
Re:Browser extensions are underrated: the promise of hackabl... by hnaccy on Monday July 29, 2019 @07:14PM (#20560479)
Why is better to fix adblocking capabilities at model that is borderline insufficient now let alone in 10 years.

There is arms race and you want adblockers (good guys) to give up any improvements in perpetuity, that is a recipe for losing.

Me installing uBlock for parents has improved their browser experience and security. I'd rather risk uBlock being compromised and having to phone them to uninstall it than have them being at the mercy of adtech, spyware, and scammers companies in 5 years.

Re:Browser extensions are underrated: the promise of hackabl... by scarface74 on Monday July 29, 2019 @07:45PM (#20560708)
How many incidents have we seen where the ad blockers are the bad guys? I don’t recall seeing any third party ads when browsing with Safari on iOS with 1Blocker that uses this architecture.
Re:Browser extensions are underrated: the promise of hackabl... by lern_too_spel on Tuesday July 30, 2019 @12:36AM (#20562176)
Edge for Android has that model. While trying it, I frequently got stopped by adblocker blockers. Firefox for Android runs uBlock Origin and never has that problem.
Re:Browser extensions are underrated: the promise of hackabl... by gildas on Monday July 29, 2019 @07:14PM (#20560475)
Google would remove uBlock from my PC before I even know it and I would notice it very quickly (unfortunately).

A personal computer has always been very complicated and using it has always been a risk in itself. I remember a time when a virus could damage the computer's hardware, and someone who knew how to program in BASIC (edit: or LOGO) was not considered as a "minority".

My point of view is that we need to make users aware of the risks and make them more responsible because things will not get any easier.

No need to optimize, I switched to Firefox, the browser for the minorities ;). I really liked Chrome though.

Re:Browser extensions are underrated: the promise of hackabl... by scarface74 on Monday July 29, 2019 @07:43PM (#20560697)
My point of view is that we need to make users aware of the risks and make them more responsible because things will not get any easier.

How has that been working for the last 30 years? Why would it start now?

Computers have been mainstream consumer appliances since the “multimedia PCs” were a thing in the mid 90s. Most people no more want to program computers than they want to fix their own cars.

Re:Browser extensions are underrated: the promise of hackabl... by bradknowles on Monday July 29, 2019 @05:47PM (#20559809)
With respect, Google is not Apple, and Apple is not Google.

I think a lot of people would say that Google is a pretty evil company in many respects, whereas Apple isn't exactly 100% saintly, but at least their profit and business goals align more closely with what is generally considered to be good for customers.

Re:Browser extensions are underrated: the promise of hackabl... by scarface74 on Monday July 29, 2019 @07:11PM (#20560456)
I’m definitely an Apple customer - our cell phone plan has 6 devices and we have two AppleTVs. But playing devil’s advocate, Apple’s business model only allows a small percentage of upper income people globally to be able to afford their products. Android and Google have done a lot more to bring computing to the masses than Apple. The cheapest iPhone that you can buy is $475 over $200 more than the average selling price of an Android phone.
Re:Browser extensions are underrated: the promise of hackabl... by saagarjha on Monday July 29, 2019 @07:38PM (#20560655)
iPhone 7 is $449 on Apple's website.
Re:Browser extensions are underrated: the promise of hackabl... by scarface74 on Monday July 29, 2019 @07:46PM (#20560722)
$26 less. That really makes it a lot more affordable compared to a $200 Moto G.
Re:Browser extensions are underrated: the promise of hackabl... by gpm on Monday July 29, 2019 @08:44PM (#20561055)
Google never did any such thing.

The proposed change that would have made ad blocking impossible still allowed non blocking request interception, it would have absolutely 0 impact on people trying to sell your browsing data via an extension, and a huge net increase in people selling your browsing data by people selling your browsing data by website embedded trackers.

Re:Browser extensions are underrated: the promise of hackabl... by TeMPOraL on Monday July 29, 2019 @05:04PM (#20559437)
Not sure if you're talking about the recent Chrome drama, but if so, "geeks were up in arms" because the new architecture essentially neutered ad blockers through the limits imposed on the block lists.
Re:Browser extensions are underrated: the promise of hackabl... by scarface74 on Monday July 29, 2019 @05:08PM (#20559486)
That’s worked well for Safari for four years.
Re:Browser extensions are underrated: the promise of hackabl... by chipperyman573 on Monday July 29, 2019 @05:39PM (#20559730)
It's worked well on safari because most of its users are people who don't care about those limits. Traditionally safari has been a relatively closed ecosystem (I haven't used it in a long time but I remember an entire lack of support for extensions at one point), so the people who would care about these changes never used it to begin with.

So now, when safari comes in with these changes that only add value compared to their previous offering (which again was substantially behind the competitors), users respond positively because the only users that remain don't know the difference between blocking the rendering of an ad and blocking the request to the ad server. So, when they hear "Ads are blocked", they don't understand the nuances that reveal to you that ads are not really blocked at all from a privacy perspective.

The reason Chrome didn't have a similar response is because the people who cared about these changes were already using chrome. So, when chrome announced an update that removes these privacy-protecting features, the users were knowledgeable enough to realize what the changes actually meant from a privacy perspective, and so responded poorly.

And even if the users were the same, safari added a feature (you can now kind of block ads in safari, compared to the zero adblocking you could do before), whereas chrome is removing a feature (you can no longer block requests to ad servers, something you could do for years). So of course the reaction to safari will be at worst lukewarm, because compared to the previous editions of safari it was an improvement.

Re:Browser extensions are underrated: the promise of hackabl... by scarface74 on Monday July 29, 2019 @05:51PM (#20559842)
Safari had plugins from day one. As far as I know. Here is an early plug in from 2010 ( https://www.cultofmac.com/47232/macheist-tweaks-gruber-with-...)

But speaking of “closed”, where is the ad blocking extension for Chrome on Android and embedded web views?

Re:Browser extensions are underrated: the promise of hackabl... by chipperyman573 on Monday July 29, 2019 @05:57PM (#20559895)
It's nowhere, which is the point. I bet if they were to add manifest V3 (the thing people are upset about) to chrome for Android, it would be received much more positively than this.
Re:Browser extensions are underrated: the promise of hackabl... by scarface74 on Monday July 29, 2019 @07:01PM (#20560384)
This is what I meant. The content blocking framework that works with both Safari on iOS and the newer web view has been around for four years.
Re:Browser extensions are underrated: the promise of hackabl... by TeMPOraL on Monday July 29, 2019 @05:01PM (#20559414)
Adds friction. Ideally user-made extensions should be more trusted and easier to work with than Internet-sourced ones. I can understand that in practice, if user can make something, the user can also be convinced by an attacker to selfpwn through, but we ought to accept some level of that risk.
Re:Browser extensions are underrated: the promise of hackabl... by scarface74 on Monday July 29, 2019 @05:08PM (#20559479)
Why is adding friction for advanced cases a bad thing? How is the browser suppose to know whether the user wrote the extension or downloaded it from the internet?

We already see what happens when users download extensions and toolbars willy nilly.

Re:Browser extensions are underrated: the promise of hackabl... by TeMPOraL on Monday July 29, 2019 @05:26PM (#20559627)
Depends on your goal.

If you want the computer to be "bicycle for the mind", you want to reduce friction so that "advanced" use isn't really "advanced", but normal. See also Hypercard, or how people use Excel in offices, or secretaries that extended Emacs because they didn't know writing Lisp was "programming", or countless other stories of end-user improvements.

If you want the computer to be a digital television set, or a digital collection of appliances, then sure - let's lock everything down, so that you can only do what you're allowed to by the vendors, and only through means allowed by the vendors. This is the scenario in which you want to add friction to end-user "advanced" use.

> How is the browser suppose to know whether the user wrote the extension or downloaded it from the internet?

It cannot be done in general - if a user can do something manually, a sophisticated piece of malware running outside of the browser can simulate too. But I think there's ways to add warnings without increasing friction. Having to manually re-enable each and every user-created extension on browser restart is IMO way too much friction. Being shown a warning about those extensions on each browser restart, but keeping them running sounds more reasonable.

Re:Browser extensions are underrated: the promise of hackabl... by scarface74 on Monday July 29, 2019 @06:04PM (#20559947)
Computers stopped being for enthusiasts by the early 90s - about the last time HyperCard was updated coincidentally. I remember the change well, it was around that time where the back of the InCider magazine stopped including code listings for interesting assembly language extensions for Basic and started listing “power users” tips.

Yes, I agree that having to re-enable extensions every time is too much, but going through contortions once isn’t.

Re:Browser extensions are underrated: the promise of hackabl... by wutbrodo on Monday July 29, 2019 @05:45PM (#20559791)
I feel like having a big scary warning would be sufficient instead of making it inconvenient. It's easy for a competent user to ignore a warning that they fully understand while it scares off those that are clueless.
Re:Browser extensions are underrated: the promise of hackabl... by aswan on Tuesday July 30, 2019 @06:17PM (#20569761)
The issue isn't about having a sufficiently scary warning. It is that the browser has to store the fact that the user has agreed to this warning somewhere (ie, presumably in the user's profile). That means any other software running on the computer with regular user permissions can make the same modification to the profile and then install an unsigned extension without the user's consent.

Typically, when Mozilla finds out about software installing extensions without user consent, the extension is added to the blocklist, but if the extension is unsigned it can just claim that it is ublock origin or adblock plus or some popular extension, leaving no practical way to block it.

This is described in greater detail at https://blog.mozilla.org/addons/2015/04/15/the-case-for-exte...

(in full disclosure, I am a Mozilla employee)

Re:Browser extensions are underrated: the promise of hackabl... by wutbrodo on Wednesday July 31, 2019 @02:38PM (#20576980)
Ah thanks, that's useful context. I was responding primarily to the claim that convolutedness is necessary to protect unsophisticated users, which I interpreted as meaning that the complexity of the UI scares users off. But this is a separate technical limitation that makes a lot of sense.
Re:Browser extensions are underrated: the promise of hackabl... by stordoff on Monday July 29, 2019 @06:01PM (#20559919)
It's also easy to ignore a warning you don't understand. I know from helping family they don't particularly care what warnings say - they have work to do, and they do know clicking OK makes it go away.
Re:Browser extensions are underrated: the promise of hackabl... by scarface74 on Monday July 29, 2019 @06:00PM (#20559916)
People ignore warnings - they have since the dawn of personal computers. You remember Vista UAC?

Why optimize for the 1% instead of the 99%?

Re:Browser extensions are underrated: the promise of hackabl... by wutbrodo on Wednesday July 31, 2019 @02:42PM (#20577005)
UAC was simultaneously seemingly ubiquitous and not a particularly "scary" warning. It just sounded like bland computer jargon to the uninformed. I was envisioning something like the https warnings that Chrome gives: a clear warning sign that uses emotionally loaded terms like "go back to safety" and hides the proceed link under the fold.

That being said, it's entirely possible that I'm overestimating the intelligence of the average user and that many of them wouldn't blink even in the face of a warning made up to look scary.

Re:Browser extensions are underrated: the promise of hackabl... by cmroanirgo on Monday July 29, 2019 @04:33PM (#20559125)
I've been on both sides of the fence in this one, and agree with both arguments. Perhaps FF could add (if it doesn't have it already) an about:config setting that allows reloads, perhaps from a specific folder(s).
Re:Browser extensions are underrated: the promise of hackabl... by scarface74 on Monday July 29, 2019 @07:03PM (#20560398)
It’s really not that hard to have a setting that allows an extension to run every time and hash the extension. If the hash changes, it’s disabled until you re-enable it.
Re:Browser extensions are underrated: the promise of hackabl... by chriswarbo on Tuesday July 30, 2019 @10:00AM (#20564902)
As another anecdote, I made a couple of Chrome extensions years ago to improve my development workflow:

- One would switch to an existing tab with the same URL, instead of opening a duplicate. This made it easier to click URLs in error/debug messages without making the browser unmanageable (IIRC this was just a copy/paste of someone else's extension, which didn't work without me fiddling it)

- One would add keybindings to the output of Drupal integration tests. These tests would say things like 'visit X', 'click the Y button', 'enter Z in the form', etc. and would save each page, so if a test failed each step could be viewed in a browser. The only problem was this is tedious, so I made an extension which bound the left/right cursor keys to stepping through these pages. Made it much easier to skip through the setup and get to the bug (e.g. adding items to cart, when the problem is in checkout).

Re:Browser extensions are underrated: the promise of hackabl... by harshreality on Monday July 29, 2019 @09:42PM (#20561328)
> One that deals with cookies (mostly "delete everything" outside of my white list)

That sounds a lot like the "Cookie AutoDelete" FF extension.