News for hackers. Stuff that matters.
Re:Firefox Profilemaker by xte on Monday December 03, 2018 @04:02PM (#18592962)
As a FF user (and a browser's user in general) I found actual browsers absurd monsters that service like ffprofile only try to mitigate. Few example: any complex enough software offer config files/dir. normally human readable and manageable. I can easily install plugins in Emacs via a simple config edit, same for (n)vim, same for zsh or fish, I can change my OS (NixOS) with a simple human-readable config file. Same for GuixSD, same for services etc in nearly all unices.

On FF however I found no damn simple way to do basic things like:

- install extensions via CLI/wrappers (for instance homeManager), there are some hack but they are not reliable and Mozilla seems to try avoiding supporting such a thing;

- configure preferences, like about:config, outside firefox;

- customize ff themes in a simple manner.

Modern browsers seems to mimic the most closed commercial OSes I know of instead of mimic classic FOSS model and that's a big problem.

Today I can easily automate my entire desktop, but browsers and they demand more and more settings and third parties tools/extensions to be "at least less unsafe" for us users (from firejail/capsicum to cookies deleters, adblockers etc.

That's a horrific mess.

Re:Firefox Profilemaker by mrmr1993 on Monday December 03, 2018 @04:41PM (#18593381)
This seems to be by design: when these things are available, spyware -- especially on Windows -- will be quick to make malicious changes in all these if they can.

It's a pain, but I can see the compromise. If it makes the average Firefox user more vulnerable, there's definitely a case to protect them, even at the expense of its more capable users.

Re:Firefox Profilemaker by rhizome on Monday December 03, 2018 @05:12PM (#18593679)
if spyware has permissions to change ".firefox-prefs" doesn't it have permission to change about:config items, too?
Re:Firefox Profilemaker by mrmr1993 on Monday December 03, 2018 @06:14PM (#18594140)
Yes, this leads Firefox to be fairly conservative with its permissions.

In general, blocking userspace from installing extensions and otherwise running malicious code stops FF from being exploited. Blocking all of these options blocks the OS from bad behaviour, especially where the user may expect a new computer/phone to have the default behaviour.

The vendors of phones and personal computers seem to have an interest in interfering with users' internet access; perhaps it is a good decision that Firefox does not let them.

Re:Firefox Profilemaker by xte on Tuesday December 04, 2018 @07:51AM (#18598918)
Actually homeManager can manage Firefox, installing extensions etc... Only it's a hack-ish and not much reliable way.

So no, actual Mozilla strategy does NOT work to stop malware's on Windows nor commercial OEMs customization, as a matter of fact made only life of pro users and admin harder and open the door for less safe setup (for instance extensions added via homeManager may not get updated by FF).

Re:Firefox Profilemaker by mrmr1993 on Tuesday December 04, 2018 @04:29PM (#18603755)
We would and should expect that it is be possible: unless Firefox signs configuration changes per-user, server-side (violating their privacy intentions), the whole configuration code is open source, and can easily be easily used or reverse engineered to make an external editor.

This doesn't change that a sanctioned API invites abuse far more readily than reverse-engineering, especially when spyware is less frequently updated than Firefox itself. That there isn't a sanctioned API, and that the de facto API can and does change every version, is an advantage for Firefox against potential attackers.

If this is something you are sorely lacking, Firefox has also been straightforward to modify and compile, in my experience. You can always share a patch and enjoy these features as part of a smaller community, without compromising the userbase as a whole.

Re:Firefox Profilemaker by xte on Monday December 03, 2018 @05:22PM (#18593754)
No software trick can fix OS unsafe design. Also "protecting users" limiting their power means jails them, not really protecting.

End users are adult, not child, and developers are others adults with ZERO right on their software's user.

If people want safer systems better learn to avoid commercial software, nothing else can help them.

Re:Firefox Profilemaker by mrmr1993 on Monday December 03, 2018 @06:06PM (#18594080)
I can agree in general, but, for now, disabling a firefox --install maliciousaddon.xpi and firefox --setconfig keyyoudontwant=valueyoudontlike is enough barrier to stop a majority of bad actors. None of us want users to click yes through install screens, having toolbars and spyware installed for the average user, but that has been the reality of those APIs thus far.

Perhaps a more fine-grained permission model is needed for cross-application changes, but I can't think of anybody actively working on it in an OS.

Re:Firefox Profilemaker by xte on Tuesday December 04, 2018 @07:48AM (#18598900)
Having a simple text-based config with a repo, like

[AddOns]

ensure-ffpkg AddonName

[Themes]

set-default ThemeName

install ThemeA, ThemeB

[Settings]

key:val

...

and have the AddonName downloaded with GNUPG signature check from an official Mozilla repo is by far more save that demand using interactive GUIs. Simply ask at startup to accept "potentially dangerous" extensions if you specify a local .xpi file it the same.

What you describe is the classic Windows approach that have proved enough to be ineffective and only useful for commercial practice. Mozilla is formally a foundation and Firefox is formally a FOSS project...

Re:Firefox Profilemaker by AnaniasAnanas on Monday December 03, 2018 @05:26PM (#18593783)
I doubt that nowadays many of the average Firefox users are really average computer users.
Re:Firefox Profilemaker by Semaphor on Monday December 03, 2018 @11:56PM (#18596400)
Our (German) site has mostly photographers who are not very (computer) technically inclined. Yet we have 20% FF users.
Re:Firefox Profilemaker by toastal on Tuesday December 04, 2018 @03:49AM (#18597597)
Firefox​ had color management and color profiles support years before the other browsers. I'd venture to guess this is why it's favorite among photographers.
Re:Firefox Profilemaker by tahnmozbus on Monday December 03, 2018 @09:06PM (#18595332)
I'd also like to point out how many times "this might void your warranty" appears on the following page.

https://support.mozilla.org/en-US/kb/how-stop-firefox-making...

which is a perfectly reasonable and legitimate user request that, the browser not talk to the internet before the user agrees it may.

Re:Firefox Profilemaker by StillBored on Tuesday December 04, 2018 @12:03AM (#18596431)
Which is crazy for a browser that claims to be "privacy focused" that those settings aren't all in the "privacy tab" with the _two_ that are...
Re:Firefox Profilemaker by jolmg on Monday December 03, 2018 @07:57PM (#18594840)
> ... Mozilla seems to try avoiding supporting such a thing

Back when I was trying to manage the configuration of my machines by having a git repository in my home directory or using stow, I got a little upset when I found that firefox stored its configuration in a profile directory with a random prefix. Why would it make it random? It's got to be the only program to do such a thing. I cannot imagine it's for anything other than to annoy people trying to manage its configuration with tools different from their own.

I've since found a way to make the profile directory not have a random prefix, but it still requires doing the change through Firefox's GUI profile manager.

Re:Firefox Profilemaker by bzbarsky on Monday December 03, 2018 @11:48PM (#18596369)
> Why would it make it random?

https://bugzilla.mozilla.org/show_bug.cgi?id=56002 has the long discussion about it, but briefly: the profile directory name randomization was introduced to prevent web sites from being able to place data they control in known locations on your hard drive (via the browser cache) and then use that as a stepping-stone in a privilege escalation.

Re:Firefox Profilemaker by tinus_hn on Monday December 03, 2018 @08:15PM (#18594936)
The name is random so pages on the web can’t reference files in it using the file:// urls.
Re:Firefox Profilemaker by jolmg on Monday December 03, 2018 @08:36PM (#18595086)
If that's dangerous in Firefox, isn't it just as dangerous, if not more, for them to reference other non-firefox files? I can't see this being a proper security measure for anything.
Re:Firefox Profilemaker by tinus_hn on Tuesday December 04, 2018 @05:24AM (#18598107)
It is. The most dangerous part though is when you can access files in the browser cache because scripts in file:// can read files in file:// (so all your files) and you can really easily put files in the browser cache.
Re:Firefox Profilemaker by xte on Tuesday December 04, 2018 @07:54AM (#18598947)
Firejail on GNU/Linux, Capsicum on FreeBSD etc do something for that, and IMO any tech-savvy users should use them.

Basically they restrict browser capabilities to see entire filesystem to the minimum extent possible so an webappp can't download from you your personal ssh settings, plain-text saved passwords in home, secret porn collection etc.

Re:Firefox Profilemaker by ksala on Tuesday December 04, 2018 @04:22AM (#18597798)
about:config preferences can be customized using the user.js files. See https://github.com/pyllyukko/user.js/#installation for some examples.

For addons and other options you can use policies.json file, see https://github.com/mozilla/policy-templates/blob/master/READ...

Re:Firefox Profilemaker by adminu on Monday December 03, 2018 @04:23PM (#18593202)
That is not entirely true, there is a prefs.js in my Profile folder that contains the changes done to my about:config page, if I interpret it correctly.
Re:Firefox Profilemaker by xte on Monday December 03, 2018 @04:27PM (#18593252)
True but certainly not friendly to edit with a big

// DO NOT EDIT THIS FILE.

and an optional user.js separate preference I do not know how reliable...

Re:Firefox Profilemaker by bzbarsky on Monday December 03, 2018 @11:53PM (#18596391)
user.js is the supported and reliable way to set preferences that should just be set no matter what the default configuration is or what about:config says.

prefs.js is the storage for the current non-default pref values. At runtime, default pref values are loaded, then prefs.js, then user.js.

You _can_ edit prefs.js and the effect will be the same as if you changed the pref in about:config, as long as you do it while Firefox is not running against that profile. If you do it while Firefox is running, your changes will be overwritten at shutdown when Firefox writes out then-current in-memory pref values.