Original question by @happeningtofry99158@lemmy.world
As a security-conscious user, I've used NoScript since Firefox's early days, but its restrictive nature has become frustrating. I'm often forced to go unprotected just to access websites with multiple scripts running on different domains, which defeats the purpose of using NoScript and balances security and usability that it once provided.
Is there a way to block browser JavaScript from executing commands that retrieve sensitive information from my local machine, while still allowing JavaScript that is only used for rendering web pages?
by sensitive information I'm referring to
- local machine time
- local machine ram
- local machine operating system + version
- local machine hardware
- Serial Number
- Hardware ID
- UUID
- Windows Device ID
- Windows Product ID
- ...
greatly appreciate any insight
10 Comments
vivi@slrpnk.net · 4 pts · 1y
Browser JavaScript is already sandboxed, so there is a limit to the info that can be accessed, though it does expose some of basic information you've listed.
To the best of my knowledge, the only items that can be accessed from the ones you listed are:
an example of the info that can be accessed (via the navigator property) for a Windows pc is:
As you can see it's not a whole lot of information. Certainly there is no way to get the serial number or other hardware information. Also, local files cannot be accessed without permission.
There are some user agent spoofer addons that will change the user agent string. I am not sure but i imagine some of those also allow overriding this navigator information to anonymize that data further. Preventing accessing the user's time zone would be pretty impossible though given how the Date object works.
30p87@feddit.org · 2 pts · 1y
Assuming there are no Bugs/"Features". Which certain companies, which are also amongst the luckiest bugfinders, wouldn't disclose at that level.
vivi@slrpnk.net · 3 pts · 1y
Well, undiscovered vulnerabilities are kind of a special case. You can't do anything about those except turn off your pc entirely. Using NoScript isn't necessarily going to help with those.
30p87@feddit.org · 2 pts · 1y
Depends. I mean stuff like undocumented/hidden properties of Objects leaking more infos than it should, which NoScript does help against. Or creative thinking, like timing certain actions (eg. drawing a canvas) to get a fingerprint and vague information about your system.
Of course, actual RCE/leaking (eg. arbitrary (process) memory reading) in the JS engine itself is another story.
moonwalker@infosec.exchange · 1 pts · 1y
NaibofTabr@infosec.pub · 4 pts · 1y
I've been using JShelter which provides a few different options for handling page load failures. It also works on Firefox mobile.
A couple notes:
lambalicious@lemmy.sdf.org · 2 pts · 1y
I'd venture the only way to block those is to either recompile the browser or somehow use a separate Javascript engine that doesn't provide that info, as it's pretty foundational (as some people mention, localtime is accessible simply by constructing a Date object).
outhouseperilous@lemmy.dbzer0.com · 1 pts · 1y
Qubes? Every window its own vm?
lambalicious@lemmy.sdf.org · 1 pts · 1y
I feel that would be incredibly wasteful (and a browsing session can be several windows, too) for marginal zero or even negative net gain. Browsing would also need to set isolation profiles, because for some tabs, sites or windows you'd certainly want to have access to your localtime (plus it be precise enough). Ditto for each and every potential variable.
The truth is, not everything needs to be containerized.
outhouseperilous@lemmy.dbzer0.com · 1 pts · 1y
You're right. Wall of pi's and a kvm switch.
moonwalker@infosec.exchange · 1 pts · 1y
who@feddit.org · 1 pts · 1y
The Tor Browser and Firefox's Resist Fingerprinting mode hide some of the things that can be used to identify your system, but there is no way to hide them all. Short of avoiding all sites that you don't completely trust, disabling scripts is the best protection available.
Off-site scripts can be blocked on a per-site basis with browser extensions like uMatrix (discontinued by still functional) and uBlock Origin (still maintained but harder to use for this purpose). To be clear, these scripts run on your machine, regardless of where they come from.
nimble@lemmy.blahaj.zone · 0 pts · 1y