It turns out Google Chrome ships a default, hidden extension that allows code on `*.google.com` access to private APIs, including your current CPU usage

You can test it out by pasting the following into your Chrome DevTools console on any Google page:

chrome.runtime.sendMessage(
"nkeimhogjdpnpccoofpliimaahmaaome",
{ method: "cpu.getInfo" },
(response) => {
console.log(JSON.stringify(response, null, 2));
},
);

More notes here: https://simonwillison.net/2024/Jul/9/hangout_servicesthunkjs/

hangout_services/thunk.js

It turns out Google Chrome (via Chromium) includes a default extension which makes extra services available to code running on the *.google.com domains - tweeted about today by Luca Casonato, โ€ฆ

Simon Willisonโ€™s Weblog
@simon Interesting! Can this perhaps be used for fingerprinting? ๐Ÿ‘€
@djh yeah, I imagine the fingerprinting risk is why they don't expose this functionality to everyone else
@simon @djh fingerprinting for me, not for thee
@simon @djh I thought it was already established that Google fingerprints you via your account. I think making it private to them keeps others from using it for fingerprinting, but I apologize if I'm missing the point.

@webology @simon @djh I think the interesting part will be when Europe looks at this and invokes the DMA which should AFAIK apply here.

If this would be the case and if they would rule to open it up for everyone not just the company who already got all your data will be using it. :/

@fallenhitokiri Or google could just remove their backdoor.
@SiteRelEnby while Iโ€™d obviously prefer that I honestly donโ€™t see Google make an ethical decision at this point :/
@simon But why would Google themselves need it for fingerprint given that the control the whole browser? Or do you mean "they need it for something else but it could be used for fingerprinting by others"? @djh
@stefan @simon @djh this is what I would mean by this statement, yeah.
@simon does that mean other extensions that can modify data on *.google.com can also use that extension?
@Rairii @simon Yep, absolutely. Other extensions can simply request access to system.cpu API however, it isnโ€™t the kind of permission that will cause alarms to go off.
@simon Good find! The next step will be to figure out how itโ€™s used. On which websites is the extension called?
@simon Reminds me of my blog post about How Firefox gives special permissions to *some* domains. https://frederikbraun.de/special-browser-privileges-for-some-domains.html
How Firefox gives special permissions to some domains

How Firefox gives special permissions to some domains

Frederik Braun
@freddy @simon Well, at least in Firefox's case it doesn't seem to give an unfair advantage to Mozilla or something.
@freddy @simon the Firefox features make sense though, don't they? ๐Ÿค”
@simon i can confirm this also works in chromium, where it is enabled in Arc Browser
@ShadowJonathan @simon It didn't work for me in a chromium incognito window.
@akkana @simon you need to do it on a google.com website

@ShadowJonathan @simon I was on google.com. Not signed in, though; maybe it only works if you're signed in to a Google account? The error message is: Uncaught TypeError: Cannot read properties of undefined (reading 'sendMessage') at <anonymous>:1:16

That's from the console I get with from "Inspect" in the context menu, then Console. If I use the hamburger menu More Tools->Developer Tools console, I get: Uncaught TypeError: chrome.runtime.sendMessage is not a function at <anonymous>:1:16

@simon isn't this just the "I agree to share usage metric" EUA we all clicked through? Or is this running even if we unselected that checkbox?

@simon There's plenty of Google-only or $bigco special-case code in Chromium, unfortunately. IIUC they only implement things like this as last resort.

A lot of these predate modern Web APIs that provide access to the same data/functions, others are needed for complex auth stuff (like smartcards or zero-trust auth), others are needed by ChromeOS components for the OS to work. Many hardcoded allowlists are for third-party extensions by big companies for certain code paths.

@AlesandroOrtiz @simon But either itโ€™s ok for general consumption, and then it should be allowed everywhere, or itโ€™s not ok for general consumption, and then it shouldnโ€™t be allowed for Google domains either.

Why should Google domains be treated differently when it comes to smartcard access? And why should Google get a pass on updating their code to newer APIs when everyone else is forced to?

@simon There's a list of methods you can try here:

https://chromium.googlesource.com/chromium/src.git/+/main/chrome/browser/resources/hangout_services/thunk.js

Also looks like the list was bigger in previous versions
chrome/browser/resources/hangout_services/thunk.js - chromium/src.git - Git at Google

@simon Hmm, the code doesn't do anything on Cromite (github.com/uazo/cromite), perhaps the extension is removed? Because the error I get is:
"VM68:1 Uncaught
TypeError: Cannot read properties of undefined (reading 'sendMessage')
at <anonymous>:1:16
(anonymous) @ VM68:1"

@simon It's such a 'mundane' thing to have a built-in advantage over your competitors when you're working at Google...๐Ÿค”

Who gives a fuck about fairness, amirite?

@simon

That's officially malware, right?

@simon

I have no way to test this on desktop. /s

Does this misfeature exist on old chrome on Android?

I am guessing yes because likely Chrome always had a backdoor. But, maybe not.

@simon Microsoft tried to warn us. They told us we'd be scroogled. Now look at us? We've all been scroogled...

Ah well.

Firefox
https://www.mozilla.org
and list of Searx instances
https://searx.space/
go brrr

Mozilla - Internet for people, not profit (US)

Weโ€™re working to put control of the internet back in the hands of the people using it.

Mozilla

@hopland @simon Mozilla telemetry, anyone?

Librewolf
https://librewolf.net
go brrr

LibreWolf Browser

A custom version of Firefox, focused on privacy, security and freedom.

@simon I use firefox compiled on Gentoo Linux :)
@simon time to complain to the EU commission about their abuse of monopoly and power such that Google will force them to open access to those APIs to any site.
@simon Not knowing how '*' is implemented, I'm concerned that it might it used on other websites matching `*.google.com`, such as https://my.malevolence.site/.google.com.

@simon

I got worried, and then I remembered that I had stopped using Chrome.

@simon For what it's worth, Edge is sufficiently 'Chromed' that it does the same there too ...
Although on a non-google site it offers me "Explain Console errors by using Copilot on Edge" 
@simon Yet another reason why NOBODY SHOULD BE USING THAT MULTICOLOURED PIECE OF SHIT!
@simon This also appears to be present in @Vivaldi

@jsparknz @simon @Vivaldi I did some testing and found that you can disable it in Vivaldi by turning off the Google Meet support in Vivaldi's Privacy and Security settings.

https://notes.kvibber.com/@kelson/statuses/01J2CQHARWXZ957D8RJ2Z4NNRH

Mine was already turned off, but I don't know what the default is, since I installed it so long ago and don't remember what settings I changed at the time.

Post by Kelson, @[email protected]

@[email protected] @[email protected] @[email protected] @[email protected] AHA! I'm using Vivaldi's built-in ad blocker, not uBlock, and turning it off didn't make a difference. BUT There is a section in Vivaldi's Privacy and Security settings for Google Extensi...

notes.kvibber.com
@kelson @simon @Vivaldi Thank you for sharing that. I tried it out and turning it off works. It does seem to me something that should be off by default, though.
@simon huuuuh. I wonder if Edge has an equivalent for Bing or MS domains?

(not that theyโ€™d technically need it, seeing as most people using Edge are also probably using Windows)
@simon Iโ€™m old enough to remember when Microsoft got consent decreeโ€™d for this sort of thing. I suppose thatโ€™s a quaint idea these days.

@simon

All the more reason to move all Google services under *.google.com instead of dedicated domains like gmail.com, etc

@simon Not near a laptop ATM but does this CLI flag disable it --disable-component-extensions-with-background-pages

IME you can see most hidden Chrome extensions via chrome://system

@simon I'm just wondering how many things goes wrong on modern websites, if I set "*.google.com" and affiliated sites in Blocklist of my opnsense router ๐Ÿค”

Google really belongs to the same category, like facebook and chinese toktik ๐Ÿ˜‚

@simon for real, shut down that company... Too much control of the market. They literally can do whatever they want and people are pretty much forced to go along with it, because it's way too embeded in everyday tasks.
@simon whoa, didn't Microsoft get in trouble with hidden apis in the 90s? (although, Apple has a bunch now too... Ugh)
@simon
I've been slowly moving away from corporate software for just this reason
@simon Yes, works on chrome on Google pages. Fascinating! Thank you for sharing this!

@simon

That's a bit of a shocker. Neat technique though.

@simon Microsoft did this too, I hope Apple and Mozilla aren't doing it too...
@simon Interesting: ungoogled chromium (top) does not have the API, but regular chromium (bottom) _has_ it, too!
@simon Seems like this is happening on @Vivaldi as well; can you folks have a look at it?